1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - | /// Python handler for operation `OperationWithNestedStructure`.
|
3 - | pub(crate) async fn operation_with_nested_structure(
|
4 - | input: crate::input::OperationWithNestedStructureInput,
|
2 + | /// Python handler for operation `NoInputAndNoOutput`.
|
3 + | pub(crate) async fn no_input_and_no_output(
|
4 + | input: crate::input::NoInputAndNoOutputInput,
|
5 5 | state: ::aws_smithy_legacy_http_server::Extension<
|
6 6 | ::aws_smithy_http_server_python::context::PyContext,
|
7 7 | >,
|
8 8 | handler: ::aws_smithy_http_server_python::PyHandler,
|
9 9 | ) -> std::result::Result<
|
10 - | crate::output::OperationWithNestedStructureOutput,
|
11 - | crate::error::OperationWithNestedStructureError,
|
10 + | crate::output::NoInputAndNoOutputOutput,
|
11 + | crate::error::NoInputAndNoOutputError,
|
12 12 | > {
|
13 13 | // Async block used to run the handler and catch any Python error.
|
14 14 | let result = if handler.is_coroutine {
|
15 15 | ::tracing::trace!(
|
16 - | name = "operation_with_nested_structure",
|
16 + | name = "no_input_and_no_output",
|
17 17 | "executing python handler coroutine"
|
18 18 | );
|
19 19 | let result = ::pyo3::Python::with_gil(|py| {
|
20 20 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
21 21 | let coroutine = if handler.args == 1 {
|
22 22 | pyhandler.call1((input,))?
|
23 23 | } else {
|
24 24 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
25 25 | };
|
26 26 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
27 27 | })?;
|
28 28 | result.await.and_then(|r| {
|
29 - | ::pyo3::Python::with_gil(|py| {
|
30 - | r.extract::<crate::output::OperationWithNestedStructureOutput>(py)
|
31 - | })
|
29 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::NoInputAndNoOutputOutput>(py))
|
32 30 | })
|
33 31 | } else {
|
34 32 | ::tracing::trace!(
|
35 - | name = "operation_with_nested_structure",
|
33 + | name = "no_input_and_no_output",
|
36 34 | "executing python handler function"
|
37 35 | );
|
38 36 | ::pyo3::Python::with_gil(|py| {
|
39 37 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
40 38 | let output = if handler.args == 1 {
|
41 39 | pyhandler.call1((input,))?
|
42 40 | } else {
|
43 41 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
44 42 | };
|
45 - | output.extract::<crate::output::OperationWithNestedStructureOutput>()
|
43 + | output.extract::<crate::output::NoInputAndNoOutputOutput>()
|
46 44 | })
|
47 45 | };
|
48 46 | // Catch and record a Python traceback.
|
49 47 | result.map_err(|e| {
|
50 48 | let rich_py_err =
|
51 49 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
52 50 | e.clone_ref(py)
|
53 51 | }));
|
54 52 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
55 53 | e.into()
|
56 54 | })
|
57 55 | }
|
58 56 |
|
59 - | /// Python handler for operation `OperationWithDefaults`.
|
60 - | pub(crate) async fn operation_with_defaults(
|
61 - | input: crate::input::OperationWithDefaultsInput,
|
57 + | /// Python handler for operation `NoInputAndOutput`.
|
58 + | pub(crate) async fn no_input_and_output(
|
59 + | input: crate::input::NoInputAndOutputInput,
|
62 60 | state: ::aws_smithy_legacy_http_server::Extension<
|
63 61 | ::aws_smithy_http_server_python::context::PyContext,
|
64 62 | >,
|
65 63 | handler: ::aws_smithy_http_server_python::PyHandler,
|
66 - | ) -> std::result::Result<
|
67 - | crate::output::OperationWithDefaultsOutput,
|
68 - | crate::error::OperationWithDefaultsError,
|
69 - | > {
|
64 + | ) -> std::result::Result<crate::output::NoInputAndOutputOutput, crate::error::NoInputAndOutputError>
|
65 + | {
|
70 66 | // Async block used to run the handler and catch any Python error.
|
71 67 | let result = if handler.is_coroutine {
|
72 68 | ::tracing::trace!(
|
73 - | name = "operation_with_defaults",
|
69 + | name = "no_input_and_output",
|
74 70 | "executing python handler coroutine"
|
75 71 | );
|
76 72 | let result = ::pyo3::Python::with_gil(|py| {
|
77 73 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
78 74 | let coroutine = if handler.args == 1 {
|
79 75 | pyhandler.call1((input,))?
|
80 76 | } else {
|
81 77 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
82 78 | };
|
83 79 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
84 80 | })?;
|
85 81 | result.await.and_then(|r| {
|
86 - | ::pyo3::Python::with_gil(|py| {
|
87 - | r.extract::<crate::output::OperationWithDefaultsOutput>(py)
|
88 - | })
|
82 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::NoInputAndOutputOutput>(py))
|
89 83 | })
|
90 84 | } else {
|
91 85 | ::tracing::trace!(
|
92 - | name = "operation_with_defaults",
|
86 + | name = "no_input_and_output",
|
93 87 | "executing python handler function"
|
94 88 | );
|
95 89 | ::pyo3::Python::with_gil(|py| {
|
96 90 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
97 91 | let output = if handler.args == 1 {
|
98 92 | pyhandler.call1((input,))?
|
99 93 | } else {
|
100 94 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
101 95 | };
|
102 - | output.extract::<crate::output::OperationWithDefaultsOutput>()
|
96 + | output.extract::<crate::output::NoInputAndOutputOutput>()
|
103 97 | })
|
104 98 | };
|
105 99 | // Catch and record a Python traceback.
|
106 100 | result.map_err(|e| {
|
107 101 | let rich_py_err =
|
108 102 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
109 103 | e.clone_ref(py)
|
110 104 | }));
|
111 105 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
112 106 | e.into()
|
113 107 | })
|
114 108 | }
|
115 109 |
|
116 - | /// Python handler for operation `ContentTypeParameters`.
|
117 - | pub(crate) async fn content_type_parameters(
|
118 - | input: crate::input::ContentTypeParametersInput,
|
110 + | /// Python handler for operation `EmptyInputAndEmptyOutput`.
|
111 + | pub(crate) async fn empty_input_and_empty_output(
|
112 + | input: crate::input::EmptyInputAndEmptyOutputInput,
|
119 113 | state: ::aws_smithy_legacy_http_server::Extension<
|
120 114 | ::aws_smithy_http_server_python::context::PyContext,
|
121 115 | >,
|
122 116 | handler: ::aws_smithy_http_server_python::PyHandler,
|
123 117 | ) -> std::result::Result<
|
124 - | crate::output::ContentTypeParametersOutput,
|
125 - | crate::error::ContentTypeParametersError,
|
118 + | crate::output::EmptyInputAndEmptyOutputOutput,
|
119 + | crate::error::EmptyInputAndEmptyOutputError,
|
126 120 | > {
|
127 121 | // Async block used to run the handler and catch any Python error.
|
128 122 | let result = if handler.is_coroutine {
|
129 123 | ::tracing::trace!(
|
130 - | name = "content_type_parameters",
|
124 + | name = "empty_input_and_empty_output",
|
131 125 | "executing python handler coroutine"
|
132 126 | );
|
133 127 | let result = ::pyo3::Python::with_gil(|py| {
|
134 128 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
135 129 | let coroutine = if handler.args == 1 {
|
136 130 | pyhandler.call1((input,))?
|
137 131 | } else {
|
138 132 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
139 133 | };
|
140 134 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
141 135 | })?;
|
142 136 | result.await.and_then(|r| {
|
143 137 | ::pyo3::Python::with_gil(|py| {
|
144 - | r.extract::<crate::output::ContentTypeParametersOutput>(py)
|
138 + | r.extract::<crate::output::EmptyInputAndEmptyOutputOutput>(py)
|
145 139 | })
|
146 140 | })
|
147 141 | } else {
|
148 142 | ::tracing::trace!(
|
149 - | name = "content_type_parameters",
|
143 + | name = "empty_input_and_empty_output",
|
150 144 | "executing python handler function"
|
151 145 | );
|
152 146 | ::pyo3::Python::with_gil(|py| {
|
153 147 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
154 148 | let output = if handler.args == 1 {
|
155 149 | pyhandler.call1((input,))?
|
156 150 | } else {
|
157 151 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
158 152 | };
|
159 - | output.extract::<crate::output::ContentTypeParametersOutput>()
|
153 + | output.extract::<crate::output::EmptyInputAndEmptyOutputOutput>()
|
160 154 | })
|
161 155 | };
|
162 156 | // Catch and record a Python traceback.
|
163 157 | result.map_err(|e| {
|
164 158 | let rich_py_err =
|
165 159 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
166 160 | e.clone_ref(py)
|
167 161 | }));
|
168 162 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
169 163 | e.into()
|
170 164 | })
|
171 165 | }
|
172 166 |
|
173 - | /// Python handler for operation `PutWithContentEncoding`.
|
174 - | pub(crate) async fn put_with_content_encoding(
|
175 - | input: crate::input::PutWithContentEncodingInput,
|
167 + | /// Python handler for operation `UnitInputAndOutput`.
|
168 + | pub(crate) async fn unit_input_and_output(
|
169 + | input: crate::input::UnitInputAndOutputInput,
|
176 170 | state: ::aws_smithy_legacy_http_server::Extension<
|
177 171 | ::aws_smithy_http_server_python::context::PyContext,
|
178 172 | >,
|
179 173 | handler: ::aws_smithy_http_server_python::PyHandler,
|
180 174 | ) -> std::result::Result<
|
181 - | crate::output::PutWithContentEncodingOutput,
|
182 - | crate::error::PutWithContentEncodingError,
|
175 + | crate::output::UnitInputAndOutputOutput,
|
176 + | crate::error::UnitInputAndOutputError,
|
183 177 | > {
|
184 178 | // Async block used to run the handler and catch any Python error.
|
185 179 | let result = if handler.is_coroutine {
|
186 180 | ::tracing::trace!(
|
187 - | name = "put_with_content_encoding",
|
181 + | name = "unit_input_and_output",
|
188 182 | "executing python handler coroutine"
|
189 183 | );
|
190 184 | let result = ::pyo3::Python::with_gil(|py| {
|
191 185 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
192 186 | let coroutine = if handler.args == 1 {
|
193 187 | pyhandler.call1((input,))?
|
194 188 | } else {
|
195 189 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
196 190 | };
|
197 191 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
198 192 | })?;
|
199 193 | result.await.and_then(|r| {
|
200 - | ::pyo3::Python::with_gil(|py| {
|
201 - | r.extract::<crate::output::PutWithContentEncodingOutput>(py)
|
202 - | })
|
194 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::UnitInputAndOutputOutput>(py))
|
203 195 | })
|
204 196 | } else {
|
205 197 | ::tracing::trace!(
|
206 - | name = "put_with_content_encoding",
|
198 + | name = "unit_input_and_output",
|
207 199 | "executing python handler function"
|
208 200 | );
|
209 201 | ::pyo3::Python::with_gil(|py| {
|
210 202 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
211 203 | let output = if handler.args == 1 {
|
212 204 | pyhandler.call1((input,))?
|
213 205 | } else {
|
214 206 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
215 207 | };
|
216 - | output.extract::<crate::output::PutWithContentEncodingOutput>()
|
208 + | output.extract::<crate::output::UnitInputAndOutputOutput>()
|
217 209 | })
|
218 210 | };
|
219 211 | // Catch and record a Python traceback.
|
220 212 | result.map_err(|e| {
|
221 213 | let rich_py_err =
|
222 214 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
223 215 | e.clone_ref(py)
|
224 216 | }));
|
225 217 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
226 218 | e.into()
|
227 219 | })
|
228 220 | }
|
229 221 |
|
230 - | /// Python handler for operation `FractionalSeconds`.
|
231 - | pub(crate) async fn fractional_seconds(
|
232 - | input: crate::input::FractionalSecondsInput,
|
222 + | /// Python handler for operation `InputAndOutputWithHeaders`.
|
223 + | pub(crate) async fn input_and_output_with_headers(
|
224 + | input: crate::input::InputAndOutputWithHeadersInput,
|
233 225 | state: ::aws_smithy_legacy_http_server::Extension<
|
234 226 | ::aws_smithy_http_server_python::context::PyContext,
|
235 227 | >,
|
236 228 | handler: ::aws_smithy_http_server_python::PyHandler,
|
237 - | ) -> std::result::Result<crate::output::FractionalSecondsOutput, crate::error::FractionalSecondsError>
|
238 - | {
|
229 + | ) -> std::result::Result<
|
230 + | crate::output::InputAndOutputWithHeadersOutput,
|
231 + | crate::error::InputAndOutputWithHeadersError,
|
232 + | > {
|
239 233 | // Async block used to run the handler and catch any Python error.
|
240 234 | let result = if handler.is_coroutine {
|
241 235 | ::tracing::trace!(
|
242 - | name = "fractional_seconds",
|
236 + | name = "input_and_output_with_headers",
|
243 237 | "executing python handler coroutine"
|
244 238 | );
|
245 239 | let result = ::pyo3::Python::with_gil(|py| {
|
246 240 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
247 241 | let coroutine = if handler.args == 1 {
|
248 242 | pyhandler.call1((input,))?
|
249 243 | } else {
|
250 244 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
251 245 | };
|
252 246 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
253 247 | })?;
|
254 248 | result.await.and_then(|r| {
|
255 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::FractionalSecondsOutput>(py))
|
249 + | ::pyo3::Python::with_gil(|py| {
|
250 + | r.extract::<crate::output::InputAndOutputWithHeadersOutput>(py)
|
251 + | })
|
256 252 | })
|
257 253 | } else {
|
258 254 | ::tracing::trace!(
|
259 - | name = "fractional_seconds",
|
255 + | name = "input_and_output_with_headers",
|
260 256 | "executing python handler function"
|
261 257 | );
|
262 258 | ::pyo3::Python::with_gil(|py| {
|
263 259 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
264 260 | let output = if handler.args == 1 {
|
265 261 | pyhandler.call1((input,))?
|
266 262 | } else {
|
267 263 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
268 264 | };
|
269 - | output.extract::<crate::output::FractionalSecondsOutput>()
|
265 + | output.extract::<crate::output::InputAndOutputWithHeadersOutput>()
|
270 266 | })
|
271 267 | };
|
272 268 | // Catch and record a Python traceback.
|
273 269 | result.map_err(|e| {
|
274 270 | let rich_py_err =
|
275 271 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
276 272 | e.clone_ref(py)
|
277 273 | }));
|
278 274 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
279 275 | e.into()
|
280 276 | })
|
281 277 | }
|
282 278 |
|
283 - | /// Python handler for operation `DatetimeOffsets`.
|
284 - | pub(crate) async fn datetime_offsets(
|
285 - | input: crate::input::DatetimeOffsetsInput,
|
279 + | /// Python handler for operation `NullAndEmptyHeadersClient`.
|
280 + | pub(crate) async fn null_and_empty_headers_client(
|
281 + | input: crate::input::NullAndEmptyHeadersClientInput,
|
286 282 | state: ::aws_smithy_legacy_http_server::Extension<
|
287 283 | ::aws_smithy_http_server_python::context::PyContext,
|
288 284 | >,
|
289 285 | handler: ::aws_smithy_http_server_python::PyHandler,
|
290 - | ) -> std::result::Result<crate::output::DatetimeOffsetsOutput, crate::error::DatetimeOffsetsError> {
|
286 + | ) -> std::result::Result<
|
287 + | crate::output::NullAndEmptyHeadersClientOutput,
|
288 + | crate::error::NullAndEmptyHeadersClientError,
|
289 + | > {
|
291 290 | // Async block used to run the handler and catch any Python error.
|
292 291 | let result = if handler.is_coroutine {
|
293 292 | ::tracing::trace!(
|
294 - | name = "datetime_offsets",
|
293 + | name = "null_and_empty_headers_client",
|
295 294 | "executing python handler coroutine"
|
296 295 | );
|
297 296 | let result = ::pyo3::Python::with_gil(|py| {
|
298 297 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
299 298 | let coroutine = if handler.args == 1 {
|
300 299 | pyhandler.call1((input,))?
|
301 300 | } else {
|
302 301 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
303 302 | };
|
304 303 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
305 304 | })?;
|
306 305 | result.await.and_then(|r| {
|
307 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::DatetimeOffsetsOutput>(py))
|
306 + | ::pyo3::Python::with_gil(|py| {
|
307 + | r.extract::<crate::output::NullAndEmptyHeadersClientOutput>(py)
|
308 + | })
|
308 309 | })
|
309 310 | } else {
|
310 311 | ::tracing::trace!(
|
311 - | name = "datetime_offsets",
|
312 + | name = "null_and_empty_headers_client",
|
312 313 | "executing python handler function"
|
313 314 | );
|
314 315 | ::pyo3::Python::with_gil(|py| {
|
315 316 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
316 317 | let output = if handler.args == 1 {
|
317 318 | pyhandler.call1((input,))?
|
318 319 | } else {
|
319 320 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
320 321 | };
|
321 - | output.extract::<crate::output::DatetimeOffsetsOutput>()
|
322 + | output.extract::<crate::output::NullAndEmptyHeadersClientOutput>()
|
322 323 | })
|
323 324 | };
|
324 325 | // Catch and record a Python traceback.
|
325 326 | result.map_err(|e| {
|
326 327 | let rich_py_err =
|
327 328 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
328 329 | e.clone_ref(py)
|
329 330 | }));
|
330 331 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
331 332 | e.into()
|
332 333 | })
|
333 334 | }
|
334 335 |
|
335 - | /// Python handler for operation `TestPostNoInputNoPayload`.
|
336 - | pub(crate) async fn test_post_no_input_no_payload(
|
337 - | input: crate::input::TestPostNoInputNoPayloadInput,
|
336 + | /// Python handler for operation `NullAndEmptyHeadersServer`.
|
337 + | pub(crate) async fn null_and_empty_headers_server(
|
338 + | input: crate::input::NullAndEmptyHeadersServerInput,
|
338 339 | state: ::aws_smithy_legacy_http_server::Extension<
|
339 340 | ::aws_smithy_http_server_python::context::PyContext,
|
340 341 | >,
|
341 342 | handler: ::aws_smithy_http_server_python::PyHandler,
|
342 343 | ) -> std::result::Result<
|
343 - | crate::output::TestPostNoInputNoPayloadOutput,
|
344 - | crate::error::TestPostNoInputNoPayloadError,
|
344 + | crate::output::NullAndEmptyHeadersServerOutput,
|
345 + | crate::error::NullAndEmptyHeadersServerError,
|
345 346 | > {
|
346 347 | // Async block used to run the handler and catch any Python error.
|
347 348 | let result = if handler.is_coroutine {
|
348 349 | ::tracing::trace!(
|
349 - | name = "test_post_no_input_no_payload",
|
350 + | name = "null_and_empty_headers_server",
|
350 351 | "executing python handler coroutine"
|
351 352 | );
|
352 353 | let result = ::pyo3::Python::with_gil(|py| {
|
353 354 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
354 355 | let coroutine = if handler.args == 1 {
|
355 356 | pyhandler.call1((input,))?
|
356 357 | } else {
|
357 358 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
358 359 | };
|
359 360 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
360 361 | })?;
|
361 362 | result.await.and_then(|r| {
|
362 363 | ::pyo3::Python::with_gil(|py| {
|
363 - | r.extract::<crate::output::TestPostNoInputNoPayloadOutput>(py)
|
364 + | r.extract::<crate::output::NullAndEmptyHeadersServerOutput>(py)
|
364 365 | })
|
365 366 | })
|
366 367 | } else {
|
367 368 | ::tracing::trace!(
|
368 - | name = "test_post_no_input_no_payload",
|
369 + | name = "null_and_empty_headers_server",
|
369 370 | "executing python handler function"
|
370 371 | );
|
371 372 | ::pyo3::Python::with_gil(|py| {
|
372 373 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
373 374 | let output = if handler.args == 1 {
|
374 375 | pyhandler.call1((input,))?
|
375 376 | } else {
|
376 377 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
377 378 | };
|
378 - | output.extract::<crate::output::TestPostNoInputNoPayloadOutput>()
|
379 + | output.extract::<crate::output::NullAndEmptyHeadersServerOutput>()
|
379 380 | })
|
380 381 | };
|
381 382 | // Catch and record a Python traceback.
|
382 383 | result.map_err(|e| {
|
383 384 | let rich_py_err =
|
384 385 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
385 386 | e.clone_ref(py)
|
386 387 | }));
|
387 388 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
388 389 | e.into()
|
389 390 | })
|
390 391 | }
|
391 392 |
|
392 - | /// Python handler for operation `TestGetNoInputNoPayload`.
|
393 - | pub(crate) async fn test_get_no_input_no_payload(
|
394 - | input: crate::input::TestGetNoInputNoPayloadInput,
|
393 + | /// Python handler for operation `TimestampFormatHeaders`.
|
394 + | pub(crate) async fn timestamp_format_headers(
|
395 + | input: crate::input::TimestampFormatHeadersInput,
|
395 396 | state: ::aws_smithy_legacy_http_server::Extension<
|
396 397 | ::aws_smithy_http_server_python::context::PyContext,
|
397 398 | >,
|
398 399 | handler: ::aws_smithy_http_server_python::PyHandler,
|
399 400 | ) -> std::result::Result<
|
400 - | crate::output::TestGetNoInputNoPayloadOutput,
|
401 - | crate::error::TestGetNoInputNoPayloadError,
|
401 + | crate::output::TimestampFormatHeadersOutput,
|
402 + | crate::error::TimestampFormatHeadersError,
|
402 403 | > {
|
403 404 | // Async block used to run the handler and catch any Python error.
|
404 405 | let result = if handler.is_coroutine {
|
405 406 | ::tracing::trace!(
|
406 - | name = "test_get_no_input_no_payload",
|
407 + | name = "timestamp_format_headers",
|
407 408 | "executing python handler coroutine"
|
408 409 | );
|
409 410 | let result = ::pyo3::Python::with_gil(|py| {
|
410 411 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
411 412 | let coroutine = if handler.args == 1 {
|
412 413 | pyhandler.call1((input,))?
|
413 414 | } else {
|
414 415 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
415 416 | };
|
416 417 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
417 418 | })?;
|
418 419 | result.await.and_then(|r| {
|
419 420 | ::pyo3::Python::with_gil(|py| {
|
420 - | r.extract::<crate::output::TestGetNoInputNoPayloadOutput>(py)
|
421 + | r.extract::<crate::output::TimestampFormatHeadersOutput>(py)
|
421 422 | })
|
422 423 | })
|
423 424 | } else {
|
424 425 | ::tracing::trace!(
|
425 - | name = "test_get_no_input_no_payload",
|
426 + | name = "timestamp_format_headers",
|
426 427 | "executing python handler function"
|
427 428 | );
|
428 429 | ::pyo3::Python::with_gil(|py| {
|
429 430 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
430 431 | let output = if handler.args == 1 {
|
431 432 | pyhandler.call1((input,))?
|
432 433 | } else {
|
433 434 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
434 435 | };
|
435 - | output.extract::<crate::output::TestGetNoInputNoPayloadOutput>()
|
436 + | output.extract::<crate::output::TimestampFormatHeadersOutput>()
|
436 437 | })
|
437 438 | };
|
438 439 | // Catch and record a Python traceback.
|
439 440 | result.map_err(|e| {
|
440 441 | let rich_py_err =
|
441 442 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
442 443 | e.clone_ref(py)
|
443 444 | }));
|
444 445 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
445 446 | e.into()
|
446 447 | })
|
447 448 | }
|
448 449 |
|
449 - | /// Python handler for operation `TestPostNoPayload`.
|
450 - | pub(crate) async fn test_post_no_payload(
|
451 - | input: crate::input::TestPostNoPayloadInput,
|
450 + | /// Python handler for operation `MediaTypeHeader`.
|
451 + | pub(crate) async fn media_type_header(
|
452 + | input: crate::input::MediaTypeHeaderInput,
|
452 453 | state: ::aws_smithy_legacy_http_server::Extension<
|
453 454 | ::aws_smithy_http_server_python::context::PyContext,
|
454 455 | >,
|
455 456 | handler: ::aws_smithy_http_server_python::PyHandler,
|
456 - | ) -> std::result::Result<crate::output::TestPostNoPayloadOutput, crate::error::TestPostNoPayloadError>
|
457 - | {
|
457 + | ) -> std::result::Result<crate::output::MediaTypeHeaderOutput, crate::error::MediaTypeHeaderError> {
|
458 458 | // Async block used to run the handler and catch any Python error.
|
459 459 | let result = if handler.is_coroutine {
|
460 460 | ::tracing::trace!(
|
461 - | name = "test_post_no_payload",
|
461 + | name = "media_type_header",
|
462 462 | "executing python handler coroutine"
|
463 463 | );
|
464 464 | let result = ::pyo3::Python::with_gil(|py| {
|
465 465 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
466 466 | let coroutine = if handler.args == 1 {
|
467 467 | pyhandler.call1((input,))?
|
468 468 | } else {
|
469 469 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
470 470 | };
|
471 471 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
472 472 | })?;
|
473 473 | result.await.and_then(|r| {
|
474 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::TestPostNoPayloadOutput>(py))
|
474 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MediaTypeHeaderOutput>(py))
|
475 475 | })
|
476 476 | } else {
|
477 477 | ::tracing::trace!(
|
478 - | name = "test_post_no_payload",
|
478 + | name = "media_type_header",
|
479 479 | "executing python handler function"
|
480 480 | );
|
481 481 | ::pyo3::Python::with_gil(|py| {
|
482 482 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
483 483 | let output = if handler.args == 1 {
|
484 484 | pyhandler.call1((input,))?
|
485 485 | } else {
|
486 486 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
487 487 | };
|
488 - | output.extract::<crate::output::TestPostNoPayloadOutput>()
|
488 + | output.extract::<crate::output::MediaTypeHeaderOutput>()
|
489 489 | })
|
490 490 | };
|
491 491 | // Catch and record a Python traceback.
|
492 492 | result.map_err(|e| {
|
493 493 | let rich_py_err =
|
494 494 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
495 495 | e.clone_ref(py)
|
496 496 | }));
|
497 497 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
498 498 | e.into()
|
499 499 | })
|
500 500 | }
|
501 501 |
|
502 - | /// Python handler for operation `TestGetNoPayload`.
|
503 - | pub(crate) async fn test_get_no_payload(
|
504 - | input: crate::input::TestGetNoPayloadInput,
|
502 + | /// Python handler for operation `HttpRequestWithLabels`.
|
503 + | pub(crate) async fn http_request_with_labels(
|
504 + | input: crate::input::HttpRequestWithLabelsInput,
|
505 505 | state: ::aws_smithy_legacy_http_server::Extension<
|
506 506 | ::aws_smithy_http_server_python::context::PyContext,
|
507 507 | >,
|
508 508 | handler: ::aws_smithy_http_server_python::PyHandler,
|
509 - | ) -> std::result::Result<crate::output::TestGetNoPayloadOutput, crate::error::TestGetNoPayloadError>
|
510 - | {
|
509 + | ) -> std::result::Result<
|
510 + | crate::output::HttpRequestWithLabelsOutput,
|
511 + | crate::error::HttpRequestWithLabelsError,
|
512 + | > {
|
511 513 | // Async block used to run the handler and catch any Python error.
|
512 514 | let result = if handler.is_coroutine {
|
513 515 | ::tracing::trace!(
|
514 - | name = "test_get_no_payload",
|
516 + | name = "http_request_with_labels",
|
515 517 | "executing python handler coroutine"
|
516 518 | );
|
517 519 | let result = ::pyo3::Python::with_gil(|py| {
|
518 520 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
519 521 | let coroutine = if handler.args == 1 {
|
520 522 | pyhandler.call1((input,))?
|
521 523 | } else {
|
522 524 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
523 525 | };
|
524 526 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
525 527 | })?;
|
526 528 | result.await.and_then(|r| {
|
527 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::TestGetNoPayloadOutput>(py))
|
529 + | ::pyo3::Python::with_gil(|py| {
|
530 + | r.extract::<crate::output::HttpRequestWithLabelsOutput>(py)
|
531 + | })
|
528 532 | })
|
529 533 | } else {
|
530 534 | ::tracing::trace!(
|
531 - | name = "test_get_no_payload",
|
535 + | name = "http_request_with_labels",
|
532 536 | "executing python handler function"
|
533 537 | );
|
534 538 | ::pyo3::Python::with_gil(|py| {
|
535 539 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
536 540 | let output = if handler.args == 1 {
|
537 541 | pyhandler.call1((input,))?
|
538 542 | } else {
|
539 543 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
540 544 | };
|
541 - | output.extract::<crate::output::TestGetNoPayloadOutput>()
|
545 + | output.extract::<crate::output::HttpRequestWithLabelsOutput>()
|
542 546 | })
|
543 547 | };
|
544 548 | // Catch and record a Python traceback.
|
545 549 | result.map_err(|e| {
|
546 550 | let rich_py_err =
|
547 551 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
548 552 | e.clone_ref(py)
|
549 553 | }));
|
550 554 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
551 555 | e.into()
|
552 556 | })
|
553 557 | }
|
554 558 |
|
555 - | /// Python handler for operation `TestPayloadBlob`.
|
556 - | pub(crate) async fn test_payload_blob(
|
557 - | input: crate::input::TestPayloadBlobInput,
|
559 + | /// Python handler for operation `HttpRequestWithLabelsAndTimestampFormat`.
|
560 + | pub(crate) async fn http_request_with_labels_and_timestamp_format(
|
561 + | input: crate::input::HttpRequestWithLabelsAndTimestampFormatInput,
|
558 562 | state: ::aws_smithy_legacy_http_server::Extension<
|
559 563 | ::aws_smithy_http_server_python::context::PyContext,
|
560 564 | >,
|
561 565 | handler: ::aws_smithy_http_server_python::PyHandler,
|
562 - | ) -> std::result::Result<crate::output::TestPayloadBlobOutput, crate::error::TestPayloadBlobError> {
|
566 + | ) -> std::result::Result<
|
567 + | crate::output::HttpRequestWithLabelsAndTimestampFormatOutput,
|
568 + | crate::error::HttpRequestWithLabelsAndTimestampFormatError,
|
569 + | > {
|
563 570 | // Async block used to run the handler and catch any Python error.
|
564 571 | let result = if handler.is_coroutine {
|
565 572 | ::tracing::trace!(
|
566 - | name = "test_payload_blob",
|
573 + | name = "http_request_with_labels_and_timestamp_format",
|
567 574 | "executing python handler coroutine"
|
568 575 | );
|
569 576 | let result = ::pyo3::Python::with_gil(|py| {
|
570 577 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
571 578 | let coroutine = if handler.args == 1 {
|
572 579 | pyhandler.call1((input,))?
|
573 580 | } else {
|
574 581 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
575 582 | };
|
576 583 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
577 584 | })?;
|
578 585 | result.await.and_then(|r| {
|
579 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::TestPayloadBlobOutput>(py))
|
586 + | ::pyo3::Python::with_gil(|py| {
|
587 + | r.extract::<crate::output::HttpRequestWithLabelsAndTimestampFormatOutput>(py)
|
588 + | })
|
580 589 | })
|
581 590 | } else {
|
582 591 | ::tracing::trace!(
|
583 - | name = "test_payload_blob",
|
592 + | name = "http_request_with_labels_and_timestamp_format",
|
584 593 | "executing python handler function"
|
585 594 | );
|
586 595 | ::pyo3::Python::with_gil(|py| {
|
587 596 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
588 597 | let output = if handler.args == 1 {
|
589 598 | pyhandler.call1((input,))?
|
590 599 | } else {
|
591 600 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
592 601 | };
|
593 - | output.extract::<crate::output::TestPayloadBlobOutput>()
|
602 + | output.extract::<crate::output::HttpRequestWithLabelsAndTimestampFormatOutput>()
|
594 603 | })
|
595 604 | };
|
596 605 | // Catch and record a Python traceback.
|
597 606 | result.map_err(|e| {
|
598 607 | let rich_py_err =
|
599 608 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
600 609 | e.clone_ref(py)
|
601 610 | }));
|
602 611 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
603 612 | e.into()
|
604 613 | })
|
605 614 | }
|
606 615 |
|
607 - | /// Python handler for operation `TestPayloadStructure`.
|
608 - | pub(crate) async fn test_payload_structure(
|
609 - | input: crate::input::TestPayloadStructureInput,
|
616 + | /// Python handler for operation `HttpRequestWithGreedyLabelInPath`.
|
617 + | pub(crate) async fn http_request_with_greedy_label_in_path(
|
618 + | input: crate::input::HttpRequestWithGreedyLabelInPathInput,
|
610 619 | state: ::aws_smithy_legacy_http_server::Extension<
|
611 620 | ::aws_smithy_http_server_python::context::PyContext,
|
612 621 | >,
|
613 622 | handler: ::aws_smithy_http_server_python::PyHandler,
|
614 623 | ) -> std::result::Result<
|
615 - | crate::output::TestPayloadStructureOutput,
|
616 - | crate::error::TestPayloadStructureError,
|
624 + | crate::output::HttpRequestWithGreedyLabelInPathOutput,
|
625 + | crate::error::HttpRequestWithGreedyLabelInPathError,
|
617 626 | > {
|
618 627 | // Async block used to run the handler and catch any Python error.
|
619 628 | let result = if handler.is_coroutine {
|
620 629 | ::tracing::trace!(
|
621 - | name = "test_payload_structure",
|
630 + | name = "http_request_with_greedy_label_in_path",
|
622 631 | "executing python handler coroutine"
|
623 632 | );
|
624 633 | let result = ::pyo3::Python::with_gil(|py| {
|
625 634 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
626 635 | let coroutine = if handler.args == 1 {
|
627 636 | pyhandler.call1((input,))?
|
628 637 | } else {
|
629 638 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
630 639 | };
|
631 640 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
632 641 | })?;
|
633 642 | result.await.and_then(|r| {
|
634 643 | ::pyo3::Python::with_gil(|py| {
|
635 - | r.extract::<crate::output::TestPayloadStructureOutput>(py)
|
644 + | r.extract::<crate::output::HttpRequestWithGreedyLabelInPathOutput>(py)
|
636 645 | })
|
637 646 | })
|
638 647 | } else {
|
639 648 | ::tracing::trace!(
|
640 - | name = "test_payload_structure",
|
649 + | name = "http_request_with_greedy_label_in_path",
|
641 650 | "executing python handler function"
|
642 651 | );
|
643 652 | ::pyo3::Python::with_gil(|py| {
|
644 653 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
645 654 | let output = if handler.args == 1 {
|
646 655 | pyhandler.call1((input,))?
|
647 656 | } else {
|
648 657 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
649 658 | };
|
650 - | output.extract::<crate::output::TestPayloadStructureOutput>()
|
659 + | output.extract::<crate::output::HttpRequestWithGreedyLabelInPathOutput>()
|
651 660 | })
|
652 661 | };
|
653 662 | // Catch and record a Python traceback.
|
654 663 | result.map_err(|e| {
|
655 664 | let rich_py_err =
|
656 665 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
657 666 | e.clone_ref(py)
|
658 667 | }));
|
659 668 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
660 669 | e.into()
|
661 670 | })
|
662 671 | }
|
663 672 |
|
664 - | /// Python handler for operation `TestBodyStructure`.
|
665 - | pub(crate) async fn test_body_structure(
|
666 - | input: crate::input::TestBodyStructureInput,
|
673 + | /// Python handler for operation `HttpRequestWithFloatLabels`.
|
674 + | pub(crate) async fn http_request_with_float_labels(
|
675 + | input: crate::input::HttpRequestWithFloatLabelsInput,
|
667 676 | state: ::aws_smithy_legacy_http_server::Extension<
|
668 677 | ::aws_smithy_http_server_python::context::PyContext,
|
669 678 | >,
|
670 679 | handler: ::aws_smithy_http_server_python::PyHandler,
|
671 - | ) -> std::result::Result<crate::output::TestBodyStructureOutput, crate::error::TestBodyStructureError>
|
672 - | {
|
680 + | ) -> std::result::Result<
|
681 + | crate::output::HttpRequestWithFloatLabelsOutput,
|
682 + | crate::error::HttpRequestWithFloatLabelsError,
|
683 + | > {
|
673 684 | // Async block used to run the handler and catch any Python error.
|
674 685 | let result = if handler.is_coroutine {
|
675 686 | ::tracing::trace!(
|
676 - | name = "test_body_structure",
|
687 + | name = "http_request_with_float_labels",
|
677 688 | "executing python handler coroutine"
|
678 689 | );
|
679 690 | let result = ::pyo3::Python::with_gil(|py| {
|
680 691 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
681 692 | let coroutine = if handler.args == 1 {
|
682 693 | pyhandler.call1((input,))?
|
683 694 | } else {
|
684 695 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
685 696 | };
|
686 697 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
687 698 | })?;
|
688 699 | result.await.and_then(|r| {
|
689 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::TestBodyStructureOutput>(py))
|
700 + | ::pyo3::Python::with_gil(|py| {
|
701 + | r.extract::<crate::output::HttpRequestWithFloatLabelsOutput>(py)
|
702 + | })
|
690 703 | })
|
691 704 | } else {
|
692 705 | ::tracing::trace!(
|
693 - | name = "test_body_structure",
|
706 + | name = "http_request_with_float_labels",
|
694 707 | "executing python handler function"
|
695 708 | );
|
696 709 | ::pyo3::Python::with_gil(|py| {
|
697 710 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
698 711 | let output = if handler.args == 1 {
|
699 712 | pyhandler.call1((input,))?
|
700 713 | } else {
|
701 714 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
702 715 | };
|
703 - | output.extract::<crate::output::TestBodyStructureOutput>()
|
716 + | output.extract::<crate::output::HttpRequestWithFloatLabelsOutput>()
|
704 717 | })
|
705 718 | };
|
706 719 | // Catch and record a Python traceback.
|
707 720 | result.map_err(|e| {
|
708 721 | let rich_py_err =
|
709 722 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
710 723 | e.clone_ref(py)
|
711 724 | }));
|
712 725 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
713 726 | e.into()
|
714 727 | })
|
715 728 | }
|
716 729 |
|
717 - | /// Python handler for operation `MalformedAcceptWithGenericString`.
|
718 - | pub(crate) async fn malformed_accept_with_generic_string(
|
719 - | input: crate::input::MalformedAcceptWithGenericStringInput,
|
730 + | /// Python handler for operation `HttpRequestWithRegexLiteral`.
|
731 + | pub(crate) async fn http_request_with_regex_literal(
|
732 + | input: crate::input::HttpRequestWithRegexLiteralInput,
|
720 733 | state: ::aws_smithy_legacy_http_server::Extension<
|
721 734 | ::aws_smithy_http_server_python::context::PyContext,
|
722 735 | >,
|
723 736 | handler: ::aws_smithy_http_server_python::PyHandler,
|
724 737 | ) -> std::result::Result<
|
725 - | crate::output::MalformedAcceptWithGenericStringOutput,
|
726 - | crate::error::MalformedAcceptWithGenericStringError,
|
738 + | crate::output::HttpRequestWithRegexLiteralOutput,
|
739 + | crate::error::HttpRequestWithRegexLiteralError,
|
727 740 | > {
|
728 741 | // Async block used to run the handler and catch any Python error.
|
729 742 | let result = if handler.is_coroutine {
|
730 743 | ::tracing::trace!(
|
731 - | name = "malformed_accept_with_generic_string",
|
744 + | name = "http_request_with_regex_literal",
|
732 745 | "executing python handler coroutine"
|
733 746 | );
|
734 747 | let result = ::pyo3::Python::with_gil(|py| {
|
735 748 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
736 749 | let coroutine = if handler.args == 1 {
|
737 750 | pyhandler.call1((input,))?
|
738 751 | } else {
|
739 752 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
740 753 | };
|
741 754 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
742 755 | })?;
|
743 756 | result.await.and_then(|r| {
|
744 757 | ::pyo3::Python::with_gil(|py| {
|
745 - | r.extract::<crate::output::MalformedAcceptWithGenericStringOutput>(py)
|
758 + | r.extract::<crate::output::HttpRequestWithRegexLiteralOutput>(py)
|
746 759 | })
|
747 760 | })
|
748 761 | } else {
|
749 762 | ::tracing::trace!(
|
750 - | name = "malformed_accept_with_generic_string",
|
763 + | name = "http_request_with_regex_literal",
|
751 764 | "executing python handler function"
|
752 765 | );
|
753 766 | ::pyo3::Python::with_gil(|py| {
|
754 767 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
755 768 | let output = if handler.args == 1 {
|
756 769 | pyhandler.call1((input,))?
|
757 770 | } else {
|
758 771 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
759 772 | };
|
760 - | output.extract::<crate::output::MalformedAcceptWithGenericStringOutput>()
|
773 + | output.extract::<crate::output::HttpRequestWithRegexLiteralOutput>()
|
761 774 | })
|
762 775 | };
|
763 776 | // Catch and record a Python traceback.
|
764 777 | result.map_err(|e| {
|
765 778 | let rich_py_err =
|
766 779 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
767 780 | e.clone_ref(py)
|
768 781 | }));
|
769 782 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
770 783 | e.into()
|
771 784 | })
|
772 785 | }
|
773 786 |
|
774 - | /// Python handler for operation `MalformedAcceptWithPayload`.
|
775 - | pub(crate) async fn malformed_accept_with_payload(
|
776 - | input: crate::input::MalformedAcceptWithPayloadInput,
|
787 + | /// Python handler for operation `AllQueryStringTypes`.
|
788 + | pub(crate) async fn all_query_string_types(
|
789 + | input: crate::input::AllQueryStringTypesInput,
|
777 790 | state: ::aws_smithy_legacy_http_server::Extension<
|
778 791 | ::aws_smithy_http_server_python::context::PyContext,
|
779 792 | >,
|
780 793 | handler: ::aws_smithy_http_server_python::PyHandler,
|
781 794 | ) -> std::result::Result<
|
782 - | crate::output::MalformedAcceptWithPayloadOutput,
|
783 - | crate::error::MalformedAcceptWithPayloadError,
|
795 + | crate::output::AllQueryStringTypesOutput,
|
796 + | crate::error::AllQueryStringTypesError,
|
784 797 | > {
|
785 798 | // Async block used to run the handler and catch any Python error.
|
786 799 | let result = if handler.is_coroutine {
|
787 800 | ::tracing::trace!(
|
788 - | name = "malformed_accept_with_payload",
|
801 + | name = "all_query_string_types",
|
789 802 | "executing python handler coroutine"
|
790 803 | );
|
791 804 | let result = ::pyo3::Python::with_gil(|py| {
|
792 805 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
793 806 | let coroutine = if handler.args == 1 {
|
794 807 | pyhandler.call1((input,))?
|
795 808 | } else {
|
796 809 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
797 810 | };
|
798 811 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
799 812 | })?;
|
800 813 | result.await.and_then(|r| {
|
801 - | ::pyo3::Python::with_gil(|py| {
|
802 - | r.extract::<crate::output::MalformedAcceptWithPayloadOutput>(py)
|
803 - | })
|
814 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::AllQueryStringTypesOutput>(py))
|
804 815 | })
|
805 816 | } else {
|
806 817 | ::tracing::trace!(
|
807 - | name = "malformed_accept_with_payload",
|
818 + | name = "all_query_string_types",
|
808 819 | "executing python handler function"
|
809 820 | );
|
810 821 | ::pyo3::Python::with_gil(|py| {
|
811 822 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
812 823 | let output = if handler.args == 1 {
|
813 824 | pyhandler.call1((input,))?
|
814 825 | } else {
|
815 826 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
816 827 | };
|
817 - | output.extract::<crate::output::MalformedAcceptWithPayloadOutput>()
|
828 + | output.extract::<crate::output::AllQueryStringTypesOutput>()
|
818 829 | })
|
819 830 | };
|
820 831 | // Catch and record a Python traceback.
|
821 832 | result.map_err(|e| {
|
822 833 | let rich_py_err =
|
823 834 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
824 835 | e.clone_ref(py)
|
825 836 | }));
|
826 837 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
827 838 | e.into()
|
828 839 | })
|
829 840 | }
|
830 841 |
|
831 - | /// Python handler for operation `MalformedAcceptWithBody`.
|
832 - | pub(crate) async fn malformed_accept_with_body(
|
833 - | input: crate::input::MalformedAcceptWithBodyInput,
|
842 + | /// Python handler for operation `ConstantQueryString`.
|
843 + | pub(crate) async fn constant_query_string(
|
844 + | input: crate::input::ConstantQueryStringInput,
|
834 845 | state: ::aws_smithy_legacy_http_server::Extension<
|
835 846 | ::aws_smithy_http_server_python::context::PyContext,
|
836 847 | >,
|
837 848 | handler: ::aws_smithy_http_server_python::PyHandler,
|
838 849 | ) -> std::result::Result<
|
839 - | crate::output::MalformedAcceptWithBodyOutput,
|
840 - | crate::error::MalformedAcceptWithBodyError,
|
850 + | crate::output::ConstantQueryStringOutput,
|
851 + | crate::error::ConstantQueryStringError,
|
841 852 | > {
|
842 853 | // Async block used to run the handler and catch any Python error.
|
843 854 | let result = if handler.is_coroutine {
|
844 855 | ::tracing::trace!(
|
845 - | name = "malformed_accept_with_body",
|
856 + | name = "constant_query_string",
|
846 857 | "executing python handler coroutine"
|
847 858 | );
|
848 859 | let result = ::pyo3::Python::with_gil(|py| {
|
849 860 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
850 861 | let coroutine = if handler.args == 1 {
|
851 862 | pyhandler.call1((input,))?
|
852 863 | } else {
|
853 864 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
854 865 | };
|
855 866 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
856 867 | })?;
|
857 868 | result.await.and_then(|r| {
|
858 - | ::pyo3::Python::with_gil(|py| {
|
859 - | r.extract::<crate::output::MalformedAcceptWithBodyOutput>(py)
|
860 - | })
|
869 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::ConstantQueryStringOutput>(py))
|
861 870 | })
|
862 871 | } else {
|
863 872 | ::tracing::trace!(
|
864 - | name = "malformed_accept_with_body",
|
873 + | name = "constant_query_string",
|
865 874 | "executing python handler function"
|
866 875 | );
|
867 876 | ::pyo3::Python::with_gil(|py| {
|
868 877 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
869 878 | let output = if handler.args == 1 {
|
870 879 | pyhandler.call1((input,))?
|
871 880 | } else {
|
872 881 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
873 882 | };
|
874 - | output.extract::<crate::output::MalformedAcceptWithBodyOutput>()
|
883 + | output.extract::<crate::output::ConstantQueryStringOutput>()
|
875 884 | })
|
876 885 | };
|
877 886 | // Catch and record a Python traceback.
|
878 887 | result.map_err(|e| {
|
879 888 | let rich_py_err =
|
880 889 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
881 890 | e.clone_ref(py)
|
882 891 | }));
|
883 892 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
884 893 | e.into()
|
885 894 | })
|
886 895 | }
|
887 896 |
|
888 - | /// Python handler for operation `MalformedContentTypeWithGenericString`.
|
889 - | pub(crate) async fn malformed_content_type_with_generic_string(
|
890 - | input: crate::input::MalformedContentTypeWithGenericStringInput,
|
897 + | /// Python handler for operation `ConstantAndVariableQueryString`.
|
898 + | pub(crate) async fn constant_and_variable_query_string(
|
899 + | input: crate::input::ConstantAndVariableQueryStringInput,
|
891 900 | state: ::aws_smithy_legacy_http_server::Extension<
|
892 901 | ::aws_smithy_http_server_python::context::PyContext,
|
893 902 | >,
|
894 903 | handler: ::aws_smithy_http_server_python::PyHandler,
|
895 904 | ) -> std::result::Result<
|
896 - | crate::output::MalformedContentTypeWithGenericStringOutput,
|
897 - | crate::error::MalformedContentTypeWithGenericStringError,
|
905 + | crate::output::ConstantAndVariableQueryStringOutput,
|
906 + | crate::error::ConstantAndVariableQueryStringError,
|
898 907 | > {
|
899 908 | // Async block used to run the handler and catch any Python error.
|
900 909 | let result = if handler.is_coroutine {
|
901 910 | ::tracing::trace!(
|
902 - | name = "malformed_content_type_with_generic_string",
|
911 + | name = "constant_and_variable_query_string",
|
903 912 | "executing python handler coroutine"
|
904 913 | );
|
905 914 | let result = ::pyo3::Python::with_gil(|py| {
|
906 915 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
907 916 | let coroutine = if handler.args == 1 {
|
908 917 | pyhandler.call1((input,))?
|
909 918 | } else {
|
910 919 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
911 920 | };
|
912 921 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
913 922 | })?;
|
914 923 | result.await.and_then(|r| {
|
915 924 | ::pyo3::Python::with_gil(|py| {
|
916 - | r.extract::<crate::output::MalformedContentTypeWithGenericStringOutput>(py)
|
925 + | r.extract::<crate::output::ConstantAndVariableQueryStringOutput>(py)
|
917 926 | })
|
918 927 | })
|
919 928 | } else {
|
920 929 | ::tracing::trace!(
|
921 - | name = "malformed_content_type_with_generic_string",
|
930 + | name = "constant_and_variable_query_string",
|
922 931 | "executing python handler function"
|
923 932 | );
|
924 933 | ::pyo3::Python::with_gil(|py| {
|
925 934 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
926 935 | let output = if handler.args == 1 {
|
927 936 | pyhandler.call1((input,))?
|
928 937 | } else {
|
929 938 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
930 939 | };
|
931 - | output.extract::<crate::output::MalformedContentTypeWithGenericStringOutput>()
|
940 + | output.extract::<crate::output::ConstantAndVariableQueryStringOutput>()
|
932 941 | })
|
933 942 | };
|
934 943 | // Catch and record a Python traceback.
|
935 944 | result.map_err(|e| {
|
936 945 | let rich_py_err =
|
937 946 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
938 947 | e.clone_ref(py)
|
939 948 | }));
|
940 949 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
941 950 | e.into()
|
942 951 | })
|
943 952 | }
|
944 953 |
|
945 - | /// Python handler for operation `MalformedContentTypeWithPayload`.
|
946 - | pub(crate) async fn malformed_content_type_with_payload(
|
947 - | input: crate::input::MalformedContentTypeWithPayloadInput,
|
954 + | /// Python handler for operation `IgnoreQueryParamsInResponse`.
|
955 + | pub(crate) async fn ignore_query_params_in_response(
|
956 + | input: crate::input::IgnoreQueryParamsInResponseInput,
|
948 957 | state: ::aws_smithy_legacy_http_server::Extension<
|
949 958 | ::aws_smithy_http_server_python::context::PyContext,
|
950 959 | >,
|
951 960 | handler: ::aws_smithy_http_server_python::PyHandler,
|
952 961 | ) -> std::result::Result<
|
953 - | crate::output::MalformedContentTypeWithPayloadOutput,
|
954 - | crate::error::MalformedContentTypeWithPayloadError,
|
962 + | crate::output::IgnoreQueryParamsInResponseOutput,
|
963 + | crate::error::IgnoreQueryParamsInResponseError,
|
955 964 | > {
|
956 965 | // Async block used to run the handler and catch any Python error.
|
957 966 | let result = if handler.is_coroutine {
|
958 967 | ::tracing::trace!(
|
959 - | name = "malformed_content_type_with_payload",
|
968 + | name = "ignore_query_params_in_response",
|
960 969 | "executing python handler coroutine"
|
961 970 | );
|
962 971 | let result = ::pyo3::Python::with_gil(|py| {
|
963 972 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
964 973 | let coroutine = if handler.args == 1 {
|
965 974 | pyhandler.call1((input,))?
|
966 975 | } else {
|
967 976 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
968 977 | };
|
969 978 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
970 979 | })?;
|
971 980 | result.await.and_then(|r| {
|
972 981 | ::pyo3::Python::with_gil(|py| {
|
973 - | r.extract::<crate::output::MalformedContentTypeWithPayloadOutput>(py)
|
982 + | r.extract::<crate::output::IgnoreQueryParamsInResponseOutput>(py)
|
974 983 | })
|
975 984 | })
|
976 985 | } else {
|
977 986 | ::tracing::trace!(
|
978 - | name = "malformed_content_type_with_payload",
|
987 + | name = "ignore_query_params_in_response",
|
979 988 | "executing python handler function"
|
980 989 | );
|
981 990 | ::pyo3::Python::with_gil(|py| {
|
982 991 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
983 992 | let output = if handler.args == 1 {
|
984 993 | pyhandler.call1((input,))?
|
985 994 | } else {
|
986 995 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
987 996 | };
|
988 - | output.extract::<crate::output::MalformedContentTypeWithPayloadOutput>()
|
997 + | output.extract::<crate::output::IgnoreQueryParamsInResponseOutput>()
|
989 998 | })
|
990 999 | };
|
991 1000 | // Catch and record a Python traceback.
|
992 1001 | result.map_err(|e| {
|
993 1002 | let rich_py_err =
|
994 1003 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
995 1004 | e.clone_ref(py)
|
996 1005 | }));
|
997 1006 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
998 1007 | e.into()
|
999 1008 | })
|
1000 1009 | }
|
1001 1010 |
|
1002 - | /// Python handler for operation `MalformedContentTypeWithBody`.
|
1003 - | pub(crate) async fn malformed_content_type_with_body(
|
1004 - | input: crate::input::MalformedContentTypeWithBodyInput,
|
1011 + | /// Python handler for operation `OmitsNullSerializesEmptyString`.
|
1012 + | pub(crate) async fn omits_null_serializes_empty_string(
|
1013 + | input: crate::input::OmitsNullSerializesEmptyStringInput,
|
1005 1014 | state: ::aws_smithy_legacy_http_server::Extension<
|
1006 1015 | ::aws_smithy_http_server_python::context::PyContext,
|
1007 1016 | >,
|
1008 1017 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1009 1018 | ) -> std::result::Result<
|
1010 - | crate::output::MalformedContentTypeWithBodyOutput,
|
1011 - | crate::error::MalformedContentTypeWithBodyError,
|
1019 + | crate::output::OmitsNullSerializesEmptyStringOutput,
|
1020 + | crate::error::OmitsNullSerializesEmptyStringError,
|
1012 1021 | > {
|
1013 1022 | // Async block used to run the handler and catch any Python error.
|
1014 1023 | let result = if handler.is_coroutine {
|
1015 1024 | ::tracing::trace!(
|
1016 - | name = "malformed_content_type_with_body",
|
1025 + | name = "omits_null_serializes_empty_string",
|
1017 1026 | "executing python handler coroutine"
|
1018 1027 | );
|
1019 1028 | let result = ::pyo3::Python::with_gil(|py| {
|
1020 1029 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1021 1030 | let coroutine = if handler.args == 1 {
|
1022 1031 | pyhandler.call1((input,))?
|
1023 1032 | } else {
|
1024 1033 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1025 1034 | };
|
1026 1035 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1027 1036 | })?;
|
1028 1037 | result.await.and_then(|r| {
|
1029 1038 | ::pyo3::Python::with_gil(|py| {
|
1030 - | r.extract::<crate::output::MalformedContentTypeWithBodyOutput>(py)
|
1039 + | r.extract::<crate::output::OmitsNullSerializesEmptyStringOutput>(py)
|
1031 1040 | })
|
1032 1041 | })
|
1033 1042 | } else {
|
1034 1043 | ::tracing::trace!(
|
1035 - | name = "malformed_content_type_with_body",
|
1044 + | name = "omits_null_serializes_empty_string",
|
1036 1045 | "executing python handler function"
|
1037 1046 | );
|
1038 1047 | ::pyo3::Python::with_gil(|py| {
|
1039 1048 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1040 1049 | let output = if handler.args == 1 {
|
1041 1050 | pyhandler.call1((input,))?
|
1042 1051 | } else {
|
1043 1052 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1044 1053 | };
|
1045 - | output.extract::<crate::output::MalformedContentTypeWithBodyOutput>()
|
1054 + | output.extract::<crate::output::OmitsNullSerializesEmptyStringOutput>()
|
1046 1055 | })
|
1047 1056 | };
|
1048 1057 | // Catch and record a Python traceback.
|
1049 1058 | result.map_err(|e| {
|
1050 1059 | let rich_py_err =
|
1051 1060 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1052 1061 | e.clone_ref(py)
|
1053 1062 | }));
|
1054 1063 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1055 1064 | e.into()
|
1056 1065 | })
|
1057 1066 | }
|
1058 1067 |
|
1059 - | /// Python handler for operation `MalformedContentTypeWithoutBodyEmptyInput`.
|
1060 - | pub(crate) async fn malformed_content_type_without_body_empty_input(
|
1061 - | input: crate::input::MalformedContentTypeWithoutBodyEmptyInputInput,
|
1068 + | /// Python handler for operation `OmitsSerializingEmptyLists`.
|
1069 + | pub(crate) async fn omits_serializing_empty_lists(
|
1070 + | input: crate::input::OmitsSerializingEmptyListsInput,
|
1062 1071 | state: ::aws_smithy_legacy_http_server::Extension<
|
1063 1072 | ::aws_smithy_http_server_python::context::PyContext,
|
1064 1073 | >,
|
1065 1074 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1066 1075 | ) -> std::result::Result<
|
1067 - | crate::output::MalformedContentTypeWithoutBodyEmptyInputOutput,
|
1068 - | crate::error::MalformedContentTypeWithoutBodyEmptyInputError,
|
1076 + | crate::output::OmitsSerializingEmptyListsOutput,
|
1077 + | crate::error::OmitsSerializingEmptyListsError,
|
1069 1078 | > {
|
1070 1079 | // Async block used to run the handler and catch any Python error.
|
1071 1080 | let result = if handler.is_coroutine {
|
1072 1081 | ::tracing::trace!(
|
1073 - | name = "malformed_content_type_without_body_empty_input",
|
1082 + | name = "omits_serializing_empty_lists",
|
1074 1083 | "executing python handler coroutine"
|
1075 1084 | );
|
1076 1085 | let result = ::pyo3::Python::with_gil(|py| {
|
1077 1086 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1078 1087 | let coroutine = if handler.args == 1 {
|
1079 1088 | pyhandler.call1((input,))?
|
1080 1089 | } else {
|
1081 1090 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1082 1091 | };
|
1083 1092 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1084 1093 | })?;
|
1085 1094 | result.await.and_then(|r| {
|
1086 1095 | ::pyo3::Python::with_gil(|py| {
|
1087 - | r.extract::<crate::output::MalformedContentTypeWithoutBodyEmptyInputOutput>(py)
|
1096 + | r.extract::<crate::output::OmitsSerializingEmptyListsOutput>(py)
|
1088 1097 | })
|
1089 1098 | })
|
1090 1099 | } else {
|
1091 1100 | ::tracing::trace!(
|
1092 - | name = "malformed_content_type_without_body_empty_input",
|
1101 + | name = "omits_serializing_empty_lists",
|
1093 1102 | "executing python handler function"
|
1094 1103 | );
|
1095 1104 | ::pyo3::Python::with_gil(|py| {
|
1096 1105 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1097 1106 | let output = if handler.args == 1 {
|
1098 1107 | pyhandler.call1((input,))?
|
1099 1108 | } else {
|
1100 1109 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1101 1110 | };
|
1102 - | output.extract::<crate::output::MalformedContentTypeWithoutBodyEmptyInputOutput>()
|
1111 + | output.extract::<crate::output::OmitsSerializingEmptyListsOutput>()
|
1103 1112 | })
|
1104 1113 | };
|
1105 1114 | // Catch and record a Python traceback.
|
1106 1115 | result.map_err(|e| {
|
1107 1116 | let rich_py_err =
|
1108 1117 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1109 1118 | e.clone_ref(py)
|
1110 1119 | }));
|
1111 1120 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1112 1121 | e.into()
|
1113 1122 | })
|
1114 1123 | }
|
1115 1124 |
|
1116 - | /// Python handler for operation `MalformedContentTypeWithoutBody`.
|
1117 - | pub(crate) async fn malformed_content_type_without_body(
|
1118 - | input: crate::input::MalformedContentTypeWithoutBodyInput,
|
1125 + | /// Python handler for operation `QueryIdempotencyTokenAutoFill`.
|
1126 + | pub(crate) async fn query_idempotency_token_auto_fill(
|
1127 + | input: crate::input::QueryIdempotencyTokenAutoFillInput,
|
1119 1128 | state: ::aws_smithy_legacy_http_server::Extension<
|
1120 1129 | ::aws_smithy_http_server_python::context::PyContext,
|
1121 1130 | >,
|
1122 1131 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1123 1132 | ) -> std::result::Result<
|
1124 - | crate::output::MalformedContentTypeWithoutBodyOutput,
|
1125 - | crate::error::MalformedContentTypeWithoutBodyError,
|
1133 + | crate::output::QueryIdempotencyTokenAutoFillOutput,
|
1134 + | crate::error::QueryIdempotencyTokenAutoFillError,
|
1126 1135 | > {
|
1127 1136 | // Async block used to run the handler and catch any Python error.
|
1128 1137 | let result = if handler.is_coroutine {
|
1129 1138 | ::tracing::trace!(
|
1130 - | name = "malformed_content_type_without_body",
|
1139 + | name = "query_idempotency_token_auto_fill",
|
1131 1140 | "executing python handler coroutine"
|
1132 1141 | );
|
1133 1142 | let result = ::pyo3::Python::with_gil(|py| {
|
1134 1143 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1135 1144 | let coroutine = if handler.args == 1 {
|
1136 1145 | pyhandler.call1((input,))?
|
1137 1146 | } else {
|
1138 1147 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1139 1148 | };
|
1140 1149 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1141 1150 | })?;
|
1142 1151 | result.await.and_then(|r| {
|
1143 1152 | ::pyo3::Python::with_gil(|py| {
|
1144 - | r.extract::<crate::output::MalformedContentTypeWithoutBodyOutput>(py)
|
1153 + | r.extract::<crate::output::QueryIdempotencyTokenAutoFillOutput>(py)
|
1145 1154 | })
|
1146 1155 | })
|
1147 1156 | } else {
|
1148 1157 | ::tracing::trace!(
|
1149 - | name = "malformed_content_type_without_body",
|
1158 + | name = "query_idempotency_token_auto_fill",
|
1150 1159 | "executing python handler function"
|
1151 1160 | );
|
1152 1161 | ::pyo3::Python::with_gil(|py| {
|
1153 1162 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1154 1163 | let output = if handler.args == 1 {
|
1155 1164 | pyhandler.call1((input,))?
|
1156 1165 | } else {
|
1157 1166 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1158 1167 | };
|
1159 - | output.extract::<crate::output::MalformedContentTypeWithoutBodyOutput>()
|
1168 + | output.extract::<crate::output::QueryIdempotencyTokenAutoFillOutput>()
|
1160 1169 | })
|
1161 1170 | };
|
1162 1171 | // Catch and record a Python traceback.
|
1163 1172 | result.map_err(|e| {
|
1164 1173 | let rich_py_err =
|
1165 1174 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1166 1175 | e.clone_ref(py)
|
1167 1176 | }));
|
1168 1177 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1169 1178 | e.into()
|
1170 1179 | })
|
1171 1180 | }
|
1172 1181 |
|
1173 - | /// Python handler for operation `MalformedTimestampBodyHttpDate`.
|
1174 - | pub(crate) async fn malformed_timestamp_body_http_date(
|
1175 - | input: crate::input::MalformedTimestampBodyHttpDateInput,
|
1182 + | /// Python handler for operation `QueryPrecedence`.
|
1183 + | pub(crate) async fn query_precedence(
|
1184 + | input: crate::input::QueryPrecedenceInput,
|
1176 1185 | state: ::aws_smithy_legacy_http_server::Extension<
|
1177 1186 | ::aws_smithy_http_server_python::context::PyContext,
|
1178 1187 | >,
|
1179 1188 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1180 - | ) -> std::result::Result<
|
1181 - | crate::output::MalformedTimestampBodyHttpDateOutput,
|
1182 - | crate::error::MalformedTimestampBodyHttpDateError,
|
1183 - | > {
|
1189 + | ) -> std::result::Result<crate::output::QueryPrecedenceOutput, crate::error::QueryPrecedenceError> {
|
1184 1190 | // Async block used to run the handler and catch any Python error.
|
1185 1191 | let result = if handler.is_coroutine {
|
1186 1192 | ::tracing::trace!(
|
1187 - | name = "malformed_timestamp_body_http_date",
|
1193 + | name = "query_precedence",
|
1188 1194 | "executing python handler coroutine"
|
1189 1195 | );
|
1190 1196 | let result = ::pyo3::Python::with_gil(|py| {
|
1191 1197 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1192 1198 | let coroutine = if handler.args == 1 {
|
1193 1199 | pyhandler.call1((input,))?
|
1194 1200 | } else {
|
1195 1201 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1196 1202 | };
|
1197 1203 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1198 1204 | })?;
|
1199 1205 | result.await.and_then(|r| {
|
1200 - | ::pyo3::Python::with_gil(|py| {
|
1201 - | r.extract::<crate::output::MalformedTimestampBodyHttpDateOutput>(py)
|
1202 - | })
|
1206 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::QueryPrecedenceOutput>(py))
|
1203 1207 | })
|
1204 1208 | } else {
|
1205 1209 | ::tracing::trace!(
|
1206 - | name = "malformed_timestamp_body_http_date",
|
1210 + | name = "query_precedence",
|
1207 1211 | "executing python handler function"
|
1208 1212 | );
|
1209 1213 | ::pyo3::Python::with_gil(|py| {
|
1210 1214 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1211 1215 | let output = if handler.args == 1 {
|
1212 1216 | pyhandler.call1((input,))?
|
1213 1217 | } else {
|
1214 1218 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1215 1219 | };
|
1216 - | output.extract::<crate::output::MalformedTimestampBodyHttpDateOutput>()
|
1220 + | output.extract::<crate::output::QueryPrecedenceOutput>()
|
1217 1221 | })
|
1218 1222 | };
|
1219 1223 | // Catch and record a Python traceback.
|
1220 1224 | result.map_err(|e| {
|
1221 1225 | let rich_py_err =
|
1222 1226 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1223 1227 | e.clone_ref(py)
|
1224 1228 | }));
|
1225 1229 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1226 1230 | e.into()
|
1227 1231 | })
|
1228 1232 | }
|
1229 1233 |
|
1230 - | /// Python handler for operation `MalformedTimestampBodyDateTime`.
|
1231 - | pub(crate) async fn malformed_timestamp_body_date_time(
|
1232 - | input: crate::input::MalformedTimestampBodyDateTimeInput,
|
1234 + | /// Python handler for operation `HttpQueryParamsOnlyOperation`.
|
1235 + | pub(crate) async fn http_query_params_only_operation(
|
1236 + | input: crate::input::HttpQueryParamsOnlyOperationInput,
|
1233 1237 | state: ::aws_smithy_legacy_http_server::Extension<
|
1234 1238 | ::aws_smithy_http_server_python::context::PyContext,
|
1235 1239 | >,
|
1236 1240 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1237 1241 | ) -> std::result::Result<
|
1238 - | crate::output::MalformedTimestampBodyDateTimeOutput,
|
1239 - | crate::error::MalformedTimestampBodyDateTimeError,
|
1242 + | crate::output::HttpQueryParamsOnlyOperationOutput,
|
1243 + | crate::error::HttpQueryParamsOnlyOperationError,
|
1240 1244 | > {
|
1241 1245 | // Async block used to run the handler and catch any Python error.
|
1242 1246 | let result = if handler.is_coroutine {
|
1243 1247 | ::tracing::trace!(
|
1244 - | name = "malformed_timestamp_body_date_time",
|
1248 + | name = "http_query_params_only_operation",
|
1245 1249 | "executing python handler coroutine"
|
1246 1250 | );
|
1247 1251 | let result = ::pyo3::Python::with_gil(|py| {
|
1248 1252 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1249 1253 | let coroutine = if handler.args == 1 {
|
1250 1254 | pyhandler.call1((input,))?
|
1251 1255 | } else {
|
1252 1256 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1253 1257 | };
|
1254 1258 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1255 1259 | })?;
|
1256 1260 | result.await.and_then(|r| {
|
1257 1261 | ::pyo3::Python::with_gil(|py| {
|
1258 - | r.extract::<crate::output::MalformedTimestampBodyDateTimeOutput>(py)
|
1262 + | r.extract::<crate::output::HttpQueryParamsOnlyOperationOutput>(py)
|
1259 1263 | })
|
1260 1264 | })
|
1261 1265 | } else {
|
1262 1266 | ::tracing::trace!(
|
1263 - | name = "malformed_timestamp_body_date_time",
|
1267 + | name = "http_query_params_only_operation",
|
1264 1268 | "executing python handler function"
|
1265 1269 | );
|
1266 1270 | ::pyo3::Python::with_gil(|py| {
|
1267 1271 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1268 1272 | let output = if handler.args == 1 {
|
1269 1273 | pyhandler.call1((input,))?
|
1270 1274 | } else {
|
1271 1275 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1272 1276 | };
|
1273 - | output.extract::<crate::output::MalformedTimestampBodyDateTimeOutput>()
|
1277 + | output.extract::<crate::output::HttpQueryParamsOnlyOperationOutput>()
|
1274 1278 | })
|
1275 1279 | };
|
1276 1280 | // Catch and record a Python traceback.
|
1277 1281 | result.map_err(|e| {
|
1278 1282 | let rich_py_err =
|
1279 1283 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1280 1284 | e.clone_ref(py)
|
1281 1285 | }));
|
1282 1286 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1283 1287 | e.into()
|
1284 1288 | })
|
1285 1289 | }
|
1286 1290 |
|
1287 - | /// Python handler for operation `MalformedTimestampBodyDefault`.
|
1288 - | pub(crate) async fn malformed_timestamp_body_default(
|
1289 - | input: crate::input::MalformedTimestampBodyDefaultInput,
|
1291 + | /// Python handler for operation `QueryParamsAsStringListMap`.
|
1292 + | pub(crate) async fn query_params_as_string_list_map(
|
1293 + | input: crate::input::QueryParamsAsStringListMapInput,
|
1290 1294 | state: ::aws_smithy_legacy_http_server::Extension<
|
1291 1295 | ::aws_smithy_http_server_python::context::PyContext,
|
1292 1296 | >,
|
1293 1297 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1294 1298 | ) -> std::result::Result<
|
1295 - | crate::output::MalformedTimestampBodyDefaultOutput,
|
1296 - | crate::error::MalformedTimestampBodyDefaultError,
|
1299 + | crate::output::QueryParamsAsStringListMapOutput,
|
1300 + | crate::error::QueryParamsAsStringListMapError,
|
1297 1301 | > {
|
1298 1302 | // Async block used to run the handler and catch any Python error.
|
1299 1303 | let result = if handler.is_coroutine {
|
1300 1304 | ::tracing::trace!(
|
1301 - | name = "malformed_timestamp_body_default",
|
1305 + | name = "query_params_as_string_list_map",
|
1302 1306 | "executing python handler coroutine"
|
1303 1307 | );
|
1304 1308 | let result = ::pyo3::Python::with_gil(|py| {
|
1305 1309 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1306 1310 | let coroutine = if handler.args == 1 {
|
1307 1311 | pyhandler.call1((input,))?
|
1308 1312 | } else {
|
1309 1313 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1310 1314 | };
|
1311 1315 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1312 1316 | })?;
|
1313 1317 | result.await.and_then(|r| {
|
1314 1318 | ::pyo3::Python::with_gil(|py| {
|
1315 - | r.extract::<crate::output::MalformedTimestampBodyDefaultOutput>(py)
|
1319 + | r.extract::<crate::output::QueryParamsAsStringListMapOutput>(py)
|
1316 1320 | })
|
1317 1321 | })
|
1318 1322 | } else {
|
1319 1323 | ::tracing::trace!(
|
1320 - | name = "malformed_timestamp_body_default",
|
1324 + | name = "query_params_as_string_list_map",
|
1321 1325 | "executing python handler function"
|
1322 1326 | );
|
1323 1327 | ::pyo3::Python::with_gil(|py| {
|
1324 1328 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1325 1329 | let output = if handler.args == 1 {
|
1326 1330 | pyhandler.call1((input,))?
|
1327 1331 | } else {
|
1328 1332 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1329 1333 | };
|
1330 - | output.extract::<crate::output::MalformedTimestampBodyDefaultOutput>()
|
1334 + | output.extract::<crate::output::QueryParamsAsStringListMapOutput>()
|
1331 1335 | })
|
1332 1336 | };
|
1333 1337 | // Catch and record a Python traceback.
|
1334 1338 | result.map_err(|e| {
|
1335 1339 | let rich_py_err =
|
1336 1340 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1337 1341 | e.clone_ref(py)
|
1338 1342 | }));
|
1339 1343 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1340 1344 | e.into()
|
1341 1345 | })
|
1342 1346 | }
|
1343 1347 |
|
1344 - | /// Python handler for operation `MalformedTimestampHeaderEpoch`.
|
1345 - | pub(crate) async fn malformed_timestamp_header_epoch(
|
1346 - | input: crate::input::MalformedTimestampHeaderEpochInput,
|
1348 + | /// Python handler for operation `HttpPrefixHeaders`.
|
1349 + | pub(crate) async fn http_prefix_headers(
|
1350 + | input: crate::input::HttpPrefixHeadersInput,
|
1347 1351 | state: ::aws_smithy_legacy_http_server::Extension<
|
1348 1352 | ::aws_smithy_http_server_python::context::PyContext,
|
1349 1353 | >,
|
1350 1354 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1351 - | ) -> std::result::Result<
|
1352 - | crate::output::MalformedTimestampHeaderEpochOutput,
|
1353 - | crate::error::MalformedTimestampHeaderEpochError,
|
1354 - | > {
|
1355 + | ) -> std::result::Result<crate::output::HttpPrefixHeadersOutput, crate::error::HttpPrefixHeadersError>
|
1356 + | {
|
1355 1357 | // Async block used to run the handler and catch any Python error.
|
1356 1358 | let result = if handler.is_coroutine {
|
1357 1359 | ::tracing::trace!(
|
1358 - | name = "malformed_timestamp_header_epoch",
|
1360 + | name = "http_prefix_headers",
|
1359 1361 | "executing python handler coroutine"
|
1360 1362 | );
|
1361 1363 | let result = ::pyo3::Python::with_gil(|py| {
|
1362 1364 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1363 1365 | let coroutine = if handler.args == 1 {
|
1364 1366 | pyhandler.call1((input,))?
|
1365 1367 | } else {
|
1366 1368 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1367 1369 | };
|
1368 1370 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1369 1371 | })?;
|
1370 1372 | result.await.and_then(|r| {
|
1371 - | ::pyo3::Python::with_gil(|py| {
|
1372 - | r.extract::<crate::output::MalformedTimestampHeaderEpochOutput>(py)
|
1373 - | })
|
1373 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::HttpPrefixHeadersOutput>(py))
|
1374 1374 | })
|
1375 1375 | } else {
|
1376 1376 | ::tracing::trace!(
|
1377 - | name = "malformed_timestamp_header_epoch",
|
1377 + | name = "http_prefix_headers",
|
1378 1378 | "executing python handler function"
|
1379 1379 | );
|
1380 1380 | ::pyo3::Python::with_gil(|py| {
|
1381 1381 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1382 1382 | let output = if handler.args == 1 {
|
1383 1383 | pyhandler.call1((input,))?
|
1384 1384 | } else {
|
1385 1385 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1386 1386 | };
|
1387 - | output.extract::<crate::output::MalformedTimestampHeaderEpochOutput>()
|
1387 + | output.extract::<crate::output::HttpPrefixHeadersOutput>()
|
1388 1388 | })
|
1389 1389 | };
|
1390 1390 | // Catch and record a Python traceback.
|
1391 1391 | result.map_err(|e| {
|
1392 1392 | let rich_py_err =
|
1393 1393 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1394 1394 | e.clone_ref(py)
|
1395 1395 | }));
|
1396 1396 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1397 1397 | e.into()
|
1398 1398 | })
|
1399 1399 | }
|
1400 1400 |
|
1401 - | /// Python handler for operation `MalformedTimestampHeaderDateTime`.
|
1402 - | pub(crate) async fn malformed_timestamp_header_date_time(
|
1403 - | input: crate::input::MalformedTimestampHeaderDateTimeInput,
|
1401 + | /// Python handler for operation `HttpPrefixHeadersInResponse`.
|
1402 + | pub(crate) async fn http_prefix_headers_in_response(
|
1403 + | input: crate::input::HttpPrefixHeadersInResponseInput,
|
1404 1404 | state: ::aws_smithy_legacy_http_server::Extension<
|
1405 1405 | ::aws_smithy_http_server_python::context::PyContext,
|
1406 1406 | >,
|
1407 1407 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1408 1408 | ) -> std::result::Result<
|
1409 - | crate::output::MalformedTimestampHeaderDateTimeOutput,
|
1410 - | crate::error::MalformedTimestampHeaderDateTimeError,
|
1409 + | crate::output::HttpPrefixHeadersInResponseOutput,
|
1410 + | crate::error::HttpPrefixHeadersInResponseError,
|
1411 1411 | > {
|
1412 1412 | // Async block used to run the handler and catch any Python error.
|
1413 1413 | let result = if handler.is_coroutine {
|
1414 1414 | ::tracing::trace!(
|
1415 - | name = "malformed_timestamp_header_date_time",
|
1415 + | name = "http_prefix_headers_in_response",
|
1416 1416 | "executing python handler coroutine"
|
1417 1417 | );
|
1418 1418 | let result = ::pyo3::Python::with_gil(|py| {
|
1419 1419 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1420 1420 | let coroutine = if handler.args == 1 {
|
1421 1421 | pyhandler.call1((input,))?
|
1422 1422 | } else {
|
1423 1423 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1424 1424 | };
|
1425 1425 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1426 1426 | })?;
|
1427 1427 | result.await.and_then(|r| {
|
1428 1428 | ::pyo3::Python::with_gil(|py| {
|
1429 - | r.extract::<crate::output::MalformedTimestampHeaderDateTimeOutput>(py)
|
1429 + | r.extract::<crate::output::HttpPrefixHeadersInResponseOutput>(py)
|
1430 1430 | })
|
1431 1431 | })
|
1432 1432 | } else {
|
1433 1433 | ::tracing::trace!(
|
1434 - | name = "malformed_timestamp_header_date_time",
|
1434 + | name = "http_prefix_headers_in_response",
|
1435 1435 | "executing python handler function"
|
1436 1436 | );
|
1437 1437 | ::pyo3::Python::with_gil(|py| {
|
1438 1438 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1439 1439 | let output = if handler.args == 1 {
|
1440 1440 | pyhandler.call1((input,))?
|
1441 1441 | } else {
|
1442 1442 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1443 1443 | };
|
1444 - | output.extract::<crate::output::MalformedTimestampHeaderDateTimeOutput>()
|
1444 + | output.extract::<crate::output::HttpPrefixHeadersInResponseOutput>()
|
1445 1445 | })
|
1446 1446 | };
|
1447 1447 | // Catch and record a Python traceback.
|
1448 1448 | result.map_err(|e| {
|
1449 1449 | let rich_py_err =
|
1450 1450 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1451 1451 | e.clone_ref(py)
|
1452 1452 | }));
|
1453 1453 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1454 1454 | e.into()
|
1455 1455 | })
|
1456 1456 | }
|
1457 1457 |
|
1458 - | /// Python handler for operation `MalformedTimestampHeaderDefault`.
|
1459 - | pub(crate) async fn malformed_timestamp_header_default(
|
1460 - | input: crate::input::MalformedTimestampHeaderDefaultInput,
|
1458 + | /// Python handler for operation `HttpEmptyPrefixHeaders`.
|
1459 + | pub(crate) async fn http_empty_prefix_headers(
|
1460 + | input: crate::input::HttpEmptyPrefixHeadersInput,
|
1461 1461 | state: ::aws_smithy_legacy_http_server::Extension<
|
1462 1462 | ::aws_smithy_http_server_python::context::PyContext,
|
1463 1463 | >,
|
1464 1464 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1465 1465 | ) -> std::result::Result<
|
1466 - | crate::output::MalformedTimestampHeaderDefaultOutput,
|
1467 - | crate::error::MalformedTimestampHeaderDefaultError,
|
1466 + | crate::output::HttpEmptyPrefixHeadersOutput,
|
1467 + | crate::error::HttpEmptyPrefixHeadersError,
|
1468 1468 | > {
|
1469 1469 | // Async block used to run the handler and catch any Python error.
|
1470 1470 | let result = if handler.is_coroutine {
|
1471 1471 | ::tracing::trace!(
|
1472 - | name = "malformed_timestamp_header_default",
|
1472 + | name = "http_empty_prefix_headers",
|
1473 1473 | "executing python handler coroutine"
|
1474 1474 | );
|
1475 1475 | let result = ::pyo3::Python::with_gil(|py| {
|
1476 1476 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1477 1477 | let coroutine = if handler.args == 1 {
|
1478 1478 | pyhandler.call1((input,))?
|
1479 1479 | } else {
|
1480 1480 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1481 1481 | };
|
1482 1482 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1483 1483 | })?;
|
1484 1484 | result.await.and_then(|r| {
|
1485 1485 | ::pyo3::Python::with_gil(|py| {
|
1486 - | r.extract::<crate::output::MalformedTimestampHeaderDefaultOutput>(py)
|
1486 + | r.extract::<crate::output::HttpEmptyPrefixHeadersOutput>(py)
|
1487 1487 | })
|
1488 1488 | })
|
1489 1489 | } else {
|
1490 1490 | ::tracing::trace!(
|
1491 - | name = "malformed_timestamp_header_default",
|
1491 + | name = "http_empty_prefix_headers",
|
1492 1492 | "executing python handler function"
|
1493 1493 | );
|
1494 1494 | ::pyo3::Python::with_gil(|py| {
|
1495 1495 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1496 1496 | let output = if handler.args == 1 {
|
1497 1497 | pyhandler.call1((input,))?
|
1498 1498 | } else {
|
1499 1499 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1500 1500 | };
|
1501 - | output.extract::<crate::output::MalformedTimestampHeaderDefaultOutput>()
|
1501 + | output.extract::<crate::output::HttpEmptyPrefixHeadersOutput>()
|
1502 1502 | })
|
1503 1503 | };
|
1504 1504 | // Catch and record a Python traceback.
|
1505 1505 | result.map_err(|e| {
|
1506 1506 | let rich_py_err =
|
1507 1507 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1508 1508 | e.clone_ref(py)
|
1509 1509 | }));
|
1510 1510 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1511 1511 | e.into()
|
1512 1512 | })
|
1513 1513 | }
|
1514 1514 |
|
1515 - | /// Python handler for operation `MalformedTimestampQueryEpoch`.
|
1516 - | pub(crate) async fn malformed_timestamp_query_epoch(
|
1517 - | input: crate::input::MalformedTimestampQueryEpochInput,
|
1515 + | /// Python handler for operation `HttpPayloadTraits`.
|
1516 + | pub(crate) async fn http_payload_traits(
|
1517 + | input: crate::input::HttpPayloadTraitsInput,
|
1518 1518 | state: ::aws_smithy_legacy_http_server::Extension<
|
1519 1519 | ::aws_smithy_http_server_python::context::PyContext,
|
1520 1520 | >,
|
1521 1521 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1522 - | ) -> std::result::Result<
|
1523 - | crate::output::MalformedTimestampQueryEpochOutput,
|
1524 - | crate::error::MalformedTimestampQueryEpochError,
|
1525 - | > {
|
1522 + | ) -> std::result::Result<crate::output::HttpPayloadTraitsOutput, crate::error::HttpPayloadTraitsError>
|
1523 + | {
|
1526 1524 | // Async block used to run the handler and catch any Python error.
|
1527 1525 | let result = if handler.is_coroutine {
|
1528 1526 | ::tracing::trace!(
|
1529 - | name = "malformed_timestamp_query_epoch",
|
1527 + | name = "http_payload_traits",
|
1530 1528 | "executing python handler coroutine"
|
1531 1529 | );
|
1532 1530 | let result = ::pyo3::Python::with_gil(|py| {
|
1533 1531 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1534 1532 | let coroutine = if handler.args == 1 {
|
1535 1533 | pyhandler.call1((input,))?
|
1536 1534 | } else {
|
1537 1535 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1538 1536 | };
|
1539 1537 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1540 1538 | })?;
|
1541 1539 | result.await.and_then(|r| {
|
1542 - | ::pyo3::Python::with_gil(|py| {
|
1543 - | r.extract::<crate::output::MalformedTimestampQueryEpochOutput>(py)
|
1544 - | })
|
1540 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::HttpPayloadTraitsOutput>(py))
|
1545 1541 | })
|
1546 1542 | } else {
|
1547 1543 | ::tracing::trace!(
|
1548 - | name = "malformed_timestamp_query_epoch",
|
1544 + | name = "http_payload_traits",
|
1549 1545 | "executing python handler function"
|
1550 1546 | );
|
1551 1547 | ::pyo3::Python::with_gil(|py| {
|
1552 1548 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1553 1549 | let output = if handler.args == 1 {
|
1554 1550 | pyhandler.call1((input,))?
|
1555 1551 | } else {
|
1556 1552 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1557 1553 | };
|
1558 - | output.extract::<crate::output::MalformedTimestampQueryEpochOutput>()
|
1554 + | output.extract::<crate::output::HttpPayloadTraitsOutput>()
|
1559 1555 | })
|
1560 1556 | };
|
1561 1557 | // Catch and record a Python traceback.
|
1562 1558 | result.map_err(|e| {
|
1563 1559 | let rich_py_err =
|
1564 1560 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1565 1561 | e.clone_ref(py)
|
1566 1562 | }));
|
1567 1563 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1568 1564 | e.into()
|
1569 1565 | })
|
1570 1566 | }
|
1571 1567 |
|
1572 - | /// Python handler for operation `MalformedTimestampQueryHttpDate`.
|
1573 - | pub(crate) async fn malformed_timestamp_query_http_date(
|
1574 - | input: crate::input::MalformedTimestampQueryHttpDateInput,
|
1568 + | /// Python handler for operation `HttpPayloadTraitsWithMediaType`.
|
1569 + | pub(crate) async fn http_payload_traits_with_media_type(
|
1570 + | input: crate::input::HttpPayloadTraitsWithMediaTypeInput,
|
1575 1571 | state: ::aws_smithy_legacy_http_server::Extension<
|
1576 1572 | ::aws_smithy_http_server_python::context::PyContext,
|
1577 1573 | >,
|
1578 1574 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1579 1575 | ) -> std::result::Result<
|
1580 - | crate::output::MalformedTimestampQueryHttpDateOutput,
|
1581 - | crate::error::MalformedTimestampQueryHttpDateError,
|
1576 + | crate::output::HttpPayloadTraitsWithMediaTypeOutput,
|
1577 + | crate::error::HttpPayloadTraitsWithMediaTypeError,
|
1582 1578 | > {
|
1583 1579 | // Async block used to run the handler and catch any Python error.
|
1584 1580 | let result = if handler.is_coroutine {
|
1585 1581 | ::tracing::trace!(
|
1586 - | name = "malformed_timestamp_query_http_date",
|
1582 + | name = "http_payload_traits_with_media_type",
|
1587 1583 | "executing python handler coroutine"
|
1588 1584 | );
|
1589 1585 | let result = ::pyo3::Python::with_gil(|py| {
|
1590 1586 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1591 1587 | let coroutine = if handler.args == 1 {
|
1592 1588 | pyhandler.call1((input,))?
|
1593 1589 | } else {
|
1594 1590 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1595 1591 | };
|
1596 1592 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1597 1593 | })?;
|
1598 1594 | result.await.and_then(|r| {
|
1599 1595 | ::pyo3::Python::with_gil(|py| {
|
1600 - | r.extract::<crate::output::MalformedTimestampQueryHttpDateOutput>(py)
|
1596 + | r.extract::<crate::output::HttpPayloadTraitsWithMediaTypeOutput>(py)
|
1601 1597 | })
|
1602 1598 | })
|
1603 1599 | } else {
|
1604 1600 | ::tracing::trace!(
|
1605 - | name = "malformed_timestamp_query_http_date",
|
1601 + | name = "http_payload_traits_with_media_type",
|
1606 1602 | "executing python handler function"
|
1607 1603 | );
|
1608 1604 | ::pyo3::Python::with_gil(|py| {
|
1609 1605 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1610 1606 | let output = if handler.args == 1 {
|
1611 1607 | pyhandler.call1((input,))?
|
1612 1608 | } else {
|
1613 1609 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1614 1610 | };
|
1615 - | output.extract::<crate::output::MalformedTimestampQueryHttpDateOutput>()
|
1611 + | output.extract::<crate::output::HttpPayloadTraitsWithMediaTypeOutput>()
|
1616 1612 | })
|
1617 1613 | };
|
1618 1614 | // Catch and record a Python traceback.
|
1619 1615 | result.map_err(|e| {
|
1620 1616 | let rich_py_err =
|
1621 1617 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1622 1618 | e.clone_ref(py)
|
1623 1619 | }));
|
1624 1620 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1625 1621 | e.into()
|
1626 1622 | })
|
1627 1623 | }
|
1628 1624 |
|
1629 - | /// Python handler for operation `MalformedTimestampQueryDefault`.
|
1630 - | pub(crate) async fn malformed_timestamp_query_default(
|
1631 - | input: crate::input::MalformedTimestampQueryDefaultInput,
|
1625 + | /// Python handler for operation `HttpPayloadWithStructure`.
|
1626 + | pub(crate) async fn http_payload_with_structure(
|
1627 + | input: crate::input::HttpPayloadWithStructureInput,
|
1632 1628 | state: ::aws_smithy_legacy_http_server::Extension<
|
1633 1629 | ::aws_smithy_http_server_python::context::PyContext,
|
1634 1630 | >,
|
1635 1631 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1636 1632 | ) -> std::result::Result<
|
1637 - | crate::output::MalformedTimestampQueryDefaultOutput,
|
1638 - | crate::error::MalformedTimestampQueryDefaultError,
|
1633 + | crate::output::HttpPayloadWithStructureOutput,
|
1634 + | crate::error::HttpPayloadWithStructureError,
|
1639 1635 | > {
|
1640 1636 | // Async block used to run the handler and catch any Python error.
|
1641 1637 | let result = if handler.is_coroutine {
|
1642 1638 | ::tracing::trace!(
|
1643 - | name = "malformed_timestamp_query_default",
|
1639 + | name = "http_payload_with_structure",
|
1644 1640 | "executing python handler coroutine"
|
1645 1641 | );
|
1646 1642 | let result = ::pyo3::Python::with_gil(|py| {
|
1647 1643 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1648 1644 | let coroutine = if handler.args == 1 {
|
1649 1645 | pyhandler.call1((input,))?
|
1650 1646 | } else {
|
1651 1647 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1652 1648 | };
|
1653 1649 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1654 1650 | })?;
|
1655 1651 | result.await.and_then(|r| {
|
1656 1652 | ::pyo3::Python::with_gil(|py| {
|
1657 - | r.extract::<crate::output::MalformedTimestampQueryDefaultOutput>(py)
|
1653 + | r.extract::<crate::output::HttpPayloadWithStructureOutput>(py)
|
1658 1654 | })
|
1659 1655 | })
|
1660 1656 | } else {
|
1661 1657 | ::tracing::trace!(
|
1662 - | name = "malformed_timestamp_query_default",
|
1658 + | name = "http_payload_with_structure",
|
1663 1659 | "executing python handler function"
|
1664 1660 | );
|
1665 1661 | ::pyo3::Python::with_gil(|py| {
|
1666 1662 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1667 1663 | let output = if handler.args == 1 {
|
1668 1664 | pyhandler.call1((input,))?
|
1669 1665 | } else {
|
1670 1666 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1671 1667 | };
|
1672 - | output.extract::<crate::output::MalformedTimestampQueryDefaultOutput>()
|
1668 + | output.extract::<crate::output::HttpPayloadWithStructureOutput>()
|
1673 1669 | })
|
1674 1670 | };
|
1675 1671 | // Catch and record a Python traceback.
|
1676 1672 | result.map_err(|e| {
|
1677 1673 | let rich_py_err =
|
1678 1674 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1679 1675 | e.clone_ref(py)
|
1680 1676 | }));
|
1681 1677 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1682 1678 | e.into()
|
1683 1679 | })
|
1684 1680 | }
|
1685 1681 |
|
1686 - | /// Python handler for operation `MalformedTimestampPathEpoch`.
|
1687 - | pub(crate) async fn malformed_timestamp_path_epoch(
|
1688 - | input: crate::input::MalformedTimestampPathEpochInput,
|
1682 + | /// Python handler for operation `HttpEnumPayload`.
|
1683 + | pub(crate) async fn http_enum_payload(
|
1684 + | input: crate::input::HttpEnumPayloadInput,
|
1689 1685 | state: ::aws_smithy_legacy_http_server::Extension<
|
1690 1686 | ::aws_smithy_http_server_python::context::PyContext,
|
1691 1687 | >,
|
1692 1688 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1693 - | ) -> std::result::Result<
|
1694 - | crate::output::MalformedTimestampPathEpochOutput,
|
1695 - | crate::error::MalformedTimestampPathEpochError,
|
1696 - | > {
|
1689 + | ) -> std::result::Result<crate::output::HttpEnumPayloadOutput, crate::error::HttpEnumPayloadError> {
|
1697 1690 | // Async block used to run the handler and catch any Python error.
|
1698 1691 | let result = if handler.is_coroutine {
|
1699 1692 | ::tracing::trace!(
|
1700 - | name = "malformed_timestamp_path_epoch",
|
1693 + | name = "http_enum_payload",
|
1701 1694 | "executing python handler coroutine"
|
1702 1695 | );
|
1703 1696 | let result = ::pyo3::Python::with_gil(|py| {
|
1704 1697 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1705 1698 | let coroutine = if handler.args == 1 {
|
1706 1699 | pyhandler.call1((input,))?
|
1707 1700 | } else {
|
1708 1701 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1709 1702 | };
|
1710 1703 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1711 1704 | })?;
|
1712 1705 | result.await.and_then(|r| {
|
1713 - | ::pyo3::Python::with_gil(|py| {
|
1714 - | r.extract::<crate::output::MalformedTimestampPathEpochOutput>(py)
|
1715 - | })
|
1706 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::HttpEnumPayloadOutput>(py))
|
1716 1707 | })
|
1717 1708 | } else {
|
1718 1709 | ::tracing::trace!(
|
1719 - | name = "malformed_timestamp_path_epoch",
|
1710 + | name = "http_enum_payload",
|
1720 1711 | "executing python handler function"
|
1721 1712 | );
|
1722 1713 | ::pyo3::Python::with_gil(|py| {
|
1723 1714 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1724 1715 | let output = if handler.args == 1 {
|
1725 1716 | pyhandler.call1((input,))?
|
1726 1717 | } else {
|
1727 1718 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1728 1719 | };
|
1729 - | output.extract::<crate::output::MalformedTimestampPathEpochOutput>()
|
1720 + | output.extract::<crate::output::HttpEnumPayloadOutput>()
|
1730 1721 | })
|
1731 1722 | };
|
1732 1723 | // Catch and record a Python traceback.
|
1733 1724 | result.map_err(|e| {
|
1734 1725 | let rich_py_err =
|
1735 1726 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1736 1727 | e.clone_ref(py)
|
1737 1728 | }));
|
1738 1729 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1739 1730 | e.into()
|
1740 1731 | })
|
1741 1732 | }
|
1742 1733 |
|
1743 - | /// Python handler for operation `MalformedTimestampPathHttpDate`.
|
1744 - | pub(crate) async fn malformed_timestamp_path_http_date(
|
1745 - | input: crate::input::MalformedTimestampPathHttpDateInput,
|
1734 + | /// Python handler for operation `HttpStringPayload`.
|
1735 + | pub(crate) async fn http_string_payload(
|
1736 + | input: crate::input::HttpStringPayloadInput,
|
1746 1737 | state: ::aws_smithy_legacy_http_server::Extension<
|
1747 1738 | ::aws_smithy_http_server_python::context::PyContext,
|
1748 1739 | >,
|
1749 1740 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1750 - | ) -> std::result::Result<
|
1751 - | crate::output::MalformedTimestampPathHttpDateOutput,
|
1752 - | crate::error::MalformedTimestampPathHttpDateError,
|
1753 - | > {
|
1741 + | ) -> std::result::Result<crate::output::HttpStringPayloadOutput, crate::error::HttpStringPayloadError>
|
1742 + | {
|
1754 1743 | // Async block used to run the handler and catch any Python error.
|
1755 1744 | let result = if handler.is_coroutine {
|
1756 1745 | ::tracing::trace!(
|
1757 - | name = "malformed_timestamp_path_http_date",
|
1746 + | name = "http_string_payload",
|
1758 1747 | "executing python handler coroutine"
|
1759 1748 | );
|
1760 1749 | let result = ::pyo3::Python::with_gil(|py| {
|
1761 1750 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1762 1751 | let coroutine = if handler.args == 1 {
|
1763 1752 | pyhandler.call1((input,))?
|
1764 1753 | } else {
|
1765 1754 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1766 1755 | };
|
1767 1756 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1768 1757 | })?;
|
1769 1758 | result.await.and_then(|r| {
|
1770 - | ::pyo3::Python::with_gil(|py| {
|
1771 - | r.extract::<crate::output::MalformedTimestampPathHttpDateOutput>(py)
|
1772 - | })
|
1759 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::HttpStringPayloadOutput>(py))
|
1773 1760 | })
|
1774 1761 | } else {
|
1775 1762 | ::tracing::trace!(
|
1776 - | name = "malformed_timestamp_path_http_date",
|
1763 + | name = "http_string_payload",
|
1777 1764 | "executing python handler function"
|
1778 1765 | );
|
1779 1766 | ::pyo3::Python::with_gil(|py| {
|
1780 1767 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1781 1768 | let output = if handler.args == 1 {
|
1782 1769 | pyhandler.call1((input,))?
|
1783 1770 | } else {
|
1784 1771 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1785 1772 | };
|
1786 - | output.extract::<crate::output::MalformedTimestampPathHttpDateOutput>()
|
1773 + | output.extract::<crate::output::HttpStringPayloadOutput>()
|
1787 1774 | })
|
1788 1775 | };
|
1789 1776 | // Catch and record a Python traceback.
|
1790 1777 | result.map_err(|e| {
|
1791 1778 | let rich_py_err =
|
1792 1779 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1793 1780 | e.clone_ref(py)
|
1794 1781 | }));
|
1795 1782 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1796 1783 | e.into()
|
1797 1784 | })
|
1798 1785 | }
|
1799 1786 |
|
1800 - | /// Python handler for operation `MalformedTimestampPathDefault`.
|
1801 - | pub(crate) async fn malformed_timestamp_path_default(
|
1802 - | input: crate::input::MalformedTimestampPathDefaultInput,
|
1787 + | /// Python handler for operation `HttpPayloadWithUnion`.
|
1788 + | pub(crate) async fn http_payload_with_union(
|
1789 + | input: crate::input::HttpPayloadWithUnionInput,
|
1803 1790 | state: ::aws_smithy_legacy_http_server::Extension<
|
1804 1791 | ::aws_smithy_http_server_python::context::PyContext,
|
1805 1792 | >,
|
1806 1793 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1807 1794 | ) -> std::result::Result<
|
1808 - | crate::output::MalformedTimestampPathDefaultOutput,
|
1809 - | crate::error::MalformedTimestampPathDefaultError,
|
1795 + | crate::output::HttpPayloadWithUnionOutput,
|
1796 + | crate::error::HttpPayloadWithUnionError,
|
1810 1797 | > {
|
1811 1798 | // Async block used to run the handler and catch any Python error.
|
1812 1799 | let result = if handler.is_coroutine {
|
1813 1800 | ::tracing::trace!(
|
1814 - | name = "malformed_timestamp_path_default",
|
1801 + | name = "http_payload_with_union",
|
1815 1802 | "executing python handler coroutine"
|
1816 1803 | );
|
1817 1804 | let result = ::pyo3::Python::with_gil(|py| {
|
1818 1805 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1819 1806 | let coroutine = if handler.args == 1 {
|
1820 1807 | pyhandler.call1((input,))?
|
1821 1808 | } else {
|
1822 1809 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1823 1810 | };
|
1824 1811 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1825 1812 | })?;
|
1826 1813 | result.await.and_then(|r| {
|
1827 1814 | ::pyo3::Python::with_gil(|py| {
|
1828 - | r.extract::<crate::output::MalformedTimestampPathDefaultOutput>(py)
|
1815 + | r.extract::<crate::output::HttpPayloadWithUnionOutput>(py)
|
1829 1816 | })
|
1830 1817 | })
|
1831 1818 | } else {
|
1832 1819 | ::tracing::trace!(
|
1833 - | name = "malformed_timestamp_path_default",
|
1820 + | name = "http_payload_with_union",
|
1834 1821 | "executing python handler function"
|
1835 1822 | );
|
1836 1823 | ::pyo3::Python::with_gil(|py| {
|
1837 1824 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1838 1825 | let output = if handler.args == 1 {
|
1839 1826 | pyhandler.call1((input,))?
|
1840 1827 | } else {
|
1841 1828 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1842 1829 | };
|
1843 - | output.extract::<crate::output::MalformedTimestampPathDefaultOutput>()
|
1830 + | output.extract::<crate::output::HttpPayloadWithUnionOutput>()
|
1844 1831 | })
|
1845 1832 | };
|
1846 1833 | // Catch and record a Python traceback.
|
1847 1834 | result.map_err(|e| {
|
1848 1835 | let rich_py_err =
|
1849 1836 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1850 1837 | e.clone_ref(py)
|
1851 1838 | }));
|
1852 1839 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1853 1840 | e.into()
|
1854 1841 | })
|
1855 1842 | }
|
1856 1843 |
|
1857 - | /// Python handler for operation `MalformedString`.
|
1858 - | pub(crate) async fn malformed_string(
|
1859 - | input: crate::input::MalformedStringInput,
|
1844 + | /// Python handler for operation `HttpResponseCode`.
|
1845 + | pub(crate) async fn http_response_code(
|
1846 + | input: crate::input::HttpResponseCodeInput,
|
1860 1847 | state: ::aws_smithy_legacy_http_server::Extension<
|
1861 1848 | ::aws_smithy_http_server_python::context::PyContext,
|
1862 1849 | >,
|
1863 1850 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1864 - | ) -> std::result::Result<crate::output::MalformedStringOutput, crate::error::MalformedStringError> {
|
1851 + | ) -> std::result::Result<crate::output::HttpResponseCodeOutput, crate::error::HttpResponseCodeError>
|
1852 + | {
|
1865 1853 | // Async block used to run the handler and catch any Python error.
|
1866 1854 | let result = if handler.is_coroutine {
|
1867 1855 | ::tracing::trace!(
|
1868 - | name = "malformed_string",
|
1856 + | name = "http_response_code",
|
1869 1857 | "executing python handler coroutine"
|
1870 1858 | );
|
1871 1859 | let result = ::pyo3::Python::with_gil(|py| {
|
1872 1860 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1873 1861 | let coroutine = if handler.args == 1 {
|
1874 1862 | pyhandler.call1((input,))?
|
1875 1863 | } else {
|
1876 1864 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1877 1865 | };
|
1878 1866 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1879 1867 | })?;
|
1880 1868 | result.await.and_then(|r| {
|
1881 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedStringOutput>(py))
|
1869 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::HttpResponseCodeOutput>(py))
|
1882 1870 | })
|
1883 1871 | } else {
|
1884 1872 | ::tracing::trace!(
|
1885 - | name = "malformed_string",
|
1873 + | name = "http_response_code",
|
1886 1874 | "executing python handler function"
|
1887 1875 | );
|
1888 1876 | ::pyo3::Python::with_gil(|py| {
|
1889 1877 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1890 1878 | let output = if handler.args == 1 {
|
1891 1879 | pyhandler.call1((input,))?
|
1892 1880 | } else {
|
1893 1881 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1894 1882 | };
|
1895 - | output.extract::<crate::output::MalformedStringOutput>()
|
1883 + | output.extract::<crate::output::HttpResponseCodeOutput>()
|
1896 1884 | })
|
1897 1885 | };
|
1898 1886 | // Catch and record a Python traceback.
|
1899 1887 | result.map_err(|e| {
|
1900 1888 | let rich_py_err =
|
1901 1889 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1902 1890 | e.clone_ref(py)
|
1903 1891 | }));
|
1904 1892 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1905 1893 | e.into()
|
1906 1894 | })
|
1907 1895 | }
|
1908 1896 |
|
1909 - | /// Python handler for operation `MalformedDouble`.
|
1910 - | pub(crate) async fn malformed_double(
|
1911 - | input: crate::input::MalformedDoubleInput,
|
1897 + | /// Python handler for operation `ResponseCodeRequired`.
|
1898 + | pub(crate) async fn response_code_required(
|
1899 + | input: crate::input::ResponseCodeRequiredInput,
|
1912 1900 | state: ::aws_smithy_legacy_http_server::Extension<
|
1913 1901 | ::aws_smithy_http_server_python::context::PyContext,
|
1914 1902 | >,
|
1915 1903 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1916 - | ) -> std::result::Result<crate::output::MalformedDoubleOutput, crate::error::MalformedDoubleError> {
|
1904 + | ) -> std::result::Result<
|
1905 + | crate::output::ResponseCodeRequiredOutput,
|
1906 + | crate::error::ResponseCodeRequiredError,
|
1907 + | > {
|
1917 1908 | // Async block used to run the handler and catch any Python error.
|
1918 1909 | let result = if handler.is_coroutine {
|
1919 1910 | ::tracing::trace!(
|
1920 - | name = "malformed_double",
|
1911 + | name = "response_code_required",
|
1921 1912 | "executing python handler coroutine"
|
1922 1913 | );
|
1923 1914 | let result = ::pyo3::Python::with_gil(|py| {
|
1924 1915 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1925 1916 | let coroutine = if handler.args == 1 {
|
1926 1917 | pyhandler.call1((input,))?
|
1927 1918 | } else {
|
1928 1919 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1929 1920 | };
|
1930 1921 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1931 1922 | })?;
|
1932 1923 | result.await.and_then(|r| {
|
1933 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedDoubleOutput>(py))
|
1924 + | ::pyo3::Python::with_gil(|py| {
|
1925 + | r.extract::<crate::output::ResponseCodeRequiredOutput>(py)
|
1926 + | })
|
1934 1927 | })
|
1935 1928 | } else {
|
1936 1929 | ::tracing::trace!(
|
1937 - | name = "malformed_double",
|
1930 + | name = "response_code_required",
|
1938 1931 | "executing python handler function"
|
1939 1932 | );
|
1940 1933 | ::pyo3::Python::with_gil(|py| {
|
1941 1934 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1942 1935 | let output = if handler.args == 1 {
|
1943 1936 | pyhandler.call1((input,))?
|
1944 1937 | } else {
|
1945 1938 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1946 1939 | };
|
1947 - | output.extract::<crate::output::MalformedDoubleOutput>()
|
1940 + | output.extract::<crate::output::ResponseCodeRequiredOutput>()
|
1948 1941 | })
|
1949 1942 | };
|
1950 1943 | // Catch and record a Python traceback.
|
1951 1944 | result.map_err(|e| {
|
1952 1945 | let rich_py_err =
|
1953 1946 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
1954 1947 | e.clone_ref(py)
|
1955 1948 | }));
|
1956 1949 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
1957 1950 | e.into()
|
1958 1951 | })
|
1959 1952 | }
|
1960 1953 |
|
1961 - | /// Python handler for operation `MalformedFloat`.
|
1962 - | pub(crate) async fn malformed_float(
|
1963 - | input: crate::input::MalformedFloatInput,
|
1954 + | /// Python handler for operation `ResponseCodeHttpFallback`.
|
1955 + | pub(crate) async fn response_code_http_fallback(
|
1956 + | input: crate::input::ResponseCodeHttpFallbackInput,
|
1964 1957 | state: ::aws_smithy_legacy_http_server::Extension<
|
1965 1958 | ::aws_smithy_http_server_python::context::PyContext,
|
1966 1959 | >,
|
1967 1960 | handler: ::aws_smithy_http_server_python::PyHandler,
|
1968 - | ) -> std::result::Result<crate::output::MalformedFloatOutput, crate::error::MalformedFloatError> {
|
1961 + | ) -> std::result::Result<
|
1962 + | crate::output::ResponseCodeHttpFallbackOutput,
|
1963 + | crate::error::ResponseCodeHttpFallbackError,
|
1964 + | > {
|
1969 1965 | // Async block used to run the handler and catch any Python error.
|
1970 1966 | let result = if handler.is_coroutine {
|
1971 1967 | ::tracing::trace!(
|
1972 - | name = "malformed_float",
|
1968 + | name = "response_code_http_fallback",
|
1973 1969 | "executing python handler coroutine"
|
1974 1970 | );
|
1975 1971 | let result = ::pyo3::Python::with_gil(|py| {
|
1976 1972 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1977 1973 | let coroutine = if handler.args == 1 {
|
1978 1974 | pyhandler.call1((input,))?
|
1979 1975 | } else {
|
1980 1976 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1981 1977 | };
|
1982 1978 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
1983 1979 | })?;
|
1984 1980 | result.await.and_then(|r| {
|
1985 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedFloatOutput>(py))
|
1981 + | ::pyo3::Python::with_gil(|py| {
|
1982 + | r.extract::<crate::output::ResponseCodeHttpFallbackOutput>(py)
|
1983 + | })
|
1986 1984 | })
|
1987 1985 | } else {
|
1988 1986 | ::tracing::trace!(
|
1989 - | name = "malformed_float",
|
1987 + | name = "response_code_http_fallback",
|
1990 1988 | "executing python handler function"
|
1991 1989 | );
|
1992 1990 | ::pyo3::Python::with_gil(|py| {
|
1993 1991 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
1994 1992 | let output = if handler.args == 1 {
|
1995 1993 | pyhandler.call1((input,))?
|
1996 1994 | } else {
|
1997 1995 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
1998 1996 | };
|
1999 - | output.extract::<crate::output::MalformedFloatOutput>()
|
1997 + | output.extract::<crate::output::ResponseCodeHttpFallbackOutput>()
|
2000 1998 | })
|
2001 1999 | };
|
2002 2000 | // Catch and record a Python traceback.
|
2003 2001 | result.map_err(|e| {
|
2004 2002 | let rich_py_err =
|
2005 2003 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2006 2004 | e.clone_ref(py)
|
2007 2005 | }));
|
2008 2006 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2009 2007 | e.into()
|
2010 2008 | })
|
2011 2009 | }
|
2012 2010 |
|
2013 - | /// Python handler for operation `MalformedLong`.
|
2014 - | pub(crate) async fn malformed_long(
|
2015 - | input: crate::input::MalformedLongInput,
|
2011 + | /// Python handler for operation `StreamingTraits`.
|
2012 + | pub(crate) async fn streaming_traits(
|
2013 + | input: crate::input::StreamingTraitsInput,
|
2016 2014 | state: ::aws_smithy_legacy_http_server::Extension<
|
2017 2015 | ::aws_smithy_http_server_python::context::PyContext,
|
2018 2016 | >,
|
2019 2017 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2020 - | ) -> std::result::Result<crate::output::MalformedLongOutput, crate::error::MalformedLongError> {
|
2018 + | ) -> std::result::Result<crate::output::StreamingTraitsOutput, crate::error::StreamingTraitsError> {
|
2021 2019 | // Async block used to run the handler and catch any Python error.
|
2022 2020 | let result = if handler.is_coroutine {
|
2023 2021 | ::tracing::trace!(
|
2024 - | name = "malformed_long",
|
2022 + | name = "streaming_traits",
|
2025 2023 | "executing python handler coroutine"
|
2026 2024 | );
|
2027 2025 | let result = ::pyo3::Python::with_gil(|py| {
|
2028 2026 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2029 2027 | let coroutine = if handler.args == 1 {
|
2030 2028 | pyhandler.call1((input,))?
|
2031 2029 | } else {
|
2032 2030 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2033 2031 | };
|
2034 2032 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2035 2033 | })?;
|
2036 2034 | result.await.and_then(|r| {
|
2037 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedLongOutput>(py))
|
2035 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::StreamingTraitsOutput>(py))
|
2038 2036 | })
|
2039 2037 | } else {
|
2040 - | ::tracing::trace!(name = "malformed_long", "executing python handler function");
|
2038 + | ::tracing::trace!(
|
2039 + | name = "streaming_traits",
|
2040 + | "executing python handler function"
|
2041 + | );
|
2041 2042 | ::pyo3::Python::with_gil(|py| {
|
2042 2043 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2043 2044 | let output = if handler.args == 1 {
|
2044 2045 | pyhandler.call1((input,))?
|
2045 2046 | } else {
|
2046 2047 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2047 2048 | };
|
2048 - | output.extract::<crate::output::MalformedLongOutput>()
|
2049 + | output.extract::<crate::output::StreamingTraitsOutput>()
|
2049 2050 | })
|
2050 2051 | };
|
2051 2052 | // Catch and record a Python traceback.
|
2052 2053 | result.map_err(|e| {
|
2053 2054 | let rich_py_err =
|
2054 2055 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2055 2056 | e.clone_ref(py)
|
2056 2057 | }));
|
2057 2058 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2058 2059 | e.into()
|
2059 2060 | })
|
2060 2061 | }
|
2061 2062 |
|
2062 - | /// Python handler for operation `MalformedShort`.
|
2063 - | pub(crate) async fn malformed_short(
|
2064 - | input: crate::input::MalformedShortInput,
|
2063 + | /// Python handler for operation `StreamingTraitsRequireLength`.
|
2064 + | pub(crate) async fn streaming_traits_require_length(
|
2065 + | input: crate::input::StreamingTraitsRequireLengthInput,
|
2065 2066 | state: ::aws_smithy_legacy_http_server::Extension<
|
2066 2067 | ::aws_smithy_http_server_python::context::PyContext,
|
2067 2068 | >,
|
2068 2069 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2069 - | ) -> std::result::Result<crate::output::MalformedShortOutput, crate::error::MalformedShortError> {
|
2070 + | ) -> std::result::Result<
|
2071 + | crate::output::StreamingTraitsRequireLengthOutput,
|
2072 + | crate::error::StreamingTraitsRequireLengthError,
|
2073 + | > {
|
2070 2074 | // Async block used to run the handler and catch any Python error.
|
2071 2075 | let result = if handler.is_coroutine {
|
2072 2076 | ::tracing::trace!(
|
2073 - | name = "malformed_short",
|
2077 + | name = "streaming_traits_require_length",
|
2074 2078 | "executing python handler coroutine"
|
2075 2079 | );
|
2076 2080 | let result = ::pyo3::Python::with_gil(|py| {
|
2077 2081 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2078 2082 | let coroutine = if handler.args == 1 {
|
2079 2083 | pyhandler.call1((input,))?
|
2080 2084 | } else {
|
2081 2085 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2082 2086 | };
|
2083 2087 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2084 2088 | })?;
|
2085 2089 | result.await.and_then(|r| {
|
2086 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedShortOutput>(py))
|
2090 + | ::pyo3::Python::with_gil(|py| {
|
2091 + | r.extract::<crate::output::StreamingTraitsRequireLengthOutput>(py)
|
2092 + | })
|
2087 2093 | })
|
2088 2094 | } else {
|
2089 2095 | ::tracing::trace!(
|
2090 - | name = "malformed_short",
|
2096 + | name = "streaming_traits_require_length",
|
2091 2097 | "executing python handler function"
|
2092 2098 | );
|
2093 2099 | ::pyo3::Python::with_gil(|py| {
|
2094 2100 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2095 2101 | let output = if handler.args == 1 {
|
2096 2102 | pyhandler.call1((input,))?
|
2097 2103 | } else {
|
2098 2104 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2099 2105 | };
|
2100 - | output.extract::<crate::output::MalformedShortOutput>()
|
2106 + | output.extract::<crate::output::StreamingTraitsRequireLengthOutput>()
|
2101 2107 | })
|
2102 2108 | };
|
2103 2109 | // Catch and record a Python traceback.
|
2104 2110 | result.map_err(|e| {
|
2105 2111 | let rich_py_err =
|
2106 2112 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2107 2113 | e.clone_ref(py)
|
2108 2114 | }));
|
2109 2115 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2110 2116 | e.into()
|
2111 2117 | })
|
2112 2118 | }
|
2113 2119 |
|
2114 - | /// Python handler for operation `MalformedByte`.
|
2115 - | pub(crate) async fn malformed_byte(
|
2116 - | input: crate::input::MalformedByteInput,
|
2120 + | /// Python handler for operation `StreamingTraitsWithMediaType`.
|
2121 + | pub(crate) async fn streaming_traits_with_media_type(
|
2122 + | input: crate::input::StreamingTraitsWithMediaTypeInput,
|
2117 2123 | state: ::aws_smithy_legacy_http_server::Extension<
|
2118 2124 | ::aws_smithy_http_server_python::context::PyContext,
|
2119 2125 | >,
|
2120 2126 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2121 - | ) -> std::result::Result<crate::output::MalformedByteOutput, crate::error::MalformedByteError> {
|
2127 + | ) -> std::result::Result<
|
2128 + | crate::output::StreamingTraitsWithMediaTypeOutput,
|
2129 + | crate::error::StreamingTraitsWithMediaTypeError,
|
2130 + | > {
|
2122 2131 | // Async block used to run the handler and catch any Python error.
|
2123 2132 | let result = if handler.is_coroutine {
|
2124 2133 | ::tracing::trace!(
|
2125 - | name = "malformed_byte",
|
2134 + | name = "streaming_traits_with_media_type",
|
2126 2135 | "executing python handler coroutine"
|
2127 2136 | );
|
2128 2137 | let result = ::pyo3::Python::with_gil(|py| {
|
2129 2138 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2130 2139 | let coroutine = if handler.args == 1 {
|
2131 2140 | pyhandler.call1((input,))?
|
2132 2141 | } else {
|
2133 2142 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2134 2143 | };
|
2135 2144 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2136 2145 | })?;
|
2137 2146 | result.await.and_then(|r| {
|
2138 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedByteOutput>(py))
|
2147 + | ::pyo3::Python::with_gil(|py| {
|
2148 + | r.extract::<crate::output::StreamingTraitsWithMediaTypeOutput>(py)
|
2149 + | })
|
2139 2150 | })
|
2140 2151 | } else {
|
2141 - | ::tracing::trace!(name = "malformed_byte", "executing python handler function");
|
2152 + | ::tracing::trace!(
|
2153 + | name = "streaming_traits_with_media_type",
|
2154 + | "executing python handler function"
|
2155 + | );
|
2142 2156 | ::pyo3::Python::with_gil(|py| {
|
2143 2157 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2144 2158 | let output = if handler.args == 1 {
|
2145 2159 | pyhandler.call1((input,))?
|
2146 2160 | } else {
|
2147 2161 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2148 2162 | };
|
2149 - | output.extract::<crate::output::MalformedByteOutput>()
|
2163 + | output.extract::<crate::output::StreamingTraitsWithMediaTypeOutput>()
|
2150 2164 | })
|
2151 2165 | };
|
2152 2166 | // Catch and record a Python traceback.
|
2153 2167 | result.map_err(|e| {
|
2154 2168 | let rich_py_err =
|
2155 2169 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2156 2170 | e.clone_ref(py)
|
2157 2171 | }));
|
2158 2172 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2159 2173 | e.into()
|
2160 2174 | })
|
2161 2175 | }
|
2162 2176 |
|
2163 - | /// Python handler for operation `MalformedBlob`.
|
2164 - | pub(crate) async fn malformed_blob(
|
2165 - | input: crate::input::MalformedBlobInput,
|
2177 + | /// Python handler for operation `GreetingWithErrors`.
|
2178 + | pub(crate) async fn greeting_with_errors(
|
2179 + | input: crate::input::GreetingWithErrorsInput,
|
2166 2180 | state: ::aws_smithy_legacy_http_server::Extension<
|
2167 2181 | ::aws_smithy_http_server_python::context::PyContext,
|
2168 2182 | >,
|
2169 2183 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2170 - | ) -> std::result::Result<crate::output::MalformedBlobOutput, crate::error::MalformedBlobError> {
|
2184 + | ) -> std::result::Result<
|
2185 + | crate::output::GreetingWithErrorsOutput,
|
2186 + | crate::error::GreetingWithErrorsError,
|
2187 + | > {
|
2171 2188 | // Async block used to run the handler and catch any Python error.
|
2172 2189 | let result = if handler.is_coroutine {
|
2173 2190 | ::tracing::trace!(
|
2174 - | name = "malformed_blob",
|
2191 + | name = "greeting_with_errors",
|
2175 2192 | "executing python handler coroutine"
|
2176 2193 | );
|
2177 2194 | let result = ::pyo3::Python::with_gil(|py| {
|
2178 2195 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2179 2196 | let coroutine = if handler.args == 1 {
|
2180 2197 | pyhandler.call1((input,))?
|
2181 2198 | } else {
|
2182 2199 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2183 2200 | };
|
2184 2201 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2185 2202 | })?;
|
2186 2203 | result.await.and_then(|r| {
|
2187 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedBlobOutput>(py))
|
2204 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::GreetingWithErrorsOutput>(py))
|
2188 2205 | })
|
2189 2206 | } else {
|
2190 - | ::tracing::trace!(name = "malformed_blob", "executing python handler function");
|
2207 + | ::tracing::trace!(
|
2208 + | name = "greeting_with_errors",
|
2209 + | "executing python handler function"
|
2210 + | );
|
2191 2211 | ::pyo3::Python::with_gil(|py| {
|
2192 2212 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2193 2213 | let output = if handler.args == 1 {
|
2194 2214 | pyhandler.call1((input,))?
|
2195 2215 | } else {
|
2196 2216 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2197 2217 | };
|
2198 - | output.extract::<crate::output::MalformedBlobOutput>()
|
2218 + | output.extract::<crate::output::GreetingWithErrorsOutput>()
|
2199 2219 | })
|
2200 2220 | };
|
2201 2221 | // Catch and record a Python traceback.
|
2202 2222 | result.map_err(|e| {
|
2203 2223 | let rich_py_err =
|
2204 2224 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2205 2225 | e.clone_ref(py)
|
2206 2226 | }));
|
2207 2227 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2208 2228 | e.into()
|
2209 2229 | })
|
2210 2230 | }
|
2211 2231 |
|
2212 - | /// Python handler for operation `MalformedMap`.
|
2213 - | pub(crate) async fn malformed_map(
|
2214 - | input: crate::input::MalformedMapInput,
|
2232 + | /// Python handler for operation `SimpleScalarProperties`.
|
2233 + | pub(crate) async fn simple_scalar_properties(
|
2234 + | input: crate::input::SimpleScalarPropertiesInput,
|
2235 + | state: ::aws_smithy_legacy_http_server::Extension<
|
2236 + | ::aws_smithy_http_server_python::context::PyContext,
|
2237 + | >,
|
2238 + | handler: ::aws_smithy_http_server_python::PyHandler,
|
2239 + | ) -> std::result::Result<
|
2240 + | crate::output::SimpleScalarPropertiesOutput,
|
2241 + | crate::error::SimpleScalarPropertiesError,
|
2242 + | > {
|
2243 + | // Async block used to run the handler and catch any Python error.
|
2244 + | let result = if handler.is_coroutine {
|
2245 + | ::tracing::trace!(
|
2246 + | name = "simple_scalar_properties",
|
2247 + | "executing python handler coroutine"
|
2248 + | );
|
2249 + | let result = ::pyo3::Python::with_gil(|py| {
|
2250 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2251 + | let coroutine = if handler.args == 1 {
|
2252 + | pyhandler.call1((input,))?
|
2253 + | } else {
|
2254 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2255 + | };
|
2256 + | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2257 + | })?;
|
2258 + | result.await.and_then(|r| {
|
2259 + | ::pyo3::Python::with_gil(|py| {
|
2260 + | r.extract::<crate::output::SimpleScalarPropertiesOutput>(py)
|
2261 + | })
|
2262 + | })
|
2263 + | } else {
|
2264 + | ::tracing::trace!(
|
2265 + | name = "simple_scalar_properties",
|
2266 + | "executing python handler function"
|
2267 + | );
|
2268 + | ::pyo3::Python::with_gil(|py| {
|
2269 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2270 + | let output = if handler.args == 1 {
|
2271 + | pyhandler.call1((input,))?
|
2272 + | } else {
|
2273 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2274 + | };
|
2275 + | output.extract::<crate::output::SimpleScalarPropertiesOutput>()
|
2276 + | })
|
2277 + | };
|
2278 + | // Catch and record a Python traceback.
|
2279 + | result.map_err(|e| {
|
2280 + | let rich_py_err =
|
2281 + | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2282 + | e.clone_ref(py)
|
2283 + | }));
|
2284 + | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2285 + | e.into()
|
2286 + | })
|
2287 + | }
|
2288 + |
|
2289 + | /// Python handler for operation `JsonTimestamps`.
|
2290 + | pub(crate) async fn json_timestamps(
|
2291 + | input: crate::input::JsonTimestampsInput,
|
2292 + | state: ::aws_smithy_legacy_http_server::Extension<
|
2293 + | ::aws_smithy_http_server_python::context::PyContext,
|
2294 + | >,
|
2295 + | handler: ::aws_smithy_http_server_python::PyHandler,
|
2296 + | ) -> std::result::Result<crate::output::JsonTimestampsOutput, crate::error::JsonTimestampsError> {
|
2297 + | // Async block used to run the handler and catch any Python error.
|
2298 + | let result = if handler.is_coroutine {
|
2299 + | ::tracing::trace!(
|
2300 + | name = "json_timestamps",
|
2301 + | "executing python handler coroutine"
|
2302 + | );
|
2303 + | let result = ::pyo3::Python::with_gil(|py| {
|
2304 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2305 + | let coroutine = if handler.args == 1 {
|
2306 + | pyhandler.call1((input,))?
|
2307 + | } else {
|
2308 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2309 + | };
|
2310 + | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2311 + | })?;
|
2312 + | result.await.and_then(|r| {
|
2313 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonTimestampsOutput>(py))
|
2314 + | })
|
2315 + | } else {
|
2316 + | ::tracing::trace!(
|
2317 + | name = "json_timestamps",
|
2318 + | "executing python handler function"
|
2319 + | );
|
2320 + | ::pyo3::Python::with_gil(|py| {
|
2321 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2322 + | let output = if handler.args == 1 {
|
2323 + | pyhandler.call1((input,))?
|
2324 + | } else {
|
2325 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2326 + | };
|
2327 + | output.extract::<crate::output::JsonTimestampsOutput>()
|
2328 + | })
|
2329 + | };
|
2330 + | // Catch and record a Python traceback.
|
2331 + | result.map_err(|e| {
|
2332 + | let rich_py_err =
|
2333 + | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2334 + | e.clone_ref(py)
|
2335 + | }));
|
2336 + | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2337 + | e.into()
|
2338 + | })
|
2339 + | }
|
2340 + |
|
2341 + | /// Python handler for operation `JsonEnums`.
|
2342 + | pub(crate) async fn json_enums(
|
2343 + | input: crate::input::JsonEnumsInput,
|
2344 + | state: ::aws_smithy_legacy_http_server::Extension<
|
2345 + | ::aws_smithy_http_server_python::context::PyContext,
|
2346 + | >,
|
2347 + | handler: ::aws_smithy_http_server_python::PyHandler,
|
2348 + | ) -> std::result::Result<crate::output::JsonEnumsOutput, crate::error::JsonEnumsError> {
|
2349 + | // Async block used to run the handler and catch any Python error.
|
2350 + | let result = if handler.is_coroutine {
|
2351 + | ::tracing::trace!(name = "json_enums", "executing python handler coroutine");
|
2352 + | let result = ::pyo3::Python::with_gil(|py| {
|
2353 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2354 + | let coroutine = if handler.args == 1 {
|
2355 + | pyhandler.call1((input,))?
|
2356 + | } else {
|
2357 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2358 + | };
|
2359 + | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2360 + | })?;
|
2361 + | result.await.and_then(|r| {
|
2362 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonEnumsOutput>(py))
|
2363 + | })
|
2364 + | } else {
|
2365 + | ::tracing::trace!(name = "json_enums", "executing python handler function");
|
2366 + | ::pyo3::Python::with_gil(|py| {
|
2367 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2368 + | let output = if handler.args == 1 {
|
2369 + | pyhandler.call1((input,))?
|
2370 + | } else {
|
2371 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2372 + | };
|
2373 + | output.extract::<crate::output::JsonEnumsOutput>()
|
2374 + | })
|
2375 + | };
|
2376 + | // Catch and record a Python traceback.
|
2377 + | result.map_err(|e| {
|
2378 + | let rich_py_err =
|
2379 + | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2380 + | e.clone_ref(py)
|
2381 + | }));
|
2382 + | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2383 + | e.into()
|
2384 + | })
|
2385 + | }
|
2386 + |
|
2387 + | /// Python handler for operation `JsonIntEnums`.
|
2388 + | pub(crate) async fn json_int_enums(
|
2389 + | input: crate::input::JsonIntEnumsInput,
|
2390 + | state: ::aws_smithy_legacy_http_server::Extension<
|
2391 + | ::aws_smithy_http_server_python::context::PyContext,
|
2392 + | >,
|
2393 + | handler: ::aws_smithy_http_server_python::PyHandler,
|
2394 + | ) -> std::result::Result<crate::output::JsonIntEnumsOutput, crate::error::JsonIntEnumsError> {
|
2395 + | // Async block used to run the handler and catch any Python error.
|
2396 + | let result = if handler.is_coroutine {
|
2397 + | ::tracing::trace!(
|
2398 + | name = "json_int_enums",
|
2399 + | "executing python handler coroutine"
|
2400 + | );
|
2401 + | let result = ::pyo3::Python::with_gil(|py| {
|
2402 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2403 + | let coroutine = if handler.args == 1 {
|
2404 + | pyhandler.call1((input,))?
|
2405 + | } else {
|
2406 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2407 + | };
|
2408 + | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2409 + | })?;
|
2410 + | result.await.and_then(|r| {
|
2411 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonIntEnumsOutput>(py))
|
2412 + | })
|
2413 + | } else {
|
2414 + | ::tracing::trace!(name = "json_int_enums", "executing python handler function");
|
2415 + | ::pyo3::Python::with_gil(|py| {
|
2416 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2417 + | let output = if handler.args == 1 {
|
2418 + | pyhandler.call1((input,))?
|
2419 + | } else {
|
2420 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2421 + | };
|
2422 + | output.extract::<crate::output::JsonIntEnumsOutput>()
|
2423 + | })
|
2424 + | };
|
2425 + | // Catch and record a Python traceback.
|
2426 + | result.map_err(|e| {
|
2427 + | let rich_py_err =
|
2428 + | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2429 + | e.clone_ref(py)
|
2430 + | }));
|
2431 + | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2432 + | e.into()
|
2433 + | })
|
2434 + | }
|
2435 + |
|
2436 + | /// Python handler for operation `RecursiveShapes`.
|
2437 + | pub(crate) async fn recursive_shapes(
|
2438 + | input: crate::input::RecursiveShapesInput,
|
2439 + | state: ::aws_smithy_legacy_http_server::Extension<
|
2440 + | ::aws_smithy_http_server_python::context::PyContext,
|
2441 + | >,
|
2442 + | handler: ::aws_smithy_http_server_python::PyHandler,
|
2443 + | ) -> std::result::Result<crate::output::RecursiveShapesOutput, crate::error::RecursiveShapesError> {
|
2444 + | // Async block used to run the handler and catch any Python error.
|
2445 + | let result = if handler.is_coroutine {
|
2446 + | ::tracing::trace!(
|
2447 + | name = "recursive_shapes",
|
2448 + | "executing python handler coroutine"
|
2449 + | );
|
2450 + | let result = ::pyo3::Python::with_gil(|py| {
|
2451 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2452 + | let coroutine = if handler.args == 1 {
|
2453 + | pyhandler.call1((input,))?
|
2454 + | } else {
|
2455 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2456 + | };
|
2457 + | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2458 + | })?;
|
2459 + | result.await.and_then(|r| {
|
2460 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::RecursiveShapesOutput>(py))
|
2461 + | })
|
2462 + | } else {
|
2463 + | ::tracing::trace!(
|
2464 + | name = "recursive_shapes",
|
2465 + | "executing python handler function"
|
2466 + | );
|
2467 + | ::pyo3::Python::with_gil(|py| {
|
2468 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2469 + | let output = if handler.args == 1 {
|
2470 + | pyhandler.call1((input,))?
|
2471 + | } else {
|
2472 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2473 + | };
|
2474 + | output.extract::<crate::output::RecursiveShapesOutput>()
|
2475 + | })
|
2476 + | };
|
2477 + | // Catch and record a Python traceback.
|
2478 + | result.map_err(|e| {
|
2479 + | let rich_py_err =
|
2480 + | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2481 + | e.clone_ref(py)
|
2482 + | }));
|
2483 + | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2484 + | e.into()
|
2485 + | })
|
2486 + | }
|
2487 + |
|
2488 + | /// Python handler for operation `JsonLists`.
|
2489 + | pub(crate) async fn json_lists(
|
2490 + | input: crate::input::JsonListsInput,
|
2491 + | state: ::aws_smithy_legacy_http_server::Extension<
|
2492 + | ::aws_smithy_http_server_python::context::PyContext,
|
2493 + | >,
|
2494 + | handler: ::aws_smithy_http_server_python::PyHandler,
|
2495 + | ) -> std::result::Result<crate::output::JsonListsOutput, crate::error::JsonListsError> {
|
2496 + | // Async block used to run the handler and catch any Python error.
|
2497 + | let result = if handler.is_coroutine {
|
2498 + | ::tracing::trace!(name = "json_lists", "executing python handler coroutine");
|
2499 + | let result = ::pyo3::Python::with_gil(|py| {
|
2500 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2501 + | let coroutine = if handler.args == 1 {
|
2502 + | pyhandler.call1((input,))?
|
2503 + | } else {
|
2504 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2505 + | };
|
2506 + | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2507 + | })?;
|
2508 + | result.await.and_then(|r| {
|
2509 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonListsOutput>(py))
|
2510 + | })
|
2511 + | } else {
|
2512 + | ::tracing::trace!(name = "json_lists", "executing python handler function");
|
2513 + | ::pyo3::Python::with_gil(|py| {
|
2514 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2515 + | let output = if handler.args == 1 {
|
2516 + | pyhandler.call1((input,))?
|
2517 + | } else {
|
2518 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2519 + | };
|
2520 + | output.extract::<crate::output::JsonListsOutput>()
|
2521 + | })
|
2522 + | };
|
2523 + | // Catch and record a Python traceback.
|
2524 + | result.map_err(|e| {
|
2525 + | let rich_py_err =
|
2526 + | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2527 + | e.clone_ref(py)
|
2528 + | }));
|
2529 + | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2530 + | e.into()
|
2531 + | })
|
2532 + | }
|
2533 + |
|
2534 + | /// Python handler for operation `SparseJsonLists`.
|
2535 + | pub(crate) async fn sparse_json_lists(
|
2536 + | input: crate::input::SparseJsonListsInput,
|
2537 + | state: ::aws_smithy_legacy_http_server::Extension<
|
2538 + | ::aws_smithy_http_server_python::context::PyContext,
|
2539 + | >,
|
2540 + | handler: ::aws_smithy_http_server_python::PyHandler,
|
2541 + | ) -> std::result::Result<crate::output::SparseJsonListsOutput, crate::error::SparseJsonListsError> {
|
2542 + | // Async block used to run the handler and catch any Python error.
|
2543 + | let result = if handler.is_coroutine {
|
2544 + | ::tracing::trace!(
|
2545 + | name = "sparse_json_lists",
|
2546 + | "executing python handler coroutine"
|
2547 + | );
|
2548 + | let result = ::pyo3::Python::with_gil(|py| {
|
2549 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2550 + | let coroutine = if handler.args == 1 {
|
2551 + | pyhandler.call1((input,))?
|
2552 + | } else {
|
2553 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2554 + | };
|
2555 + | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2556 + | })?;
|
2557 + | result.await.and_then(|r| {
|
2558 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::SparseJsonListsOutput>(py))
|
2559 + | })
|
2560 + | } else {
|
2561 + | ::tracing::trace!(
|
2562 + | name = "sparse_json_lists",
|
2563 + | "executing python handler function"
|
2564 + | );
|
2565 + | ::pyo3::Python::with_gil(|py| {
|
2566 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2567 + | let output = if handler.args == 1 {
|
2568 + | pyhandler.call1((input,))?
|
2569 + | } else {
|
2570 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2571 + | };
|
2572 + | output.extract::<crate::output::SparseJsonListsOutput>()
|
2573 + | })
|
2574 + | };
|
2575 + | // Catch and record a Python traceback.
|
2576 + | result.map_err(|e| {
|
2577 + | let rich_py_err =
|
2578 + | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2579 + | e.clone_ref(py)
|
2580 + | }));
|
2581 + | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2582 + | e.into()
|
2583 + | })
|
2584 + | }
|
2585 + |
|
2586 + | /// Python handler for operation `JsonMaps`.
|
2587 + | pub(crate) async fn json_maps(
|
2588 + | input: crate::input::JsonMapsInput,
|
2589 + | state: ::aws_smithy_legacy_http_server::Extension<
|
2590 + | ::aws_smithy_http_server_python::context::PyContext,
|
2591 + | >,
|
2592 + | handler: ::aws_smithy_http_server_python::PyHandler,
|
2593 + | ) -> std::result::Result<crate::output::JsonMapsOutput, crate::error::JsonMapsError> {
|
2594 + | // Async block used to run the handler and catch any Python error.
|
2595 + | let result = if handler.is_coroutine {
|
2596 + | ::tracing::trace!(name = "json_maps", "executing python handler coroutine");
|
2597 + | let result = ::pyo3::Python::with_gil(|py| {
|
2598 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2599 + | let coroutine = if handler.args == 1 {
|
2600 + | pyhandler.call1((input,))?
|
2601 + | } else {
|
2602 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2603 + | };
|
2604 + | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2605 + | })?;
|
2606 + | result.await.and_then(|r| {
|
2607 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonMapsOutput>(py))
|
2608 + | })
|
2609 + | } else {
|
2610 + | ::tracing::trace!(name = "json_maps", "executing python handler function");
|
2611 + | ::pyo3::Python::with_gil(|py| {
|
2612 + | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2613 + | let output = if handler.args == 1 {
|
2614 + | pyhandler.call1((input,))?
|
2615 + | } else {
|
2616 + | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2617 + | };
|
2618 + | output.extract::<crate::output::JsonMapsOutput>()
|
2619 + | })
|
2620 + | };
|
2621 + | // Catch and record a Python traceback.
|
2622 + | result.map_err(|e| {
|
2623 + | let rich_py_err =
|
2624 + | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2625 + | e.clone_ref(py)
|
2626 + | }));
|
2627 + | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2628 + | e.into()
|
2629 + | })
|
2630 + | }
|
2631 + |
|
2632 + | /// Python handler for operation `SparseJsonMaps`.
|
2633 + | pub(crate) async fn sparse_json_maps(
|
2634 + | input: crate::input::SparseJsonMapsInput,
|
2215 2635 | state: ::aws_smithy_legacy_http_server::Extension<
|
2216 2636 | ::aws_smithy_http_server_python::context::PyContext,
|
2217 2637 | >,
|
2218 2638 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2219 - | ) -> std::result::Result<crate::output::MalformedMapOutput, crate::error::MalformedMapError> {
|
2639 + | ) -> std::result::Result<crate::output::SparseJsonMapsOutput, crate::error::SparseJsonMapsError> {
|
2220 2640 | // Async block used to run the handler and catch any Python error.
|
2221 2641 | let result = if handler.is_coroutine {
|
2222 - | ::tracing::trace!(name = "malformed_map", "executing python handler coroutine");
|
2642 + | ::tracing::trace!(
|
2643 + | name = "sparse_json_maps",
|
2644 + | "executing python handler coroutine"
|
2645 + | );
|
2223 2646 | let result = ::pyo3::Python::with_gil(|py| {
|
2224 2647 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2225 2648 | let coroutine = if handler.args == 1 {
|
2226 2649 | pyhandler.call1((input,))?
|
2227 2650 | } else {
|
2228 2651 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2229 2652 | };
|
2230 2653 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2231 2654 | })?;
|
2232 2655 | result.await.and_then(|r| {
|
2233 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedMapOutput>(py))
|
2656 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::SparseJsonMapsOutput>(py))
|
2234 2657 | })
|
2235 2658 | } else {
|
2236 - | ::tracing::trace!(name = "malformed_map", "executing python handler function");
|
2659 + | ::tracing::trace!(
|
2660 + | name = "sparse_json_maps",
|
2661 + | "executing python handler function"
|
2662 + | );
|
2237 2663 | ::pyo3::Python::with_gil(|py| {
|
2238 2664 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2239 2665 | let output = if handler.args == 1 {
|
2240 2666 | pyhandler.call1((input,))?
|
2241 2667 | } else {
|
2242 2668 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2243 2669 | };
|
2244 - | output.extract::<crate::output::MalformedMapOutput>()
|
2670 + | output.extract::<crate::output::SparseJsonMapsOutput>()
|
2245 2671 | })
|
2246 2672 | };
|
2247 2673 | // Catch and record a Python traceback.
|
2248 2674 | result.map_err(|e| {
|
2249 2675 | let rich_py_err =
|
2250 2676 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2251 2677 | e.clone_ref(py)
|
2252 2678 | }));
|
2253 2679 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2254 2680 | e.into()
|
2255 2681 | })
|
2256 2682 | }
|
2257 2683 |
|
2258 - | /// Python handler for operation `MalformedList`.
|
2259 - | pub(crate) async fn malformed_list(
|
2260 - | input: crate::input::MalformedListInput,
|
2684 + | /// Python handler for operation `JsonBlobs`.
|
2685 + | pub(crate) async fn json_blobs(
|
2686 + | input: crate::input::JsonBlobsInput,
|
2261 2687 | state: ::aws_smithy_legacy_http_server::Extension<
|
2262 2688 | ::aws_smithy_http_server_python::context::PyContext,
|
2263 2689 | >,
|
2264 2690 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2265 - | ) -> std::result::Result<crate::output::MalformedListOutput, crate::error::MalformedListError> {
|
2691 + | ) -> std::result::Result<crate::output::JsonBlobsOutput, crate::error::JsonBlobsError> {
|
2266 2692 | // Async block used to run the handler and catch any Python error.
|
2267 2693 | let result = if handler.is_coroutine {
|
2268 - | ::tracing::trace!(
|
2269 - | name = "malformed_list",
|
2270 - | "executing python handler coroutine"
|
2271 - | );
|
2694 + | ::tracing::trace!(name = "json_blobs", "executing python handler coroutine");
|
2272 2695 | let result = ::pyo3::Python::with_gil(|py| {
|
2273 2696 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2274 2697 | let coroutine = if handler.args == 1 {
|
2275 2698 | pyhandler.call1((input,))?
|
2276 2699 | } else {
|
2277 2700 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2278 2701 | };
|
2279 2702 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2280 2703 | })?;
|
2281 2704 | result.await.and_then(|r| {
|
2282 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedListOutput>(py))
|
2705 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonBlobsOutput>(py))
|
2283 2706 | })
|
2284 2707 | } else {
|
2285 - | ::tracing::trace!(name = "malformed_list", "executing python handler function");
|
2708 + | ::tracing::trace!(name = "json_blobs", "executing python handler function");
|
2286 2709 | ::pyo3::Python::with_gil(|py| {
|
2287 2710 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2288 2711 | let output = if handler.args == 1 {
|
2289 2712 | pyhandler.call1((input,))?
|
2290 2713 | } else {
|
2291 2714 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2292 2715 | };
|
2293 - | output.extract::<crate::output::MalformedListOutput>()
|
2716 + | output.extract::<crate::output::JsonBlobsOutput>()
|
2294 2717 | })
|
2295 2718 | };
|
2296 2719 | // Catch and record a Python traceback.
|
2297 2720 | result.map_err(|e| {
|
2298 2721 | let rich_py_err =
|
2299 2722 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2300 2723 | e.clone_ref(py)
|
2301 2724 | }));
|
2302 2725 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2303 2726 | e.into()
|
2304 2727 | })
|
2305 2728 | }
|
2306 2729 |
|
2307 - | /// Python handler for operation `MalformedBoolean`.
|
2308 - | pub(crate) async fn malformed_boolean(
|
2309 - | input: crate::input::MalformedBooleanInput,
|
2730 + | /// Python handler for operation `DocumentType`.
|
2731 + | pub(crate) async fn document_type(
|
2732 + | input: crate::input::DocumentTypeInput,
|
2310 2733 | state: ::aws_smithy_legacy_http_server::Extension<
|
2311 2734 | ::aws_smithy_http_server_python::context::PyContext,
|
2312 2735 | >,
|
2313 2736 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2314 - | ) -> std::result::Result<crate::output::MalformedBooleanOutput, crate::error::MalformedBooleanError>
|
2315 - | {
|
2737 + | ) -> std::result::Result<crate::output::DocumentTypeOutput, crate::error::DocumentTypeError> {
|
2316 2738 | // Async block used to run the handler and catch any Python error.
|
2317 2739 | let result = if handler.is_coroutine {
|
2318 - | ::tracing::trace!(
|
2319 - | name = "malformed_boolean",
|
2320 - | "executing python handler coroutine"
|
2321 - | );
|
2740 + | ::tracing::trace!(name = "document_type", "executing python handler coroutine");
|
2322 2741 | let result = ::pyo3::Python::with_gil(|py| {
|
2323 2742 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2324 2743 | let coroutine = if handler.args == 1 {
|
2325 2744 | pyhandler.call1((input,))?
|
2326 2745 | } else {
|
2327 2746 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2328 2747 | };
|
2329 2748 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2330 2749 | })?;
|
2331 2750 | result.await.and_then(|r| {
|
2332 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedBooleanOutput>(py))
|
2751 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::DocumentTypeOutput>(py))
|
2333 2752 | })
|
2334 2753 | } else {
|
2335 - | ::tracing::trace!(
|
2336 - | name = "malformed_boolean",
|
2337 - | "executing python handler function"
|
2338 - | );
|
2754 + | ::tracing::trace!(name = "document_type", "executing python handler function");
|
2339 2755 | ::pyo3::Python::with_gil(|py| {
|
2340 2756 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2341 2757 | let output = if handler.args == 1 {
|
2342 2758 | pyhandler.call1((input,))?
|
2343 2759 | } else {
|
2344 2760 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2345 2761 | };
|
2346 - | output.extract::<crate::output::MalformedBooleanOutput>()
|
2762 + | output.extract::<crate::output::DocumentTypeOutput>()
|
2347 2763 | })
|
2348 2764 | };
|
2349 2765 | // Catch and record a Python traceback.
|
2350 2766 | result.map_err(|e| {
|
2351 2767 | let rich_py_err =
|
2352 2768 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2353 2769 | e.clone_ref(py)
|
2354 2770 | }));
|
2355 2771 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2356 2772 | e.into()
|
2357 2773 | })
|
2358 2774 | }
|
2359 2775 |
|
2360 - | /// Python handler for operation `MalformedUnion`.
|
2361 - | pub(crate) async fn malformed_union(
|
2362 - | input: crate::input::MalformedUnionInput,
|
2776 + | /// Python handler for operation `DocumentTypeAsPayload`.
|
2777 + | pub(crate) async fn document_type_as_payload(
|
2778 + | input: crate::input::DocumentTypeAsPayloadInput,
|
2363 2779 | state: ::aws_smithy_legacy_http_server::Extension<
|
2364 2780 | ::aws_smithy_http_server_python::context::PyContext,
|
2365 2781 | >,
|
2366 2782 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2367 - | ) -> std::result::Result<crate::output::MalformedUnionOutput, crate::error::MalformedUnionError> {
|
2783 + | ) -> std::result::Result<
|
2784 + | crate::output::DocumentTypeAsPayloadOutput,
|
2785 + | crate::error::DocumentTypeAsPayloadError,
|
2786 + | > {
|
2368 2787 | // Async block used to run the handler and catch any Python error.
|
2369 2788 | let result = if handler.is_coroutine {
|
2370 2789 | ::tracing::trace!(
|
2371 - | name = "malformed_union",
|
2790 + | name = "document_type_as_payload",
|
2372 2791 | "executing python handler coroutine"
|
2373 2792 | );
|
2374 2793 | let result = ::pyo3::Python::with_gil(|py| {
|
2375 2794 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2376 2795 | let coroutine = if handler.args == 1 {
|
2377 2796 | pyhandler.call1((input,))?
|
2378 2797 | } else {
|
2379 2798 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2380 2799 | };
|
2381 2800 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2382 2801 | })?;
|
2383 2802 | result.await.and_then(|r| {
|
2384 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedUnionOutput>(py))
|
2803 + | ::pyo3::Python::with_gil(|py| {
|
2804 + | r.extract::<crate::output::DocumentTypeAsPayloadOutput>(py)
|
2805 + | })
|
2385 2806 | })
|
2386 2807 | } else {
|
2387 2808 | ::tracing::trace!(
|
2388 - | name = "malformed_union",
|
2809 + | name = "document_type_as_payload",
|
2389 2810 | "executing python handler function"
|
2390 2811 | );
|
2391 2812 | ::pyo3::Python::with_gil(|py| {
|
2392 2813 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2393 2814 | let output = if handler.args == 1 {
|
2394 2815 | pyhandler.call1((input,))?
|
2395 2816 | } else {
|
2396 2817 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2397 2818 | };
|
2398 - | output.extract::<crate::output::MalformedUnionOutput>()
|
2819 + | output.extract::<crate::output::DocumentTypeAsPayloadOutput>()
|
2399 2820 | })
|
2400 2821 | };
|
2401 2822 | // Catch and record a Python traceback.
|
2402 2823 | result.map_err(|e| {
|
2403 2824 | let rich_py_err =
|
2404 2825 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2405 2826 | e.clone_ref(py)
|
2406 2827 | }));
|
2407 2828 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2408 2829 | e.into()
|
2409 2830 | })
|
2410 2831 | }
|
2411 2832 |
|
2412 - | /// Python handler for operation `MalformedInteger`.
|
2413 - | pub(crate) async fn malformed_integer(
|
2414 - | input: crate::input::MalformedIntegerInput,
|
2833 + | /// Python handler for operation `DocumentTypeAsMapValue`.
|
2834 + | pub(crate) async fn document_type_as_map_value(
|
2835 + | input: crate::input::DocumentTypeAsMapValueInput,
|
2415 2836 | state: ::aws_smithy_legacy_http_server::Extension<
|
2416 2837 | ::aws_smithy_http_server_python::context::PyContext,
|
2417 2838 | >,
|
2418 2839 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2419 - | ) -> std::result::Result<crate::output::MalformedIntegerOutput, crate::error::MalformedIntegerError>
|
2420 - | {
|
2840 + | ) -> std::result::Result<
|
2841 + | crate::output::DocumentTypeAsMapValueOutput,
|
2842 + | crate::error::DocumentTypeAsMapValueError,
|
2843 + | > {
|
2421 2844 | // Async block used to run the handler and catch any Python error.
|
2422 2845 | let result = if handler.is_coroutine {
|
2423 2846 | ::tracing::trace!(
|
2424 - | name = "malformed_integer",
|
2847 + | name = "document_type_as_map_value",
|
2425 2848 | "executing python handler coroutine"
|
2426 2849 | );
|
2427 2850 | let result = ::pyo3::Python::with_gil(|py| {
|
2428 2851 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2429 2852 | let coroutine = if handler.args == 1 {
|
2430 2853 | pyhandler.call1((input,))?
|
2431 2854 | } else {
|
2432 2855 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2433 2856 | };
|
2434 2857 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2435 2858 | })?;
|
2436 2859 | result.await.and_then(|r| {
|
2437 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedIntegerOutput>(py))
|
2860 + | ::pyo3::Python::with_gil(|py| {
|
2861 + | r.extract::<crate::output::DocumentTypeAsMapValueOutput>(py)
|
2862 + | })
|
2438 2863 | })
|
2439 2864 | } else {
|
2440 2865 | ::tracing::trace!(
|
2441 - | name = "malformed_integer",
|
2866 + | name = "document_type_as_map_value",
|
2442 2867 | "executing python handler function"
|
2443 2868 | );
|
2444 2869 | ::pyo3::Python::with_gil(|py| {
|
2445 2870 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2446 2871 | let output = if handler.args == 1 {
|
2447 2872 | pyhandler.call1((input,))?
|
2448 2873 | } else {
|
2449 2874 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2450 2875 | };
|
2451 - | output.extract::<crate::output::MalformedIntegerOutput>()
|
2876 + | output.extract::<crate::output::DocumentTypeAsMapValueOutput>()
|
2452 2877 | })
|
2453 2878 | };
|
2454 2879 | // Catch and record a Python traceback.
|
2455 2880 | result.map_err(|e| {
|
2456 2881 | let rich_py_err =
|
2457 2882 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2458 2883 | e.clone_ref(py)
|
2459 2884 | }));
|
2460 2885 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2461 2886 | e.into()
|
2462 2887 | })
|
2463 2888 | }
|
2464 2889 |
|
2465 - | /// Python handler for operation `MalformedRequestBody`.
|
2466 - | pub(crate) async fn malformed_request_body(
|
2467 - | input: crate::input::MalformedRequestBodyInput,
|
2890 + | /// Python handler for operation `JsonUnions`.
|
2891 + | pub(crate) async fn json_unions(
|
2892 + | input: crate::input::JsonUnionsInput,
|
2468 2893 | state: ::aws_smithy_legacy_http_server::Extension<
|
2469 2894 | ::aws_smithy_http_server_python::context::PyContext,
|
2470 2895 | >,
|
2471 2896 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2472 - | ) -> std::result::Result<
|
2473 - | crate::output::MalformedRequestBodyOutput,
|
2474 - | crate::error::MalformedRequestBodyError,
|
2475 - | > {
|
2897 + | ) -> std::result::Result<crate::output::JsonUnionsOutput, crate::error::JsonUnionsError> {
|
2476 2898 | // Async block used to run the handler and catch any Python error.
|
2477 2899 | let result = if handler.is_coroutine {
|
2478 - | ::tracing::trace!(
|
2479 - | name = "malformed_request_body",
|
2480 - | "executing python handler coroutine"
|
2481 - | );
|
2900 + | ::tracing::trace!(name = "json_unions", "executing python handler coroutine");
|
2482 2901 | let result = ::pyo3::Python::with_gil(|py| {
|
2483 2902 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2484 2903 | let coroutine = if handler.args == 1 {
|
2485 2904 | pyhandler.call1((input,))?
|
2486 2905 | } else {
|
2487 2906 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2488 2907 | };
|
2489 2908 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2490 2909 | })?;
|
2491 2910 | result.await.and_then(|r| {
|
2492 - | ::pyo3::Python::with_gil(|py| {
|
2493 - | r.extract::<crate::output::MalformedRequestBodyOutput>(py)
|
2494 - | })
|
2911 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonUnionsOutput>(py))
|
2495 2912 | })
|
2496 2913 | } else {
|
2497 - | ::tracing::trace!(
|
2498 - | name = "malformed_request_body",
|
2499 - | "executing python handler function"
|
2500 - | );
|
2914 + | ::tracing::trace!(name = "json_unions", "executing python handler function");
|
2501 2915 | ::pyo3::Python::with_gil(|py| {
|
2502 2916 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2503 2917 | let output = if handler.args == 1 {
|
2504 2918 | pyhandler.call1((input,))?
|
2505 2919 | } else {
|
2506 2920 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2507 2921 | };
|
2508 - | output.extract::<crate::output::MalformedRequestBodyOutput>()
|
2922 + | output.extract::<crate::output::JsonUnionsOutput>()
|
2509 2923 | })
|
2510 2924 | };
|
2511 2925 | // Catch and record a Python traceback.
|
2512 2926 | result.map_err(|e| {
|
2513 2927 | let rich_py_err =
|
2514 2928 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2515 2929 | e.clone_ref(py)
|
2516 2930 | }));
|
2517 2931 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2518 2932 | e.into()
|
2519 2933 | })
|
2520 2934 | }
|
2521 2935 |
|
2522 - | /// Python handler for operation `HttpChecksumRequired`.
|
2523 - | pub(crate) async fn http_checksum_required(
|
2524 - | input: crate::input::HttpChecksumRequiredInput,
|
2936 + | /// Python handler for operation `PostPlayerAction`.
|
2937 + | pub(crate) async fn post_player_action(
|
2938 + | input: crate::input::PostPlayerActionInput,
|
2525 2939 | state: ::aws_smithy_legacy_http_server::Extension<
|
2526 2940 | ::aws_smithy_http_server_python::context::PyContext,
|
2527 2941 | >,
|
2528 2942 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2529 - | ) -> std::result::Result<
|
2530 - | crate::output::HttpChecksumRequiredOutput,
|
2531 - | crate::error::HttpChecksumRequiredError,
|
2532 - | > {
|
2943 + | ) -> std::result::Result<crate::output::PostPlayerActionOutput, crate::error::PostPlayerActionError>
|
2944 + | {
|
2533 2945 | // Async block used to run the handler and catch any Python error.
|
2534 2946 | let result = if handler.is_coroutine {
|
2535 2947 | ::tracing::trace!(
|
2536 - | name = "http_checksum_required",
|
2948 + | name = "post_player_action",
|
2537 2949 | "executing python handler coroutine"
|
2538 2950 | );
|
2539 2951 | let result = ::pyo3::Python::with_gil(|py| {
|
2540 2952 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2541 2953 | let coroutine = if handler.args == 1 {
|
2542 2954 | pyhandler.call1((input,))?
|
2543 2955 | } else {
|
2544 2956 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2545 2957 | };
|
2546 2958 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2547 2959 | })?;
|
2548 2960 | result.await.and_then(|r| {
|
2549 - | ::pyo3::Python::with_gil(|py| {
|
2550 - | r.extract::<crate::output::HttpChecksumRequiredOutput>(py)
|
2551 - | })
|
2961 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::PostPlayerActionOutput>(py))
|
2552 2962 | })
|
2553 2963 | } else {
|
2554 2964 | ::tracing::trace!(
|
2555 - | name = "http_checksum_required",
|
2965 + | name = "post_player_action",
|
2556 2966 | "executing python handler function"
|
2557 2967 | );
|
2558 2968 | ::pyo3::Python::with_gil(|py| {
|
2559 2969 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2560 2970 | let output = if handler.args == 1 {
|
2561 2971 | pyhandler.call1((input,))?
|
2562 2972 | } else {
|
2563 2973 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2564 2974 | };
|
2565 - | output.extract::<crate::output::HttpChecksumRequiredOutput>()
|
2975 + | output.extract::<crate::output::PostPlayerActionOutput>()
|
2566 2976 | })
|
2567 2977 | };
|
2568 2978 | // Catch and record a Python traceback.
|
2569 2979 | result.map_err(|e| {
|
2570 2980 | let rich_py_err =
|
2571 2981 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2572 2982 | e.clone_ref(py)
|
2573 2983 | }));
|
2574 2984 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2575 2985 | e.into()
|
2576 2986 | })
|
2577 2987 | }
|
2578 2988 |
|
2579 - | /// Python handler for operation `HostWithPathOperation`.
|
2580 - | pub(crate) async fn host_with_path_operation(
|
2581 - | input: crate::input::HostWithPathOperationInput,
|
2989 + | /// Python handler for operation `PostUnionWithJsonName`.
|
2990 + | pub(crate) async fn post_union_with_json_name(
|
2991 + | input: crate::input::PostUnionWithJsonNameInput,
|
2582 2992 | state: ::aws_smithy_legacy_http_server::Extension<
|
2583 2993 | ::aws_smithy_http_server_python::context::PyContext,
|
2584 2994 | >,
|
2585 2995 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2586 2996 | ) -> std::result::Result<
|
2587 - | crate::output::HostWithPathOperationOutput,
|
2588 - | crate::error::HostWithPathOperationError,
|
2997 + | crate::output::PostUnionWithJsonNameOutput,
|
2998 + | crate::error::PostUnionWithJsonNameError,
|
2589 2999 | > {
|
2590 3000 | // Async block used to run the handler and catch any Python error.
|
2591 3001 | let result = if handler.is_coroutine {
|
2592 3002 | ::tracing::trace!(
|
2593 - | name = "host_with_path_operation",
|
3003 + | name = "post_union_with_json_name",
|
2594 3004 | "executing python handler coroutine"
|
2595 3005 | );
|
2596 3006 | let result = ::pyo3::Python::with_gil(|py| {
|
2597 3007 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2598 3008 | let coroutine = if handler.args == 1 {
|
2599 3009 | pyhandler.call1((input,))?
|
2600 3010 | } else {
|
2601 3011 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2602 3012 | };
|
2603 3013 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2604 3014 | })?;
|
2605 3015 | result.await.and_then(|r| {
|
2606 3016 | ::pyo3::Python::with_gil(|py| {
|
2607 - | r.extract::<crate::output::HostWithPathOperationOutput>(py)
|
3017 + | r.extract::<crate::output::PostUnionWithJsonNameOutput>(py)
|
2608 3018 | })
|
2609 3019 | })
|
2610 3020 | } else {
|
2611 3021 | ::tracing::trace!(
|
2612 - | name = "host_with_path_operation",
|
3022 + | name = "post_union_with_json_name",
|
2613 3023 | "executing python handler function"
|
2614 3024 | );
|
2615 3025 | ::pyo3::Python::with_gil(|py| {
|
2616 3026 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2617 3027 | let output = if handler.args == 1 {
|
2618 3028 | pyhandler.call1((input,))?
|
2619 3029 | } else {
|
2620 3030 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2621 3031 | };
|
2622 - | output.extract::<crate::output::HostWithPathOperationOutput>()
|
3032 + | output.extract::<crate::output::PostUnionWithJsonNameOutput>()
|
2623 3033 | })
|
2624 3034 | };
|
2625 3035 | // Catch and record a Python traceback.
|
2626 3036 | result.map_err(|e| {
|
2627 3037 | let rich_py_err =
|
2628 3038 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2629 3039 | e.clone_ref(py)
|
2630 3040 | }));
|
2631 3041 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2632 3042 | e.into()
|
2633 3043 | })
|
2634 3044 | }
|
2635 3045 |
|
2636 - | /// Python handler for operation `EndpointWithHostLabelOperation`.
|
2637 - | pub(crate) async fn endpoint_with_host_label_operation(
|
2638 - | input: crate::input::EndpointWithHostLabelOperationInput,
|
3046 + | /// Python handler for operation `EndpointOperation`.
|
3047 + | pub(crate) async fn endpoint_operation(
|
3048 + | input: crate::input::EndpointOperationInput,
|
2639 3049 | state: ::aws_smithy_legacy_http_server::Extension<
|
2640 3050 | ::aws_smithy_http_server_python::context::PyContext,
|
2641 3051 | >,
|
2642 3052 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2643 - | ) -> std::result::Result<
|
2644 - | crate::output::EndpointWithHostLabelOperationOutput,
|
2645 - | crate::error::EndpointWithHostLabelOperationError,
|
2646 - | > {
|
3053 + | ) -> std::result::Result<crate::output::EndpointOperationOutput, crate::error::EndpointOperationError>
|
3054 + | {
|
2647 3055 | // Async block used to run the handler and catch any Python error.
|
2648 3056 | let result = if handler.is_coroutine {
|
2649 3057 | ::tracing::trace!(
|
2650 - | name = "endpoint_with_host_label_operation",
|
3058 + | name = "endpoint_operation",
|
2651 3059 | "executing python handler coroutine"
|
2652 3060 | );
|
2653 3061 | let result = ::pyo3::Python::with_gil(|py| {
|
2654 3062 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2655 3063 | let coroutine = if handler.args == 1 {
|
2656 3064 | pyhandler.call1((input,))?
|
2657 3065 | } else {
|
2658 3066 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2659 3067 | };
|
2660 3068 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2661 3069 | })?;
|
2662 3070 | result.await.and_then(|r| {
|
2663 - | ::pyo3::Python::with_gil(|py| {
|
2664 - | r.extract::<crate::output::EndpointWithHostLabelOperationOutput>(py)
|
2665 - | })
|
3071 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::EndpointOperationOutput>(py))
|
2666 3072 | })
|
2667 3073 | } else {
|
2668 3074 | ::tracing::trace!(
|
2669 - | name = "endpoint_with_host_label_operation",
|
3075 + | name = "endpoint_operation",
|
2670 3076 | "executing python handler function"
|
2671 3077 | );
|
2672 3078 | ::pyo3::Python::with_gil(|py| {
|
2673 3079 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2674 3080 | let output = if handler.args == 1 {
|
2675 3081 | pyhandler.call1((input,))?
|
2676 3082 | } else {
|
2677 3083 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2678 3084 | };
|
2679 - | output.extract::<crate::output::EndpointWithHostLabelOperationOutput>()
|
3085 + | output.extract::<crate::output::EndpointOperationOutput>()
|
2680 3086 | })
|
2681 3087 | };
|
2682 3088 | // Catch and record a Python traceback.
|
2683 3089 | result.map_err(|e| {
|
2684 3090 | let rich_py_err =
|
2685 3091 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2686 3092 | e.clone_ref(py)
|
2687 3093 | }));
|
2688 3094 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2689 3095 | e.into()
|
2690 3096 | })
|
2691 3097 | }
|
2692 3098 |
|
2693 - | /// Python handler for operation `EndpointOperation`.
|
2694 - | pub(crate) async fn endpoint_operation(
|
2695 - | input: crate::input::EndpointOperationInput,
|
3099 + | /// Python handler for operation `EndpointWithHostLabelOperation`.
|
3100 + | pub(crate) async fn endpoint_with_host_label_operation(
|
3101 + | input: crate::input::EndpointWithHostLabelOperationInput,
|
2696 3102 | state: ::aws_smithy_legacy_http_server::Extension<
|
2697 3103 | ::aws_smithy_http_server_python::context::PyContext,
|
2698 3104 | >,
|
2699 3105 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2700 - | ) -> std::result::Result<crate::output::EndpointOperationOutput, crate::error::EndpointOperationError>
|
2701 - | {
|
3106 + | ) -> std::result::Result<
|
3107 + | crate::output::EndpointWithHostLabelOperationOutput,
|
3108 + | crate::error::EndpointWithHostLabelOperationError,
|
3109 + | > {
|
2702 3110 | // Async block used to run the handler and catch any Python error.
|
2703 3111 | let result = if handler.is_coroutine {
|
2704 3112 | ::tracing::trace!(
|
2705 - | name = "endpoint_operation",
|
3113 + | name = "endpoint_with_host_label_operation",
|
2706 3114 | "executing python handler coroutine"
|
2707 3115 | );
|
2708 3116 | let result = ::pyo3::Python::with_gil(|py| {
|
2709 3117 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2710 3118 | let coroutine = if handler.args == 1 {
|
2711 3119 | pyhandler.call1((input,))?
|
2712 3120 | } else {
|
2713 3121 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2714 3122 | };
|
2715 3123 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2716 3124 | })?;
|
2717 3125 | result.await.and_then(|r| {
|
2718 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::EndpointOperationOutput>(py))
|
3126 + | ::pyo3::Python::with_gil(|py| {
|
3127 + | r.extract::<crate::output::EndpointWithHostLabelOperationOutput>(py)
|
3128 + | })
|
2719 3129 | })
|
2720 3130 | } else {
|
2721 3131 | ::tracing::trace!(
|
2722 - | name = "endpoint_operation",
|
3132 + | name = "endpoint_with_host_label_operation",
|
2723 3133 | "executing python handler function"
|
2724 3134 | );
|
2725 3135 | ::pyo3::Python::with_gil(|py| {
|
2726 3136 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2727 3137 | let output = if handler.args == 1 {
|
2728 3138 | pyhandler.call1((input,))?
|
2729 3139 | } else {
|
2730 3140 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2731 3141 | };
|
2732 - | output.extract::<crate::output::EndpointOperationOutput>()
|
3142 + | output.extract::<crate::output::EndpointWithHostLabelOperationOutput>()
|
2733 3143 | })
|
2734 3144 | };
|
2735 3145 | // Catch and record a Python traceback.
|
2736 3146 | result.map_err(|e| {
|
2737 3147 | let rich_py_err =
|
2738 3148 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2739 3149 | e.clone_ref(py)
|
2740 3150 | }));
|
2741 3151 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2742 3152 | e.into()
|
2743 3153 | })
|
2744 3154 | }
|
2745 3155 |
|
2746 - | /// Python handler for operation `PostUnionWithJsonName`.
|
2747 - | pub(crate) async fn post_union_with_json_name(
|
2748 - | input: crate::input::PostUnionWithJsonNameInput,
|
3156 + | /// Python handler for operation `HostWithPathOperation`.
|
3157 + | pub(crate) async fn host_with_path_operation(
|
3158 + | input: crate::input::HostWithPathOperationInput,
|
2749 3159 | state: ::aws_smithy_legacy_http_server::Extension<
|
2750 3160 | ::aws_smithy_http_server_python::context::PyContext,
|
2751 3161 | >,
|
2752 3162 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2753 3163 | ) -> std::result::Result<
|
2754 - | crate::output::PostUnionWithJsonNameOutput,
|
2755 - | crate::error::PostUnionWithJsonNameError,
|
3164 + | crate::output::HostWithPathOperationOutput,
|
3165 + | crate::error::HostWithPathOperationError,
|
2756 3166 | > {
|
2757 3167 | // Async block used to run the handler and catch any Python error.
|
2758 3168 | let result = if handler.is_coroutine {
|
2759 3169 | ::tracing::trace!(
|
2760 - | name = "post_union_with_json_name",
|
3170 + | name = "host_with_path_operation",
|
2761 3171 | "executing python handler coroutine"
|
2762 3172 | );
|
2763 3173 | let result = ::pyo3::Python::with_gil(|py| {
|
2764 3174 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2765 3175 | let coroutine = if handler.args == 1 {
|
2766 3176 | pyhandler.call1((input,))?
|
2767 3177 | } else {
|
2768 3178 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2769 3179 | };
|
2770 3180 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2771 3181 | })?;
|
2772 3182 | result.await.and_then(|r| {
|
2773 3183 | ::pyo3::Python::with_gil(|py| {
|
2774 - | r.extract::<crate::output::PostUnionWithJsonNameOutput>(py)
|
3184 + | r.extract::<crate::output::HostWithPathOperationOutput>(py)
|
2775 3185 | })
|
2776 3186 | })
|
2777 3187 | } else {
|
2778 3188 | ::tracing::trace!(
|
2779 - | name = "post_union_with_json_name",
|
3189 + | name = "host_with_path_operation",
|
2780 3190 | "executing python handler function"
|
2781 3191 | );
|
2782 3192 | ::pyo3::Python::with_gil(|py| {
|
2783 3193 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2784 3194 | let output = if handler.args == 1 {
|
2785 3195 | pyhandler.call1((input,))?
|
2786 3196 | } else {
|
2787 3197 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2788 3198 | };
|
2789 - | output.extract::<crate::output::PostUnionWithJsonNameOutput>()
|
3199 + | output.extract::<crate::output::HostWithPathOperationOutput>()
|
2790 3200 | })
|
2791 3201 | };
|
2792 3202 | // Catch and record a Python traceback.
|
2793 3203 | result.map_err(|e| {
|
2794 3204 | let rich_py_err =
|
2795 3205 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2796 3206 | e.clone_ref(py)
|
2797 3207 | }));
|
2798 3208 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2799 3209 | e.into()
|
2800 3210 | })
|
2801 3211 | }
|
2802 3212 |
|
2803 - | /// Python handler for operation `PostPlayerAction`.
|
2804 - | pub(crate) async fn post_player_action(
|
2805 - | input: crate::input::PostPlayerActionInput,
|
3213 + | /// Python handler for operation `HttpChecksumRequired`.
|
3214 + | pub(crate) async fn http_checksum_required(
|
3215 + | input: crate::input::HttpChecksumRequiredInput,
|
2806 3216 | state: ::aws_smithy_legacy_http_server::Extension<
|
2807 3217 | ::aws_smithy_http_server_python::context::PyContext,
|
2808 3218 | >,
|
2809 3219 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2810 - | ) -> std::result::Result<crate::output::PostPlayerActionOutput, crate::error::PostPlayerActionError>
|
2811 - | {
|
3220 + | ) -> std::result::Result<
|
3221 + | crate::output::HttpChecksumRequiredOutput,
|
3222 + | crate::error::HttpChecksumRequiredError,
|
3223 + | > {
|
2812 3224 | // Async block used to run the handler and catch any Python error.
|
2813 3225 | let result = if handler.is_coroutine {
|
2814 3226 | ::tracing::trace!(
|
2815 - | name = "post_player_action",
|
3227 + | name = "http_checksum_required",
|
2816 3228 | "executing python handler coroutine"
|
2817 3229 | );
|
2818 3230 | let result = ::pyo3::Python::with_gil(|py| {
|
2819 3231 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2820 3232 | let coroutine = if handler.args == 1 {
|
2821 3233 | pyhandler.call1((input,))?
|
2822 3234 | } else {
|
2823 3235 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2824 3236 | };
|
2825 3237 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2826 3238 | })?;
|
2827 3239 | result.await.and_then(|r| {
|
2828 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::PostPlayerActionOutput>(py))
|
3240 + | ::pyo3::Python::with_gil(|py| {
|
3241 + | r.extract::<crate::output::HttpChecksumRequiredOutput>(py)
|
3242 + | })
|
2829 3243 | })
|
2830 3244 | } else {
|
2831 3245 | ::tracing::trace!(
|
2832 - | name = "post_player_action",
|
3246 + | name = "http_checksum_required",
|
2833 3247 | "executing python handler function"
|
2834 3248 | );
|
2835 3249 | ::pyo3::Python::with_gil(|py| {
|
2836 3250 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2837 3251 | let output = if handler.args == 1 {
|
2838 3252 | pyhandler.call1((input,))?
|
2839 3253 | } else {
|
2840 3254 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2841 3255 | };
|
2842 - | output.extract::<crate::output::PostPlayerActionOutput>()
|
3256 + | output.extract::<crate::output::HttpChecksumRequiredOutput>()
|
2843 3257 | })
|
2844 3258 | };
|
2845 3259 | // Catch and record a Python traceback.
|
2846 3260 | result.map_err(|e| {
|
2847 3261 | let rich_py_err =
|
2848 3262 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2849 3263 | e.clone_ref(py)
|
2850 3264 | }));
|
2851 3265 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2852 3266 | e.into()
|
2853 3267 | })
|
2854 3268 | }
|
2855 3269 |
|
2856 - | /// Python handler for operation `JsonUnions`.
|
2857 - | pub(crate) async fn json_unions(
|
2858 - | input: crate::input::JsonUnionsInput,
|
3270 + | /// Python handler for operation `MalformedRequestBody`.
|
3271 + | pub(crate) async fn malformed_request_body(
|
3272 + | input: crate::input::MalformedRequestBodyInput,
|
2859 3273 | state: ::aws_smithy_legacy_http_server::Extension<
|
2860 3274 | ::aws_smithy_http_server_python::context::PyContext,
|
2861 3275 | >,
|
2862 3276 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2863 - | ) -> std::result::Result<crate::output::JsonUnionsOutput, crate::error::JsonUnionsError> {
|
3277 + | ) -> std::result::Result<
|
3278 + | crate::output::MalformedRequestBodyOutput,
|
3279 + | crate::error::MalformedRequestBodyError,
|
3280 + | > {
|
2864 3281 | // Async block used to run the handler and catch any Python error.
|
2865 3282 | let result = if handler.is_coroutine {
|
2866 - | ::tracing::trace!(name = "json_unions", "executing python handler coroutine");
|
3283 + | ::tracing::trace!(
|
3284 + | name = "malformed_request_body",
|
3285 + | "executing python handler coroutine"
|
3286 + | );
|
2867 3287 | let result = ::pyo3::Python::with_gil(|py| {
|
2868 3288 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2869 3289 | let coroutine = if handler.args == 1 {
|
2870 3290 | pyhandler.call1((input,))?
|
2871 3291 | } else {
|
2872 3292 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2873 3293 | };
|
2874 3294 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2875 3295 | })?;
|
2876 3296 | result.await.and_then(|r| {
|
2877 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonUnionsOutput>(py))
|
3297 + | ::pyo3::Python::with_gil(|py| {
|
3298 + | r.extract::<crate::output::MalformedRequestBodyOutput>(py)
|
3299 + | })
|
2878 3300 | })
|
2879 3301 | } else {
|
2880 - | ::tracing::trace!(name = "json_unions", "executing python handler function");
|
3302 + | ::tracing::trace!(
|
3303 + | name = "malformed_request_body",
|
3304 + | "executing python handler function"
|
3305 + | );
|
2881 3306 | ::pyo3::Python::with_gil(|py| {
|
2882 3307 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2883 3308 | let output = if handler.args == 1 {
|
2884 3309 | pyhandler.call1((input,))?
|
2885 3310 | } else {
|
2886 3311 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2887 3312 | };
|
2888 - | output.extract::<crate::output::JsonUnionsOutput>()
|
3313 + | output.extract::<crate::output::MalformedRequestBodyOutput>()
|
2889 3314 | })
|
2890 3315 | };
|
2891 3316 | // Catch and record a Python traceback.
|
2892 3317 | result.map_err(|e| {
|
2893 3318 | let rich_py_err =
|
2894 3319 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2895 3320 | e.clone_ref(py)
|
2896 3321 | }));
|
2897 3322 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2898 3323 | e.into()
|
2899 3324 | })
|
2900 3325 | }
|
2901 3326 |
|
2902 - | /// Python handler for operation `DocumentTypeAsMapValue`.
|
2903 - | pub(crate) async fn document_type_as_map_value(
|
2904 - | input: crate::input::DocumentTypeAsMapValueInput,
|
3327 + | /// Python handler for operation `MalformedInteger`.
|
3328 + | pub(crate) async fn malformed_integer(
|
3329 + | input: crate::input::MalformedIntegerInput,
|
2905 3330 | state: ::aws_smithy_legacy_http_server::Extension<
|
2906 3331 | ::aws_smithy_http_server_python::context::PyContext,
|
2907 3332 | >,
|
2908 3333 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2909 - | ) -> std::result::Result<
|
2910 - | crate::output::DocumentTypeAsMapValueOutput,
|
2911 - | crate::error::DocumentTypeAsMapValueError,
|
2912 - | > {
|
3334 + | ) -> std::result::Result<crate::output::MalformedIntegerOutput, crate::error::MalformedIntegerError>
|
3335 + | {
|
2913 3336 | // Async block used to run the handler and catch any Python error.
|
2914 3337 | let result = if handler.is_coroutine {
|
2915 3338 | ::tracing::trace!(
|
2916 - | name = "document_type_as_map_value",
|
3339 + | name = "malformed_integer",
|
2917 3340 | "executing python handler coroutine"
|
2918 3341 | );
|
2919 3342 | let result = ::pyo3::Python::with_gil(|py| {
|
2920 3343 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2921 3344 | let coroutine = if handler.args == 1 {
|
2922 3345 | pyhandler.call1((input,))?
|
2923 3346 | } else {
|
2924 3347 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2925 3348 | };
|
2926 3349 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2927 3350 | })?;
|
2928 3351 | result.await.and_then(|r| {
|
2929 - | ::pyo3::Python::with_gil(|py| {
|
2930 - | r.extract::<crate::output::DocumentTypeAsMapValueOutput>(py)
|
2931 - | })
|
3352 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedIntegerOutput>(py))
|
2932 3353 | })
|
2933 3354 | } else {
|
2934 3355 | ::tracing::trace!(
|
2935 - | name = "document_type_as_map_value",
|
3356 + | name = "malformed_integer",
|
2936 3357 | "executing python handler function"
|
2937 3358 | );
|
2938 3359 | ::pyo3::Python::with_gil(|py| {
|
2939 3360 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2940 3361 | let output = if handler.args == 1 {
|
2941 3362 | pyhandler.call1((input,))?
|
2942 3363 | } else {
|
2943 3364 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2944 3365 | };
|
2945 - | output.extract::<crate::output::DocumentTypeAsMapValueOutput>()
|
3366 + | output.extract::<crate::output::MalformedIntegerOutput>()
|
2946 3367 | })
|
2947 3368 | };
|
2948 3369 | // Catch and record a Python traceback.
|
2949 3370 | result.map_err(|e| {
|
2950 3371 | let rich_py_err =
|
2951 3372 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
2952 3373 | e.clone_ref(py)
|
2953 3374 | }));
|
2954 3375 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
2955 3376 | e.into()
|
2956 3377 | })
|
2957 3378 | }
|
2958 3379 |
|
2959 - | /// Python handler for operation `DocumentTypeAsPayload`.
|
2960 - | pub(crate) async fn document_type_as_payload(
|
2961 - | input: crate::input::DocumentTypeAsPayloadInput,
|
3380 + | /// Python handler for operation `MalformedUnion`.
|
3381 + | pub(crate) async fn malformed_union(
|
3382 + | input: crate::input::MalformedUnionInput,
|
2962 3383 | state: ::aws_smithy_legacy_http_server::Extension<
|
2963 3384 | ::aws_smithy_http_server_python::context::PyContext,
|
2964 3385 | >,
|
2965 3386 | handler: ::aws_smithy_http_server_python::PyHandler,
|
2966 - | ) -> std::result::Result<
|
2967 - | crate::output::DocumentTypeAsPayloadOutput,
|
2968 - | crate::error::DocumentTypeAsPayloadError,
|
2969 - | > {
|
3387 + | ) -> std::result::Result<crate::output::MalformedUnionOutput, crate::error::MalformedUnionError> {
|
2970 3388 | // Async block used to run the handler and catch any Python error.
|
2971 3389 | let result = if handler.is_coroutine {
|
2972 3390 | ::tracing::trace!(
|
2973 - | name = "document_type_as_payload",
|
3391 + | name = "malformed_union",
|
2974 3392 | "executing python handler coroutine"
|
2975 3393 | );
|
2976 3394 | let result = ::pyo3::Python::with_gil(|py| {
|
2977 3395 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2978 3396 | let coroutine = if handler.args == 1 {
|
2979 3397 | pyhandler.call1((input,))?
|
2980 3398 | } else {
|
2981 3399 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
2982 3400 | };
|
2983 3401 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
2984 3402 | })?;
|
2985 3403 | result.await.and_then(|r| {
|
2986 - | ::pyo3::Python::with_gil(|py| {
|
2987 - | r.extract::<crate::output::DocumentTypeAsPayloadOutput>(py)
|
2988 - | })
|
3404 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedUnionOutput>(py))
|
2989 3405 | })
|
2990 3406 | } else {
|
2991 3407 | ::tracing::trace!(
|
2992 - | name = "document_type_as_payload",
|
3408 + | name = "malformed_union",
|
2993 3409 | "executing python handler function"
|
2994 3410 | );
|
2995 3411 | ::pyo3::Python::with_gil(|py| {
|
2996 3412 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
2997 3413 | let output = if handler.args == 1 {
|
2998 3414 | pyhandler.call1((input,))?
|
2999 3415 | } else {
|
3000 3416 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3001 3417 | };
|
3002 - | output.extract::<crate::output::DocumentTypeAsPayloadOutput>()
|
3418 + | output.extract::<crate::output::MalformedUnionOutput>()
|
3003 3419 | })
|
3004 3420 | };
|
3005 3421 | // Catch and record a Python traceback.
|
3006 3422 | result.map_err(|e| {
|
3007 3423 | let rich_py_err =
|
3008 3424 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3009 3425 | e.clone_ref(py)
|
3010 3426 | }));
|
3011 3427 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3012 3428 | e.into()
|
3013 3429 | })
|
3014 3430 | }
|
3015 3431 |
|
3016 - | /// Python handler for operation `DocumentType`.
|
3017 - | pub(crate) async fn document_type(
|
3018 - | input: crate::input::DocumentTypeInput,
|
3432 + | /// Python handler for operation `MalformedBoolean`.
|
3433 + | pub(crate) async fn malformed_boolean(
|
3434 + | input: crate::input::MalformedBooleanInput,
|
3019 3435 | state: ::aws_smithy_legacy_http_server::Extension<
|
3020 3436 | ::aws_smithy_http_server_python::context::PyContext,
|
3021 3437 | >,
|
3022 3438 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3023 - | ) -> std::result::Result<crate::output::DocumentTypeOutput, crate::error::DocumentTypeError> {
|
3439 + | ) -> std::result::Result<crate::output::MalformedBooleanOutput, crate::error::MalformedBooleanError>
|
3440 + | {
|
3024 3441 | // Async block used to run the handler and catch any Python error.
|
3025 3442 | let result = if handler.is_coroutine {
|
3026 - | ::tracing::trace!(name = "document_type", "executing python handler coroutine");
|
3443 + | ::tracing::trace!(
|
3444 + | name = "malformed_boolean",
|
3445 + | "executing python handler coroutine"
|
3446 + | );
|
3027 3447 | let result = ::pyo3::Python::with_gil(|py| {
|
3028 3448 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3029 3449 | let coroutine = if handler.args == 1 {
|
3030 3450 | pyhandler.call1((input,))?
|
3031 3451 | } else {
|
3032 3452 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3033 3453 | };
|
3034 3454 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3035 3455 | })?;
|
3036 3456 | result.await.and_then(|r| {
|
3037 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::DocumentTypeOutput>(py))
|
3457 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedBooleanOutput>(py))
|
3038 3458 | })
|
3039 3459 | } else {
|
3040 - | ::tracing::trace!(name = "document_type", "executing python handler function");
|
3460 + | ::tracing::trace!(
|
3461 + | name = "malformed_boolean",
|
3462 + | "executing python handler function"
|
3463 + | );
|
3041 3464 | ::pyo3::Python::with_gil(|py| {
|
3042 3465 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3043 3466 | let output = if handler.args == 1 {
|
3044 3467 | pyhandler.call1((input,))?
|
3045 3468 | } else {
|
3046 3469 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3047 3470 | };
|
3048 - | output.extract::<crate::output::DocumentTypeOutput>()
|
3471 + | output.extract::<crate::output::MalformedBooleanOutput>()
|
3049 3472 | })
|
3050 3473 | };
|
3051 3474 | // Catch and record a Python traceback.
|
3052 3475 | result.map_err(|e| {
|
3053 3476 | let rich_py_err =
|
3054 3477 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3055 3478 | e.clone_ref(py)
|
3056 3479 | }));
|
3057 3480 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3058 3481 | e.into()
|
3059 3482 | })
|
3060 3483 | }
|
3061 3484 |
|
3062 - | /// Python handler for operation `JsonBlobs`.
|
3063 - | pub(crate) async fn json_blobs(
|
3064 - | input: crate::input::JsonBlobsInput,
|
3485 + | /// Python handler for operation `MalformedList`.
|
3486 + | pub(crate) async fn malformed_list(
|
3487 + | input: crate::input::MalformedListInput,
|
3065 3488 | state: ::aws_smithy_legacy_http_server::Extension<
|
3066 3489 | ::aws_smithy_http_server_python::context::PyContext,
|
3067 3490 | >,
|
3068 3491 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3069 - | ) -> std::result::Result<crate::output::JsonBlobsOutput, crate::error::JsonBlobsError> {
|
3492 + | ) -> std::result::Result<crate::output::MalformedListOutput, crate::error::MalformedListError> {
|
3070 3493 | // Async block used to run the handler and catch any Python error.
|
3071 3494 | let result = if handler.is_coroutine {
|
3072 - | ::tracing::trace!(name = "json_blobs", "executing python handler coroutine");
|
3495 + | ::tracing::trace!(
|
3496 + | name = "malformed_list",
|
3497 + | "executing python handler coroutine"
|
3498 + | );
|
3073 3499 | let result = ::pyo3::Python::with_gil(|py| {
|
3074 3500 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3075 3501 | let coroutine = if handler.args == 1 {
|
3076 3502 | pyhandler.call1((input,))?
|
3077 3503 | } else {
|
3078 3504 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3079 3505 | };
|
3080 3506 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3081 3507 | })?;
|
3082 3508 | result.await.and_then(|r| {
|
3083 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonBlobsOutput>(py))
|
3509 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedListOutput>(py))
|
3084 3510 | })
|
3085 3511 | } else {
|
3086 - | ::tracing::trace!(name = "json_blobs", "executing python handler function");
|
3512 + | ::tracing::trace!(name = "malformed_list", "executing python handler function");
|
3087 3513 | ::pyo3::Python::with_gil(|py| {
|
3088 3514 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3089 3515 | let output = if handler.args == 1 {
|
3090 3516 | pyhandler.call1((input,))?
|
3091 3517 | } else {
|
3092 3518 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3093 3519 | };
|
3094 - | output.extract::<crate::output::JsonBlobsOutput>()
|
3520 + | output.extract::<crate::output::MalformedListOutput>()
|
3095 3521 | })
|
3096 3522 | };
|
3097 3523 | // Catch and record a Python traceback.
|
3098 3524 | result.map_err(|e| {
|
3099 3525 | let rich_py_err =
|
3100 3526 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3101 3527 | e.clone_ref(py)
|
3102 3528 | }));
|
3103 3529 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3104 3530 | e.into()
|
3105 3531 | })
|
3106 3532 | }
|
3107 3533 |
|
3108 - | /// Python handler for operation `SparseJsonMaps`.
|
3109 - | pub(crate) async fn sparse_json_maps(
|
3110 - | input: crate::input::SparseJsonMapsInput,
|
3534 + | /// Python handler for operation `MalformedMap`.
|
3535 + | pub(crate) async fn malformed_map(
|
3536 + | input: crate::input::MalformedMapInput,
|
3111 3537 | state: ::aws_smithy_legacy_http_server::Extension<
|
3112 3538 | ::aws_smithy_http_server_python::context::PyContext,
|
3113 3539 | >,
|
3114 3540 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3115 - | ) -> std::result::Result<crate::output::SparseJsonMapsOutput, crate::error::SparseJsonMapsError> {
|
3541 + | ) -> std::result::Result<crate::output::MalformedMapOutput, crate::error::MalformedMapError> {
|
3116 3542 | // Async block used to run the handler and catch any Python error.
|
3117 3543 | let result = if handler.is_coroutine {
|
3118 - | ::tracing::trace!(
|
3119 - | name = "sparse_json_maps",
|
3120 - | "executing python handler coroutine"
|
3121 - | );
|
3544 + | ::tracing::trace!(name = "malformed_map", "executing python handler coroutine");
|
3122 3545 | let result = ::pyo3::Python::with_gil(|py| {
|
3123 3546 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3124 3547 | let coroutine = if handler.args == 1 {
|
3125 3548 | pyhandler.call1((input,))?
|
3126 3549 | } else {
|
3127 3550 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3128 3551 | };
|
3129 3552 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3130 3553 | })?;
|
3131 3554 | result.await.and_then(|r| {
|
3132 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::SparseJsonMapsOutput>(py))
|
3555 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedMapOutput>(py))
|
3133 3556 | })
|
3134 3557 | } else {
|
3135 - | ::tracing::trace!(
|
3136 - | name = "sparse_json_maps",
|
3137 - | "executing python handler function"
|
3138 - | );
|
3558 + | ::tracing::trace!(name = "malformed_map", "executing python handler function");
|
3139 3559 | ::pyo3::Python::with_gil(|py| {
|
3140 3560 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3141 3561 | let output = if handler.args == 1 {
|
3142 3562 | pyhandler.call1((input,))?
|
3143 3563 | } else {
|
3144 3564 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3145 3565 | };
|
3146 - | output.extract::<crate::output::SparseJsonMapsOutput>()
|
3566 + | output.extract::<crate::output::MalformedMapOutput>()
|
3147 3567 | })
|
3148 3568 | };
|
3149 3569 | // Catch and record a Python traceback.
|
3150 3570 | result.map_err(|e| {
|
3151 3571 | let rich_py_err =
|
3152 3572 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3153 3573 | e.clone_ref(py)
|
3154 3574 | }));
|
3155 3575 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3156 3576 | e.into()
|
3157 3577 | })
|
3158 3578 | }
|
3159 3579 |
|
3160 - | /// Python handler for operation `JsonMaps`.
|
3161 - | pub(crate) async fn json_maps(
|
3162 - | input: crate::input::JsonMapsInput,
|
3580 + | /// Python handler for operation `MalformedBlob`.
|
3581 + | pub(crate) async fn malformed_blob(
|
3582 + | input: crate::input::MalformedBlobInput,
|
3163 3583 | state: ::aws_smithy_legacy_http_server::Extension<
|
3164 3584 | ::aws_smithy_http_server_python::context::PyContext,
|
3165 3585 | >,
|
3166 3586 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3167 - | ) -> std::result::Result<crate::output::JsonMapsOutput, crate::error::JsonMapsError> {
|
3587 + | ) -> std::result::Result<crate::output::MalformedBlobOutput, crate::error::MalformedBlobError> {
|
3168 3588 | // Async block used to run the handler and catch any Python error.
|
3169 3589 | let result = if handler.is_coroutine {
|
3170 - | ::tracing::trace!(name = "json_maps", "executing python handler coroutine");
|
3590 + | ::tracing::trace!(
|
3591 + | name = "malformed_blob",
|
3592 + | "executing python handler coroutine"
|
3593 + | );
|
3171 3594 | let result = ::pyo3::Python::with_gil(|py| {
|
3172 3595 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3173 3596 | let coroutine = if handler.args == 1 {
|
3174 3597 | pyhandler.call1((input,))?
|
3175 3598 | } else {
|
3176 3599 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3177 3600 | };
|
3178 3601 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3179 3602 | })?;
|
3180 3603 | result.await.and_then(|r| {
|
3181 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonMapsOutput>(py))
|
3604 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedBlobOutput>(py))
|
3182 3605 | })
|
3183 3606 | } else {
|
3184 - | ::tracing::trace!(name = "json_maps", "executing python handler function");
|
3607 + | ::tracing::trace!(name = "malformed_blob", "executing python handler function");
|
3185 3608 | ::pyo3::Python::with_gil(|py| {
|
3186 3609 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3187 3610 | let output = if handler.args == 1 {
|
3188 3611 | pyhandler.call1((input,))?
|
3189 3612 | } else {
|
3190 3613 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3191 3614 | };
|
3192 - | output.extract::<crate::output::JsonMapsOutput>()
|
3615 + | output.extract::<crate::output::MalformedBlobOutput>()
|
3193 3616 | })
|
3194 3617 | };
|
3195 3618 | // Catch and record a Python traceback.
|
3196 3619 | result.map_err(|e| {
|
3197 3620 | let rich_py_err =
|
3198 3621 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3199 3622 | e.clone_ref(py)
|
3200 3623 | }));
|
3201 3624 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3202 3625 | e.into()
|
3203 3626 | })
|
3204 3627 | }
|
3205 3628 |
|
3206 - | /// Python handler for operation `SparseJsonLists`.
|
3207 - | pub(crate) async fn sparse_json_lists(
|
3208 - | input: crate::input::SparseJsonListsInput,
|
3629 + | /// Python handler for operation `MalformedByte`.
|
3630 + | pub(crate) async fn malformed_byte(
|
3631 + | input: crate::input::MalformedByteInput,
|
3209 3632 | state: ::aws_smithy_legacy_http_server::Extension<
|
3210 3633 | ::aws_smithy_http_server_python::context::PyContext,
|
3211 3634 | >,
|
3212 3635 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3213 - | ) -> std::result::Result<crate::output::SparseJsonListsOutput, crate::error::SparseJsonListsError> {
|
3636 + | ) -> std::result::Result<crate::output::MalformedByteOutput, crate::error::MalformedByteError> {
|
3214 3637 | // Async block used to run the handler and catch any Python error.
|
3215 3638 | let result = if handler.is_coroutine {
|
3216 3639 | ::tracing::trace!(
|
3217 - | name = "sparse_json_lists",
|
3640 + | name = "malformed_byte",
|
3218 3641 | "executing python handler coroutine"
|
3219 3642 | );
|
3220 3643 | let result = ::pyo3::Python::with_gil(|py| {
|
3221 3644 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3222 3645 | let coroutine = if handler.args == 1 {
|
3223 3646 | pyhandler.call1((input,))?
|
3224 3647 | } else {
|
3225 3648 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3226 3649 | };
|
3227 3650 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3228 3651 | })?;
|
3229 3652 | result.await.and_then(|r| {
|
3230 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::SparseJsonListsOutput>(py))
|
3653 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedByteOutput>(py))
|
3231 3654 | })
|
3232 3655 | } else {
|
3233 - | ::tracing::trace!(
|
3234 - | name = "sparse_json_lists",
|
3235 - | "executing python handler function"
|
3236 - | );
|
3656 + | ::tracing::trace!(name = "malformed_byte", "executing python handler function");
|
3237 3657 | ::pyo3::Python::with_gil(|py| {
|
3238 3658 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3239 3659 | let output = if handler.args == 1 {
|
3240 3660 | pyhandler.call1((input,))?
|
3241 3661 | } else {
|
3242 3662 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3243 3663 | };
|
3244 - | output.extract::<crate::output::SparseJsonListsOutput>()
|
3664 + | output.extract::<crate::output::MalformedByteOutput>()
|
3245 3665 | })
|
3246 3666 | };
|
3247 3667 | // Catch and record a Python traceback.
|
3248 3668 | result.map_err(|e| {
|
3249 3669 | let rich_py_err =
|
3250 3670 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3251 3671 | e.clone_ref(py)
|
3252 3672 | }));
|
3253 3673 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3254 3674 | e.into()
|
3255 3675 | })
|
3256 3676 | }
|
3257 3677 |
|
3258 - | /// Python handler for operation `JsonLists`.
|
3259 - | pub(crate) async fn json_lists(
|
3260 - | input: crate::input::JsonListsInput,
|
3678 + | /// Python handler for operation `MalformedShort`.
|
3679 + | pub(crate) async fn malformed_short(
|
3680 + | input: crate::input::MalformedShortInput,
|
3261 3681 | state: ::aws_smithy_legacy_http_server::Extension<
|
3262 3682 | ::aws_smithy_http_server_python::context::PyContext,
|
3263 3683 | >,
|
3264 3684 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3265 - | ) -> std::result::Result<crate::output::JsonListsOutput, crate::error::JsonListsError> {
|
3685 + | ) -> std::result::Result<crate::output::MalformedShortOutput, crate::error::MalformedShortError> {
|
3266 3686 | // Async block used to run the handler and catch any Python error.
|
3267 3687 | let result = if handler.is_coroutine {
|
3268 - | ::tracing::trace!(name = "json_lists", "executing python handler coroutine");
|
3688 + | ::tracing::trace!(
|
3689 + | name = "malformed_short",
|
3690 + | "executing python handler coroutine"
|
3691 + | );
|
3269 3692 | let result = ::pyo3::Python::with_gil(|py| {
|
3270 3693 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3271 3694 | let coroutine = if handler.args == 1 {
|
3272 3695 | pyhandler.call1((input,))?
|
3273 3696 | } else {
|
3274 3697 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3275 3698 | };
|
3276 3699 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3277 3700 | })?;
|
3278 3701 | result.await.and_then(|r| {
|
3279 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonListsOutput>(py))
|
3702 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedShortOutput>(py))
|
3280 3703 | })
|
3281 3704 | } else {
|
3282 - | ::tracing::trace!(name = "json_lists", "executing python handler function");
|
3705 + | ::tracing::trace!(
|
3706 + | name = "malformed_short",
|
3707 + | "executing python handler function"
|
3708 + | );
|
3283 3709 | ::pyo3::Python::with_gil(|py| {
|
3284 3710 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3285 3711 | let output = if handler.args == 1 {
|
3286 3712 | pyhandler.call1((input,))?
|
3287 3713 | } else {
|
3288 3714 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3289 3715 | };
|
3290 - | output.extract::<crate::output::JsonListsOutput>()
|
3716 + | output.extract::<crate::output::MalformedShortOutput>()
|
3291 3717 | })
|
3292 3718 | };
|
3293 3719 | // Catch and record a Python traceback.
|
3294 3720 | result.map_err(|e| {
|
3295 3721 | let rich_py_err =
|
3296 3722 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3297 3723 | e.clone_ref(py)
|
3298 3724 | }));
|
3299 3725 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3300 3726 | e.into()
|
3301 3727 | })
|
3302 3728 | }
|
3303 3729 |
|
3304 - | /// Python handler for operation `RecursiveShapes`.
|
3305 - | pub(crate) async fn recursive_shapes(
|
3306 - | input: crate::input::RecursiveShapesInput,
|
3730 + | /// Python handler for operation `MalformedLong`.
|
3731 + | pub(crate) async fn malformed_long(
|
3732 + | input: crate::input::MalformedLongInput,
|
3307 3733 | state: ::aws_smithy_legacy_http_server::Extension<
|
3308 3734 | ::aws_smithy_http_server_python::context::PyContext,
|
3309 3735 | >,
|
3310 3736 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3311 - | ) -> std::result::Result<crate::output::RecursiveShapesOutput, crate::error::RecursiveShapesError> {
|
3737 + | ) -> std::result::Result<crate::output::MalformedLongOutput, crate::error::MalformedLongError> {
|
3312 3738 | // Async block used to run the handler and catch any Python error.
|
3313 3739 | let result = if handler.is_coroutine {
|
3314 3740 | ::tracing::trace!(
|
3315 - | name = "recursive_shapes",
|
3741 + | name = "malformed_long",
|
3316 3742 | "executing python handler coroutine"
|
3317 3743 | );
|
3318 3744 | let result = ::pyo3::Python::with_gil(|py| {
|
3319 3745 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3320 3746 | let coroutine = if handler.args == 1 {
|
3321 3747 | pyhandler.call1((input,))?
|
3322 3748 | } else {
|
3323 3749 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3324 3750 | };
|
3325 3751 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3326 3752 | })?;
|
3327 3753 | result.await.and_then(|r| {
|
3328 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::RecursiveShapesOutput>(py))
|
3754 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedLongOutput>(py))
|
3329 3755 | })
|
3330 3756 | } else {
|
3331 - | ::tracing::trace!(
|
3332 - | name = "recursive_shapes",
|
3333 - | "executing python handler function"
|
3334 - | );
|
3757 + | ::tracing::trace!(name = "malformed_long", "executing python handler function");
|
3335 3758 | ::pyo3::Python::with_gil(|py| {
|
3336 3759 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3337 3760 | let output = if handler.args == 1 {
|
3338 3761 | pyhandler.call1((input,))?
|
3339 3762 | } else {
|
3340 3763 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3341 3764 | };
|
3342 - | output.extract::<crate::output::RecursiveShapesOutput>()
|
3765 + | output.extract::<crate::output::MalformedLongOutput>()
|
3343 3766 | })
|
3344 3767 | };
|
3345 3768 | // Catch and record a Python traceback.
|
3346 3769 | result.map_err(|e| {
|
3347 3770 | let rich_py_err =
|
3348 3771 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3349 3772 | e.clone_ref(py)
|
3350 3773 | }));
|
3351 3774 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3352 3775 | e.into()
|
3353 3776 | })
|
3354 3777 | }
|
3355 3778 |
|
3356 - | /// Python handler for operation `JsonIntEnums`.
|
3357 - | pub(crate) async fn json_int_enums(
|
3358 - | input: crate::input::JsonIntEnumsInput,
|
3779 + | /// Python handler for operation `MalformedFloat`.
|
3780 + | pub(crate) async fn malformed_float(
|
3781 + | input: crate::input::MalformedFloatInput,
|
3359 3782 | state: ::aws_smithy_legacy_http_server::Extension<
|
3360 3783 | ::aws_smithy_http_server_python::context::PyContext,
|
3361 3784 | >,
|
3362 3785 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3363 - | ) -> std::result::Result<crate::output::JsonIntEnumsOutput, crate::error::JsonIntEnumsError> {
|
3786 + | ) -> std::result::Result<crate::output::MalformedFloatOutput, crate::error::MalformedFloatError> {
|
3364 3787 | // Async block used to run the handler and catch any Python error.
|
3365 3788 | let result = if handler.is_coroutine {
|
3366 3789 | ::tracing::trace!(
|
3367 - | name = "json_int_enums",
|
3790 + | name = "malformed_float",
|
3368 3791 | "executing python handler coroutine"
|
3369 3792 | );
|
3370 3793 | let result = ::pyo3::Python::with_gil(|py| {
|
3371 3794 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3372 3795 | let coroutine = if handler.args == 1 {
|
3373 3796 | pyhandler.call1((input,))?
|
3374 3797 | } else {
|
3375 3798 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3376 3799 | };
|
3377 3800 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3378 3801 | })?;
|
3379 3802 | result.await.and_then(|r| {
|
3380 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonIntEnumsOutput>(py))
|
3803 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedFloatOutput>(py))
|
3381 3804 | })
|
3382 3805 | } else {
|
3383 - | ::tracing::trace!(name = "json_int_enums", "executing python handler function");
|
3806 + | ::tracing::trace!(
|
3807 + | name = "malformed_float",
|
3808 + | "executing python handler function"
|
3809 + | );
|
3384 3810 | ::pyo3::Python::with_gil(|py| {
|
3385 3811 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3386 3812 | let output = if handler.args == 1 {
|
3387 3813 | pyhandler.call1((input,))?
|
3388 3814 | } else {
|
3389 3815 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3390 3816 | };
|
3391 - | output.extract::<crate::output::JsonIntEnumsOutput>()
|
3817 + | output.extract::<crate::output::MalformedFloatOutput>()
|
3392 3818 | })
|
3393 3819 | };
|
3394 3820 | // Catch and record a Python traceback.
|
3395 3821 | result.map_err(|e| {
|
3396 3822 | let rich_py_err =
|
3397 3823 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3398 3824 | e.clone_ref(py)
|
3399 3825 | }));
|
3400 3826 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3401 3827 | e.into()
|
3402 3828 | })
|
3403 3829 | }
|
3404 3830 |
|
3405 - | /// Python handler for operation `JsonEnums`.
|
3406 - | pub(crate) async fn json_enums(
|
3407 - | input: crate::input::JsonEnumsInput,
|
3831 + | /// Python handler for operation `MalformedDouble`.
|
3832 + | pub(crate) async fn malformed_double(
|
3833 + | input: crate::input::MalformedDoubleInput,
|
3408 3834 | state: ::aws_smithy_legacy_http_server::Extension<
|
3409 3835 | ::aws_smithy_http_server_python::context::PyContext,
|
3410 3836 | >,
|
3411 3837 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3412 - | ) -> std::result::Result<crate::output::JsonEnumsOutput, crate::error::JsonEnumsError> {
|
3838 + | ) -> std::result::Result<crate::output::MalformedDoubleOutput, crate::error::MalformedDoubleError> {
|
3413 3839 | // Async block used to run the handler and catch any Python error.
|
3414 3840 | let result = if handler.is_coroutine {
|
3415 - | ::tracing::trace!(name = "json_enums", "executing python handler coroutine");
|
3841 + | ::tracing::trace!(
|
3842 + | name = "malformed_double",
|
3843 + | "executing python handler coroutine"
|
3844 + | );
|
3416 3845 | let result = ::pyo3::Python::with_gil(|py| {
|
3417 3846 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3418 3847 | let coroutine = if handler.args == 1 {
|
3419 3848 | pyhandler.call1((input,))?
|
3420 3849 | } else {
|
3421 3850 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3422 3851 | };
|
3423 3852 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3424 3853 | })?;
|
3425 3854 | result.await.and_then(|r| {
|
3426 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonEnumsOutput>(py))
|
3855 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedDoubleOutput>(py))
|
3427 3856 | })
|
3428 3857 | } else {
|
3429 - | ::tracing::trace!(name = "json_enums", "executing python handler function");
|
3858 + | ::tracing::trace!(
|
3859 + | name = "malformed_double",
|
3860 + | "executing python handler function"
|
3861 + | );
|
3430 3862 | ::pyo3::Python::with_gil(|py| {
|
3431 3863 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3432 3864 | let output = if handler.args == 1 {
|
3433 3865 | pyhandler.call1((input,))?
|
3434 3866 | } else {
|
3435 3867 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3436 3868 | };
|
3437 - | output.extract::<crate::output::JsonEnumsOutput>()
|
3869 + | output.extract::<crate::output::MalformedDoubleOutput>()
|
3438 3870 | })
|
3439 3871 | };
|
3440 3872 | // Catch and record a Python traceback.
|
3441 3873 | result.map_err(|e| {
|
3442 3874 | let rich_py_err =
|
3443 3875 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3444 3876 | e.clone_ref(py)
|
3445 3877 | }));
|
3446 3878 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3447 3879 | e.into()
|
3448 3880 | })
|
3449 - | }
|
3450 - |
|
3451 - | /// Python handler for operation `JsonTimestamps`.
|
3452 - | pub(crate) async fn json_timestamps(
|
3453 - | input: crate::input::JsonTimestampsInput,
|
3881 + | }
|
3882 + |
|
3883 + | /// Python handler for operation `MalformedString`.
|
3884 + | pub(crate) async fn malformed_string(
|
3885 + | input: crate::input::MalformedStringInput,
|
3454 3886 | state: ::aws_smithy_legacy_http_server::Extension<
|
3455 3887 | ::aws_smithy_http_server_python::context::PyContext,
|
3456 3888 | >,
|
3457 3889 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3458 - | ) -> std::result::Result<crate::output::JsonTimestampsOutput, crate::error::JsonTimestampsError> {
|
3890 + | ) -> std::result::Result<crate::output::MalformedStringOutput, crate::error::MalformedStringError> {
|
3459 3891 | // Async block used to run the handler and catch any Python error.
|
3460 3892 | let result = if handler.is_coroutine {
|
3461 3893 | ::tracing::trace!(
|
3462 - | name = "json_timestamps",
|
3894 + | name = "malformed_string",
|
3463 3895 | "executing python handler coroutine"
|
3464 3896 | );
|
3465 3897 | let result = ::pyo3::Python::with_gil(|py| {
|
3466 3898 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3467 3899 | let coroutine = if handler.args == 1 {
|
3468 3900 | pyhandler.call1((input,))?
|
3469 3901 | } else {
|
3470 3902 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3471 3903 | };
|
3472 3904 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3473 3905 | })?;
|
3474 3906 | result.await.and_then(|r| {
|
3475 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonTimestampsOutput>(py))
|
3907 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MalformedStringOutput>(py))
|
3476 3908 | })
|
3477 3909 | } else {
|
3478 3910 | ::tracing::trace!(
|
3479 - | name = "json_timestamps",
|
3911 + | name = "malformed_string",
|
3480 3912 | "executing python handler function"
|
3481 3913 | );
|
3482 3914 | ::pyo3::Python::with_gil(|py| {
|
3483 3915 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3484 3916 | let output = if handler.args == 1 {
|
3485 3917 | pyhandler.call1((input,))?
|
3486 3918 | } else {
|
3487 3919 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3488 3920 | };
|
3489 - | output.extract::<crate::output::JsonTimestampsOutput>()
|
3921 + | output.extract::<crate::output::MalformedStringOutput>()
|
3490 3922 | })
|
3491 3923 | };
|
3492 3924 | // Catch and record a Python traceback.
|
3493 3925 | result.map_err(|e| {
|
3494 3926 | let rich_py_err =
|
3495 3927 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3496 3928 | e.clone_ref(py)
|
3497 3929 | }));
|
3498 3930 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3499 3931 | e.into()
|
3500 3932 | })
|
3501 3933 | }
|
3502 3934 |
|
3503 - | /// Python handler for operation `SimpleScalarProperties`.
|
3504 - | pub(crate) async fn simple_scalar_properties(
|
3505 - | input: crate::input::SimpleScalarPropertiesInput,
|
3935 + | /// Python handler for operation `MalformedTimestampPathDefault`.
|
3936 + | pub(crate) async fn malformed_timestamp_path_default(
|
3937 + | input: crate::input::MalformedTimestampPathDefaultInput,
|
3506 3938 | state: ::aws_smithy_legacy_http_server::Extension<
|
3507 3939 | ::aws_smithy_http_server_python::context::PyContext,
|
3508 3940 | >,
|
3509 3941 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3510 3942 | ) -> std::result::Result<
|
3511 - | crate::output::SimpleScalarPropertiesOutput,
|
3512 - | crate::error::SimpleScalarPropertiesError,
|
3943 + | crate::output::MalformedTimestampPathDefaultOutput,
|
3944 + | crate::error::MalformedTimestampPathDefaultError,
|
3513 3945 | > {
|
3514 3946 | // Async block used to run the handler and catch any Python error.
|
3515 3947 | let result = if handler.is_coroutine {
|
3516 3948 | ::tracing::trace!(
|
3517 - | name = "simple_scalar_properties",
|
3949 + | name = "malformed_timestamp_path_default",
|
3518 3950 | "executing python handler coroutine"
|
3519 3951 | );
|
3520 3952 | let result = ::pyo3::Python::with_gil(|py| {
|
3521 3953 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3522 3954 | let coroutine = if handler.args == 1 {
|
3523 3955 | pyhandler.call1((input,))?
|
3524 3956 | } else {
|
3525 3957 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3526 3958 | };
|
3527 3959 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3528 3960 | })?;
|
3529 3961 | result.await.and_then(|r| {
|
3530 3962 | ::pyo3::Python::with_gil(|py| {
|
3531 - | r.extract::<crate::output::SimpleScalarPropertiesOutput>(py)
|
3963 + | r.extract::<crate::output::MalformedTimestampPathDefaultOutput>(py)
|
3532 3964 | })
|
3533 3965 | })
|
3534 3966 | } else {
|
3535 3967 | ::tracing::trace!(
|
3536 - | name = "simple_scalar_properties",
|
3968 + | name = "malformed_timestamp_path_default",
|
3537 3969 | "executing python handler function"
|
3538 3970 | );
|
3539 3971 | ::pyo3::Python::with_gil(|py| {
|
3540 3972 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3541 3973 | let output = if handler.args == 1 {
|
3542 3974 | pyhandler.call1((input,))?
|
3543 3975 | } else {
|
3544 3976 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3545 3977 | };
|
3546 - | output.extract::<crate::output::SimpleScalarPropertiesOutput>()
|
3978 + | output.extract::<crate::output::MalformedTimestampPathDefaultOutput>()
|
3547 3979 | })
|
3548 3980 | };
|
3549 3981 | // Catch and record a Python traceback.
|
3550 3982 | result.map_err(|e| {
|
3551 3983 | let rich_py_err =
|
3552 3984 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3553 3985 | e.clone_ref(py)
|
3554 3986 | }));
|
3555 3987 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3556 3988 | e.into()
|
3557 3989 | })
|
3558 3990 | }
|
3559 3991 |
|
3560 - | /// Python handler for operation `GreetingWithErrors`.
|
3561 - | pub(crate) async fn greeting_with_errors(
|
3562 - | input: crate::input::GreetingWithErrorsInput,
|
3992 + | /// Python handler for operation `MalformedTimestampPathHttpDate`.
|
3993 + | pub(crate) async fn malformed_timestamp_path_http_date(
|
3994 + | input: crate::input::MalformedTimestampPathHttpDateInput,
|
3563 3995 | state: ::aws_smithy_legacy_http_server::Extension<
|
3564 3996 | ::aws_smithy_http_server_python::context::PyContext,
|
3565 3997 | >,
|
3566 3998 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3567 3999 | ) -> std::result::Result<
|
3568 - | crate::output::GreetingWithErrorsOutput,
|
3569 - | crate::error::GreetingWithErrorsError,
|
4000 + | crate::output::MalformedTimestampPathHttpDateOutput,
|
4001 + | crate::error::MalformedTimestampPathHttpDateError,
|
3570 4002 | > {
|
3571 4003 | // Async block used to run the handler and catch any Python error.
|
3572 4004 | let result = if handler.is_coroutine {
|
3573 4005 | ::tracing::trace!(
|
3574 - | name = "greeting_with_errors",
|
4006 + | name = "malformed_timestamp_path_http_date",
|
3575 4007 | "executing python handler coroutine"
|
3576 4008 | );
|
3577 4009 | let result = ::pyo3::Python::with_gil(|py| {
|
3578 4010 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3579 4011 | let coroutine = if handler.args == 1 {
|
3580 4012 | pyhandler.call1((input,))?
|
3581 4013 | } else {
|
3582 4014 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3583 4015 | };
|
3584 4016 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3585 4017 | })?;
|
3586 4018 | result.await.and_then(|r| {
|
3587 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::GreetingWithErrorsOutput>(py))
|
4019 + | ::pyo3::Python::with_gil(|py| {
|
4020 + | r.extract::<crate::output::MalformedTimestampPathHttpDateOutput>(py)
|
4021 + | })
|
3588 4022 | })
|
3589 4023 | } else {
|
3590 4024 | ::tracing::trace!(
|
3591 - | name = "greeting_with_errors",
|
4025 + | name = "malformed_timestamp_path_http_date",
|
3592 4026 | "executing python handler function"
|
3593 4027 | );
|
3594 4028 | ::pyo3::Python::with_gil(|py| {
|
3595 4029 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3596 4030 | let output = if handler.args == 1 {
|
3597 4031 | pyhandler.call1((input,))?
|
3598 4032 | } else {
|
3599 4033 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3600 4034 | };
|
3601 - | output.extract::<crate::output::GreetingWithErrorsOutput>()
|
4035 + | output.extract::<crate::output::MalformedTimestampPathHttpDateOutput>()
|
3602 4036 | })
|
3603 4037 | };
|
3604 4038 | // Catch and record a Python traceback.
|
3605 4039 | result.map_err(|e| {
|
3606 4040 | let rich_py_err =
|
3607 4041 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3608 4042 | e.clone_ref(py)
|
3609 4043 | }));
|
3610 4044 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3611 4045 | e.into()
|
3612 4046 | })
|
3613 4047 | }
|
3614 4048 |
|
3615 - | /// Python handler for operation `StreamingTraitsWithMediaType`.
|
3616 - | pub(crate) async fn streaming_traits_with_media_type(
|
3617 - | input: crate::input::StreamingTraitsWithMediaTypeInput,
|
4049 + | /// Python handler for operation `MalformedTimestampPathEpoch`.
|
4050 + | pub(crate) async fn malformed_timestamp_path_epoch(
|
4051 + | input: crate::input::MalformedTimestampPathEpochInput,
|
3618 4052 | state: ::aws_smithy_legacy_http_server::Extension<
|
3619 4053 | ::aws_smithy_http_server_python::context::PyContext,
|
3620 4054 | >,
|
3621 4055 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3622 4056 | ) -> std::result::Result<
|
3623 - | crate::output::StreamingTraitsWithMediaTypeOutput,
|
3624 - | crate::error::StreamingTraitsWithMediaTypeError,
|
4057 + | crate::output::MalformedTimestampPathEpochOutput,
|
4058 + | crate::error::MalformedTimestampPathEpochError,
|
3625 4059 | > {
|
3626 4060 | // Async block used to run the handler and catch any Python error.
|
3627 4061 | let result = if handler.is_coroutine {
|
3628 4062 | ::tracing::trace!(
|
3629 - | name = "streaming_traits_with_media_type",
|
4063 + | name = "malformed_timestamp_path_epoch",
|
3630 4064 | "executing python handler coroutine"
|
3631 4065 | );
|
3632 4066 | let result = ::pyo3::Python::with_gil(|py| {
|
3633 4067 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3634 4068 | let coroutine = if handler.args == 1 {
|
3635 4069 | pyhandler.call1((input,))?
|
3636 4070 | } else {
|
3637 4071 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3638 4072 | };
|
3639 4073 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3640 4074 | })?;
|
3641 4075 | result.await.and_then(|r| {
|
3642 4076 | ::pyo3::Python::with_gil(|py| {
|
3643 - | r.extract::<crate::output::StreamingTraitsWithMediaTypeOutput>(py)
|
4077 + | r.extract::<crate::output::MalformedTimestampPathEpochOutput>(py)
|
3644 4078 | })
|
3645 4079 | })
|
3646 4080 | } else {
|
3647 4081 | ::tracing::trace!(
|
3648 - | name = "streaming_traits_with_media_type",
|
4082 + | name = "malformed_timestamp_path_epoch",
|
3649 4083 | "executing python handler function"
|
3650 4084 | );
|
3651 4085 | ::pyo3::Python::with_gil(|py| {
|
3652 4086 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3653 4087 | let output = if handler.args == 1 {
|
3654 4088 | pyhandler.call1((input,))?
|
3655 4089 | } else {
|
3656 4090 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3657 4091 | };
|
3658 - | output.extract::<crate::output::StreamingTraitsWithMediaTypeOutput>()
|
4092 + | output.extract::<crate::output::MalformedTimestampPathEpochOutput>()
|
3659 4093 | })
|
3660 4094 | };
|
3661 4095 | // Catch and record a Python traceback.
|
3662 4096 | result.map_err(|e| {
|
3663 4097 | let rich_py_err =
|
3664 4098 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3665 4099 | e.clone_ref(py)
|
3666 4100 | }));
|
3667 4101 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3668 4102 | e.into()
|
3669 4103 | })
|
3670 4104 | }
|
3671 4105 |
|
3672 - | /// Python handler for operation `StreamingTraitsRequireLength`.
|
3673 - | pub(crate) async fn streaming_traits_require_length(
|
3674 - | input: crate::input::StreamingTraitsRequireLengthInput,
|
4106 + | /// Python handler for operation `MalformedTimestampQueryDefault`.
|
4107 + | pub(crate) async fn malformed_timestamp_query_default(
|
4108 + | input: crate::input::MalformedTimestampQueryDefaultInput,
|
3675 4109 | state: ::aws_smithy_legacy_http_server::Extension<
|
3676 4110 | ::aws_smithy_http_server_python::context::PyContext,
|
3677 4111 | >,
|
3678 4112 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3679 4113 | ) -> std::result::Result<
|
3680 - | crate::output::StreamingTraitsRequireLengthOutput,
|
3681 - | crate::error::StreamingTraitsRequireLengthError,
|
4114 + | crate::output::MalformedTimestampQueryDefaultOutput,
|
4115 + | crate::error::MalformedTimestampQueryDefaultError,
|
3682 4116 | > {
|
3683 4117 | // Async block used to run the handler and catch any Python error.
|
3684 4118 | let result = if handler.is_coroutine {
|
3685 4119 | ::tracing::trace!(
|
3686 - | name = "streaming_traits_require_length",
|
4120 + | name = "malformed_timestamp_query_default",
|
3687 4121 | "executing python handler coroutine"
|
3688 4122 | );
|
3689 4123 | let result = ::pyo3::Python::with_gil(|py| {
|
3690 4124 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3691 4125 | let coroutine = if handler.args == 1 {
|
3692 4126 | pyhandler.call1((input,))?
|
3693 4127 | } else {
|
3694 4128 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3695 4129 | };
|
3696 4130 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3697 4131 | })?;
|
3698 4132 | result.await.and_then(|r| {
|
3699 4133 | ::pyo3::Python::with_gil(|py| {
|
3700 - | r.extract::<crate::output::StreamingTraitsRequireLengthOutput>(py)
|
4134 + | r.extract::<crate::output::MalformedTimestampQueryDefaultOutput>(py)
|
3701 4135 | })
|
3702 4136 | })
|
3703 4137 | } else {
|
3704 4138 | ::tracing::trace!(
|
3705 - | name = "streaming_traits_require_length",
|
4139 + | name = "malformed_timestamp_query_default",
|
3706 4140 | "executing python handler function"
|
3707 4141 | );
|
3708 4142 | ::pyo3::Python::with_gil(|py| {
|
3709 4143 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3710 4144 | let output = if handler.args == 1 {
|
3711 4145 | pyhandler.call1((input,))?
|
3712 4146 | } else {
|
3713 4147 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3714 4148 | };
|
3715 - | output.extract::<crate::output::StreamingTraitsRequireLengthOutput>()
|
4149 + | output.extract::<crate::output::MalformedTimestampQueryDefaultOutput>()
|
3716 4150 | })
|
3717 4151 | };
|
3718 4152 | // Catch and record a Python traceback.
|
3719 4153 | result.map_err(|e| {
|
3720 4154 | let rich_py_err =
|
3721 4155 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3722 4156 | e.clone_ref(py)
|
3723 4157 | }));
|
3724 4158 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3725 4159 | e.into()
|
3726 4160 | })
|
3727 4161 | }
|
3728 4162 |
|
3729 - | /// Python handler for operation `StreamingTraits`.
|
3730 - | pub(crate) async fn streaming_traits(
|
3731 - | input: crate::input::StreamingTraitsInput,
|
4163 + | /// Python handler for operation `MalformedTimestampQueryHttpDate`.
|
4164 + | pub(crate) async fn malformed_timestamp_query_http_date(
|
4165 + | input: crate::input::MalformedTimestampQueryHttpDateInput,
|
3732 4166 | state: ::aws_smithy_legacy_http_server::Extension<
|
3733 4167 | ::aws_smithy_http_server_python::context::PyContext,
|
3734 4168 | >,
|
3735 4169 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3736 - | ) -> std::result::Result<crate::output::StreamingTraitsOutput, crate::error::StreamingTraitsError> {
|
4170 + | ) -> std::result::Result<
|
4171 + | crate::output::MalformedTimestampQueryHttpDateOutput,
|
4172 + | crate::error::MalformedTimestampQueryHttpDateError,
|
4173 + | > {
|
3737 4174 | // Async block used to run the handler and catch any Python error.
|
3738 4175 | let result = if handler.is_coroutine {
|
3739 4176 | ::tracing::trace!(
|
3740 - | name = "streaming_traits",
|
4177 + | name = "malformed_timestamp_query_http_date",
|
3741 4178 | "executing python handler coroutine"
|
3742 4179 | );
|
3743 4180 | let result = ::pyo3::Python::with_gil(|py| {
|
3744 4181 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3745 4182 | let coroutine = if handler.args == 1 {
|
3746 4183 | pyhandler.call1((input,))?
|
3747 4184 | } else {
|
3748 4185 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3749 4186 | };
|
3750 4187 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3751 4188 | })?;
|
3752 4189 | result.await.and_then(|r| {
|
3753 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::StreamingTraitsOutput>(py))
|
4190 + | ::pyo3::Python::with_gil(|py| {
|
4191 + | r.extract::<crate::output::MalformedTimestampQueryHttpDateOutput>(py)
|
4192 + | })
|
3754 4193 | })
|
3755 4194 | } else {
|
3756 4195 | ::tracing::trace!(
|
3757 - | name = "streaming_traits",
|
4196 + | name = "malformed_timestamp_query_http_date",
|
3758 4197 | "executing python handler function"
|
3759 4198 | );
|
3760 4199 | ::pyo3::Python::with_gil(|py| {
|
3761 4200 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3762 4201 | let output = if handler.args == 1 {
|
3763 4202 | pyhandler.call1((input,))?
|
3764 4203 | } else {
|
3765 4204 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3766 4205 | };
|
3767 - | output.extract::<crate::output::StreamingTraitsOutput>()
|
4206 + | output.extract::<crate::output::MalformedTimestampQueryHttpDateOutput>()
|
3768 4207 | })
|
3769 4208 | };
|
3770 4209 | // Catch and record a Python traceback.
|
3771 4210 | result.map_err(|e| {
|
3772 4211 | let rich_py_err =
|
3773 4212 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3774 4213 | e.clone_ref(py)
|
3775 4214 | }));
|
3776 4215 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3777 4216 | e.into()
|
3778 4217 | })
|
3779 4218 | }
|
3780 4219 |
|
3781 - | /// Python handler for operation `ResponseCodeHttpFallback`.
|
3782 - | pub(crate) async fn response_code_http_fallback(
|
3783 - | input: crate::input::ResponseCodeHttpFallbackInput,
|
4220 + | /// Python handler for operation `MalformedTimestampQueryEpoch`.
|
4221 + | pub(crate) async fn malformed_timestamp_query_epoch(
|
4222 + | input: crate::input::MalformedTimestampQueryEpochInput,
|
3784 4223 | state: ::aws_smithy_legacy_http_server::Extension<
|
3785 4224 | ::aws_smithy_http_server_python::context::PyContext,
|
3786 4225 | >,
|
3787 4226 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3788 4227 | ) -> std::result::Result<
|
3789 - | crate::output::ResponseCodeHttpFallbackOutput,
|
3790 - | crate::error::ResponseCodeHttpFallbackError,
|
4228 + | crate::output::MalformedTimestampQueryEpochOutput,
|
4229 + | crate::error::MalformedTimestampQueryEpochError,
|
3791 4230 | > {
|
3792 4231 | // Async block used to run the handler and catch any Python error.
|
3793 4232 | let result = if handler.is_coroutine {
|
3794 4233 | ::tracing::trace!(
|
3795 - | name = "response_code_http_fallback",
|
4234 + | name = "malformed_timestamp_query_epoch",
|
3796 4235 | "executing python handler coroutine"
|
3797 4236 | );
|
3798 4237 | let result = ::pyo3::Python::with_gil(|py| {
|
3799 4238 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3800 4239 | let coroutine = if handler.args == 1 {
|
3801 4240 | pyhandler.call1((input,))?
|
3802 4241 | } else {
|
3803 4242 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3804 4243 | };
|
3805 4244 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3806 4245 | })?;
|
3807 4246 | result.await.and_then(|r| {
|
3808 4247 | ::pyo3::Python::with_gil(|py| {
|
3809 - | r.extract::<crate::output::ResponseCodeHttpFallbackOutput>(py)
|
4248 + | r.extract::<crate::output::MalformedTimestampQueryEpochOutput>(py)
|
3810 4249 | })
|
3811 4250 | })
|
3812 4251 | } else {
|
3813 4252 | ::tracing::trace!(
|
3814 - | name = "response_code_http_fallback",
|
4253 + | name = "malformed_timestamp_query_epoch",
|
3815 4254 | "executing python handler function"
|
3816 4255 | );
|
3817 4256 | ::pyo3::Python::with_gil(|py| {
|
3818 4257 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3819 4258 | let output = if handler.args == 1 {
|
3820 4259 | pyhandler.call1((input,))?
|
3821 4260 | } else {
|
3822 4261 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3823 4262 | };
|
3824 - | output.extract::<crate::output::ResponseCodeHttpFallbackOutput>()
|
4263 + | output.extract::<crate::output::MalformedTimestampQueryEpochOutput>()
|
3825 4264 | })
|
3826 4265 | };
|
3827 4266 | // Catch and record a Python traceback.
|
3828 4267 | result.map_err(|e| {
|
3829 4268 | let rich_py_err =
|
3830 4269 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3831 4270 | e.clone_ref(py)
|
3832 4271 | }));
|
3833 4272 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3834 4273 | e.into()
|
3835 4274 | })
|
3836 4275 | }
|
3837 4276 |
|
3838 - | /// Python handler for operation `ResponseCodeRequired`.
|
3839 - | pub(crate) async fn response_code_required(
|
3840 - | input: crate::input::ResponseCodeRequiredInput,
|
4277 + | /// Python handler for operation `MalformedTimestampHeaderDefault`.
|
4278 + | pub(crate) async fn malformed_timestamp_header_default(
|
4279 + | input: crate::input::MalformedTimestampHeaderDefaultInput,
|
3841 4280 | state: ::aws_smithy_legacy_http_server::Extension<
|
3842 4281 | ::aws_smithy_http_server_python::context::PyContext,
|
3843 4282 | >,
|
3844 4283 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3845 4284 | ) -> std::result::Result<
|
3846 - | crate::output::ResponseCodeRequiredOutput,
|
3847 - | crate::error::ResponseCodeRequiredError,
|
4285 + | crate::output::MalformedTimestampHeaderDefaultOutput,
|
4286 + | crate::error::MalformedTimestampHeaderDefaultError,
|
3848 4287 | > {
|
3849 4288 | // Async block used to run the handler and catch any Python error.
|
3850 4289 | let result = if handler.is_coroutine {
|
3851 4290 | ::tracing::trace!(
|
3852 - | name = "response_code_required",
|
4291 + | name = "malformed_timestamp_header_default",
|
3853 4292 | "executing python handler coroutine"
|
3854 4293 | );
|
3855 4294 | let result = ::pyo3::Python::with_gil(|py| {
|
3856 4295 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3857 4296 | let coroutine = if handler.args == 1 {
|
3858 4297 | pyhandler.call1((input,))?
|
3859 4298 | } else {
|
3860 4299 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3861 4300 | };
|
3862 4301 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3863 4302 | })?;
|
3864 4303 | result.await.and_then(|r| {
|
3865 4304 | ::pyo3::Python::with_gil(|py| {
|
3866 - | r.extract::<crate::output::ResponseCodeRequiredOutput>(py)
|
4305 + | r.extract::<crate::output::MalformedTimestampHeaderDefaultOutput>(py)
|
3867 4306 | })
|
3868 4307 | })
|
3869 4308 | } else {
|
3870 4309 | ::tracing::trace!(
|
3871 - | name = "response_code_required",
|
4310 + | name = "malformed_timestamp_header_default",
|
3872 4311 | "executing python handler function"
|
3873 4312 | );
|
3874 4313 | ::pyo3::Python::with_gil(|py| {
|
3875 4314 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3876 4315 | let output = if handler.args == 1 {
|
3877 4316 | pyhandler.call1((input,))?
|
3878 4317 | } else {
|
3879 4318 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3880 4319 | };
|
3881 - | output.extract::<crate::output::ResponseCodeRequiredOutput>()
|
4320 + | output.extract::<crate::output::MalformedTimestampHeaderDefaultOutput>()
|
3882 4321 | })
|
3883 4322 | };
|
3884 4323 | // Catch and record a Python traceback.
|
3885 4324 | result.map_err(|e| {
|
3886 4325 | let rich_py_err =
|
3887 4326 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3888 4327 | e.clone_ref(py)
|
3889 4328 | }));
|
3890 4329 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3891 4330 | e.into()
|
3892 4331 | })
|
3893 4332 | }
|
3894 4333 |
|
3895 - | /// Python handler for operation `HttpResponseCode`.
|
3896 - | pub(crate) async fn http_response_code(
|
3897 - | input: crate::input::HttpResponseCodeInput,
|
4334 + | /// Python handler for operation `MalformedTimestampHeaderDateTime`.
|
4335 + | pub(crate) async fn malformed_timestamp_header_date_time(
|
4336 + | input: crate::input::MalformedTimestampHeaderDateTimeInput,
|
3898 4337 | state: ::aws_smithy_legacy_http_server::Extension<
|
3899 4338 | ::aws_smithy_http_server_python::context::PyContext,
|
3900 4339 | >,
|
3901 4340 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3902 - | ) -> std::result::Result<crate::output::HttpResponseCodeOutput, crate::error::HttpResponseCodeError>
|
3903 - | {
|
4341 + | ) -> std::result::Result<
|
4342 + | crate::output::MalformedTimestampHeaderDateTimeOutput,
|
4343 + | crate::error::MalformedTimestampHeaderDateTimeError,
|
4344 + | > {
|
3904 4345 | // Async block used to run the handler and catch any Python error.
|
3905 4346 | let result = if handler.is_coroutine {
|
3906 4347 | ::tracing::trace!(
|
3907 - | name = "http_response_code",
|
4348 + | name = "malformed_timestamp_header_date_time",
|
3908 4349 | "executing python handler coroutine"
|
3909 4350 | );
|
3910 4351 | let result = ::pyo3::Python::with_gil(|py| {
|
3911 4352 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3912 4353 | let coroutine = if handler.args == 1 {
|
3913 4354 | pyhandler.call1((input,))?
|
3914 4355 | } else {
|
3915 4356 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3916 4357 | };
|
3917 4358 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3918 4359 | })?;
|
3919 4360 | result.await.and_then(|r| {
|
3920 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::HttpResponseCodeOutput>(py))
|
4361 + | ::pyo3::Python::with_gil(|py| {
|
4362 + | r.extract::<crate::output::MalformedTimestampHeaderDateTimeOutput>(py)
|
4363 + | })
|
3921 4364 | })
|
3922 4365 | } else {
|
3923 4366 | ::tracing::trace!(
|
3924 - | name = "http_response_code",
|
4367 + | name = "malformed_timestamp_header_date_time",
|
3925 4368 | "executing python handler function"
|
3926 4369 | );
|
3927 4370 | ::pyo3::Python::with_gil(|py| {
|
3928 4371 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3929 4372 | let output = if handler.args == 1 {
|
3930 4373 | pyhandler.call1((input,))?
|
3931 4374 | } else {
|
3932 4375 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3933 4376 | };
|
3934 - | output.extract::<crate::output::HttpResponseCodeOutput>()
|
4377 + | output.extract::<crate::output::MalformedTimestampHeaderDateTimeOutput>()
|
3935 4378 | })
|
3936 4379 | };
|
3937 4380 | // Catch and record a Python traceback.
|
3938 4381 | result.map_err(|e| {
|
3939 4382 | let rich_py_err =
|
3940 4383 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3941 4384 | e.clone_ref(py)
|
3942 4385 | }));
|
3943 4386 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
3944 4387 | e.into()
|
3945 4388 | })
|
3946 4389 | }
|
3947 4390 |
|
3948 - | /// Python handler for operation `HttpPayloadWithUnion`.
|
3949 - | pub(crate) async fn http_payload_with_union(
|
3950 - | input: crate::input::HttpPayloadWithUnionInput,
|
4391 + | /// Python handler for operation `MalformedTimestampHeaderEpoch`.
|
4392 + | pub(crate) async fn malformed_timestamp_header_epoch(
|
4393 + | input: crate::input::MalformedTimestampHeaderEpochInput,
|
3951 4394 | state: ::aws_smithy_legacy_http_server::Extension<
|
3952 4395 | ::aws_smithy_http_server_python::context::PyContext,
|
3953 4396 | >,
|
3954 4397 | handler: ::aws_smithy_http_server_python::PyHandler,
|
3955 4398 | ) -> std::result::Result<
|
3956 - | crate::output::HttpPayloadWithUnionOutput,
|
3957 - | crate::error::HttpPayloadWithUnionError,
|
4399 + | crate::output::MalformedTimestampHeaderEpochOutput,
|
4400 + | crate::error::MalformedTimestampHeaderEpochError,
|
3958 4401 | > {
|
3959 4402 | // Async block used to run the handler and catch any Python error.
|
3960 4403 | let result = if handler.is_coroutine {
|
3961 4404 | ::tracing::trace!(
|
3962 - | name = "http_payload_with_union",
|
4405 + | name = "malformed_timestamp_header_epoch",
|
3963 4406 | "executing python handler coroutine"
|
3964 4407 | );
|
3965 4408 | let result = ::pyo3::Python::with_gil(|py| {
|
3966 4409 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3967 4410 | let coroutine = if handler.args == 1 {
|
3968 4411 | pyhandler.call1((input,))?
|
3969 4412 | } else {
|
3970 4413 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3971 4414 | };
|
3972 4415 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
3973 4416 | })?;
|
3974 4417 | result.await.and_then(|r| {
|
3975 4418 | ::pyo3::Python::with_gil(|py| {
|
3976 - | r.extract::<crate::output::HttpPayloadWithUnionOutput>(py)
|
4419 + | r.extract::<crate::output::MalformedTimestampHeaderEpochOutput>(py)
|
3977 4420 | })
|
3978 4421 | })
|
3979 4422 | } else {
|
3980 4423 | ::tracing::trace!(
|
3981 - | name = "http_payload_with_union",
|
4424 + | name = "malformed_timestamp_header_epoch",
|
3982 4425 | "executing python handler function"
|
3983 4426 | );
|
3984 4427 | ::pyo3::Python::with_gil(|py| {
|
3985 4428 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
3986 4429 | let output = if handler.args == 1 {
|
3987 4430 | pyhandler.call1((input,))?
|
3988 4431 | } else {
|
3989 4432 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
3990 4433 | };
|
3991 - | output.extract::<crate::output::HttpPayloadWithUnionOutput>()
|
4434 + | output.extract::<crate::output::MalformedTimestampHeaderEpochOutput>()
|
3992 4435 | })
|
3993 4436 | };
|
3994 4437 | // Catch and record a Python traceback.
|
3995 4438 | result.map_err(|e| {
|
3996 4439 | let rich_py_err =
|
3997 4440 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
3998 4441 | e.clone_ref(py)
|
3999 4442 | }));
|
4000 4443 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4001 4444 | e.into()
|
4002 4445 | })
|
4003 4446 | }
|
4004 4447 |
|
4005 - | /// Python handler for operation `HttpStringPayload`.
|
4006 - | pub(crate) async fn http_string_payload(
|
4007 - | input: crate::input::HttpStringPayloadInput,
|
4448 + | /// Python handler for operation `MalformedTimestampBodyDefault`.
|
4449 + | pub(crate) async fn malformed_timestamp_body_default(
|
4450 + | input: crate::input::MalformedTimestampBodyDefaultInput,
|
4008 4451 | state: ::aws_smithy_legacy_http_server::Extension<
|
4009 4452 | ::aws_smithy_http_server_python::context::PyContext,
|
4010 4453 | >,
|
4011 4454 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4012 - | ) -> std::result::Result<crate::output::HttpStringPayloadOutput, crate::error::HttpStringPayloadError>
|
4013 - | {
|
4455 + | ) -> std::result::Result<
|
4456 + | crate::output::MalformedTimestampBodyDefaultOutput,
|
4457 + | crate::error::MalformedTimestampBodyDefaultError,
|
4458 + | > {
|
4014 4459 | // Async block used to run the handler and catch any Python error.
|
4015 4460 | let result = if handler.is_coroutine {
|
4016 4461 | ::tracing::trace!(
|
4017 - | name = "http_string_payload",
|
4462 + | name = "malformed_timestamp_body_default",
|
4018 4463 | "executing python handler coroutine"
|
4019 4464 | );
|
4020 4465 | let result = ::pyo3::Python::with_gil(|py| {
|
4021 4466 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4022 4467 | let coroutine = if handler.args == 1 {
|
4023 4468 | pyhandler.call1((input,))?
|
4024 4469 | } else {
|
4025 4470 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4026 4471 | };
|
4027 4472 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4028 4473 | })?;
|
4029 4474 | result.await.and_then(|r| {
|
4030 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::HttpStringPayloadOutput>(py))
|
4475 + | ::pyo3::Python::with_gil(|py| {
|
4476 + | r.extract::<crate::output::MalformedTimestampBodyDefaultOutput>(py)
|
4477 + | })
|
4031 4478 | })
|
4032 4479 | } else {
|
4033 4480 | ::tracing::trace!(
|
4034 - | name = "http_string_payload",
|
4481 + | name = "malformed_timestamp_body_default",
|
4035 4482 | "executing python handler function"
|
4036 4483 | );
|
4037 4484 | ::pyo3::Python::with_gil(|py| {
|
4038 4485 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4039 4486 | let output = if handler.args == 1 {
|
4040 4487 | pyhandler.call1((input,))?
|
4041 4488 | } else {
|
4042 4489 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4043 4490 | };
|
4044 - | output.extract::<crate::output::HttpStringPayloadOutput>()
|
4491 + | output.extract::<crate::output::MalformedTimestampBodyDefaultOutput>()
|
4045 4492 | })
|
4046 4493 | };
|
4047 4494 | // Catch and record a Python traceback.
|
4048 4495 | result.map_err(|e| {
|
4049 4496 | let rich_py_err =
|
4050 4497 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4051 4498 | e.clone_ref(py)
|
4052 4499 | }));
|
4053 4500 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4054 4501 | e.into()
|
4055 4502 | })
|
4056 4503 | }
|
4057 4504 |
|
4058 - | /// Python handler for operation `HttpEnumPayload`.
|
4059 - | pub(crate) async fn http_enum_payload(
|
4060 - | input: crate::input::HttpEnumPayloadInput,
|
4505 + | /// Python handler for operation `MalformedTimestampBodyDateTime`.
|
4506 + | pub(crate) async fn malformed_timestamp_body_date_time(
|
4507 + | input: crate::input::MalformedTimestampBodyDateTimeInput,
|
4061 4508 | state: ::aws_smithy_legacy_http_server::Extension<
|
4062 4509 | ::aws_smithy_http_server_python::context::PyContext,
|
4063 4510 | >,
|
4064 4511 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4065 - | ) -> std::result::Result<crate::output::HttpEnumPayloadOutput, crate::error::HttpEnumPayloadError> {
|
4512 + | ) -> std::result::Result<
|
4513 + | crate::output::MalformedTimestampBodyDateTimeOutput,
|
4514 + | crate::error::MalformedTimestampBodyDateTimeError,
|
4515 + | > {
|
4066 4516 | // Async block used to run the handler and catch any Python error.
|
4067 4517 | let result = if handler.is_coroutine {
|
4068 4518 | ::tracing::trace!(
|
4069 - | name = "http_enum_payload",
|
4519 + | name = "malformed_timestamp_body_date_time",
|
4070 4520 | "executing python handler coroutine"
|
4071 4521 | );
|
4072 4522 | let result = ::pyo3::Python::with_gil(|py| {
|
4073 4523 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4074 4524 | let coroutine = if handler.args == 1 {
|
4075 4525 | pyhandler.call1((input,))?
|
4076 4526 | } else {
|
4077 4527 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4078 4528 | };
|
4079 4529 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4080 4530 | })?;
|
4081 4531 | result.await.and_then(|r| {
|
4082 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::HttpEnumPayloadOutput>(py))
|
4532 + | ::pyo3::Python::with_gil(|py| {
|
4533 + | r.extract::<crate::output::MalformedTimestampBodyDateTimeOutput>(py)
|
4534 + | })
|
4083 4535 | })
|
4084 4536 | } else {
|
4085 4537 | ::tracing::trace!(
|
4086 - | name = "http_enum_payload",
|
4538 + | name = "malformed_timestamp_body_date_time",
|
4087 4539 | "executing python handler function"
|
4088 4540 | );
|
4089 4541 | ::pyo3::Python::with_gil(|py| {
|
4090 4542 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4091 4543 | let output = if handler.args == 1 {
|
4092 4544 | pyhandler.call1((input,))?
|
4093 4545 | } else {
|
4094 4546 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4095 4547 | };
|
4096 - | output.extract::<crate::output::HttpEnumPayloadOutput>()
|
4548 + | output.extract::<crate::output::MalformedTimestampBodyDateTimeOutput>()
|
4097 4549 | })
|
4098 4550 | };
|
4099 4551 | // Catch and record a Python traceback.
|
4100 4552 | result.map_err(|e| {
|
4101 4553 | let rich_py_err =
|
4102 4554 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4103 4555 | e.clone_ref(py)
|
4104 4556 | }));
|
4105 4557 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4106 4558 | e.into()
|
4107 4559 | })
|
4108 4560 | }
|
4109 4561 |
|
4110 - | /// Python handler for operation `HttpPayloadWithStructure`.
|
4111 - | pub(crate) async fn http_payload_with_structure(
|
4112 - | input: crate::input::HttpPayloadWithStructureInput,
|
4562 + | /// Python handler for operation `MalformedTimestampBodyHttpDate`.
|
4563 + | pub(crate) async fn malformed_timestamp_body_http_date(
|
4564 + | input: crate::input::MalformedTimestampBodyHttpDateInput,
|
4113 4565 | state: ::aws_smithy_legacy_http_server::Extension<
|
4114 4566 | ::aws_smithy_http_server_python::context::PyContext,
|
4115 4567 | >,
|
4116 4568 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4117 4569 | ) -> std::result::Result<
|
4118 - | crate::output::HttpPayloadWithStructureOutput,
|
4119 - | crate::error::HttpPayloadWithStructureError,
|
4570 + | crate::output::MalformedTimestampBodyHttpDateOutput,
|
4571 + | crate::error::MalformedTimestampBodyHttpDateError,
|
4120 4572 | > {
|
4121 4573 | // Async block used to run the handler and catch any Python error.
|
4122 4574 | let result = if handler.is_coroutine {
|
4123 4575 | ::tracing::trace!(
|
4124 - | name = "http_payload_with_structure",
|
4576 + | name = "malformed_timestamp_body_http_date",
|
4125 4577 | "executing python handler coroutine"
|
4126 4578 | );
|
4127 4579 | let result = ::pyo3::Python::with_gil(|py| {
|
4128 4580 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4129 4581 | let coroutine = if handler.args == 1 {
|
4130 4582 | pyhandler.call1((input,))?
|
4131 4583 | } else {
|
4132 4584 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4133 4585 | };
|
4134 4586 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4135 4587 | })?;
|
4136 4588 | result.await.and_then(|r| {
|
4137 4589 | ::pyo3::Python::with_gil(|py| {
|
4138 - | r.extract::<crate::output::HttpPayloadWithStructureOutput>(py)
|
4590 + | r.extract::<crate::output::MalformedTimestampBodyHttpDateOutput>(py)
|
4139 4591 | })
|
4140 4592 | })
|
4141 4593 | } else {
|
4142 4594 | ::tracing::trace!(
|
4143 - | name = "http_payload_with_structure",
|
4595 + | name = "malformed_timestamp_body_http_date",
|
4144 4596 | "executing python handler function"
|
4145 4597 | );
|
4146 4598 | ::pyo3::Python::with_gil(|py| {
|
4147 4599 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4148 4600 | let output = if handler.args == 1 {
|
4149 4601 | pyhandler.call1((input,))?
|
4150 4602 | } else {
|
4151 4603 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4152 4604 | };
|
4153 - | output.extract::<crate::output::HttpPayloadWithStructureOutput>()
|
4605 + | output.extract::<crate::output::MalformedTimestampBodyHttpDateOutput>()
|
4154 4606 | })
|
4155 4607 | };
|
4156 4608 | // Catch and record a Python traceback.
|
4157 4609 | result.map_err(|e| {
|
4158 4610 | let rich_py_err =
|
4159 4611 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4160 4612 | e.clone_ref(py)
|
4161 4613 | }));
|
4162 4614 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4163 4615 | e.into()
|
4164 4616 | })
|
4165 4617 | }
|
4166 4618 |
|
4167 - | /// Python handler for operation `HttpPayloadTraitsWithMediaType`.
|
4168 - | pub(crate) async fn http_payload_traits_with_media_type(
|
4169 - | input: crate::input::HttpPayloadTraitsWithMediaTypeInput,
|
4619 + | /// Python handler for operation `MalformedContentTypeWithoutBody`.
|
4620 + | pub(crate) async fn malformed_content_type_without_body(
|
4621 + | input: crate::input::MalformedContentTypeWithoutBodyInput,
|
4170 4622 | state: ::aws_smithy_legacy_http_server::Extension<
|
4171 4623 | ::aws_smithy_http_server_python::context::PyContext,
|
4172 4624 | >,
|
4173 4625 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4174 - | ) -> std::result::Result<
|
4175 - | crate::output::HttpPayloadTraitsWithMediaTypeOutput,
|
4176 - | crate::error::HttpPayloadTraitsWithMediaTypeError,
|
4626 + | ) -> std::result::Result<
|
4627 + | crate::output::MalformedContentTypeWithoutBodyOutput,
|
4628 + | crate::error::MalformedContentTypeWithoutBodyError,
|
4177 4629 | > {
|
4178 4630 | // Async block used to run the handler and catch any Python error.
|
4179 4631 | let result = if handler.is_coroutine {
|
4180 4632 | ::tracing::trace!(
|
4181 - | name = "http_payload_traits_with_media_type",
|
4633 + | name = "malformed_content_type_without_body",
|
4182 4634 | "executing python handler coroutine"
|
4183 4635 | );
|
4184 4636 | let result = ::pyo3::Python::with_gil(|py| {
|
4185 4637 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4186 4638 | let coroutine = if handler.args == 1 {
|
4187 4639 | pyhandler.call1((input,))?
|
4188 4640 | } else {
|
4189 4641 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4190 4642 | };
|
4191 4643 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4192 4644 | })?;
|
4193 4645 | result.await.and_then(|r| {
|
4194 4646 | ::pyo3::Python::with_gil(|py| {
|
4195 - | r.extract::<crate::output::HttpPayloadTraitsWithMediaTypeOutput>(py)
|
4647 + | r.extract::<crate::output::MalformedContentTypeWithoutBodyOutput>(py)
|
4196 4648 | })
|
4197 4649 | })
|
4198 4650 | } else {
|
4199 4651 | ::tracing::trace!(
|
4200 - | name = "http_payload_traits_with_media_type",
|
4652 + | name = "malformed_content_type_without_body",
|
4201 4653 | "executing python handler function"
|
4202 4654 | );
|
4203 4655 | ::pyo3::Python::with_gil(|py| {
|
4204 4656 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4205 4657 | let output = if handler.args == 1 {
|
4206 4658 | pyhandler.call1((input,))?
|
4207 4659 | } else {
|
4208 4660 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4209 4661 | };
|
4210 - | output.extract::<crate::output::HttpPayloadTraitsWithMediaTypeOutput>()
|
4662 + | output.extract::<crate::output::MalformedContentTypeWithoutBodyOutput>()
|
4211 4663 | })
|
4212 4664 | };
|
4213 4665 | // Catch and record a Python traceback.
|
4214 4666 | result.map_err(|e| {
|
4215 4667 | let rich_py_err =
|
4216 4668 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4217 4669 | e.clone_ref(py)
|
4218 4670 | }));
|
4219 4671 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4220 4672 | e.into()
|
4221 4673 | })
|
4222 4674 | }
|
4223 4675 |
|
4224 - | /// Python handler for operation `HttpPayloadTraits`.
|
4225 - | pub(crate) async fn http_payload_traits(
|
4226 - | input: crate::input::HttpPayloadTraitsInput,
|
4676 + | /// Python handler for operation `MalformedContentTypeWithoutBodyEmptyInput`.
|
4677 + | pub(crate) async fn malformed_content_type_without_body_empty_input(
|
4678 + | input: crate::input::MalformedContentTypeWithoutBodyEmptyInputInput,
|
4227 4679 | state: ::aws_smithy_legacy_http_server::Extension<
|
4228 4680 | ::aws_smithy_http_server_python::context::PyContext,
|
4229 4681 | >,
|
4230 4682 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4231 - | ) -> std::result::Result<crate::output::HttpPayloadTraitsOutput, crate::error::HttpPayloadTraitsError>
|
4232 - | {
|
4683 + | ) -> std::result::Result<
|
4684 + | crate::output::MalformedContentTypeWithoutBodyEmptyInputOutput,
|
4685 + | crate::error::MalformedContentTypeWithoutBodyEmptyInputError,
|
4686 + | > {
|
4233 4687 | // Async block used to run the handler and catch any Python error.
|
4234 4688 | let result = if handler.is_coroutine {
|
4235 4689 | ::tracing::trace!(
|
4236 - | name = "http_payload_traits",
|
4690 + | name = "malformed_content_type_without_body_empty_input",
|
4237 4691 | "executing python handler coroutine"
|
4238 4692 | );
|
4239 4693 | let result = ::pyo3::Python::with_gil(|py| {
|
4240 4694 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4241 4695 | let coroutine = if handler.args == 1 {
|
4242 4696 | pyhandler.call1((input,))?
|
4243 4697 | } else {
|
4244 4698 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4245 4699 | };
|
4246 4700 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4247 4701 | })?;
|
4248 4702 | result.await.and_then(|r| {
|
4249 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::HttpPayloadTraitsOutput>(py))
|
4703 + | ::pyo3::Python::with_gil(|py| {
|
4704 + | r.extract::<crate::output::MalformedContentTypeWithoutBodyEmptyInputOutput>(py)
|
4705 + | })
|
4250 4706 | })
|
4251 4707 | } else {
|
4252 4708 | ::tracing::trace!(
|
4253 - | name = "http_payload_traits",
|
4709 + | name = "malformed_content_type_without_body_empty_input",
|
4254 4710 | "executing python handler function"
|
4255 4711 | );
|
4256 4712 | ::pyo3::Python::with_gil(|py| {
|
4257 4713 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4258 4714 | let output = if handler.args == 1 {
|
4259 4715 | pyhandler.call1((input,))?
|
4260 4716 | } else {
|
4261 4717 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4262 4718 | };
|
4263 - | output.extract::<crate::output::HttpPayloadTraitsOutput>()
|
4719 + | output.extract::<crate::output::MalformedContentTypeWithoutBodyEmptyInputOutput>()
|
4264 4720 | })
|
4265 4721 | };
|
4266 4722 | // Catch and record a Python traceback.
|
4267 4723 | result.map_err(|e| {
|
4268 4724 | let rich_py_err =
|
4269 4725 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4270 4726 | e.clone_ref(py)
|
4271 4727 | }));
|
4272 4728 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4273 4729 | e.into()
|
4274 4730 | })
|
4275 4731 | }
|
4276 4732 |
|
4277 - | /// Python handler for operation `HttpEmptyPrefixHeaders`.
|
4278 - | pub(crate) async fn http_empty_prefix_headers(
|
4279 - | input: crate::input::HttpEmptyPrefixHeadersInput,
|
4733 + | /// Python handler for operation `MalformedContentTypeWithBody`.
|
4734 + | pub(crate) async fn malformed_content_type_with_body(
|
4735 + | input: crate::input::MalformedContentTypeWithBodyInput,
|
4280 4736 | state: ::aws_smithy_legacy_http_server::Extension<
|
4281 4737 | ::aws_smithy_http_server_python::context::PyContext,
|
4282 4738 | >,
|
4283 4739 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4284 4740 | ) -> std::result::Result<
|
4285 - | crate::output::HttpEmptyPrefixHeadersOutput,
|
4286 - | crate::error::HttpEmptyPrefixHeadersError,
|
4741 + | crate::output::MalformedContentTypeWithBodyOutput,
|
4742 + | crate::error::MalformedContentTypeWithBodyError,
|
4287 4743 | > {
|
4288 4744 | // Async block used to run the handler and catch any Python error.
|
4289 4745 | let result = if handler.is_coroutine {
|
4290 4746 | ::tracing::trace!(
|
4291 - | name = "http_empty_prefix_headers",
|
4747 + | name = "malformed_content_type_with_body",
|
4292 4748 | "executing python handler coroutine"
|
4293 4749 | );
|
4294 4750 | let result = ::pyo3::Python::with_gil(|py| {
|
4295 4751 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4296 4752 | let coroutine = if handler.args == 1 {
|
4297 4753 | pyhandler.call1((input,))?
|
4298 4754 | } else {
|
4299 4755 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4300 4756 | };
|
4301 4757 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4302 4758 | })?;
|
4303 4759 | result.await.and_then(|r| {
|
4304 4760 | ::pyo3::Python::with_gil(|py| {
|
4305 - | r.extract::<crate::output::HttpEmptyPrefixHeadersOutput>(py)
|
4761 + | r.extract::<crate::output::MalformedContentTypeWithBodyOutput>(py)
|
4306 4762 | })
|
4307 4763 | })
|
4308 4764 | } else {
|
4309 4765 | ::tracing::trace!(
|
4310 - | name = "http_empty_prefix_headers",
|
4766 + | name = "malformed_content_type_with_body",
|
4311 4767 | "executing python handler function"
|
4312 4768 | );
|
4313 4769 | ::pyo3::Python::with_gil(|py| {
|
4314 4770 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4315 4771 | let output = if handler.args == 1 {
|
4316 4772 | pyhandler.call1((input,))?
|
4317 4773 | } else {
|
4318 4774 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4319 4775 | };
|
4320 - | output.extract::<crate::output::HttpEmptyPrefixHeadersOutput>()
|
4776 + | output.extract::<crate::output::MalformedContentTypeWithBodyOutput>()
|
4321 4777 | })
|
4322 4778 | };
|
4323 4779 | // Catch and record a Python traceback.
|
4324 4780 | result.map_err(|e| {
|
4325 4781 | let rich_py_err =
|
4326 4782 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4327 4783 | e.clone_ref(py)
|
4328 4784 | }));
|
4329 4785 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4330 4786 | e.into()
|
4331 4787 | })
|
4332 4788 | }
|
4333 4789 |
|
4334 - | /// Python handler for operation `HttpPrefixHeadersInResponse`.
|
4335 - | pub(crate) async fn http_prefix_headers_in_response(
|
4336 - | input: crate::input::HttpPrefixHeadersInResponseInput,
|
4790 + | /// Python handler for operation `MalformedContentTypeWithPayload`.
|
4791 + | pub(crate) async fn malformed_content_type_with_payload(
|
4792 + | input: crate::input::MalformedContentTypeWithPayloadInput,
|
4337 4793 | state: ::aws_smithy_legacy_http_server::Extension<
|
4338 4794 | ::aws_smithy_http_server_python::context::PyContext,
|
4339 4795 | >,
|
4340 4796 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4341 4797 | ) -> std::result::Result<
|
4342 - | crate::output::HttpPrefixHeadersInResponseOutput,
|
4343 - | crate::error::HttpPrefixHeadersInResponseError,
|
4798 + | crate::output::MalformedContentTypeWithPayloadOutput,
|
4799 + | crate::error::MalformedContentTypeWithPayloadError,
|
4344 4800 | > {
|
4345 4801 | // Async block used to run the handler and catch any Python error.
|
4346 4802 | let result = if handler.is_coroutine {
|
4347 4803 | ::tracing::trace!(
|
4348 - | name = "http_prefix_headers_in_response",
|
4804 + | name = "malformed_content_type_with_payload",
|
4349 4805 | "executing python handler coroutine"
|
4350 4806 | );
|
4351 4807 | let result = ::pyo3::Python::with_gil(|py| {
|
4352 4808 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4353 4809 | let coroutine = if handler.args == 1 {
|
4354 4810 | pyhandler.call1((input,))?
|
4355 4811 | } else {
|
4356 4812 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4357 4813 | };
|
4358 4814 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4359 4815 | })?;
|
4360 4816 | result.await.and_then(|r| {
|
4361 4817 | ::pyo3::Python::with_gil(|py| {
|
4362 - | r.extract::<crate::output::HttpPrefixHeadersInResponseOutput>(py)
|
4818 + | r.extract::<crate::output::MalformedContentTypeWithPayloadOutput>(py)
|
4363 4819 | })
|
4364 4820 | })
|
4365 4821 | } else {
|
4366 4822 | ::tracing::trace!(
|
4367 - | name = "http_prefix_headers_in_response",
|
4823 + | name = "malformed_content_type_with_payload",
|
4368 4824 | "executing python handler function"
|
4369 4825 | );
|
4370 4826 | ::pyo3::Python::with_gil(|py| {
|
4371 4827 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4372 4828 | let output = if handler.args == 1 {
|
4373 4829 | pyhandler.call1((input,))?
|
4374 4830 | } else {
|
4375 4831 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4376 4832 | };
|
4377 - | output.extract::<crate::output::HttpPrefixHeadersInResponseOutput>()
|
4833 + | output.extract::<crate::output::MalformedContentTypeWithPayloadOutput>()
|
4378 4834 | })
|
4379 4835 | };
|
4380 4836 | // Catch and record a Python traceback.
|
4381 4837 | result.map_err(|e| {
|
4382 4838 | let rich_py_err =
|
4383 4839 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4384 4840 | e.clone_ref(py)
|
4385 4841 | }));
|
4386 4842 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4387 4843 | e.into()
|
4388 4844 | })
|
4389 4845 | }
|
4390 4846 |
|
4391 - | /// Python handler for operation `HttpPrefixHeaders`.
|
4392 - | pub(crate) async fn http_prefix_headers(
|
4393 - | input: crate::input::HttpPrefixHeadersInput,
|
4847 + | /// Python handler for operation `MalformedContentTypeWithGenericString`.
|
4848 + | pub(crate) async fn malformed_content_type_with_generic_string(
|
4849 + | input: crate::input::MalformedContentTypeWithGenericStringInput,
|
4394 4850 | state: ::aws_smithy_legacy_http_server::Extension<
|
4395 4851 | ::aws_smithy_http_server_python::context::PyContext,
|
4396 4852 | >,
|
4397 4853 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4398 - | ) -> std::result::Result<crate::output::HttpPrefixHeadersOutput, crate::error::HttpPrefixHeadersError>
|
4399 - | {
|
4854 + | ) -> std::result::Result<
|
4855 + | crate::output::MalformedContentTypeWithGenericStringOutput,
|
4856 + | crate::error::MalformedContentTypeWithGenericStringError,
|
4857 + | > {
|
4400 4858 | // Async block used to run the handler and catch any Python error.
|
4401 4859 | let result = if handler.is_coroutine {
|
4402 4860 | ::tracing::trace!(
|
4403 - | name = "http_prefix_headers",
|
4861 + | name = "malformed_content_type_with_generic_string",
|
4404 4862 | "executing python handler coroutine"
|
4405 4863 | );
|
4406 4864 | let result = ::pyo3::Python::with_gil(|py| {
|
4407 4865 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4408 4866 | let coroutine = if handler.args == 1 {
|
4409 4867 | pyhandler.call1((input,))?
|
4410 4868 | } else {
|
4411 4869 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4412 4870 | };
|
4413 4871 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4414 4872 | })?;
|
4415 4873 | result.await.and_then(|r| {
|
4416 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::HttpPrefixHeadersOutput>(py))
|
4874 + | ::pyo3::Python::with_gil(|py| {
|
4875 + | r.extract::<crate::output::MalformedContentTypeWithGenericStringOutput>(py)
|
4876 + | })
|
4417 4877 | })
|
4418 4878 | } else {
|
4419 4879 | ::tracing::trace!(
|
4420 - | name = "http_prefix_headers",
|
4880 + | name = "malformed_content_type_with_generic_string",
|
4421 4881 | "executing python handler function"
|
4422 4882 | );
|
4423 4883 | ::pyo3::Python::with_gil(|py| {
|
4424 4884 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4425 4885 | let output = if handler.args == 1 {
|
4426 4886 | pyhandler.call1((input,))?
|
4427 4887 | } else {
|
4428 4888 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4429 4889 | };
|
4430 - | output.extract::<crate::output::HttpPrefixHeadersOutput>()
|
4890 + | output.extract::<crate::output::MalformedContentTypeWithGenericStringOutput>()
|
4431 4891 | })
|
4432 4892 | };
|
4433 4893 | // Catch and record a Python traceback.
|
4434 4894 | result.map_err(|e| {
|
4435 4895 | let rich_py_err =
|
4436 4896 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4437 4897 | e.clone_ref(py)
|
4438 4898 | }));
|
4439 4899 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4440 4900 | e.into()
|
4441 4901 | })
|
4442 4902 | }
|
4443 4903 |
|
4444 - | /// Python handler for operation `QueryParamsAsStringListMap`.
|
4445 - | pub(crate) async fn query_params_as_string_list_map(
|
4446 - | input: crate::input::QueryParamsAsStringListMapInput,
|
4904 + | /// Python handler for operation `MalformedAcceptWithBody`.
|
4905 + | pub(crate) async fn malformed_accept_with_body(
|
4906 + | input: crate::input::MalformedAcceptWithBodyInput,
|
4447 4907 | state: ::aws_smithy_legacy_http_server::Extension<
|
4448 4908 | ::aws_smithy_http_server_python::context::PyContext,
|
4449 4909 | >,
|
4450 4910 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4451 4911 | ) -> std::result::Result<
|
4452 - | crate::output::QueryParamsAsStringListMapOutput,
|
4453 - | crate::error::QueryParamsAsStringListMapError,
|
4912 + | crate::output::MalformedAcceptWithBodyOutput,
|
4913 + | crate::error::MalformedAcceptWithBodyError,
|
4454 4914 | > {
|
4455 4915 | // Async block used to run the handler and catch any Python error.
|
4456 4916 | let result = if handler.is_coroutine {
|
4457 4917 | ::tracing::trace!(
|
4458 - | name = "query_params_as_string_list_map",
|
4918 + | name = "malformed_accept_with_body",
|
4459 4919 | "executing python handler coroutine"
|
4460 4920 | );
|
4461 4921 | let result = ::pyo3::Python::with_gil(|py| {
|
4462 4922 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4463 4923 | let coroutine = if handler.args == 1 {
|
4464 4924 | pyhandler.call1((input,))?
|
4465 4925 | } else {
|
4466 4926 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4467 4927 | };
|
4468 4928 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4469 4929 | })?;
|
4470 4930 | result.await.and_then(|r| {
|
4471 4931 | ::pyo3::Python::with_gil(|py| {
|
4472 - | r.extract::<crate::output::QueryParamsAsStringListMapOutput>(py)
|
4932 + | r.extract::<crate::output::MalformedAcceptWithBodyOutput>(py)
|
4473 4933 | })
|
4474 4934 | })
|
4475 4935 | } else {
|
4476 4936 | ::tracing::trace!(
|
4477 - | name = "query_params_as_string_list_map",
|
4937 + | name = "malformed_accept_with_body",
|
4478 4938 | "executing python handler function"
|
4479 4939 | );
|
4480 4940 | ::pyo3::Python::with_gil(|py| {
|
4481 4941 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4482 4942 | let output = if handler.args == 1 {
|
4483 4943 | pyhandler.call1((input,))?
|
4484 4944 | } else {
|
4485 4945 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4486 4946 | };
|
4487 - | output.extract::<crate::output::QueryParamsAsStringListMapOutput>()
|
4947 + | output.extract::<crate::output::MalformedAcceptWithBodyOutput>()
|
4488 4948 | })
|
4489 4949 | };
|
4490 4950 | // Catch and record a Python traceback.
|
4491 4951 | result.map_err(|e| {
|
4492 4952 | let rich_py_err =
|
4493 4953 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4494 4954 | e.clone_ref(py)
|
4495 4955 | }));
|
4496 4956 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4497 4957 | e.into()
|
4498 4958 | })
|
4499 4959 | }
|
4500 4960 |
|
4501 - | /// Python handler for operation `QueryPrecedence`.
|
4502 - | pub(crate) async fn query_precedence(
|
4503 - | input: crate::input::QueryPrecedenceInput,
|
4961 + | /// Python handler for operation `MalformedAcceptWithPayload`.
|
4962 + | pub(crate) async fn malformed_accept_with_payload(
|
4963 + | input: crate::input::MalformedAcceptWithPayloadInput,
|
4504 4964 | state: ::aws_smithy_legacy_http_server::Extension<
|
4505 4965 | ::aws_smithy_http_server_python::context::PyContext,
|
4506 4966 | >,
|
4507 4967 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4508 - | ) -> std::result::Result<crate::output::QueryPrecedenceOutput, crate::error::QueryPrecedenceError> {
|
4968 + | ) -> std::result::Result<
|
4969 + | crate::output::MalformedAcceptWithPayloadOutput,
|
4970 + | crate::error::MalformedAcceptWithPayloadError,
|
4971 + | > {
|
4509 4972 | // Async block used to run the handler and catch any Python error.
|
4510 4973 | let result = if handler.is_coroutine {
|
4511 4974 | ::tracing::trace!(
|
4512 - | name = "query_precedence",
|
4975 + | name = "malformed_accept_with_payload",
|
4513 4976 | "executing python handler coroutine"
|
4514 4977 | );
|
4515 4978 | let result = ::pyo3::Python::with_gil(|py| {
|
4516 4979 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4517 4980 | let coroutine = if handler.args == 1 {
|
4518 4981 | pyhandler.call1((input,))?
|
4519 4982 | } else {
|
4520 4983 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4521 4984 | };
|
4522 4985 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4523 4986 | })?;
|
4524 4987 | result.await.and_then(|r| {
|
4525 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::QueryPrecedenceOutput>(py))
|
4988 + | ::pyo3::Python::with_gil(|py| {
|
4989 + | r.extract::<crate::output::MalformedAcceptWithPayloadOutput>(py)
|
4990 + | })
|
4526 4991 | })
|
4527 4992 | } else {
|
4528 4993 | ::tracing::trace!(
|
4529 - | name = "query_precedence",
|
4994 + | name = "malformed_accept_with_payload",
|
4530 4995 | "executing python handler function"
|
4531 4996 | );
|
4532 4997 | ::pyo3::Python::with_gil(|py| {
|
4533 4998 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4534 4999 | let output = if handler.args == 1 {
|
4535 5000 | pyhandler.call1((input,))?
|
4536 5001 | } else {
|
4537 5002 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4538 5003 | };
|
4539 - | output.extract::<crate::output::QueryPrecedenceOutput>()
|
5004 + | output.extract::<crate::output::MalformedAcceptWithPayloadOutput>()
|
4540 5005 | })
|
4541 5006 | };
|
4542 5007 | // Catch and record a Python traceback.
|
4543 5008 | result.map_err(|e| {
|
4544 5009 | let rich_py_err =
|
4545 5010 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4546 5011 | e.clone_ref(py)
|
4547 5012 | }));
|
4548 5013 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4549 5014 | e.into()
|
4550 5015 | })
|
4551 5016 | }
|
4552 5017 |
|
4553 - | /// Python handler for operation `QueryIdempotencyTokenAutoFill`.
|
4554 - | pub(crate) async fn query_idempotency_token_auto_fill(
|
4555 - | input: crate::input::QueryIdempotencyTokenAutoFillInput,
|
5018 + | /// Python handler for operation `MalformedAcceptWithGenericString`.
|
5019 + | pub(crate) async fn malformed_accept_with_generic_string(
|
5020 + | input: crate::input::MalformedAcceptWithGenericStringInput,
|
4556 5021 | state: ::aws_smithy_legacy_http_server::Extension<
|
4557 5022 | ::aws_smithy_http_server_python::context::PyContext,
|
4558 5023 | >,
|
4559 5024 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4560 5025 | ) -> std::result::Result<
|
4561 - | crate::output::QueryIdempotencyTokenAutoFillOutput,
|
4562 - | crate::error::QueryIdempotencyTokenAutoFillError,
|
5026 + | crate::output::MalformedAcceptWithGenericStringOutput,
|
5027 + | crate::error::MalformedAcceptWithGenericStringError,
|
4563 5028 | > {
|
4564 5029 | // Async block used to run the handler and catch any Python error.
|
4565 5030 | let result = if handler.is_coroutine {
|
4566 5031 | ::tracing::trace!(
|
4567 - | name = "query_idempotency_token_auto_fill",
|
5032 + | name = "malformed_accept_with_generic_string",
|
4568 5033 | "executing python handler coroutine"
|
4569 5034 | );
|
4570 5035 | let result = ::pyo3::Python::with_gil(|py| {
|
4571 5036 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4572 5037 | let coroutine = if handler.args == 1 {
|
4573 5038 | pyhandler.call1((input,))?
|
4574 5039 | } else {
|
4575 5040 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4576 5041 | };
|
4577 5042 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4578 5043 | })?;
|
4579 5044 | result.await.and_then(|r| {
|
4580 5045 | ::pyo3::Python::with_gil(|py| {
|
4581 - | r.extract::<crate::output::QueryIdempotencyTokenAutoFillOutput>(py)
|
5046 + | r.extract::<crate::output::MalformedAcceptWithGenericStringOutput>(py)
|
4582 5047 | })
|
4583 5048 | })
|
4584 5049 | } else {
|
4585 5050 | ::tracing::trace!(
|
4586 - | name = "query_idempotency_token_auto_fill",
|
5051 + | name = "malformed_accept_with_generic_string",
|
4587 5052 | "executing python handler function"
|
4588 5053 | );
|
4589 5054 | ::pyo3::Python::with_gil(|py| {
|
4590 5055 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4591 5056 | let output = if handler.args == 1 {
|
4592 5057 | pyhandler.call1((input,))?
|
4593 5058 | } else {
|
4594 5059 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4595 5060 | };
|
4596 - | output.extract::<crate::output::QueryIdempotencyTokenAutoFillOutput>()
|
5061 + | output.extract::<crate::output::MalformedAcceptWithGenericStringOutput>()
|
4597 5062 | })
|
4598 5063 | };
|
4599 5064 | // Catch and record a Python traceback.
|
4600 5065 | result.map_err(|e| {
|
4601 5066 | let rich_py_err =
|
4602 5067 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4603 5068 | e.clone_ref(py)
|
4604 5069 | }));
|
4605 5070 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4606 5071 | e.into()
|
4607 5072 | })
|
4608 5073 | }
|
4609 5074 |
|
4610 - | /// Python handler for operation `OmitsSerializingEmptyLists`.
|
4611 - | pub(crate) async fn omits_serializing_empty_lists(
|
4612 - | input: crate::input::OmitsSerializingEmptyListsInput,
|
5075 + | /// Python handler for operation `TestBodyStructure`.
|
5076 + | pub(crate) async fn test_body_structure(
|
5077 + | input: crate::input::TestBodyStructureInput,
|
4613 5078 | state: ::aws_smithy_legacy_http_server::Extension<
|
4614 5079 | ::aws_smithy_http_server_python::context::PyContext,
|
4615 5080 | >,
|
4616 5081 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4617 - | ) -> std::result::Result<
|
4618 - | crate::output::OmitsSerializingEmptyListsOutput,
|
4619 - | crate::error::OmitsSerializingEmptyListsError,
|
4620 - | > {
|
5082 + | ) -> std::result::Result<crate::output::TestBodyStructureOutput, crate::error::TestBodyStructureError>
|
5083 + | {
|
4621 5084 | // Async block used to run the handler and catch any Python error.
|
4622 5085 | let result = if handler.is_coroutine {
|
4623 5086 | ::tracing::trace!(
|
4624 - | name = "omits_serializing_empty_lists",
|
5087 + | name = "test_body_structure",
|
4625 5088 | "executing python handler coroutine"
|
4626 5089 | );
|
4627 5090 | let result = ::pyo3::Python::with_gil(|py| {
|
4628 5091 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4629 5092 | let coroutine = if handler.args == 1 {
|
4630 5093 | pyhandler.call1((input,))?
|
4631 5094 | } else {
|
4632 5095 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4633 5096 | };
|
4634 5097 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4635 5098 | })?;
|
4636 5099 | result.await.and_then(|r| {
|
4637 - | ::pyo3::Python::with_gil(|py| {
|
4638 - | r.extract::<crate::output::OmitsSerializingEmptyListsOutput>(py)
|
4639 - | })
|
5100 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::TestBodyStructureOutput>(py))
|
4640 5101 | })
|
4641 5102 | } else {
|
4642 5103 | ::tracing::trace!(
|
4643 - | name = "omits_serializing_empty_lists",
|
5104 + | name = "test_body_structure",
|
4644 5105 | "executing python handler function"
|
4645 5106 | );
|
4646 5107 | ::pyo3::Python::with_gil(|py| {
|
4647 5108 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4648 5109 | let output = if handler.args == 1 {
|
4649 5110 | pyhandler.call1((input,))?
|
4650 5111 | } else {
|
4651 5112 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4652 5113 | };
|
4653 - | output.extract::<crate::output::OmitsSerializingEmptyListsOutput>()
|
5114 + | output.extract::<crate::output::TestBodyStructureOutput>()
|
4654 5115 | })
|
4655 5116 | };
|
4656 5117 | // Catch and record a Python traceback.
|
4657 5118 | result.map_err(|e| {
|
4658 5119 | let rich_py_err =
|
4659 5120 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4660 5121 | e.clone_ref(py)
|
4661 5122 | }));
|
4662 5123 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4663 5124 | e.into()
|
4664 5125 | })
|
4665 5126 | }
|
4666 5127 |
|
4667 - | /// Python handler for operation `OmitsNullSerializesEmptyString`.
|
4668 - | pub(crate) async fn omits_null_serializes_empty_string(
|
4669 - | input: crate::input::OmitsNullSerializesEmptyStringInput,
|
5128 + | /// Python handler for operation `TestPayloadStructure`.
|
5129 + | pub(crate) async fn test_payload_structure(
|
5130 + | input: crate::input::TestPayloadStructureInput,
|
4670 5131 | state: ::aws_smithy_legacy_http_server::Extension<
|
4671 5132 | ::aws_smithy_http_server_python::context::PyContext,
|
4672 5133 | >,
|
4673 5134 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4674 5135 | ) -> std::result::Result<
|
4675 - | crate::output::OmitsNullSerializesEmptyStringOutput,
|
4676 - | crate::error::OmitsNullSerializesEmptyStringError,
|
5136 + | crate::output::TestPayloadStructureOutput,
|
5137 + | crate::error::TestPayloadStructureError,
|
4677 5138 | > {
|
4678 5139 | // Async block used to run the handler and catch any Python error.
|
4679 5140 | let result = if handler.is_coroutine {
|
4680 5141 | ::tracing::trace!(
|
4681 - | name = "omits_null_serializes_empty_string",
|
5142 + | name = "test_payload_structure",
|
4682 5143 | "executing python handler coroutine"
|
4683 5144 | );
|
4684 5145 | let result = ::pyo3::Python::with_gil(|py| {
|
4685 5146 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4686 5147 | let coroutine = if handler.args == 1 {
|
4687 5148 | pyhandler.call1((input,))?
|
4688 5149 | } else {
|
4689 5150 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4690 5151 | };
|
4691 5152 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4692 5153 | })?;
|
4693 5154 | result.await.and_then(|r| {
|
4694 5155 | ::pyo3::Python::with_gil(|py| {
|
4695 - | r.extract::<crate::output::OmitsNullSerializesEmptyStringOutput>(py)
|
5156 + | r.extract::<crate::output::TestPayloadStructureOutput>(py)
|
4696 5157 | })
|
4697 5158 | })
|
4698 5159 | } else {
|
4699 5160 | ::tracing::trace!(
|
4700 - | name = "omits_null_serializes_empty_string",
|
5161 + | name = "test_payload_structure",
|
4701 5162 | "executing python handler function"
|
4702 5163 | );
|
4703 5164 | ::pyo3::Python::with_gil(|py| {
|
4704 5165 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4705 5166 | let output = if handler.args == 1 {
|
4706 5167 | pyhandler.call1((input,))?
|
4707 5168 | } else {
|
4708 5169 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4709 5170 | };
|
4710 - | output.extract::<crate::output::OmitsNullSerializesEmptyStringOutput>()
|
5171 + | output.extract::<crate::output::TestPayloadStructureOutput>()
|
4711 5172 | })
|
4712 5173 | };
|
4713 5174 | // Catch and record a Python traceback.
|
4714 5175 | result.map_err(|e| {
|
4715 5176 | let rich_py_err =
|
4716 5177 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4717 5178 | e.clone_ref(py)
|
4718 5179 | }));
|
4719 5180 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4720 5181 | e.into()
|
4721 5182 | })
|
4722 5183 | }
|
4723 5184 |
|
4724 - | /// Python handler for operation `IgnoreQueryParamsInResponse`.
|
4725 - | pub(crate) async fn ignore_query_params_in_response(
|
4726 - | input: crate::input::IgnoreQueryParamsInResponseInput,
|
5185 + | /// Python handler for operation `TestPayloadBlob`.
|
5186 + | pub(crate) async fn test_payload_blob(
|
5187 + | input: crate::input::TestPayloadBlobInput,
|
4727 5188 | state: ::aws_smithy_legacy_http_server::Extension<
|
4728 5189 | ::aws_smithy_http_server_python::context::PyContext,
|
4729 5190 | >,
|
4730 5191 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4731 - | ) -> std::result::Result<
|
4732 - | crate::output::IgnoreQueryParamsInResponseOutput,
|
4733 - | crate::error::IgnoreQueryParamsInResponseError,
|
4734 - | > {
|
5192 + | ) -> std::result::Result<crate::output::TestPayloadBlobOutput, crate::error::TestPayloadBlobError> {
|
4735 5193 | // Async block used to run the handler and catch any Python error.
|
4736 5194 | let result = if handler.is_coroutine {
|
4737 5195 | ::tracing::trace!(
|
4738 - | name = "ignore_query_params_in_response",
|
5196 + | name = "test_payload_blob",
|
4739 5197 | "executing python handler coroutine"
|
4740 5198 | );
|
4741 5199 | let result = ::pyo3::Python::with_gil(|py| {
|
4742 5200 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4743 5201 | let coroutine = if handler.args == 1 {
|
4744 5202 | pyhandler.call1((input,))?
|
4745 5203 | } else {
|
4746 5204 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4747 5205 | };
|
4748 5206 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4749 5207 | })?;
|
4750 5208 | result.await.and_then(|r| {
|
4751 - | ::pyo3::Python::with_gil(|py| {
|
4752 - | r.extract::<crate::output::IgnoreQueryParamsInResponseOutput>(py)
|
4753 - | })
|
5209 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::TestPayloadBlobOutput>(py))
|
4754 5210 | })
|
4755 5211 | } else {
|
4756 5212 | ::tracing::trace!(
|
4757 - | name = "ignore_query_params_in_response",
|
5213 + | name = "test_payload_blob",
|
4758 5214 | "executing python handler function"
|
4759 5215 | );
|
4760 5216 | ::pyo3::Python::with_gil(|py| {
|
4761 5217 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4762 5218 | let output = if handler.args == 1 {
|
4763 5219 | pyhandler.call1((input,))?
|
4764 5220 | } else {
|
4765 5221 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4766 5222 | };
|
4767 - | output.extract::<crate::output::IgnoreQueryParamsInResponseOutput>()
|
5223 + | output.extract::<crate::output::TestPayloadBlobOutput>()
|
4768 5224 | })
|
4769 5225 | };
|
4770 5226 | // Catch and record a Python traceback.
|
4771 5227 | result.map_err(|e| {
|
4772 5228 | let rich_py_err =
|
4773 5229 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4774 5230 | e.clone_ref(py)
|
4775 5231 | }));
|
4776 5232 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4777 5233 | e.into()
|
4778 5234 | })
|
4779 5235 | }
|
4780 5236 |
|
4781 - | /// Python handler for operation `ConstantAndVariableQueryString`.
|
4782 - | pub(crate) async fn constant_and_variable_query_string(
|
4783 - | input: crate::input::ConstantAndVariableQueryStringInput,
|
5237 + | /// Python handler for operation `TestGetNoPayload`.
|
5238 + | pub(crate) async fn test_get_no_payload(
|
5239 + | input: crate::input::TestGetNoPayloadInput,
|
4784 5240 | state: ::aws_smithy_legacy_http_server::Extension<
|
4785 5241 | ::aws_smithy_http_server_python::context::PyContext,
|
4786 5242 | >,
|
4787 5243 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4788 - | ) -> std::result::Result<
|
4789 - | crate::output::ConstantAndVariableQueryStringOutput,
|
4790 - | crate::error::ConstantAndVariableQueryStringError,
|
4791 - | > {
|
5244 + | ) -> std::result::Result<crate::output::TestGetNoPayloadOutput, crate::error::TestGetNoPayloadError>
|
5245 + | {
|
4792 5246 | // Async block used to run the handler and catch any Python error.
|
4793 5247 | let result = if handler.is_coroutine {
|
4794 5248 | ::tracing::trace!(
|
4795 - | name = "constant_and_variable_query_string",
|
5249 + | name = "test_get_no_payload",
|
4796 5250 | "executing python handler coroutine"
|
4797 5251 | );
|
4798 5252 | let result = ::pyo3::Python::with_gil(|py| {
|
4799 5253 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4800 5254 | let coroutine = if handler.args == 1 {
|
4801 5255 | pyhandler.call1((input,))?
|
4802 5256 | } else {
|
4803 5257 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4804 5258 | };
|
4805 5259 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4806 5260 | })?;
|
4807 5261 | result.await.and_then(|r| {
|
4808 - | ::pyo3::Python::with_gil(|py| {
|
4809 - | r.extract::<crate::output::ConstantAndVariableQueryStringOutput>(py)
|
4810 - | })
|
5262 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::TestGetNoPayloadOutput>(py))
|
4811 5263 | })
|
4812 5264 | } else {
|
4813 5265 | ::tracing::trace!(
|
4814 - | name = "constant_and_variable_query_string",
|
5266 + | name = "test_get_no_payload",
|
4815 5267 | "executing python handler function"
|
4816 5268 | );
|
4817 5269 | ::pyo3::Python::with_gil(|py| {
|
4818 5270 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4819 5271 | let output = if handler.args == 1 {
|
4820 5272 | pyhandler.call1((input,))?
|
4821 5273 | } else {
|
4822 5274 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4823 5275 | };
|
4824 - | output.extract::<crate::output::ConstantAndVariableQueryStringOutput>()
|
5276 + | output.extract::<crate::output::TestGetNoPayloadOutput>()
|
4825 5277 | })
|
4826 5278 | };
|
4827 5279 | // Catch and record a Python traceback.
|
4828 5280 | result.map_err(|e| {
|
4829 5281 | let rich_py_err =
|
4830 5282 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4831 5283 | e.clone_ref(py)
|
4832 5284 | }));
|
4833 5285 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4834 5286 | e.into()
|
4835 5287 | })
|
4836 5288 | }
|
4837 5289 |
|
4838 - | /// Python handler for operation `ConstantQueryString`.
|
4839 - | pub(crate) async fn constant_query_string(
|
4840 - | input: crate::input::ConstantQueryStringInput,
|
5290 + | /// Python handler for operation `TestPostNoPayload`.
|
5291 + | pub(crate) async fn test_post_no_payload(
|
5292 + | input: crate::input::TestPostNoPayloadInput,
|
4841 5293 | state: ::aws_smithy_legacy_http_server::Extension<
|
4842 5294 | ::aws_smithy_http_server_python::context::PyContext,
|
4843 5295 | >,
|
4844 5296 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4845 - | ) -> std::result::Result<
|
4846 - | crate::output::ConstantQueryStringOutput,
|
4847 - | crate::error::ConstantQueryStringError,
|
4848 - | > {
|
5297 + | ) -> std::result::Result<crate::output::TestPostNoPayloadOutput, crate::error::TestPostNoPayloadError>
|
5298 + | {
|
4849 5299 | // Async block used to run the handler and catch any Python error.
|
4850 5300 | let result = if handler.is_coroutine {
|
4851 5301 | ::tracing::trace!(
|
4852 - | name = "constant_query_string",
|
5302 + | name = "test_post_no_payload",
|
4853 5303 | "executing python handler coroutine"
|
4854 5304 | );
|
4855 5305 | let result = ::pyo3::Python::with_gil(|py| {
|
4856 5306 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4857 5307 | let coroutine = if handler.args == 1 {
|
4858 5308 | pyhandler.call1((input,))?
|
4859 5309 | } else {
|
4860 5310 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4861 5311 | };
|
4862 5312 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4863 5313 | })?;
|
4864 5314 | result.await.and_then(|r| {
|
4865 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::ConstantQueryStringOutput>(py))
|
5315 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::TestPostNoPayloadOutput>(py))
|
4866 5316 | })
|
4867 5317 | } else {
|
4868 5318 | ::tracing::trace!(
|
4869 - | name = "constant_query_string",
|
5319 + | name = "test_post_no_payload",
|
4870 5320 | "executing python handler function"
|
4871 5321 | );
|
4872 5322 | ::pyo3::Python::with_gil(|py| {
|
4873 5323 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4874 5324 | let output = if handler.args == 1 {
|
4875 5325 | pyhandler.call1((input,))?
|
4876 5326 | } else {
|
4877 5327 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4878 5328 | };
|
4879 - | output.extract::<crate::output::ConstantQueryStringOutput>()
|
5329 + | output.extract::<crate::output::TestPostNoPayloadOutput>()
|
4880 5330 | })
|
4881 5331 | };
|
4882 5332 | // Catch and record a Python traceback.
|
4883 5333 | result.map_err(|e| {
|
4884 5334 | let rich_py_err =
|
4885 5335 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4886 5336 | e.clone_ref(py)
|
4887 5337 | }));
|
4888 5338 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4889 5339 | e.into()
|
4890 5340 | })
|
4891 - | }
|
4892 - |
|
4893 - | /// Python handler for operation `AllQueryStringTypes`.
|
4894 - | pub(crate) async fn all_query_string_types(
|
4895 - | input: crate::input::AllQueryStringTypesInput,
|
5341 + | }
|
5342 + |
|
5343 + | /// Python handler for operation `TestGetNoInputNoPayload`.
|
5344 + | pub(crate) async fn test_get_no_input_no_payload(
|
5345 + | input: crate::input::TestGetNoInputNoPayloadInput,
|
4896 5346 | state: ::aws_smithy_legacy_http_server::Extension<
|
4897 5347 | ::aws_smithy_http_server_python::context::PyContext,
|
4898 5348 | >,
|
4899 5349 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4900 5350 | ) -> std::result::Result<
|
4901 - | crate::output::AllQueryStringTypesOutput,
|
4902 - | crate::error::AllQueryStringTypesError,
|
5351 + | crate::output::TestGetNoInputNoPayloadOutput,
|
5352 + | crate::error::TestGetNoInputNoPayloadError,
|
4903 5353 | > {
|
4904 5354 | // Async block used to run the handler and catch any Python error.
|
4905 5355 | let result = if handler.is_coroutine {
|
4906 5356 | ::tracing::trace!(
|
4907 - | name = "all_query_string_types",
|
5357 + | name = "test_get_no_input_no_payload",
|
4908 5358 | "executing python handler coroutine"
|
4909 5359 | );
|
4910 5360 | let result = ::pyo3::Python::with_gil(|py| {
|
4911 5361 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4912 5362 | let coroutine = if handler.args == 1 {
|
4913 5363 | pyhandler.call1((input,))?
|
4914 5364 | } else {
|
4915 5365 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4916 5366 | };
|
4917 5367 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4918 5368 | })?;
|
4919 5369 | result.await.and_then(|r| {
|
4920 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::AllQueryStringTypesOutput>(py))
|
5370 + | ::pyo3::Python::with_gil(|py| {
|
5371 + | r.extract::<crate::output::TestGetNoInputNoPayloadOutput>(py)
|
5372 + | })
|
4921 5373 | })
|
4922 5374 | } else {
|
4923 5375 | ::tracing::trace!(
|
4924 - | name = "all_query_string_types",
|
5376 + | name = "test_get_no_input_no_payload",
|
4925 5377 | "executing python handler function"
|
4926 5378 | );
|
4927 5379 | ::pyo3::Python::with_gil(|py| {
|
4928 5380 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4929 5381 | let output = if handler.args == 1 {
|
4930 5382 | pyhandler.call1((input,))?
|
4931 5383 | } else {
|
4932 5384 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4933 5385 | };
|
4934 - | output.extract::<crate::output::AllQueryStringTypesOutput>()
|
5386 + | output.extract::<crate::output::TestGetNoInputNoPayloadOutput>()
|
4935 5387 | })
|
4936 5388 | };
|
4937 5389 | // Catch and record a Python traceback.
|
4938 5390 | result.map_err(|e| {
|
4939 5391 | let rich_py_err =
|
4940 5392 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4941 5393 | e.clone_ref(py)
|
4942 5394 | }));
|
4943 5395 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
4944 5396 | e.into()
|
4945 5397 | })
|
4946 5398 | }
|
4947 5399 |
|
4948 - | /// Python handler for operation `HttpRequestWithRegexLiteral`.
|
4949 - | pub(crate) async fn http_request_with_regex_literal(
|
4950 - | input: crate::input::HttpRequestWithRegexLiteralInput,
|
5400 + | /// Python handler for operation `TestPostNoInputNoPayload`.
|
5401 + | pub(crate) async fn test_post_no_input_no_payload(
|
5402 + | input: crate::input::TestPostNoInputNoPayloadInput,
|
4951 5403 | state: ::aws_smithy_legacy_http_server::Extension<
|
4952 5404 | ::aws_smithy_http_server_python::context::PyContext,
|
4953 5405 | >,
|
4954 5406 | handler: ::aws_smithy_http_server_python::PyHandler,
|
4955 5407 | ) -> std::result::Result<
|
4956 - | crate::output::HttpRequestWithRegexLiteralOutput,
|
4957 - | crate::error::HttpRequestWithRegexLiteralError,
|
5408 + | crate::output::TestPostNoInputNoPayloadOutput,
|
5409 + | crate::error::TestPostNoInputNoPayloadError,
|
4958 5410 | > {
|
4959 5411 | // Async block used to run the handler and catch any Python error.
|
4960 5412 | let result = if handler.is_coroutine {
|
4961 5413 | ::tracing::trace!(
|
4962 - | name = "http_request_with_regex_literal",
|
5414 + | name = "test_post_no_input_no_payload",
|
4963 5415 | "executing python handler coroutine"
|
4964 5416 | );
|
4965 5417 | let result = ::pyo3::Python::with_gil(|py| {
|
4966 5418 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4967 5419 | let coroutine = if handler.args == 1 {
|
4968 5420 | pyhandler.call1((input,))?
|
4969 5421 | } else {
|
4970 5422 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4971 5423 | };
|
4972 5424 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
4973 5425 | })?;
|
4974 5426 | result.await.and_then(|r| {
|
4975 5427 | ::pyo3::Python::with_gil(|py| {
|
4976 - | r.extract::<crate::output::HttpRequestWithRegexLiteralOutput>(py)
|
5428 + | r.extract::<crate::output::TestPostNoInputNoPayloadOutput>(py)
|
4977 5429 | })
|
4978 5430 | })
|
4979 5431 | } else {
|
4980 5432 | ::tracing::trace!(
|
4981 - | name = "http_request_with_regex_literal",
|
5433 + | name = "test_post_no_input_no_payload",
|
4982 5434 | "executing python handler function"
|
4983 5435 | );
|
4984 5436 | ::pyo3::Python::with_gil(|py| {
|
4985 5437 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
4986 5438 | let output = if handler.args == 1 {
|
4987 5439 | pyhandler.call1((input,))?
|
4988 5440 | } else {
|
4989 5441 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
4990 5442 | };
|
4991 - | output.extract::<crate::output::HttpRequestWithRegexLiteralOutput>()
|
5443 + | output.extract::<crate::output::TestPostNoInputNoPayloadOutput>()
|
4992 5444 | })
|
4993 5445 | };
|
4994 5446 | // Catch and record a Python traceback.
|
4995 5447 | result.map_err(|e| {
|
4996 5448 | let rich_py_err =
|
4997 5449 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
4998 5450 | e.clone_ref(py)
|
4999 5451 | }));
|
5000 5452 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
5001 5453 | e.into()
|
5002 5454 | })
|
5003 5455 | }
|
5004 5456 |
|
5005 - | /// Python handler for operation `HttpRequestWithFloatLabels`.
|
5006 - | pub(crate) async fn http_request_with_float_labels(
|
5007 - | input: crate::input::HttpRequestWithFloatLabelsInput,
|
5457 + | /// Python handler for operation `DatetimeOffsets`.
|
5458 + | pub(crate) async fn datetime_offsets(
|
5459 + | input: crate::input::DatetimeOffsetsInput,
|
5008 5460 | state: ::aws_smithy_legacy_http_server::Extension<
|
5009 5461 | ::aws_smithy_http_server_python::context::PyContext,
|
5010 5462 | >,
|
5011 5463 | handler: ::aws_smithy_http_server_python::PyHandler,
|
5012 - | ) -> std::result::Result<
|
5013 - | crate::output::HttpRequestWithFloatLabelsOutput,
|
5014 - | crate::error::HttpRequestWithFloatLabelsError,
|
5015 - | > {
|
5464 + | ) -> std::result::Result<crate::output::DatetimeOffsetsOutput, crate::error::DatetimeOffsetsError> {
|
5016 5465 | // Async block used to run the handler and catch any Python error.
|
5017 5466 | let result = if handler.is_coroutine {
|
5018 5467 | ::tracing::trace!(
|
5019 - | name = "http_request_with_float_labels",
|
5468 + | name = "datetime_offsets",
|
5020 5469 | "executing python handler coroutine"
|
5021 5470 | );
|
5022 5471 | let result = ::pyo3::Python::with_gil(|py| {
|
5023 5472 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5024 5473 | let coroutine = if handler.args == 1 {
|
5025 5474 | pyhandler.call1((input,))?
|
5026 5475 | } else {
|
5027 5476 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5028 5477 | };
|
5029 5478 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
5030 5479 | })?;
|
5031 5480 | result.await.and_then(|r| {
|
5032 - | ::pyo3::Python::with_gil(|py| {
|
5033 - | r.extract::<crate::output::HttpRequestWithFloatLabelsOutput>(py)
|
5034 - | })
|
5481 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::DatetimeOffsetsOutput>(py))
|
5035 5482 | })
|
5036 5483 | } else {
|
5037 5484 | ::tracing::trace!(
|
5038 - | name = "http_request_with_float_labels",
|
5485 + | name = "datetime_offsets",
|
5039 5486 | "executing python handler function"
|
5040 5487 | );
|
5041 5488 | ::pyo3::Python::with_gil(|py| {
|
5042 5489 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5043 5490 | let output = if handler.args == 1 {
|
5044 5491 | pyhandler.call1((input,))?
|
5045 5492 | } else {
|
5046 5493 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5047 5494 | };
|
5048 - | output.extract::<crate::output::HttpRequestWithFloatLabelsOutput>()
|
5495 + | output.extract::<crate::output::DatetimeOffsetsOutput>()
|
5049 5496 | })
|
5050 5497 | };
|
5051 5498 | // Catch and record a Python traceback.
|
5052 5499 | result.map_err(|e| {
|
5053 5500 | let rich_py_err =
|
5054 5501 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
5055 5502 | e.clone_ref(py)
|
5056 5503 | }));
|
5057 5504 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
5058 5505 | e.into()
|
5059 5506 | })
|
5060 5507 | }
|
5061 5508 |
|
5062 - | /// Python handler for operation `HttpRequestWithGreedyLabelInPath`.
|
5063 - | pub(crate) async fn http_request_with_greedy_label_in_path(
|
5064 - | input: crate::input::HttpRequestWithGreedyLabelInPathInput,
|
5509 + | /// Python handler for operation `FractionalSeconds`.
|
5510 + | pub(crate) async fn fractional_seconds(
|
5511 + | input: crate::input::FractionalSecondsInput,
|
5065 5512 | state: ::aws_smithy_legacy_http_server::Extension<
|
5066 5513 | ::aws_smithy_http_server_python::context::PyContext,
|
5067 5514 | >,
|
5068 5515 | handler: ::aws_smithy_http_server_python::PyHandler,
|
5069 - | ) -> std::result::Result<
|
5070 - | crate::output::HttpRequestWithGreedyLabelInPathOutput,
|
5071 - | crate::error::HttpRequestWithGreedyLabelInPathError,
|
5072 - | > {
|
5516 + | ) -> std::result::Result<crate::output::FractionalSecondsOutput, crate::error::FractionalSecondsError>
|
5517 + | {
|
5073 5518 | // Async block used to run the handler and catch any Python error.
|
5074 5519 | let result = if handler.is_coroutine {
|
5075 5520 | ::tracing::trace!(
|
5076 - | name = "http_request_with_greedy_label_in_path",
|
5521 + | name = "fractional_seconds",
|
5077 5522 | "executing python handler coroutine"
|
5078 5523 | );
|
5079 5524 | let result = ::pyo3::Python::with_gil(|py| {
|
5080 5525 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5081 5526 | let coroutine = if handler.args == 1 {
|
5082 5527 | pyhandler.call1((input,))?
|
5083 5528 | } else {
|
5084 5529 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5085 5530 | };
|
5086 5531 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
5087 5532 | })?;
|
5088 5533 | result.await.and_then(|r| {
|
5089 - | ::pyo3::Python::with_gil(|py| {
|
5090 - | r.extract::<crate::output::HttpRequestWithGreedyLabelInPathOutput>(py)
|
5091 - | })
|
5534 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::FractionalSecondsOutput>(py))
|
5092 5535 | })
|
5093 5536 | } else {
|
5094 5537 | ::tracing::trace!(
|
5095 - | name = "http_request_with_greedy_label_in_path",
|
5538 + | name = "fractional_seconds",
|
5096 5539 | "executing python handler function"
|
5097 5540 | );
|
5098 5541 | ::pyo3::Python::with_gil(|py| {
|
5099 5542 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5100 5543 | let output = if handler.args == 1 {
|
5101 5544 | pyhandler.call1((input,))?
|
5102 5545 | } else {
|
5103 5546 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5104 5547 | };
|
5105 - | output.extract::<crate::output::HttpRequestWithGreedyLabelInPathOutput>()
|
5548 + | output.extract::<crate::output::FractionalSecondsOutput>()
|
5106 5549 | })
|
5107 5550 | };
|
5108 5551 | // Catch and record a Python traceback.
|
5109 5552 | result.map_err(|e| {
|
5110 5553 | let rich_py_err =
|
5111 5554 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
5112 5555 | e.clone_ref(py)
|
5113 5556 | }));
|
5114 5557 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
5115 5558 | e.into()
|
5116 5559 | })
|
5117 5560 | }
|
5118 5561 |
|
5119 - | /// Python handler for operation `HttpRequestWithLabelsAndTimestampFormat`.
|
5120 - | pub(crate) async fn http_request_with_labels_and_timestamp_format(
|
5121 - | input: crate::input::HttpRequestWithLabelsAndTimestampFormatInput,
|
5562 + | /// Python handler for operation `PutWithContentEncoding`.
|
5563 + | pub(crate) async fn put_with_content_encoding(
|
5564 + | input: crate::input::PutWithContentEncodingInput,
|
5122 5565 | state: ::aws_smithy_legacy_http_server::Extension<
|
5123 5566 | ::aws_smithy_http_server_python::context::PyContext,
|
5124 5567 | >,
|
5125 5568 | handler: ::aws_smithy_http_server_python::PyHandler,
|
5126 5569 | ) -> std::result::Result<
|
5127 - | crate::output::HttpRequestWithLabelsAndTimestampFormatOutput,
|
5128 - | crate::error::HttpRequestWithLabelsAndTimestampFormatError,
|
5570 + | crate::output::PutWithContentEncodingOutput,
|
5571 + | crate::error::PutWithContentEncodingError,
|
5129 5572 | > {
|
5130 5573 | // Async block used to run the handler and catch any Python error.
|
5131 5574 | let result = if handler.is_coroutine {
|
5132 5575 | ::tracing::trace!(
|
5133 - | name = "http_request_with_labels_and_timestamp_format",
|
5576 + | name = "put_with_content_encoding",
|
5134 5577 | "executing python handler coroutine"
|
5135 5578 | );
|
5136 5579 | let result = ::pyo3::Python::with_gil(|py| {
|
5137 5580 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5138 5581 | let coroutine = if handler.args == 1 {
|
5139 5582 | pyhandler.call1((input,))?
|
5140 5583 | } else {
|
5141 5584 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5142 5585 | };
|
5143 5586 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
5144 5587 | })?;
|
5145 5588 | result.await.and_then(|r| {
|
5146 5589 | ::pyo3::Python::with_gil(|py| {
|
5147 - | r.extract::<crate::output::HttpRequestWithLabelsAndTimestampFormatOutput>(py)
|
5590 + | r.extract::<crate::output::PutWithContentEncodingOutput>(py)
|
5148 5591 | })
|
5149 5592 | })
|
5150 5593 | } else {
|
5151 5594 | ::tracing::trace!(
|
5152 - | name = "http_request_with_labels_and_timestamp_format",
|
5595 + | name = "put_with_content_encoding",
|
5153 5596 | "executing python handler function"
|
5154 5597 | );
|
5155 5598 | ::pyo3::Python::with_gil(|py| {
|
5156 5599 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5157 5600 | let output = if handler.args == 1 {
|
5158 5601 | pyhandler.call1((input,))?
|
5159 5602 | } else {
|
5160 5603 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5161 5604 | };
|
5162 - | output.extract::<crate::output::HttpRequestWithLabelsAndTimestampFormatOutput>()
|
5605 + | output.extract::<crate::output::PutWithContentEncodingOutput>()
|
5163 5606 | })
|
5164 5607 | };
|
5165 5608 | // Catch and record a Python traceback.
|
5166 5609 | result.map_err(|e| {
|
5167 5610 | let rich_py_err =
|
5168 5611 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
5169 5612 | e.clone_ref(py)
|
5170 5613 | }));
|
5171 5614 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
5172 5615 | e.into()
|
5173 5616 | })
|
5174 5617 | }
|
5175 5618 |
|
5176 - | /// Python handler for operation `HttpRequestWithLabels`.
|
5177 - | pub(crate) async fn http_request_with_labels(
|
5178 - | input: crate::input::HttpRequestWithLabelsInput,
|
5619 + | /// Python handler for operation `ContentTypeParameters`.
|
5620 + | pub(crate) async fn content_type_parameters(
|
5621 + | input: crate::input::ContentTypeParametersInput,
|
5179 5622 | state: ::aws_smithy_legacy_http_server::Extension<
|
5180 5623 | ::aws_smithy_http_server_python::context::PyContext,
|
5181 5624 | >,
|
5182 5625 | handler: ::aws_smithy_http_server_python::PyHandler,
|
5183 5626 | ) -> std::result::Result<
|
5184 - | crate::output::HttpRequestWithLabelsOutput,
|
5185 - | crate::error::HttpRequestWithLabelsError,
|
5627 + | crate::output::ContentTypeParametersOutput,
|
5628 + | crate::error::ContentTypeParametersError,
|
5186 5629 | > {
|
5187 5630 | // Async block used to run the handler and catch any Python error.
|
5188 5631 | let result = if handler.is_coroutine {
|
5189 5632 | ::tracing::trace!(
|
5190 - | name = "http_request_with_labels",
|
5633 + | name = "content_type_parameters",
|
5191 5634 | "executing python handler coroutine"
|
5192 5635 | );
|
5193 5636 | let result = ::pyo3::Python::with_gil(|py| {
|
5194 5637 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5195 5638 | let coroutine = if handler.args == 1 {
|
5196 5639 | pyhandler.call1((input,))?
|
5197 5640 | } else {
|
5198 5641 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5199 5642 | };
|
5200 5643 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
5201 5644 | })?;
|
5202 5645 | result.await.and_then(|r| {
|
5203 5646 | ::pyo3::Python::with_gil(|py| {
|
5204 - | r.extract::<crate::output::HttpRequestWithLabelsOutput>(py)
|
5647 + | r.extract::<crate::output::ContentTypeParametersOutput>(py)
|
5205 5648 | })
|
5206 5649 | })
|
5207 5650 | } else {
|
5208 5651 | ::tracing::trace!(
|
5209 - | name = "http_request_with_labels",
|
5652 + | name = "content_type_parameters",
|
5210 5653 | "executing python handler function"
|
5211 5654 | );
|
5212 5655 | ::pyo3::Python::with_gil(|py| {
|
5213 5656 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5214 5657 | let output = if handler.args == 1 {
|
5215 5658 | pyhandler.call1((input,))?
|
5216 5659 | } else {
|
5217 5660 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5218 5661 | };
|
5219 - | output.extract::<crate::output::HttpRequestWithLabelsOutput>()
|
5662 + | output.extract::<crate::output::ContentTypeParametersOutput>()
|
5220 5663 | })
|
5221 5664 | };
|
5222 5665 | // Catch and record a Python traceback.
|
5223 5666 | result.map_err(|e| {
|
5224 5667 | let rich_py_err =
|
5225 5668 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
5226 5669 | e.clone_ref(py)
|
5227 5670 | }));
|
5228 5671 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
5229 5672 | e.into()
|
5230 5673 | })
|
5231 5674 | }
|
5232 5675 |
|
5233 - | /// Python handler for operation `MediaTypeHeader`.
|
5234 - | pub(crate) async fn media_type_header(
|
5235 - | input: crate::input::MediaTypeHeaderInput,
|
5676 + | /// Python handler for operation `OperationWithDefaults`.
|
5677 + | pub(crate) async fn operation_with_defaults(
|
5678 + | input: crate::input::OperationWithDefaultsInput,
|
5236 5679 | state: ::aws_smithy_legacy_http_server::Extension<
|
5237 5680 | ::aws_smithy_http_server_python::context::PyContext,
|
5238 5681 | >,
|
5239 5682 | handler: ::aws_smithy_http_server_python::PyHandler,
|
5240 - | ) -> std::result::Result<crate::output::MediaTypeHeaderOutput, crate::error::MediaTypeHeaderError> {
|
5683 + | ) -> std::result::Result<
|
5684 + | crate::output::OperationWithDefaultsOutput,
|
5685 + | crate::error::OperationWithDefaultsError,
|
5686 + | > {
|
5241 5687 | // Async block used to run the handler and catch any Python error.
|
5242 5688 | let result = if handler.is_coroutine {
|
5243 5689 | ::tracing::trace!(
|
5244 - | name = "media_type_header",
|
5690 + | name = "operation_with_defaults",
|
5245 5691 | "executing python handler coroutine"
|
5246 5692 | );
|
5247 5693 | let result = ::pyo3::Python::with_gil(|py| {
|
5248 5694 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5249 5695 | let coroutine = if handler.args == 1 {
|
5250 5696 | pyhandler.call1((input,))?
|
5251 5697 | } else {
|
5252 5698 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5253 5699 | };
|
5254 5700 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
5255 5701 | })?;
|
5256 5702 | result.await.and_then(|r| {
|
5257 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::MediaTypeHeaderOutput>(py))
|
5703 + | ::pyo3::Python::with_gil(|py| {
|
5704 + | r.extract::<crate::output::OperationWithDefaultsOutput>(py)
|
5705 + | })
|
5258 5706 | })
|
5259 5707 | } else {
|
5260 5708 | ::tracing::trace!(
|
5261 - | name = "media_type_header",
|
5709 + | name = "operation_with_defaults",
|
5262 5710 | "executing python handler function"
|
5263 5711 | );
|
5264 5712 | ::pyo3::Python::with_gil(|py| {
|
5265 5713 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5266 5714 | let output = if handler.args == 1 {
|
5267 5715 | pyhandler.call1((input,))?
|
5268 5716 | } else {
|
5269 5717 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5270 5718 | };
|
5271 - | output.extract::<crate::output::MediaTypeHeaderOutput>()
|
5719 + | output.extract::<crate::output::OperationWithDefaultsOutput>()
|
5272 5720 | })
|
5273 5721 | };
|
5274 5722 | // Catch and record a Python traceback.
|
5275 5723 | result.map_err(|e| {
|
5276 5724 | let rich_py_err =
|
5277 5725 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
5278 5726 | e.clone_ref(py)
|
5279 5727 | }));
|
5280 5728 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
5281 5729 | e.into()
|
5282 5730 | })
|
5283 5731 | }
|
5284 5732 |
|
5285 - | /// Python handler for operation `TimestampFormatHeaders`.
|
5286 - | pub(crate) async fn timestamp_format_headers(
|
5287 - | input: crate::input::TimestampFormatHeadersInput,
|
5733 + | /// Python handler for operation `OperationWithNestedStructure`.
|
5734 + | pub(crate) async fn operation_with_nested_structure(
|
5735 + | input: crate::input::OperationWithNestedStructureInput,
|
5288 5736 | state: ::aws_smithy_legacy_http_server::Extension<
|
5289 5737 | ::aws_smithy_http_server_python::context::PyContext,
|
5290 5738 | >,
|
5291 5739 | handler: ::aws_smithy_http_server_python::PyHandler,
|
5292 5740 | ) -> std::result::Result<
|
5293 - | crate::output::TimestampFormatHeadersOutput,
|
5294 - | crate::error::TimestampFormatHeadersError,
|
5741 + | crate::output::OperationWithNestedStructureOutput,
|
5742 + | crate::error::OperationWithNestedStructureError,
|
5295 5743 | > {
|
5296 5744 | // Async block used to run the handler and catch any Python error.
|
5297 5745 | let result = if handler.is_coroutine {
|
5298 5746 | ::tracing::trace!(
|
5299 - | name = "timestamp_format_headers",
|
5747 + | name = "operation_with_nested_structure",
|
5300 5748 | "executing python handler coroutine"
|
5301 5749 | );
|
5302 5750 | let result = ::pyo3::Python::with_gil(|py| {
|
5303 5751 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5304 5752 | let coroutine = if handler.args == 1 {
|
5305 5753 | pyhandler.call1((input,))?
|
5306 5754 | } else {
|
5307 5755 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5308 5756 | };
|
5309 5757 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
5310 5758 | })?;
|
5311 5759 | result.await.and_then(|r| {
|
5312 5760 | ::pyo3::Python::with_gil(|py| {
|
5313 - | r.extract::<crate::output::TimestampFormatHeadersOutput>(py)
|
5761 + | r.extract::<crate::output::OperationWithNestedStructureOutput>(py)
|
5314 5762 | })
|
5315 5763 | })
|
5316 5764 | } else {
|
5317 5765 | ::tracing::trace!(
|
5318 - | name = "timestamp_format_headers",
|
5766 + | name = "operation_with_nested_structure",
|
5319 5767 | "executing python handler function"
|
5320 5768 | );
|
5321 5769 | ::pyo3::Python::with_gil(|py| {
|
5322 5770 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5323 5771 | let output = if handler.args == 1 {
|
5324 5772 | pyhandler.call1((input,))?
|
5325 5773 | } else {
|
5326 5774 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5327 5775 | };
|
5328 - | output.extract::<crate::output::TimestampFormatHeadersOutput>()
|
5776 + | output.extract::<crate::output::OperationWithNestedStructureOutput>()
|
5329 5777 | })
|
5330 5778 | };
|
5331 5779 | // Catch and record a Python traceback.
|
5332 5780 | result.map_err(|e| {
|
5333 5781 | let rich_py_err =
|
5334 5782 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
5335 5783 | e.clone_ref(py)
|
5336 5784 | }));
|
5337 5785 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
5338 5786 | e.into()
|
5339 5787 | })
|
5340 5788 | }
|
5341 5789 |
|
5342 - | /// Python handler for operation `NullAndEmptyHeadersServer`.
|
5343 - | pub(crate) async fn null_and_empty_headers_server(
|
5344 - | input: crate::input::NullAndEmptyHeadersServerInput,
|
5790 + | /// Python handler for operation `InputStream`.
|
5791 + | pub(crate) async fn input_stream(
|
5792 + | input: crate::input::InputStreamInput,
|
5345 5793 | state: ::aws_smithy_legacy_http_server::Extension<
|
5346 5794 | ::aws_smithy_http_server_python::context::PyContext,
|
5347 5795 | >,
|
5348 5796 | handler: ::aws_smithy_http_server_python::PyHandler,
|
5349 - | ) -> std::result::Result<
|
5350 - | crate::output::NullAndEmptyHeadersServerOutput,
|
5351 - | crate::error::NullAndEmptyHeadersServerError,
|
5352 - | > {
|
5797 + | ) -> std::result::Result<crate::output::InputStreamOutput, crate::error::InputStreamError> {
|
5353 5798 | // Async block used to run the handler and catch any Python error.
|
5354 5799 | let result = if handler.is_coroutine {
|
5355 - | ::tracing::trace!(
|
5356 - | name = "null_and_empty_headers_server",
|
5357 - | "executing python handler coroutine"
|
5358 - | );
|
5800 + | ::tracing::trace!(name = "input_stream", "executing python handler coroutine");
|
5359 5801 | let result = ::pyo3::Python::with_gil(|py| {
|
5360 5802 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5361 5803 | let coroutine = if handler.args == 1 {
|
5362 5804 | pyhandler.call1((input,))?
|
5363 5805 | } else {
|
5364 5806 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5365 5807 | };
|
5366 5808 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
5367 5809 | })?;
|
5368 5810 | result.await.and_then(|r| {
|
5369 - | ::pyo3::Python::with_gil(|py| {
|
5370 - | r.extract::<crate::output::NullAndEmptyHeadersServerOutput>(py)
|
5371 - | })
|
5811 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::InputStreamOutput>(py))
|
5372 5812 | })
|
5373 5813 | } else {
|
5374 - | ::tracing::trace!(
|
5375 - | name = "null_and_empty_headers_server",
|
5376 - | "executing python handler function"
|
5377 - | );
|
5814 + | ::tracing::trace!(name = "input_stream", "executing python handler function");
|
5378 5815 | ::pyo3::Python::with_gil(|py| {
|
5379 5816 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5380 5817 | let output = if handler.args == 1 {
|
5381 5818 | pyhandler.call1((input,))?
|
5382 5819 | } else {
|
5383 5820 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5384 5821 | };
|
5385 - | output.extract::<crate::output::NullAndEmptyHeadersServerOutput>()
|
5822 + | output.extract::<crate::output::InputStreamOutput>()
|
5386 5823 | })
|
5387 5824 | };
|
5388 5825 | // Catch and record a Python traceback.
|
5389 5826 | result.map_err(|e| {
|
5390 5827 | let rich_py_err =
|
5391 5828 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
5392 5829 | e.clone_ref(py)
|
5393 5830 | }));
|
5394 5831 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
5395 5832 | e.into()
|
5396 5833 | })
|
5397 5834 | }
|
5398 5835 |
|
5399 - | /// Python handler for operation `NullAndEmptyHeadersClient`.
|
5400 - | pub(crate) async fn null_and_empty_headers_client(
|
5401 - | input: crate::input::NullAndEmptyHeadersClientInput,
|
5836 + | /// Python handler for operation `OutputStream`.
|
5837 + | pub(crate) async fn output_stream(
|
5838 + | input: crate::input::OutputStreamInput,
|
5402 5839 | state: ::aws_smithy_legacy_http_server::Extension<
|
5403 5840 | ::aws_smithy_http_server_python::context::PyContext,
|
5404 5841 | >,
|
5405 5842 | handler: ::aws_smithy_http_server_python::PyHandler,
|
5406 - | ) -> std::result::Result<
|
5407 - | crate::output::NullAndEmptyHeadersClientOutput,
|
5408 - | crate::error::NullAndEmptyHeadersClientError,
|
5409 - | > {
|
5843 + | ) -> std::result::Result<crate::output::OutputStreamOutput, crate::error::OutputStreamError> {
|
5410 5844 | // Async block used to run the handler and catch any Python error.
|
5411 5845 | let result = if handler.is_coroutine {
|
5412 - | ::tracing::trace!(
|
5413 - | name = "null_and_empty_headers_client",
|
5414 - | "executing python handler coroutine"
|
5415 - | );
|
5846 + | ::tracing::trace!(name = "output_stream", "executing python handler coroutine");
|
5416 5847 | let result = ::pyo3::Python::with_gil(|py| {
|
5417 5848 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5418 5849 | let coroutine = if handler.args == 1 {
|
5419 5850 | pyhandler.call1((input,))?
|
5420 5851 | } else {
|
5421 5852 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5422 5853 | };
|
5423 5854 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
5424 5855 | })?;
|
5425 5856 | result.await.and_then(|r| {
|
5426 - | ::pyo3::Python::with_gil(|py| {
|
5427 - | r.extract::<crate::output::NullAndEmptyHeadersClientOutput>(py)
|
5428 - | })
|
5857 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::OutputStreamOutput>(py))
|
5429 5858 | })
|
5430 5859 | } else {
|
5431 - | ::tracing::trace!(
|
5432 - | name = "null_and_empty_headers_client",
|
5433 - | "executing python handler function"
|
5434 - | );
|
5860 + | ::tracing::trace!(name = "output_stream", "executing python handler function");
|
5435 5861 | ::pyo3::Python::with_gil(|py| {
|
5436 5862 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5437 5863 | let output = if handler.args == 1 {
|
5438 5864 | pyhandler.call1((input,))?
|
5439 5865 | } else {
|
5440 5866 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5441 5867 | };
|
5442 - | output.extract::<crate::output::NullAndEmptyHeadersClientOutput>()
|
5868 + | output.extract::<crate::output::OutputStreamOutput>()
|
5443 5869 | })
|
5444 5870 | };
|
5445 5871 | // Catch and record a Python traceback.
|
5446 5872 | result.map_err(|e| {
|
5447 5873 | let rich_py_err =
|
5448 5874 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
5449 5875 | e.clone_ref(py)
|
5450 5876 | }));
|
5451 5877 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
5452 5878 | e.into()
|
5453 5879 | })
|
5454 5880 | }
|
5455 5881 |
|
5456 - | /// Python handler for operation `InputAndOutputWithHeaders`.
|
5457 - | pub(crate) async fn input_and_output_with_headers(
|
5458 - | input: crate::input::InputAndOutputWithHeadersInput,
|
5882 + | /// Python handler for operation `DuplexStream`.
|
5883 + | pub(crate) async fn duplex_stream(
|
5884 + | input: crate::input::DuplexStreamInput,
|
5459 5885 | state: ::aws_smithy_legacy_http_server::Extension<
|
5460 5886 | ::aws_smithy_http_server_python::context::PyContext,
|
5461 5887 | >,
|
5462 5888 | handler: ::aws_smithy_http_server_python::PyHandler,
|
5463 - | ) -> std::result::Result<
|
5464 - | crate::output::InputAndOutputWithHeadersOutput,
|
5465 - | crate::error::InputAndOutputWithHeadersError,
|
5466 - | > {
|
5889 + | ) -> std::result::Result<crate::output::DuplexStreamOutput, crate::error::DuplexStreamError> {
|
5467 5890 | // Async block used to run the handler and catch any Python error.
|
5468 5891 | let result = if handler.is_coroutine {
|
5469 - | ::tracing::trace!(
|
5470 - | name = "input_and_output_with_headers",
|
5471 - | "executing python handler coroutine"
|
5472 - | );
|
5892 + | ::tracing::trace!(name = "duplex_stream", "executing python handler coroutine");
|
5473 5893 | let result = ::pyo3::Python::with_gil(|py| {
|
5474 5894 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5475 5895 | let coroutine = if handler.args == 1 {
|
5476 5896 | pyhandler.call1((input,))?
|
5477 5897 | } else {
|
5478 5898 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5479 5899 | };
|
5480 5900 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
5481 5901 | })?;
|
5482 5902 | result.await.and_then(|r| {
|
5483 - | ::pyo3::Python::with_gil(|py| {
|
5484 - | r.extract::<crate::output::InputAndOutputWithHeadersOutput>(py)
|
5485 - | })
|
5903 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::DuplexStreamOutput>(py))
|
5486 5904 | })
|
5487 5905 | } else {
|
5488 - | ::tracing::trace!(
|
5489 - | name = "input_and_output_with_headers",
|
5490 - | "executing python handler function"
|
5491 - | );
|
5906 + | ::tracing::trace!(name = "duplex_stream", "executing python handler function");
|
5492 5907 | ::pyo3::Python::with_gil(|py| {
|
5493 5908 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5494 5909 | let output = if handler.args == 1 {
|
5495 5910 | pyhandler.call1((input,))?
|
5496 5911 | } else {
|
5497 5912 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5498 5913 | };
|
5499 - | output.extract::<crate::output::InputAndOutputWithHeadersOutput>()
|
5914 + | output.extract::<crate::output::DuplexStreamOutput>()
|
5500 5915 | })
|
5501 5916 | };
|
5502 5917 | // Catch and record a Python traceback.
|
5503 5918 | result.map_err(|e| {
|
5504 5919 | let rich_py_err =
|
5505 5920 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
5506 5921 | e.clone_ref(py)
|
5507 5922 | }));
|
5508 5923 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
5509 5924 | e.into()
|
5510 5925 | })
|
5511 5926 | }
|
5512 5927 |
|
5513 - | /// Python handler for operation `UnitInputAndOutput`.
|
5514 - | pub(crate) async fn unit_input_and_output(
|
5515 - | input: crate::input::UnitInputAndOutputInput,
|
5928 + | /// Python handler for operation `InputStreamWithInitialRequest`.
|
5929 + | pub(crate) async fn input_stream_with_initial_request(
|
5930 + | input: crate::input::InputStreamWithInitialRequestInput,
|
5516 5931 | state: ::aws_smithy_legacy_http_server::Extension<
|
5517 5932 | ::aws_smithy_http_server_python::context::PyContext,
|
5518 5933 | >,
|
5519 5934 | handler: ::aws_smithy_http_server_python::PyHandler,
|
5520 5935 | ) -> std::result::Result<
|
5521 - | crate::output::UnitInputAndOutputOutput,
|
5522 - | crate::error::UnitInputAndOutputError,
|
5936 + | crate::output::InputStreamWithInitialRequestOutput,
|
5937 + | crate::error::InputStreamWithInitialRequestError,
|
5523 5938 | > {
|
5524 5939 | // Async block used to run the handler and catch any Python error.
|
5525 5940 | let result = if handler.is_coroutine {
|
5526 5941 | ::tracing::trace!(
|
5527 - | name = "unit_input_and_output",
|
5942 + | name = "input_stream_with_initial_request",
|
5528 5943 | "executing python handler coroutine"
|
5529 5944 | );
|
5530 5945 | let result = ::pyo3::Python::with_gil(|py| {
|
5531 5946 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5532 5947 | let coroutine = if handler.args == 1 {
|
5533 5948 | pyhandler.call1((input,))?
|
5534 5949 | } else {
|
5535 5950 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5536 5951 | };
|
5537 5952 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
5538 5953 | })?;
|
5539 5954 | result.await.and_then(|r| {
|
5540 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::UnitInputAndOutputOutput>(py))
|
5955 + | ::pyo3::Python::with_gil(|py| {
|
5956 + | r.extract::<crate::output::InputStreamWithInitialRequestOutput>(py)
|
5957 + | })
|
5541 5958 | })
|
5542 5959 | } else {
|
5543 5960 | ::tracing::trace!(
|
5544 - | name = "unit_input_and_output",
|
5961 + | name = "input_stream_with_initial_request",
|
5545 5962 | "executing python handler function"
|
5546 5963 | );
|
5547 5964 | ::pyo3::Python::with_gil(|py| {
|
5548 5965 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5549 5966 | let output = if handler.args == 1 {
|
5550 5967 | pyhandler.call1((input,))?
|
5551 5968 | } else {
|
5552 5969 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5553 5970 | };
|
5554 - | output.extract::<crate::output::UnitInputAndOutputOutput>()
|
5971 + | output.extract::<crate::output::InputStreamWithInitialRequestOutput>()
|
5555 5972 | })
|
5556 5973 | };
|
5557 5974 | // Catch and record a Python traceback.
|
5558 5975 | result.map_err(|e| {
|
5559 5976 | let rich_py_err =
|
5560 5977 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
5561 5978 | e.clone_ref(py)
|
5562 5979 | }));
|
5563 5980 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
5564 5981 | e.into()
|
5565 5982 | })
|
5566 5983 | }
|
5567 5984 |
|
5568 - | /// Python handler for operation `EmptyInputAndEmptyOutput`.
|
5569 - | pub(crate) async fn empty_input_and_empty_output(
|
5570 - | input: crate::input::EmptyInputAndEmptyOutputInput,
|
5985 + | /// Python handler for operation `OutputStreamWithInitialResponse`.
|
5986 + | pub(crate) async fn output_stream_with_initial_response(
|
5987 + | input: crate::input::OutputStreamWithInitialResponseInput,
|
5571 5988 | state: ::aws_smithy_legacy_http_server::Extension<
|
5572 5989 | ::aws_smithy_http_server_python::context::PyContext,
|
5573 5990 | >,
|
5574 5991 | handler: ::aws_smithy_http_server_python::PyHandler,
|
5575 5992 | ) -> std::result::Result<
|
5576 - | crate::output::EmptyInputAndEmptyOutputOutput,
|
5577 - | crate::error::EmptyInputAndEmptyOutputError,
|
5993 + | crate::output::OutputStreamWithInitialResponseOutput,
|
5994 + | crate::error::OutputStreamWithInitialResponseError,
|
5578 5995 | > {
|
5579 5996 | // Async block used to run the handler and catch any Python error.
|
5580 5997 | let result = if handler.is_coroutine {
|
5581 5998 | ::tracing::trace!(
|
5582 - | name = "empty_input_and_empty_output",
|
5999 + | name = "output_stream_with_initial_response",
|
5583 6000 | "executing python handler coroutine"
|
5584 6001 | );
|
5585 6002 | let result = ::pyo3::Python::with_gil(|py| {
|
5586 6003 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5587 6004 | let coroutine = if handler.args == 1 {
|
5588 6005 | pyhandler.call1((input,))?
|
5589 6006 | } else {
|
5590 6007 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5591 6008 | };
|
5592 6009 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
5593 6010 | })?;
|
5594 6011 | result.await.and_then(|r| {
|
5595 6012 | ::pyo3::Python::with_gil(|py| {
|
5596 - | r.extract::<crate::output::EmptyInputAndEmptyOutputOutput>(py)
|
6013 + | r.extract::<crate::output::OutputStreamWithInitialResponseOutput>(py)
|
5597 6014 | })
|
5598 6015 | })
|
5599 6016 | } else {
|
5600 6017 | ::tracing::trace!(
|
5601 - | name = "empty_input_and_empty_output",
|
6018 + | name = "output_stream_with_initial_response",
|
5602 6019 | "executing python handler function"
|
5603 6020 | );
|
5604 6021 | ::pyo3::Python::with_gil(|py| {
|
5605 6022 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5606 6023 | let output = if handler.args == 1 {
|
5607 6024 | pyhandler.call1((input,))?
|
5608 6025 | } else {
|
5609 6026 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5610 6027 | };
|
5611 - | output.extract::<crate::output::EmptyInputAndEmptyOutputOutput>()
|
6028 + | output.extract::<crate::output::OutputStreamWithInitialResponseOutput>()
|
5612 6029 | })
|
5613 6030 | };
|
5614 6031 | // Catch and record a Python traceback.
|
5615 6032 | result.map_err(|e| {
|
5616 6033 | let rich_py_err =
|
5617 6034 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
5618 6035 | e.clone_ref(py)
|
5619 6036 | }));
|
5620 6037 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
5621 6038 | e.into()
|
5622 6039 | })
|
5623 6040 | }
|
5624 6041 |
|
5625 - | /// Python handler for operation `NoInputAndOutput`.
|
5626 - | pub(crate) async fn no_input_and_output(
|
5627 - | input: crate::input::NoInputAndOutputInput,
|
6042 + | /// Python handler for operation `DuplexStreamWithInitialMessages`.
|
6043 + | pub(crate) async fn duplex_stream_with_initial_messages(
|
6044 + | input: crate::input::DuplexStreamWithInitialMessagesInput,
|
5628 6045 | state: ::aws_smithy_legacy_http_server::Extension<
|
5629 6046 | ::aws_smithy_http_server_python::context::PyContext,
|
5630 6047 | >,
|
5631 6048 | handler: ::aws_smithy_http_server_python::PyHandler,
|
5632 - | ) -> std::result::Result<crate::output::NoInputAndOutputOutput, crate::error::NoInputAndOutputError>
|
5633 - | {
|
6049 + | ) -> std::result::Result<
|
6050 + | crate::output::DuplexStreamWithInitialMessagesOutput,
|
6051 + | crate::error::DuplexStreamWithInitialMessagesError,
|
6052 + | > {
|
5634 6053 | // Async block used to run the handler and catch any Python error.
|
5635 6054 | let result = if handler.is_coroutine {
|
5636 6055 | ::tracing::trace!(
|
5637 - | name = "no_input_and_output",
|
6056 + | name = "duplex_stream_with_initial_messages",
|
5638 6057 | "executing python handler coroutine"
|
5639 6058 | );
|
5640 6059 | let result = ::pyo3::Python::with_gil(|py| {
|
5641 6060 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5642 6061 | let coroutine = if handler.args == 1 {
|
5643 6062 | pyhandler.call1((input,))?
|
5644 6063 | } else {
|
5645 6064 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5646 6065 | };
|
5647 6066 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
5648 6067 | })?;
|
5649 6068 | result.await.and_then(|r| {
|
5650 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::NoInputAndOutputOutput>(py))
|
6069 + | ::pyo3::Python::with_gil(|py| {
|
6070 + | r.extract::<crate::output::DuplexStreamWithInitialMessagesOutput>(py)
|
6071 + | })
|
5651 6072 | })
|
5652 6073 | } else {
|
5653 6074 | ::tracing::trace!(
|
5654 - | name = "no_input_and_output",
|
6075 + | name = "duplex_stream_with_initial_messages",
|
5655 6076 | "executing python handler function"
|
5656 6077 | );
|
5657 6078 | ::pyo3::Python::with_gil(|py| {
|
5658 6079 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5659 6080 | let output = if handler.args == 1 {
|
5660 6081 | pyhandler.call1((input,))?
|
5661 6082 | } else {
|
5662 6083 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5663 6084 | };
|
5664 - | output.extract::<crate::output::NoInputAndOutputOutput>()
|
6085 + | output.extract::<crate::output::DuplexStreamWithInitialMessagesOutput>()
|
5665 6086 | })
|
5666 6087 | };
|
5667 6088 | // Catch and record a Python traceback.
|
5668 6089 | result.map_err(|e| {
|
5669 6090 | let rich_py_err =
|
5670 6091 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
5671 6092 | e.clone_ref(py)
|
5672 6093 | }));
|
5673 6094 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
5674 6095 | e.into()
|
5675 6096 | })
|
5676 6097 | }
|
5677 6098 |
|
5678 - | /// Python handler for operation `NoInputAndNoOutput`.
|
5679 - | pub(crate) async fn no_input_and_no_output(
|
5680 - | input: crate::input::NoInputAndNoOutputInput,
|
6099 + | /// Python handler for operation `DuplexStreamWithDistinctStreams`.
|
6100 + | pub(crate) async fn duplex_stream_with_distinct_streams(
|
6101 + | input: crate::input::DuplexStreamWithDistinctStreamsInput,
|
5681 6102 | state: ::aws_smithy_legacy_http_server::Extension<
|
5682 6103 | ::aws_smithy_http_server_python::context::PyContext,
|
5683 6104 | >,
|
5684 6105 | handler: ::aws_smithy_http_server_python::PyHandler,
|
5685 6106 | ) -> std::result::Result<
|
5686 - | crate::output::NoInputAndNoOutputOutput,
|
5687 - | crate::error::NoInputAndNoOutputError,
|
6107 + | crate::output::DuplexStreamWithDistinctStreamsOutput,
|
6108 + | crate::error::DuplexStreamWithDistinctStreamsError,
|
5688 6109 | > {
|
5689 6110 | // Async block used to run the handler and catch any Python error.
|
5690 6111 | let result = if handler.is_coroutine {
|
5691 6112 | ::tracing::trace!(
|
5692 - | name = "no_input_and_no_output",
|
6113 + | name = "duplex_stream_with_distinct_streams",
|
5693 6114 | "executing python handler coroutine"
|
5694 6115 | );
|
5695 6116 | let result = ::pyo3::Python::with_gil(|py| {
|
5696 6117 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5697 6118 | let coroutine = if handler.args == 1 {
|
5698 6119 | pyhandler.call1((input,))?
|
5699 6120 | } else {
|
5700 6121 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5701 6122 | };
|
5702 6123 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
5703 6124 | })?;
|
5704 6125 | result.await.and_then(|r| {
|
5705 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::NoInputAndNoOutputOutput>(py))
|
6126 + | ::pyo3::Python::with_gil(|py| {
|
6127 + | r.extract::<crate::output::DuplexStreamWithDistinctStreamsOutput>(py)
|
6128 + | })
|
5706 6129 | })
|
5707 6130 | } else {
|
5708 6131 | ::tracing::trace!(
|
5709 - | name = "no_input_and_no_output",
|
6132 + | name = "duplex_stream_with_distinct_streams",
|
5710 6133 | "executing python handler function"
|
5711 6134 | );
|
5712 6135 | ::pyo3::Python::with_gil(|py| {
|
5713 6136 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
5714 6137 | let output = if handler.args == 1 {
|
5715 6138 | pyhandler.call1((input,))?
|
5716 6139 | } else {
|
5717 6140 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
5718 6141 | };
|
5719 - | output.extract::<crate::output::NoInputAndNoOutputOutput>()
|
6142 + | output.extract::<crate::output::DuplexStreamWithDistinctStreamsOutput>()
|
5720 6143 | })
|
5721 6144 | };
|
5722 6145 | // Catch and record a Python traceback.
|
5723 6146 | result.map_err(|e| {
|
5724 6147 | let rich_py_err =
|
5725 6148 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
5726 6149 | e.clone_ref(py)
|
5727 6150 | }));
|
5728 6151 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
5729 6152 | e.into()
|