1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
2 3 | /// Python handler for operation `EventStreamsOperation`.
|
3 4 | pub(crate) async fn event_streams_operation(
|
4 5 | input: crate::input::EventStreamsOperationInput,
|
5 6 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
6 7 | handler: ::aws_smithy_http_server_python::PyHandler,
|
7 8 | ) -> std::result::Result<
|
8 9 | crate::output::EventStreamsOperationOutput,
|
9 10 | crate::error::EventStreamsOperationError,
|
10 11 | > {
|
11 12 | // Async block used to run the handler and catch any Python error.
|
12 13 | let result = if handler.is_coroutine {
|
13 14 | ::tracing::trace!(
|
14 15 | name = "event_streams_operation",
|
15 16 | "executing python handler coroutine"
|
16 17 | );
|
17 18 | let result = ::pyo3::Python::with_gil(|py| {
|
18 19 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
19 20 | let coroutine = if handler.args == 1 {
|
20 21 | pyhandler.call1((input,))?
|
21 22 | } else {
|
22 23 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
23 24 | };
|
24 25 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
25 26 | })?;
|
26 27 | result.await.and_then(|r| {
|
27 28 | ::pyo3::Python::with_gil(|py| {
|
28 29 | r.extract::<crate::output::EventStreamsOperationOutput>(py)
|
29 30 | })
|
30 31 | })
|
31 32 | } else {
|
32 33 | ::tracing::trace!(
|
33 34 | name = "event_streams_operation",
|
34 35 | "executing python handler function"
|
35 36 | );
|
36 37 | ::pyo3::Python::with_gil(|py| {
|
37 38 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
38 39 | let output = if handler.args == 1 {
|
39 40 | pyhandler.call1((input,))?
|
40 41 | } else {
|
41 42 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
42 43 | };
|
43 44 | output.extract::<crate::output::EventStreamsOperationOutput>()
|
44 45 | })
|
45 46 | };
|
46 47 | // Catch and record a Python traceback.
|
47 48 | result.map_err(|e| {
|
48 49 | let rich_py_err =
|
49 50 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
50 51 | e.clone_ref(py)
|
51 52 | }));
|
52 53 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
53 54 | e.into()
|
54 55 | })
|
55 56 | }
|
56 57 |
|
58 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
57 59 | /// Python handler for operation `StreamingBlobOperation`.
|
58 60 | pub(crate) async fn streaming_blob_operation(
|
59 61 | input: crate::input::StreamingBlobOperationInput,
|
60 62 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
61 63 | handler: ::aws_smithy_http_server_python::PyHandler,
|
62 64 | ) -> std::result::Result<
|
63 65 | crate::output::StreamingBlobOperationOutput,
|
64 66 | crate::error::StreamingBlobOperationError,
|
65 67 | > {
|
66 68 | // Async block used to run the handler and catch any Python error.
|
67 69 | let result = if handler.is_coroutine {
|
68 70 | ::tracing::trace!(
|
69 71 | name = "streaming_blob_operation",
|
70 72 | "executing python handler coroutine"
|
71 73 | );
|
72 74 | let result = ::pyo3::Python::with_gil(|py| {
|
73 75 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
74 76 | let coroutine = if handler.args == 1 {
|
75 77 | pyhandler.call1((input,))?
|
76 78 | } else {
|
77 79 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
78 80 | };
|
79 81 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
80 82 | })?;
|
81 83 | result.await.and_then(|r| {
|
82 84 | ::pyo3::Python::with_gil(|py| {
|
83 85 | r.extract::<crate::output::StreamingBlobOperationOutput>(py)
|
84 86 | })
|
85 87 | })
|
86 88 | } else {
|
87 89 | ::tracing::trace!(
|
88 90 | name = "streaming_blob_operation",
|
89 91 | "executing python handler function"
|
90 92 | );
|
91 93 | ::pyo3::Python::with_gil(|py| {
|
92 94 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
93 95 | let output = if handler.args == 1 {
|
94 96 | pyhandler.call1((input,))?
|
95 97 | } else {
|
96 98 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
97 99 | };
|
98 100 | output.extract::<crate::output::StreamingBlobOperationOutput>()
|
99 101 | })
|
100 102 | };
|
101 103 | // Catch and record a Python traceback.
|
102 104 | result.map_err(|e| {
|
103 105 | let rich_py_err =
|
104 106 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
105 107 | e.clone_ref(py)
|
106 108 | }));
|
107 109 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
108 110 | e.into()
|
109 111 | })
|
110 112 | }
|
111 113 |
|
114 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
112 115 | /// Python handler for operation `NonStreamingBlobOperation`.
|
113 116 | pub(crate) async fn non_streaming_blob_operation(
|
114 117 | input: crate::input::NonStreamingBlobOperationInput,
|
115 118 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
116 119 | handler: ::aws_smithy_http_server_python::PyHandler,
|
117 120 | ) -> std::result::Result<
|
118 121 | crate::output::NonStreamingBlobOperationOutput,
|
119 122 | crate::error::NonStreamingBlobOperationError,
|
120 123 | > {
|
121 124 | // Async block used to run the handler and catch any Python error.
|
122 125 | let result = if handler.is_coroutine {
|
123 126 | ::tracing::trace!(
|
124 127 | name = "non_streaming_blob_operation",
|
125 128 | "executing python handler coroutine"
|
126 129 | );
|
127 130 | let result = ::pyo3::Python::with_gil(|py| {
|
128 131 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
129 132 | let coroutine = if handler.args == 1 {
|
130 133 | pyhandler.call1((input,))?
|
131 134 | } else {
|
132 135 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
133 136 | };
|
134 137 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
135 138 | })?;
|
136 139 | result.await.and_then(|r| {
|
137 140 | ::pyo3::Python::with_gil(|py| {
|
138 141 | r.extract::<crate::output::NonStreamingBlobOperationOutput>(py)
|
139 142 | })
|
140 143 | })
|
141 144 | } else {
|
142 145 | ::tracing::trace!(
|
143 146 | name = "non_streaming_blob_operation",
|
144 147 | "executing python handler function"
|
145 148 | );
|
146 149 | ::pyo3::Python::with_gil(|py| {
|
147 150 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
148 151 | let output = if handler.args == 1 {
|
149 152 | pyhandler.call1((input,))?
|
150 153 | } else {
|
151 154 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
152 155 | };
|
153 156 | output.extract::<crate::output::NonStreamingBlobOperationOutput>()
|
154 157 | })
|
155 158 | };
|
156 159 | // Catch and record a Python traceback.
|
157 160 | result.map_err(|e| {
|
158 161 | let rich_py_err =
|
159 162 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
160 163 | e.clone_ref(py)
|
161 164 | }));
|
162 165 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
163 166 | e.into()
|
164 167 | })
|
165 168 | }
|
166 169 |
|
170 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
167 171 | /// Python handler for operation `QueryParamsTargetingMapOfEnumStringOperation`.
|
168 172 | pub(crate) async fn query_params_targeting_map_of_enum_string_operation(
|
169 173 | input: crate::input::QueryParamsTargetingMapOfEnumStringOperationInput,
|
170 174 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
171 175 | handler: ::aws_smithy_http_server_python::PyHandler,
|
172 176 | ) -> std::result::Result<
|
173 177 | crate::output::QueryParamsTargetingMapOfEnumStringOperationOutput,
|
174 178 | crate::error::QueryParamsTargetingMapOfEnumStringOperationError,
|
175 179 | > {
|
176 180 | // Async block used to run the handler and catch any Python error.
|
177 181 | let result = if handler.is_coroutine {
|
178 182 | ::tracing::trace!(
|
179 183 | name = "query_params_targeting_map_of_enum_string_operation",
|
180 184 | "executing python handler coroutine"
|
181 185 | );
|
182 186 | let result = ::pyo3::Python::with_gil(|py| {
|
183 187 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
184 188 | let coroutine = if handler.args == 1 {
|
185 189 | pyhandler.call1((input,))?
|
186 190 | } else {
|
187 191 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
188 192 | };
|
189 193 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
190 194 | })?;
|
191 195 | result.await.and_then(|r| {
|
192 196 | ::pyo3::Python::with_gil(|py| {
|
193 197 | r.extract::<crate::output::QueryParamsTargetingMapOfEnumStringOperationOutput>(py)
|
194 198 | })
|
195 199 | })
|
196 200 | } else {
|
197 201 | ::tracing::trace!(
|
198 202 | name = "query_params_targeting_map_of_enum_string_operation",
|
199 203 | "executing python handler function"
|
200 204 | );
|
201 205 | ::pyo3::Python::with_gil(|py| {
|
202 206 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
203 207 | let output = if handler.args == 1 {
|
204 208 | pyhandler.call1((input,))?
|
205 209 | } else {
|
206 210 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
207 211 | };
|
208 212 | output.extract::<crate::output::QueryParamsTargetingMapOfEnumStringOperationOutput>()
|
209 213 | })
|
210 214 | };
|
211 215 | // Catch and record a Python traceback.
|
212 216 | result.map_err(|e| {
|
213 217 | let rich_py_err =
|
214 218 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
215 219 | e.clone_ref(py)
|
216 220 | }));
|
217 221 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
218 222 | e.into()
|
219 223 | })
|
220 224 | }
|
221 225 |
|
226 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
222 227 | /// Python handler for operation `HttpPrefixHeadersTargetingLengthMapOperation`.
|
223 228 | pub(crate) async fn http_prefix_headers_targeting_length_map_operation(
|
224 229 | input: crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput,
|
225 230 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
226 231 | handler: ::aws_smithy_http_server_python::PyHandler,
|
227 232 | ) -> std::result::Result<
|
228 233 | crate::output::HttpPrefixHeadersTargetingLengthMapOperationOutput,
|
229 234 | crate::error::HttpPrefixHeadersTargetingLengthMapOperationError,
|
230 235 | > {
|
231 236 | // Async block used to run the handler and catch any Python error.
|
232 237 | let result = if handler.is_coroutine {
|
233 238 | ::tracing::trace!(
|
234 239 | name = "http_prefix_headers_targeting_length_map_operation",
|
235 240 | "executing python handler coroutine"
|
236 241 | );
|
237 242 | let result = ::pyo3::Python::with_gil(|py| {
|
238 243 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
239 244 | let coroutine = if handler.args == 1 {
|
240 245 | pyhandler.call1((input,))?
|
241 246 | } else {
|
242 247 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
243 248 | };
|
244 249 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
245 250 | })?;
|
246 251 | result.await.and_then(|r| {
|
247 252 | ::pyo3::Python::with_gil(|py| {
|
248 253 | r.extract::<crate::output::HttpPrefixHeadersTargetingLengthMapOperationOutput>(py)
|
249 254 | })
|
250 255 | })
|
251 256 | } else {
|
252 257 | ::tracing::trace!(
|
253 258 | name = "http_prefix_headers_targeting_length_map_operation",
|
254 259 | "executing python handler function"
|
255 260 | );
|
256 261 | ::pyo3::Python::with_gil(|py| {
|
257 262 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
258 263 | let output = if handler.args == 1 {
|
259 264 | pyhandler.call1((input,))?
|
260 265 | } else {
|
261 266 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
262 267 | };
|
263 268 | output.extract::<crate::output::HttpPrefixHeadersTargetingLengthMapOperationOutput>()
|
264 269 | })
|
265 270 | };
|
266 271 | // Catch and record a Python traceback.
|
267 272 | result.map_err(|e| {
|
268 273 | let rich_py_err =
|
269 274 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
270 275 | e.clone_ref(py)
|
271 276 | }));
|
272 277 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
273 278 | e.into()
|
274 279 | })
|
275 280 | }
|
276 281 |
|
282 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
277 283 | /// Python handler for operation `QueryParamsTargetingMapOfListOfLengthPatternStringOperation`.
|
278 284 | pub(crate) async fn query_params_targeting_map_of_list_of_length_pattern_string_operation(
|
279 285 | input: crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput,
|
280 286 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
281 287 | handler: ::aws_smithy_http_server_python::PyHandler,
|
282 288 | ) -> std::result::Result<
|
283 289 | crate::output::QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput,
|
284 290 | crate::error::QueryParamsTargetingMapOfListOfLengthPatternStringOperationError,
|
285 291 | > {
|
286 292 | // Async block used to run the handler and catch any Python error.
|
287 293 | let result = if handler.is_coroutine {
|
288 294 | ::tracing::trace!(
|
289 295 | name = "query_params_targeting_map_of_list_of_length_pattern_string_operation",
|
290 296 | "executing python handler coroutine"
|
291 297 | );
|
292 298 | let result = ::pyo3::Python::with_gil(|py| {
|
293 299 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
294 300 | let coroutine = if handler.args == 1 {
|
295 301 | pyhandler.call1((input,))?
|
296 302 | } else {
|
297 303 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
298 304 | };
|
299 305 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
300 306 | })?;
|
301 307 | result.await.and_then(|r| ::pyo3::Python::with_gil(|py| r.extract::<crate::output::QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput>(py)))
|
302 308 | } else {
|
303 309 | ::tracing::trace!(
|
304 310 | name = "query_params_targeting_map_of_list_of_length_pattern_string_operation",
|
305 311 | "executing python handler function"
|
306 312 | );
|
307 313 | ::pyo3::Python::with_gil(|py| {
|
308 314 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
309 315 | let output = if handler.args == 1 {
|
310 316 | pyhandler.call1((input,))?
|
311 317 | } else {
|
312 318 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
313 319 | };
|
314 320 | output.extract::<crate::output::QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput>()
|
315 321 | })
|
316 322 | };
|
317 323 | // Catch and record a Python traceback.
|
318 324 | result.map_err(|e| {
|
319 325 | let rich_py_err =
|
320 326 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
321 327 | e.clone_ref(py)
|
322 328 | }));
|
323 329 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
324 330 | e.into()
|
325 331 | })
|
326 332 | }
|
327 333 |
|
334 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
328 335 | /// Python handler for operation `QueryParamsTargetingMapOfLengthPatternStringOperation`.
|
329 336 | pub(crate) async fn query_params_targeting_map_of_length_pattern_string_operation(
|
330 337 | input: crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput,
|
331 338 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
332 339 | handler: ::aws_smithy_http_server_python::PyHandler,
|
333 340 | ) -> std::result::Result<
|
334 341 | crate::output::QueryParamsTargetingMapOfLengthPatternStringOperationOutput,
|
335 342 | crate::error::QueryParamsTargetingMapOfLengthPatternStringOperationError,
|
336 343 | > {
|
337 344 | // Async block used to run the handler and catch any Python error.
|
338 345 | let result = if handler.is_coroutine {
|
339 346 | ::tracing::trace!(
|
340 347 | name = "query_params_targeting_map_of_length_pattern_string_operation",
|
341 348 | "executing python handler coroutine"
|
342 349 | );
|
343 350 | let result = ::pyo3::Python::with_gil(|py| {
|
344 351 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
345 352 | let coroutine = if handler.args == 1 {
|
346 353 | pyhandler.call1((input,))?
|
347 354 | } else {
|
348 355 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
349 356 | };
|
350 357 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
351 358 | })?;
|
352 359 | result.await.and_then(|r| ::pyo3::Python::with_gil(|py| r.extract::<crate::output::QueryParamsTargetingMapOfLengthPatternStringOperationOutput>(py)))
|
353 360 | } else {
|
354 361 | ::tracing::trace!(
|
355 362 | name = "query_params_targeting_map_of_length_pattern_string_operation",
|
356 363 | "executing python handler function"
|
357 364 | );
|
358 365 | ::pyo3::Python::with_gil(|py| {
|
359 366 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
360 367 | let output = if handler.args == 1 {
|
361 368 | pyhandler.call1((input,))?
|
362 369 | } else {
|
363 370 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
364 371 | };
|
365 372 | output.extract::<crate::output::QueryParamsTargetingMapOfLengthPatternStringOperationOutput>()
|
366 373 | })
|
367 374 | };
|
368 375 | // Catch and record a Python traceback.
|
369 376 | result.map_err(|e| {
|
370 377 | let rich_py_err =
|
371 378 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
372 379 | e.clone_ref(py)
|
373 380 | }));
|
374 381 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
375 382 | e.into()
|
376 383 | })
|
377 384 | }
|
378 385 |
|
386 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
379 387 | /// Python handler for operation `QueryParamsTargetingMapOfListOfPatternStringOperation`.
|
380 388 | pub(crate) async fn query_params_targeting_map_of_list_of_pattern_string_operation(
|
381 389 | input: crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput,
|
382 390 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
383 391 | handler: ::aws_smithy_http_server_python::PyHandler,
|
384 392 | ) -> std::result::Result<
|
385 393 | crate::output::QueryParamsTargetingMapOfListOfPatternStringOperationOutput,
|
386 394 | crate::error::QueryParamsTargetingMapOfListOfPatternStringOperationError,
|
387 395 | > {
|
388 396 | // Async block used to run the handler and catch any Python error.
|
389 397 | let result = if handler.is_coroutine {
|
390 398 | ::tracing::trace!(
|
391 399 | name = "query_params_targeting_map_of_list_of_pattern_string_operation",
|
392 400 | "executing python handler coroutine"
|
393 401 | );
|
394 402 | let result = ::pyo3::Python::with_gil(|py| {
|
395 403 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
396 404 | let coroutine = if handler.args == 1 {
|
397 405 | pyhandler.call1((input,))?
|
398 406 | } else {
|
399 407 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
400 408 | };
|
401 409 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
402 410 | })?;
|
403 411 | result.await.and_then(|r| ::pyo3::Python::with_gil(|py| r.extract::<crate::output::QueryParamsTargetingMapOfListOfPatternStringOperationOutput>(py)))
|
404 412 | } else {
|
405 413 | ::tracing::trace!(
|
406 414 | name = "query_params_targeting_map_of_list_of_pattern_string_operation",
|
407 415 | "executing python handler function"
|
408 416 | );
|
409 417 | ::pyo3::Python::with_gil(|py| {
|
410 418 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
411 419 | let output = if handler.args == 1 {
|
412 420 | pyhandler.call1((input,))?
|
413 421 | } else {
|
414 422 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
415 423 | };
|
416 424 | output.extract::<crate::output::QueryParamsTargetingMapOfListOfPatternStringOperationOutput>()
|
417 425 | })
|
418 426 | };
|
419 427 | // Catch and record a Python traceback.
|
420 428 | result.map_err(|e| {
|
421 429 | let rich_py_err =
|
422 430 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
423 431 | e.clone_ref(py)
|
424 432 | }));
|
425 433 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
426 434 | e.into()
|
427 435 | })
|
428 436 | }
|
429 437 |
|
438 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
430 439 | /// Python handler for operation `QueryParamsTargetingMapOfPatternStringOperation`.
|
431 440 | pub(crate) async fn query_params_targeting_map_of_pattern_string_operation(
|
432 441 | input: crate::input::QueryParamsTargetingMapOfPatternStringOperationInput,
|
433 442 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
434 443 | handler: ::aws_smithy_http_server_python::PyHandler,
|
435 444 | ) -> std::result::Result<
|
436 445 | crate::output::QueryParamsTargetingMapOfPatternStringOperationOutput,
|
437 446 | crate::error::QueryParamsTargetingMapOfPatternStringOperationError,
|
438 447 | > {
|
439 448 | // Async block used to run the handler and catch any Python error.
|
440 449 | let result = if handler.is_coroutine {
|
441 450 | ::tracing::trace!(
|
442 451 | name = "query_params_targeting_map_of_pattern_string_operation",
|
443 452 | "executing python handler coroutine"
|
444 453 | );
|
445 454 | let result = ::pyo3::Python::with_gil(|py| {
|
446 455 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
447 456 | let coroutine = if handler.args == 1 {
|
448 457 | pyhandler.call1((input,))?
|
449 458 | } else {
|
450 459 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
451 460 | };
|
452 461 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
453 462 | })?;
|
454 463 | result.await.and_then(|r| {
|
455 464 | ::pyo3::Python::with_gil(|py| {
|
456 465 | r.extract::<crate::output::QueryParamsTargetingMapOfPatternStringOperationOutput>(
|
457 466 | py,
|
458 467 | )
|
459 468 | })
|
460 469 | })
|
461 470 | } else {
|
462 471 | ::tracing::trace!(
|
463 472 | name = "query_params_targeting_map_of_pattern_string_operation",
|
464 473 | "executing python handler function"
|
465 474 | );
|
466 475 | ::pyo3::Python::with_gil(|py| {
|
467 476 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
468 477 | let output = if handler.args == 1 {
|
469 478 | pyhandler.call1((input,))?
|
470 479 | } else {
|
471 480 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
472 481 | };
|
473 482 | output.extract::<crate::output::QueryParamsTargetingMapOfPatternStringOperationOutput>()
|
474 483 | })
|
475 484 | };
|
476 485 | // Catch and record a Python traceback.
|
477 486 | result.map_err(|e| {
|
478 487 | let rich_py_err =
|
479 488 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
480 489 | e.clone_ref(py)
|
481 490 | }));
|
482 491 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
483 492 | e.into()
|
484 493 | })
|
485 494 | }
|
486 495 |
|
496 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
487 497 | /// Python handler for operation `QueryParamsTargetingMapOfListOfEnumStringOperation`.
|
488 498 | pub(crate) async fn query_params_targeting_map_of_list_of_enum_string_operation(
|
489 499 | input: crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput,
|
490 500 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
491 501 | handler: ::aws_smithy_http_server_python::PyHandler,
|
492 502 | ) -> std::result::Result<
|
493 503 | crate::output::QueryParamsTargetingMapOfListOfEnumStringOperationOutput,
|
494 504 | crate::error::QueryParamsTargetingMapOfListOfEnumStringOperationError,
|
495 505 | > {
|
496 506 | // Async block used to run the handler and catch any Python error.
|
497 507 | let result = if handler.is_coroutine {
|
498 508 | ::tracing::trace!(
|
499 509 | name = "query_params_targeting_map_of_list_of_enum_string_operation",
|
500 510 | "executing python handler coroutine"
|
501 511 | );
|
502 512 | let result = ::pyo3::Python::with_gil(|py| {
|
503 513 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
504 514 | let coroutine = if handler.args == 1 {
|
505 515 | pyhandler.call1((input,))?
|
506 516 | } else {
|
507 517 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
508 518 | };
|
509 519 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
510 520 | })?;
|
511 521 | result.await.and_then(|r| ::pyo3::Python::with_gil(|py| r.extract::<crate::output::QueryParamsTargetingMapOfListOfEnumStringOperationOutput>(py)))
|
512 522 | } else {
|
513 523 | ::tracing::trace!(
|
514 524 | name = "query_params_targeting_map_of_list_of_enum_string_operation",
|
515 525 | "executing python handler function"
|
516 526 | );
|
517 527 | ::pyo3::Python::with_gil(|py| {
|
518 528 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
519 529 | let output = if handler.args == 1 {
|
520 530 | pyhandler.call1((input,))?
|
521 531 | } else {
|
522 532 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
523 533 | };
|
524 534 | output
|
525 535 | .extract::<crate::output::QueryParamsTargetingMapOfListOfEnumStringOperationOutput>(
|
526 536 | )
|
527 537 | })
|
528 538 | };
|
529 539 | // Catch and record a Python traceback.
|
530 540 | result.map_err(|e| {
|
531 541 | let rich_py_err =
|
532 542 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
533 543 | e.clone_ref(py)
|
534 544 | }));
|
535 545 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
536 546 | e.into()
|
537 547 | })
|
538 548 | }
|
539 549 |
|
550 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
540 551 | /// Python handler for operation `QueryParamsTargetingMapOfLengthListOfPatternStringOperation`.
|
541 552 | pub(crate) async fn query_params_targeting_map_of_length_list_of_pattern_string_operation(
|
542 553 | input: crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput,
|
543 554 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
544 555 | handler: ::aws_smithy_http_server_python::PyHandler,
|
545 556 | ) -> std::result::Result<
|
546 557 | crate::output::QueryParamsTargetingMapOfLengthListOfPatternStringOperationOutput,
|
547 558 | crate::error::QueryParamsTargetingMapOfLengthListOfPatternStringOperationError,
|
548 559 | > {
|
549 560 | // Async block used to run the handler and catch any Python error.
|
550 561 | let result = if handler.is_coroutine {
|
551 562 | ::tracing::trace!(
|
552 563 | name = "query_params_targeting_map_of_length_list_of_pattern_string_operation",
|
553 564 | "executing python handler coroutine"
|
554 565 | );
|
555 566 | let result = ::pyo3::Python::with_gil(|py| {
|
556 567 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
557 568 | let coroutine = if handler.args == 1 {
|
558 569 | pyhandler.call1((input,))?
|
559 570 | } else {
|
560 571 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
561 572 | };
|
562 573 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
563 574 | })?;
|
564 575 | result.await.and_then(|r| ::pyo3::Python::with_gil(|py| r.extract::<crate::output::QueryParamsTargetingMapOfLengthListOfPatternStringOperationOutput>(py)))
|
565 576 | } else {
|
566 577 | ::tracing::trace!(
|
567 578 | name = "query_params_targeting_map_of_length_list_of_pattern_string_operation",
|
568 579 | "executing python handler function"
|
569 580 | );
|
570 581 | ::pyo3::Python::with_gil(|py| {
|
571 582 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
572 583 | let output = if handler.args == 1 {
|
573 584 | pyhandler.call1((input,))?
|
574 585 | } else {
|
575 586 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
576 587 | };
|
577 588 | output.extract::<crate::output::QueryParamsTargetingMapOfLengthListOfPatternStringOperationOutput>()
|
578 589 | })
|
579 590 | };
|
580 591 | // Catch and record a Python traceback.
|
581 592 | result.map_err(|e| {
|
582 593 | let rich_py_err =
|
583 594 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
584 595 | e.clone_ref(py)
|
585 596 | }));
|
586 597 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
587 598 | e.into()
|
588 599 | })
|
589 600 | }
|
590 601 |
|
602 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
591 603 | /// Python handler for operation `QueryParamsTargetingMapOfSetOfLengthStringOperation`.
|
592 604 | pub(crate) async fn query_params_targeting_map_of_set_of_length_string_operation(
|
593 605 | input: crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput,
|
594 606 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
595 607 | handler: ::aws_smithy_http_server_python::PyHandler,
|
596 608 | ) -> std::result::Result<
|
597 609 | crate::output::QueryParamsTargetingMapOfSetOfLengthStringOperationOutput,
|
598 610 | crate::error::QueryParamsTargetingMapOfSetOfLengthStringOperationError,
|
599 611 | > {
|
600 612 | // Async block used to run the handler and catch any Python error.
|
601 613 | let result = if handler.is_coroutine {
|
602 614 | ::tracing::trace!(
|
603 615 | name = "query_params_targeting_map_of_set_of_length_string_operation",
|
604 616 | "executing python handler coroutine"
|
605 617 | );
|
606 618 | let result = ::pyo3::Python::with_gil(|py| {
|
607 619 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
608 620 | let coroutine = if handler.args == 1 {
|
609 621 | pyhandler.call1((input,))?
|
610 622 | } else {
|
611 623 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
612 624 | };
|
613 625 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
614 626 | })?;
|
615 627 | result.await.and_then(|r| ::pyo3::Python::with_gil(|py| r.extract::<crate::output::QueryParamsTargetingMapOfSetOfLengthStringOperationOutput>(py)))
|
616 628 | } else {
|
617 629 | ::tracing::trace!(
|
618 630 | name = "query_params_targeting_map_of_set_of_length_string_operation",
|
619 631 | "executing python handler function"
|
620 632 | );
|
621 633 | ::pyo3::Python::with_gil(|py| {
|
622 634 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
623 635 | let output = if handler.args == 1 {
|
624 636 | pyhandler.call1((input,))?
|
625 637 | } else {
|
626 638 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
627 639 | };
|
628 640 | output.extract::<crate::output::QueryParamsTargetingMapOfSetOfLengthStringOperationOutput>()
|
629 641 | })
|
630 642 | };
|
631 643 | // Catch and record a Python traceback.
|
632 644 | result.map_err(|e| {
|
633 645 | let rich_py_err =
|
634 646 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
635 647 | e.clone_ref(py)
|
636 648 | }));
|
637 649 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
638 650 | e.into()
|
639 651 | })
|
640 652 | }
|
641 653 |
|
654 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
642 655 | /// Python handler for operation `QueryParamsTargetingMapOfListOfLengthStringOperation`.
|
643 656 | pub(crate) async fn query_params_targeting_map_of_list_of_length_string_operation(
|
644 657 | input: crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput,
|
645 658 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
646 659 | handler: ::aws_smithy_http_server_python::PyHandler,
|
647 660 | ) -> std::result::Result<
|
648 661 | crate::output::QueryParamsTargetingMapOfListOfLengthStringOperationOutput,
|
649 662 | crate::error::QueryParamsTargetingMapOfListOfLengthStringOperationError,
|
650 663 | > {
|
651 664 | // Async block used to run the handler and catch any Python error.
|
652 665 | let result = if handler.is_coroutine {
|
653 666 | ::tracing::trace!(
|
654 667 | name = "query_params_targeting_map_of_list_of_length_string_operation",
|
655 668 | "executing python handler coroutine"
|
656 669 | );
|
657 670 | let result = ::pyo3::Python::with_gil(|py| {
|
658 671 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
659 672 | let coroutine = if handler.args == 1 {
|
660 673 | pyhandler.call1((input,))?
|
661 674 | } else {
|
662 675 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
663 676 | };
|
664 677 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
665 678 | })?;
|
666 679 | result.await.and_then(|r| ::pyo3::Python::with_gil(|py| r.extract::<crate::output::QueryParamsTargetingMapOfListOfLengthStringOperationOutput>(py)))
|
667 680 | } else {
|
668 681 | ::tracing::trace!(
|
669 682 | name = "query_params_targeting_map_of_list_of_length_string_operation",
|
670 683 | "executing python handler function"
|
671 684 | );
|
672 685 | ::pyo3::Python::with_gil(|py| {
|
673 686 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
674 687 | let output = if handler.args == 1 {
|
675 688 | pyhandler.call1((input,))?
|
676 689 | } else {
|
677 690 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
678 691 | };
|
679 692 | output.extract::<crate::output::QueryParamsTargetingMapOfListOfLengthStringOperationOutput>()
|
680 693 | })
|
681 694 | };
|
682 695 | // Catch and record a Python traceback.
|
683 696 | result.map_err(|e| {
|
684 697 | let rich_py_err =
|
685 698 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
686 699 | e.clone_ref(py)
|
687 700 | }));
|
688 701 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
689 702 | e.into()
|
690 703 | })
|
691 704 | }
|
692 705 |
|
706 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
693 707 | /// Python handler for operation `QueryParamsTargetingMapOfLengthStringOperation`.
|
694 708 | pub(crate) async fn query_params_targeting_map_of_length_string_operation(
|
695 709 | input: crate::input::QueryParamsTargetingMapOfLengthStringOperationInput,
|
696 710 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
697 711 | handler: ::aws_smithy_http_server_python::PyHandler,
|
698 712 | ) -> std::result::Result<
|
699 713 | crate::output::QueryParamsTargetingMapOfLengthStringOperationOutput,
|
700 714 | crate::error::QueryParamsTargetingMapOfLengthStringOperationError,
|
701 715 | > {
|
702 716 | // Async block used to run the handler and catch any Python error.
|
703 717 | let result = if handler.is_coroutine {
|
704 718 | ::tracing::trace!(
|
705 719 | name = "query_params_targeting_map_of_length_string_operation",
|
706 720 | "executing python handler coroutine"
|
707 721 | );
|
708 722 | let result = ::pyo3::Python::with_gil(|py| {
|
709 723 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
710 724 | let coroutine = if handler.args == 1 {
|
711 725 | pyhandler.call1((input,))?
|
712 726 | } else {
|
713 727 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
714 728 | };
|
715 729 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
716 730 | })?;
|
717 731 | result.await.and_then(|r| {
|
718 732 | ::pyo3::Python::with_gil(|py| {
|
719 733 | r.extract::<crate::output::QueryParamsTargetingMapOfLengthStringOperationOutput>(py)
|
720 734 | })
|
721 735 | })
|
722 736 | } else {
|
723 737 | ::tracing::trace!(
|
724 738 | name = "query_params_targeting_map_of_length_string_operation",
|
725 739 | "executing python handler function"
|
726 740 | );
|
727 741 | ::pyo3::Python::with_gil(|py| {
|
728 742 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
729 743 | let output = if handler.args == 1 {
|
730 744 | pyhandler.call1((input,))?
|
731 745 | } else {
|
732 746 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
733 747 | };
|
734 748 | output.extract::<crate::output::QueryParamsTargetingMapOfLengthStringOperationOutput>()
|
735 749 | })
|
736 750 | };
|
737 751 | // Catch and record a Python traceback.
|
738 752 | result.map_err(|e| {
|
739 753 | let rich_py_err =
|
740 754 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
741 755 | e.clone_ref(py)
|
742 756 | }));
|
743 757 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
744 758 | e.into()
|
745 759 | })
|
746 760 | }
|
747 761 |
|
762 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
748 763 | /// Python handler for operation `QueryParamsTargetingLengthMapOperation`.
|
749 764 | pub(crate) async fn query_params_targeting_length_map_operation(
|
750 765 | input: crate::input::QueryParamsTargetingLengthMapOperationInput,
|
751 766 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
752 767 | handler: ::aws_smithy_http_server_python::PyHandler,
|
753 768 | ) -> std::result::Result<
|
754 769 | crate::output::QueryParamsTargetingLengthMapOperationOutput,
|
755 770 | crate::error::QueryParamsTargetingLengthMapOperationError,
|
756 771 | > {
|
757 772 | // Async block used to run the handler and catch any Python error.
|
758 773 | let result = if handler.is_coroutine {
|
759 774 | ::tracing::trace!(
|
760 775 | name = "query_params_targeting_length_map_operation",
|
761 776 | "executing python handler coroutine"
|
762 777 | );
|
763 778 | let result = ::pyo3::Python::with_gil(|py| {
|
764 779 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
765 780 | let coroutine = if handler.args == 1 {
|
766 781 | pyhandler.call1((input,))?
|
767 782 | } else {
|
768 783 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
769 784 | };
|
770 785 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
771 786 | })?;
|
772 787 | result.await.and_then(|r| {
|
773 788 | ::pyo3::Python::with_gil(|py| {
|
774 789 | r.extract::<crate::output::QueryParamsTargetingLengthMapOperationOutput>(py)
|
775 790 | })
|
776 791 | })
|
777 792 | } else {
|
778 793 | ::tracing::trace!(
|
779 794 | name = "query_params_targeting_length_map_operation",
|
780 795 | "executing python handler function"
|
781 796 | );
|
782 797 | ::pyo3::Python::with_gil(|py| {
|
783 798 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
784 799 | let output = if handler.args == 1 {
|
785 800 | pyhandler.call1((input,))?
|
786 801 | } else {
|
787 802 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
788 803 | };
|
789 804 | output.extract::<crate::output::QueryParamsTargetingLengthMapOperationOutput>()
|
790 805 | })
|
791 806 | };
|
792 807 | // Catch and record a Python traceback.
|
793 808 | result.map_err(|e| {
|
794 809 | let rich_py_err =
|
795 810 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
796 811 | e.clone_ref(py)
|
797 812 | }));
|
798 813 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
799 814 | e.into()
|
800 815 | })
|
801 816 | }
|
802 817 |
|
818 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
803 819 | /// Python handler for operation `ConstrainedRecursiveShapesOperation`.
|
804 820 | pub(crate) async fn constrained_recursive_shapes_operation(
|
805 821 | input: crate::input::ConstrainedRecursiveShapesOperationInput,
|
806 822 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
807 823 | handler: ::aws_smithy_http_server_python::PyHandler,
|
808 824 | ) -> std::result::Result<
|
809 825 | crate::output::ConstrainedRecursiveShapesOperationOutput,
|
810 826 | crate::error::ConstrainedRecursiveShapesOperationError,
|
811 827 | > {
|
812 828 | // Async block used to run the handler and catch any Python error.
|
813 829 | let result = if handler.is_coroutine {
|
814 830 | ::tracing::trace!(
|
815 831 | name = "constrained_recursive_shapes_operation",
|
816 832 | "executing python handler coroutine"
|
817 833 | );
|
818 834 | let result = ::pyo3::Python::with_gil(|py| {
|
819 835 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
820 836 | let coroutine = if handler.args == 1 {
|
821 837 | pyhandler.call1((input,))?
|
822 838 | } else {
|
823 839 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
824 840 | };
|
825 841 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
826 842 | })?;
|
827 843 | result.await.and_then(|r| {
|
828 844 | ::pyo3::Python::with_gil(|py| {
|
829 845 | r.extract::<crate::output::ConstrainedRecursiveShapesOperationOutput>(py)
|
830 846 | })
|
831 847 | })
|
832 848 | } else {
|
833 849 | ::tracing::trace!(
|
834 850 | name = "constrained_recursive_shapes_operation",
|
835 851 | "executing python handler function"
|
836 852 | );
|
837 853 | ::pyo3::Python::with_gil(|py| {
|
838 854 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
839 855 | let output = if handler.args == 1 {
|
840 856 | pyhandler.call1((input,))?
|
841 857 | } else {
|
842 858 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
843 859 | };
|
844 860 | output.extract::<crate::output::ConstrainedRecursiveShapesOperationOutput>()
|
845 861 | })
|
846 862 | };
|
847 863 | // Catch and record a Python traceback.
|
848 864 | result.map_err(|e| {
|
849 865 | let rich_py_err =
|
850 866 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
851 867 | e.clone_ref(py)
|
852 868 | }));
|
853 869 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
854 870 | e.into()
|
855 871 | })
|
856 872 | }
|
857 873 |
|
874 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
858 875 | /// Python handler for operation `ConstrainedHttpPayloadBoundShapeOperation`.
|
859 876 | pub(crate) async fn constrained_http_payload_bound_shape_operation(
|
860 877 | input: crate::input::ConstrainedHttpPayloadBoundShapeOperationInput,
|
861 878 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
862 879 | handler: ::aws_smithy_http_server_python::PyHandler,
|
863 880 | ) -> std::result::Result<
|
864 881 | crate::output::ConstrainedHttpPayloadBoundShapeOperationOutput,
|
865 882 | crate::error::ConstrainedHttpPayloadBoundShapeOperationError,
|
866 883 | > {
|
867 884 | // Async block used to run the handler and catch any Python error.
|
868 885 | let result = if handler.is_coroutine {
|
869 886 | ::tracing::trace!(
|
870 887 | name = "constrained_http_payload_bound_shape_operation",
|
871 888 | "executing python handler coroutine"
|
872 889 | );
|
873 890 | let result = ::pyo3::Python::with_gil(|py| {
|
874 891 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
875 892 | let coroutine = if handler.args == 1 {
|
876 893 | pyhandler.call1((input,))?
|
877 894 | } else {
|
878 895 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
879 896 | };
|
880 897 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
881 898 | })?;
|
882 899 | result.await.and_then(|r| {
|
883 900 | ::pyo3::Python::with_gil(|py| {
|
884 901 | r.extract::<crate::output::ConstrainedHttpPayloadBoundShapeOperationOutput>(py)
|
885 902 | })
|
886 903 | })
|
887 904 | } else {
|
888 905 | ::tracing::trace!(
|
889 906 | name = "constrained_http_payload_bound_shape_operation",
|
890 907 | "executing python handler function"
|
891 908 | );
|
892 909 | ::pyo3::Python::with_gil(|py| {
|
893 910 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
894 911 | let output = if handler.args == 1 {
|
895 912 | pyhandler.call1((input,))?
|
896 913 | } else {
|
897 914 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
898 915 | };
|
899 916 | output.extract::<crate::output::ConstrainedHttpPayloadBoundShapeOperationOutput>()
|
900 917 | })
|
901 918 | };
|
902 919 | // Catch and record a Python traceback.
|
903 920 | result.map_err(|e| {
|
904 921 | let rich_py_err =
|
905 922 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
906 923 | e.clone_ref(py)
|
907 924 | }));
|
908 925 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
909 926 | e.into()
|
910 927 | })
|
911 928 | }
|
912 929 |
|
930 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
913 931 | /// Python handler for operation `ConstrainedHttpBoundShapesOperation`.
|
914 932 | pub(crate) async fn constrained_http_bound_shapes_operation(
|
915 933 | input: crate::input::ConstrainedHttpBoundShapesOperationInput,
|
916 934 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
917 935 | handler: ::aws_smithy_http_server_python::PyHandler,
|
918 936 | ) -> std::result::Result<
|
919 937 | crate::output::ConstrainedHttpBoundShapesOperationOutput,
|
920 938 | crate::error::ConstrainedHttpBoundShapesOperationError,
|
921 939 | > {
|
922 940 | // Async block used to run the handler and catch any Python error.
|
923 941 | let result = if handler.is_coroutine {
|
924 942 | ::tracing::trace!(
|
925 943 | name = "constrained_http_bound_shapes_operation",
|
926 944 | "executing python handler coroutine"
|
927 945 | );
|
928 946 | let result = ::pyo3::Python::with_gil(|py| {
|
929 947 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
930 948 | let coroutine = if handler.args == 1 {
|
931 949 | pyhandler.call1((input,))?
|
932 950 | } else {
|
933 951 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
934 952 | };
|
935 953 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
936 954 | })?;
|
937 955 | result.await.and_then(|r| {
|
938 956 | ::pyo3::Python::with_gil(|py| {
|
939 957 | r.extract::<crate::output::ConstrainedHttpBoundShapesOperationOutput>(py)
|
940 958 | })
|
941 959 | })
|
942 960 | } else {
|
943 961 | ::tracing::trace!(
|
944 962 | name = "constrained_http_bound_shapes_operation",
|
945 963 | "executing python handler function"
|
946 964 | );
|
947 965 | ::pyo3::Python::with_gil(|py| {
|
948 966 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
949 967 | let output = if handler.args == 1 {
|
950 968 | pyhandler.call1((input,))?
|
951 969 | } else {
|
952 970 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
953 971 | };
|
954 972 | output.extract::<crate::output::ConstrainedHttpBoundShapesOperationOutput>()
|
955 973 | })
|
956 974 | };
|
957 975 | // Catch and record a Python traceback.
|
958 976 | result.map_err(|e| {
|
959 977 | let rich_py_err =
|
960 978 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
961 979 | e.clone_ref(py)
|
962 980 | }));
|
963 981 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
964 982 | e.into()
|
965 983 | })
|
966 984 | }
|
967 985 |
|
986 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
968 987 | /// Python handler for operation `ConstrainedShapesOnlyInOutputOperation`.
|
969 988 | pub(crate) async fn constrained_shapes_only_in_output_operation(
|
970 989 | input: crate::input::ConstrainedShapesOnlyInOutputOperationInput,
|
971 990 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
972 991 | handler: ::aws_smithy_http_server_python::PyHandler,
|
973 992 | ) -> std::result::Result<
|
974 993 | crate::output::ConstrainedShapesOnlyInOutputOperationOutput,
|
975 994 | crate::error::ConstrainedShapesOnlyInOutputOperationError,
|
976 995 | > {
|
977 996 | // Async block used to run the handler and catch any Python error.
|
978 997 | let result = if handler.is_coroutine {
|
979 998 | ::tracing::trace!(
|
980 999 | name = "constrained_shapes_only_in_output_operation",
|
981 1000 | "executing python handler coroutine"
|
982 1001 | );
|
983 1002 | let result = ::pyo3::Python::with_gil(|py| {
|
984 1003 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
985 1004 | let coroutine = if handler.args == 1 {
|
986 1005 | pyhandler.call1((input,))?
|
987 1006 | } else {
|
988 1007 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
989 1008 | };
|
990 1009 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
991 1010 | })?;
|
992 1011 | result.await.and_then(|r| {
|
993 1012 | ::pyo3::Python::with_gil(|py| {
|
994 1013 | r.extract::<crate::output::ConstrainedShapesOnlyInOutputOperationOutput>(py)
|
995 1014 | })
|
996 1015 | })
|
997 1016 | } else {
|
998 1017 | ::tracing::trace!(
|
999 1018 | name = "constrained_shapes_only_in_output_operation",
|
1000 1019 | "executing python handler function"
|
1001 1020 | );
|
1002 1021 | ::pyo3::Python::with_gil(|py| {
|
1003 1022 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1004 1023 | let output = if handler.args == 1 {
|
1005 1024 | pyhandler.call1((input,))?
|
1006 1025 | } else {
|
1007 1026 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1008 1027 | };
|
1009 1028 | output.extract::<crate::output::ConstrainedShapesOnlyInOutputOperationOutput>()
|
1010 1029 | })
|
1011 1030 | };
|
1012 1031 | // Catch and record a Python traceback.
|
1013 1032 | result.map_err(|e| {
|
1014 1033 | let rich_py_err =
|
1015 1034 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1016 1035 | e.clone_ref(py)
|
1017 1036 | }));
|
1018 1037 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1019 1038 | e.into()
|
1020 1039 | })
|
1021 1040 | }
|
1022 1041 |
|
1042 + | /* PythonServerOperationHandlerGenerator.kt:61 */
|
1023 1043 | /// Python handler for operation `ConstrainedShapesOperation`.
|
1024 1044 | pub(crate) async fn constrained_shapes_operation(
|
1025 1045 | input: crate::input::ConstrainedShapesOperationInput,
|
1026 1046 | state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
|
1027 1047 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1028 1048 | ) -> std::result::Result<
|
1029 1049 | crate::output::ConstrainedShapesOperationOutput,
|
1030 1050 | crate::error::ConstrainedShapesOperationError,
|
1031 1051 | > {
|
1032 1052 | // Async block used to run the handler and catch any Python error.
|