1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - | /// Python handler for operation `ContentTypeParameters`.
|
3 - | pub(crate) async fn content_type_parameters(
|
4 - | input: crate::input::ContentTypeParametersInput,
|
2 + | /// Python handler for operation `EmptyOperation`.
|
3 + | pub(crate) async fn empty_operation(
|
4 + | input: crate::input::EmptyOperationInput,
|
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 - | ) -> std::result::Result<
|
10 - | crate::output::ContentTypeParametersOutput,
|
11 - | crate::error::ContentTypeParametersError,
|
12 - | > {
|
9 + | ) -> std::result::Result<crate::output::EmptyOperationOutput, crate::error::EmptyOperationError> {
|
13 10 | // Async block used to run the handler and catch any Python error.
|
14 11 | let result = if handler.is_coroutine {
|
15 12 | ::tracing::trace!(
|
16 - | name = "content_type_parameters",
|
13 + | name = "empty_operation",
|
17 14 | "executing python handler coroutine"
|
18 15 | );
|
19 16 | let result = ::pyo3::Python::with_gil(|py| {
|
20 17 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
21 18 | let coroutine = if handler.args == 1 {
|
22 19 | pyhandler.call1((input,))?
|
23 20 | } else {
|
24 21 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
25 22 | };
|
26 23 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
27 24 | })?;
|
28 25 | result.await.and_then(|r| {
|
29 - | ::pyo3::Python::with_gil(|py| {
|
30 - | r.extract::<crate::output::ContentTypeParametersOutput>(py)
|
31 - | })
|
26 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::EmptyOperationOutput>(py))
|
32 27 | })
|
33 28 | } else {
|
34 29 | ::tracing::trace!(
|
35 - | name = "content_type_parameters",
|
30 + | name = "empty_operation",
|
36 31 | "executing python handler function"
|
37 32 | );
|
38 33 | ::pyo3::Python::with_gil(|py| {
|
39 34 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
40 35 | let output = if handler.args == 1 {
|
41 36 | pyhandler.call1((input,))?
|
42 37 | } else {
|
43 38 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
44 39 | };
|
45 - | output.extract::<crate::output::ContentTypeParametersOutput>()
|
40 + | output.extract::<crate::output::EmptyOperationOutput>()
|
46 41 | })
|
47 42 | };
|
48 43 | // Catch and record a Python traceback.
|
49 44 | result.map_err(|e| {
|
50 45 | let rich_py_err =
|
51 46 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
52 47 | e.clone_ref(py)
|
53 48 | }));
|
54 49 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
55 50 | e.into()
|
56 51 | })
|
57 52 | }
|
58 53 |
|
59 - | /// Python handler for operation `PutWithContentEncoding`.
|
60 - | pub(crate) async fn put_with_content_encoding(
|
61 - | input: crate::input::PutWithContentEncodingInput,
|
54 + | /// Python handler for operation `KitchenSinkOperation`.
|
55 + | pub(crate) async fn kitchen_sink_operation(
|
56 + | input: crate::input::KitchenSinkOperationInput,
|
62 57 | state: ::aws_smithy_legacy_http_server::Extension<
|
63 58 | ::aws_smithy_http_server_python::context::PyContext,
|
64 59 | >,
|
65 60 | handler: ::aws_smithy_http_server_python::PyHandler,
|
66 61 | ) -> std::result::Result<
|
67 - | crate::output::PutWithContentEncodingOutput,
|
68 - | crate::error::PutWithContentEncodingError,
|
62 + | crate::output::KitchenSinkOperationOutput,
|
63 + | crate::error::KitchenSinkOperationError,
|
69 64 | > {
|
70 65 | // Async block used to run the handler and catch any Python error.
|
71 66 | let result = if handler.is_coroutine {
|
72 67 | ::tracing::trace!(
|
73 - | name = "put_with_content_encoding",
|
68 + | name = "kitchen_sink_operation",
|
74 69 | "executing python handler coroutine"
|
75 70 | );
|
76 71 | let result = ::pyo3::Python::with_gil(|py| {
|
77 72 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
78 73 | let coroutine = if handler.args == 1 {
|
79 74 | pyhandler.call1((input,))?
|
80 75 | } else {
|
81 76 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
82 77 | };
|
83 78 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
84 79 | })?;
|
85 80 | result.await.and_then(|r| {
|
86 81 | ::pyo3::Python::with_gil(|py| {
|
87 - | r.extract::<crate::output::PutWithContentEncodingOutput>(py)
|
82 + | r.extract::<crate::output::KitchenSinkOperationOutput>(py)
|
88 83 | })
|
89 84 | })
|
90 85 | } else {
|
91 86 | ::tracing::trace!(
|
92 - | name = "put_with_content_encoding",
|
87 + | name = "kitchen_sink_operation",
|
93 88 | "executing python handler function"
|
94 89 | );
|
95 90 | ::pyo3::Python::with_gil(|py| {
|
96 91 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
97 92 | let output = if handler.args == 1 {
|
98 93 | pyhandler.call1((input,))?
|
99 94 | } else {
|
100 95 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
101 96 | };
|
102 - | output.extract::<crate::output::PutWithContentEncodingOutput>()
|
97 + | output.extract::<crate::output::KitchenSinkOperationOutput>()
|
103 98 | })
|
104 99 | };
|
105 100 | // Catch and record a Python traceback.
|
106 101 | result.map_err(|e| {
|
107 102 | let rich_py_err =
|
108 103 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
109 104 | e.clone_ref(py)
|
110 105 | }));
|
111 106 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
112 107 | e.into()
|
113 108 | })
|
114 109 | }
|
115 110 |
|
116 - | /// Python handler for operation `FractionalSeconds`.
|
117 - | pub(crate) async fn fractional_seconds(
|
118 - | input: crate::input::FractionalSecondsInput,
|
111 + | /// Python handler for operation `SimpleScalarProperties`.
|
112 + | pub(crate) async fn simple_scalar_properties(
|
113 + | input: crate::input::SimpleScalarPropertiesInput,
|
119 114 | state: ::aws_smithy_legacy_http_server::Extension<
|
120 115 | ::aws_smithy_http_server_python::context::PyContext,
|
121 116 | >,
|
122 117 | handler: ::aws_smithy_http_server_python::PyHandler,
|
123 - | ) -> std::result::Result<crate::output::FractionalSecondsOutput, crate::error::FractionalSecondsError>
|
124 - | {
|
118 + | ) -> std::result::Result<
|
119 + | crate::output::SimpleScalarPropertiesOutput,
|
120 + | crate::error::SimpleScalarPropertiesError,
|
121 + | > {
|
125 122 | // Async block used to run the handler and catch any Python error.
|
126 123 | let result = if handler.is_coroutine {
|
127 124 | ::tracing::trace!(
|
128 - | name = "fractional_seconds",
|
125 + | name = "simple_scalar_properties",
|
129 126 | "executing python handler coroutine"
|
130 127 | );
|
131 128 | let result = ::pyo3::Python::with_gil(|py| {
|
132 129 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
133 130 | let coroutine = if handler.args == 1 {
|
134 131 | pyhandler.call1((input,))?
|
135 132 | } else {
|
136 133 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
137 134 | };
|
138 135 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
139 136 | })?;
|
140 137 | result.await.and_then(|r| {
|
141 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::FractionalSecondsOutput>(py))
|
138 + | ::pyo3::Python::with_gil(|py| {
|
139 + | r.extract::<crate::output::SimpleScalarPropertiesOutput>(py)
|
140 + | })
|
142 141 | })
|
143 142 | } else {
|
144 143 | ::tracing::trace!(
|
145 - | name = "fractional_seconds",
|
144 + | name = "simple_scalar_properties",
|
146 145 | "executing python handler function"
|
147 146 | );
|
148 147 | ::pyo3::Python::with_gil(|py| {
|
149 148 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
150 149 | let output = if handler.args == 1 {
|
151 150 | pyhandler.call1((input,))?
|
152 151 | } else {
|
153 152 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
154 153 | };
|
155 - | output.extract::<crate::output::FractionalSecondsOutput>()
|
154 + | output.extract::<crate::output::SimpleScalarPropertiesOutput>()
|
156 155 | })
|
157 156 | };
|
158 157 | // Catch and record a Python traceback.
|
159 158 | result.map_err(|e| {
|
160 159 | let rich_py_err =
|
161 160 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
162 161 | e.clone_ref(py)
|
163 162 | }));
|
164 163 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
165 164 | e.into()
|
166 165 | })
|
167 166 | }
|
168 167 |
|
169 - | /// Python handler for operation `DatetimeOffsets`.
|
170 - | pub(crate) async fn datetime_offsets(
|
171 - | input: crate::input::DatetimeOffsetsInput,
|
168 + | /// Python handler for operation `OperationWithOptionalInputOutput`.
|
169 + | pub(crate) async fn operation_with_optional_input_output(
|
170 + | input: crate::input::OperationWithOptionalInputOutputInput,
|
172 171 | state: ::aws_smithy_legacy_http_server::Extension<
|
173 172 | ::aws_smithy_http_server_python::context::PyContext,
|
174 173 | >,
|
175 174 | handler: ::aws_smithy_http_server_python::PyHandler,
|
176 - | ) -> std::result::Result<crate::output::DatetimeOffsetsOutput, crate::error::DatetimeOffsetsError> {
|
175 + | ) -> std::result::Result<
|
176 + | crate::output::OperationWithOptionalInputOutputOutput,
|
177 + | crate::error::OperationWithOptionalInputOutputError,
|
178 + | > {
|
177 179 | // Async block used to run the handler and catch any Python error.
|
178 180 | let result = if handler.is_coroutine {
|
179 181 | ::tracing::trace!(
|
180 - | name = "datetime_offsets",
|
182 + | name = "operation_with_optional_input_output",
|
181 183 | "executing python handler coroutine"
|
182 184 | );
|
183 185 | let result = ::pyo3::Python::with_gil(|py| {
|
184 186 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
185 187 | let coroutine = if handler.args == 1 {
|
186 188 | pyhandler.call1((input,))?
|
187 189 | } else {
|
188 190 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
189 191 | };
|
190 192 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
191 193 | })?;
|
192 194 | result.await.and_then(|r| {
|
193 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::DatetimeOffsetsOutput>(py))
|
195 + | ::pyo3::Python::with_gil(|py| {
|
196 + | r.extract::<crate::output::OperationWithOptionalInputOutputOutput>(py)
|
197 + | })
|
194 198 | })
|
195 199 | } else {
|
196 200 | ::tracing::trace!(
|
197 - | name = "datetime_offsets",
|
201 + | name = "operation_with_optional_input_output",
|
198 202 | "executing python handler function"
|
199 203 | );
|
200 204 | ::pyo3::Python::with_gil(|py| {
|
201 205 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
202 206 | let output = if handler.args == 1 {
|
203 207 | pyhandler.call1((input,))?
|
204 208 | } else {
|
205 209 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
206 210 | };
|
207 - | output.extract::<crate::output::DatetimeOffsetsOutput>()
|
211 + | output.extract::<crate::output::OperationWithOptionalInputOutputOutput>()
|
208 212 | })
|
209 213 | };
|
210 214 | // Catch and record a Python traceback.
|
211 215 | result.map_err(|e| {
|
212 216 | let rich_py_err =
|
213 217 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
214 218 | e.clone_ref(py)
|
215 219 | }));
|
216 220 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
217 221 | e.into()
|
218 222 | })
|
219 223 | }
|
220 224 |
|
221 - | /// Python handler for operation `HostWithPathOperation`.
|
222 - | pub(crate) async fn host_with_path_operation(
|
223 - | input: crate::input::HostWithPathOperationInput,
|
225 + | /// Python handler for operation `PutAndGetInlineDocuments`.
|
226 + | pub(crate) async fn put_and_get_inline_documents(
|
227 + | input: crate::input::PutAndGetInlineDocumentsInput,
|
224 228 | state: ::aws_smithy_legacy_http_server::Extension<
|
225 229 | ::aws_smithy_http_server_python::context::PyContext,
|
226 230 | >,
|
227 231 | handler: ::aws_smithy_http_server_python::PyHandler,
|
228 232 | ) -> std::result::Result<
|
229 - | crate::output::HostWithPathOperationOutput,
|
230 - | crate::error::HostWithPathOperationError,
|
233 + | crate::output::PutAndGetInlineDocumentsOutput,
|
234 + | crate::error::PutAndGetInlineDocumentsError,
|
231 235 | > {
|
232 236 | // Async block used to run the handler and catch any Python error.
|
233 237 | let result = if handler.is_coroutine {
|
234 238 | ::tracing::trace!(
|
235 - | name = "host_with_path_operation",
|
239 + | name = "put_and_get_inline_documents",
|
236 240 | "executing python handler coroutine"
|
237 241 | );
|
238 242 | let result = ::pyo3::Python::with_gil(|py| {
|
239 243 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
240 244 | let coroutine = if handler.args == 1 {
|
241 245 | pyhandler.call1((input,))?
|
242 246 | } else {
|
243 247 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
244 248 | };
|
245 249 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
246 250 | })?;
|
247 251 | result.await.and_then(|r| {
|
248 252 | ::pyo3::Python::with_gil(|py| {
|
249 - | r.extract::<crate::output::HostWithPathOperationOutput>(py)
|
253 + | r.extract::<crate::output::PutAndGetInlineDocumentsOutput>(py)
|
250 254 | })
|
251 255 | })
|
252 256 | } else {
|
253 257 | ::tracing::trace!(
|
254 - | name = "host_with_path_operation",
|
258 + | name = "put_and_get_inline_documents",
|
255 259 | "executing python handler function"
|
256 260 | );
|
257 261 | ::pyo3::Python::with_gil(|py| {
|
258 262 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
259 263 | let output = if handler.args == 1 {
|
260 264 | pyhandler.call1((input,))?
|
261 265 | } else {
|
262 266 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
263 267 | };
|
264 - | output.extract::<crate::output::HostWithPathOperationOutput>()
|
268 + | output.extract::<crate::output::PutAndGetInlineDocumentsOutput>()
|
265 269 | })
|
266 270 | };
|
267 271 | // Catch and record a Python traceback.
|
268 272 | result.map_err(|e| {
|
269 273 | let rich_py_err =
|
270 274 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
271 275 | e.clone_ref(py)
|
272 276 | }));
|
273 277 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
274 278 | e.into()
|
275 279 | })
|
276 280 | }
|
277 281 |
|
278 - | /// Python handler for operation `EndpointWithHostLabelOperation`.
|
279 - | pub(crate) async fn endpoint_with_host_label_operation(
|
280 - | input: crate::input::EndpointWithHostLabelOperationInput,
|
282 + | /// Python handler for operation `JsonEnums`.
|
283 + | pub(crate) async fn json_enums(
|
284 + | input: crate::input::JsonEnumsInput,
|
281 285 | state: ::aws_smithy_legacy_http_server::Extension<
|
282 286 | ::aws_smithy_http_server_python::context::PyContext,
|
283 287 | >,
|
284 288 | handler: ::aws_smithy_http_server_python::PyHandler,
|
285 - | ) -> std::result::Result<
|
286 - | crate::output::EndpointWithHostLabelOperationOutput,
|
287 - | crate::error::EndpointWithHostLabelOperationError,
|
288 - | > {
|
289 + | ) -> std::result::Result<crate::output::JsonEnumsOutput, crate::error::JsonEnumsError> {
|
289 290 | // Async block used to run the handler and catch any Python error.
|
290 291 | let result = if handler.is_coroutine {
|
291 - | ::tracing::trace!(
|
292 - | name = "endpoint_with_host_label_operation",
|
293 - | "executing python handler coroutine"
|
294 - | );
|
292 + | ::tracing::trace!(name = "json_enums", "executing python handler coroutine");
|
295 293 | let result = ::pyo3::Python::with_gil(|py| {
|
296 294 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
297 295 | let coroutine = if handler.args == 1 {
|
298 296 | pyhandler.call1((input,))?
|
299 297 | } else {
|
300 298 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
301 299 | };
|
302 300 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
303 301 | })?;
|
304 302 | result.await.and_then(|r| {
|
305 - | ::pyo3::Python::with_gil(|py| {
|
306 - | r.extract::<crate::output::EndpointWithHostLabelOperationOutput>(py)
|
307 - | })
|
303 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonEnumsOutput>(py))
|
308 304 | })
|
309 305 | } else {
|
310 - | ::tracing::trace!(
|
311 - | name = "endpoint_with_host_label_operation",
|
312 - | "executing python handler function"
|
313 - | );
|
306 + | ::tracing::trace!(name = "json_enums", "executing python handler function");
|
314 307 | ::pyo3::Python::with_gil(|py| {
|
315 308 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
316 309 | let output = if handler.args == 1 {
|
317 310 | pyhandler.call1((input,))?
|
318 311 | } else {
|
319 312 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
320 313 | };
|
321 - | output.extract::<crate::output::EndpointWithHostLabelOperationOutput>()
|
314 + | output.extract::<crate::output::JsonEnumsOutput>()
|
322 315 | })
|
323 316 | };
|
324 317 | // Catch and record a Python traceback.
|
325 318 | result.map_err(|e| {
|
326 319 | let rich_py_err =
|
327 320 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
328 321 | e.clone_ref(py)
|
329 322 | }));
|
330 323 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
331 324 | e.into()
|
332 325 | })
|
333 326 | }
|
334 327 |
|
335 - | /// Python handler for operation `EndpointOperation`.
|
336 - | pub(crate) async fn endpoint_operation(
|
337 - | input: crate::input::EndpointOperationInput,
|
328 + | /// Python handler for operation `JsonIntEnums`.
|
329 + | pub(crate) async fn json_int_enums(
|
330 + | input: crate::input::JsonIntEnumsInput,
|
338 331 | state: ::aws_smithy_legacy_http_server::Extension<
|
339 332 | ::aws_smithy_http_server_python::context::PyContext,
|
340 333 | >,
|
341 334 | handler: ::aws_smithy_http_server_python::PyHandler,
|
342 - | ) -> std::result::Result<crate::output::EndpointOperationOutput, crate::error::EndpointOperationError>
|
343 - | {
|
335 + | ) -> std::result::Result<crate::output::JsonIntEnumsOutput, crate::error::JsonIntEnumsError> {
|
344 336 | // Async block used to run the handler and catch any Python error.
|
345 337 | let result = if handler.is_coroutine {
|
346 338 | ::tracing::trace!(
|
347 - | name = "endpoint_operation",
|
339 + | name = "json_int_enums",
|
348 340 | "executing python handler coroutine"
|
349 341 | );
|
350 342 | let result = ::pyo3::Python::with_gil(|py| {
|
351 343 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
352 344 | let coroutine = if handler.args == 1 {
|
353 345 | pyhandler.call1((input,))?
|
354 346 | } else {
|
355 347 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
356 348 | };
|
357 349 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
358 350 | })?;
|
359 351 | result.await.and_then(|r| {
|
360 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::EndpointOperationOutput>(py))
|
352 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonIntEnumsOutput>(py))
|
361 353 | })
|
362 354 | } else {
|
363 - | ::tracing::trace!(
|
364 - | name = "endpoint_operation",
|
365 - | "executing python handler function"
|
366 - | );
|
355 + | ::tracing::trace!(name = "json_int_enums", "executing python handler function");
|
367 356 | ::pyo3::Python::with_gil(|py| {
|
368 357 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
369 358 | let output = if handler.args == 1 {
|
370 359 | pyhandler.call1((input,))?
|
371 360 | } else {
|
372 361 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
373 362 | };
|
374 - | output.extract::<crate::output::EndpointOperationOutput>()
|
363 + | output.extract::<crate::output::JsonIntEnumsOutput>()
|
375 364 | })
|
376 365 | };
|
377 366 | // Catch and record a Python traceback.
|
378 367 | result.map_err(|e| {
|
379 368 | let rich_py_err =
|
380 369 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
381 370 | e.clone_ref(py)
|
382 371 | }));
|
383 372 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
384 373 | e.into()
|
385 374 | })
|
386 375 | }
|
387 376 |
|
388 - | /// Python handler for operation `JsonUnions`.
|
389 - | pub(crate) async fn json_unions(
|
390 - | input: crate::input::JsonUnionsInput,
|
377 + | /// Python handler for operation `NullOperation`.
|
378 + | pub(crate) async fn null_operation(
|
379 + | input: crate::input::NullOperationInput,
|
391 380 | state: ::aws_smithy_legacy_http_server::Extension<
|
392 381 | ::aws_smithy_http_server_python::context::PyContext,
|
393 382 | >,
|
394 383 | handler: ::aws_smithy_http_server_python::PyHandler,
|
395 - | ) -> std::result::Result<crate::output::JsonUnionsOutput, crate::error::JsonUnionsError> {
|
384 + | ) -> std::result::Result<crate::output::NullOperationOutput, crate::error::NullOperationError> {
|
396 385 | // Async block used to run the handler and catch any Python error.
|
397 386 | let result = if handler.is_coroutine {
|
398 - | ::tracing::trace!(name = "json_unions", "executing python handler coroutine");
|
387 + | ::tracing::trace!(
|
388 + | name = "null_operation",
|
389 + | "executing python handler coroutine"
|
390 + | );
|
399 391 | let result = ::pyo3::Python::with_gil(|py| {
|
400 392 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
401 393 | let coroutine = if handler.args == 1 {
|
402 394 | pyhandler.call1((input,))?
|
403 395 | } else {
|
404 396 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
405 397 | };
|
406 398 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
407 399 | })?;
|
408 400 | result.await.and_then(|r| {
|
409 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonUnionsOutput>(py))
|
401 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::NullOperationOutput>(py))
|
410 402 | })
|
411 403 | } else {
|
412 - | ::tracing::trace!(name = "json_unions", "executing python handler function");
|
404 + | ::tracing::trace!(name = "null_operation", "executing python handler function");
|
413 405 | ::pyo3::Python::with_gil(|py| {
|
414 406 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
415 407 | let output = if handler.args == 1 {
|
416 408 | pyhandler.call1((input,))?
|
417 409 | } else {
|
418 410 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
419 411 | };
|
420 - | output.extract::<crate::output::JsonUnionsOutput>()
|
412 + | output.extract::<crate::output::NullOperationOutput>()
|
421 413 | })
|
422 414 | };
|
423 415 | // Catch and record a Python traceback.
|
424 416 | result.map_err(|e| {
|
425 417 | let rich_py_err =
|
426 418 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
427 419 | e.clone_ref(py)
|
428 420 | }));
|
429 421 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
430 422 | e.into()
|
431 423 | })
|
432 424 | }
|
433 425 |
|
434 - | /// Python handler for operation `GreetingWithErrors`.
|
435 - | pub(crate) async fn greeting_with_errors(
|
436 - | input: crate::input::GreetingWithErrorsInput,
|
426 + | /// Python handler for operation `SparseNullsOperation`.
|
427 + | pub(crate) async fn sparse_nulls_operation(
|
428 + | input: crate::input::SparseNullsOperationInput,
|
437 429 | state: ::aws_smithy_legacy_http_server::Extension<
|
438 430 | ::aws_smithy_http_server_python::context::PyContext,
|
439 431 | >,
|
440 432 | handler: ::aws_smithy_http_server_python::PyHandler,
|
441 433 | ) -> std::result::Result<
|
442 - | crate::output::GreetingWithErrorsOutput,
|
443 - | crate::error::GreetingWithErrorsError,
|
434 + | crate::output::SparseNullsOperationOutput,
|
435 + | crate::error::SparseNullsOperationError,
|
444 436 | > {
|
445 437 | // Async block used to run the handler and catch any Python error.
|
446 438 | let result = if handler.is_coroutine {
|
447 439 | ::tracing::trace!(
|
448 - | name = "greeting_with_errors",
|
440 + | name = "sparse_nulls_operation",
|
449 441 | "executing python handler coroutine"
|
450 442 | );
|
451 443 | let result = ::pyo3::Python::with_gil(|py| {
|
452 444 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
453 445 | let coroutine = if handler.args == 1 {
|
454 446 | pyhandler.call1((input,))?
|
455 447 | } else {
|
456 448 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
457 449 | };
|
458 450 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
459 451 | })?;
|
460 452 | result.await.and_then(|r| {
|
461 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::GreetingWithErrorsOutput>(py))
|
453 + | ::pyo3::Python::with_gil(|py| {
|
454 + | r.extract::<crate::output::SparseNullsOperationOutput>(py)
|
455 + | })
|
462 456 | })
|
463 457 | } else {
|
464 458 | ::tracing::trace!(
|
465 - | name = "greeting_with_errors",
|
459 + | name = "sparse_nulls_operation",
|
466 460 | "executing python handler function"
|
467 461 | );
|
468 462 | ::pyo3::Python::with_gil(|py| {
|
469 463 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
470 464 | let output = if handler.args == 1 {
|
471 465 | pyhandler.call1((input,))?
|
472 466 | } else {
|
473 467 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
474 468 | };
|
475 - | output.extract::<crate::output::GreetingWithErrorsOutput>()
|
469 + | output.extract::<crate::output::SparseNullsOperationOutput>()
|
476 470 | })
|
477 471 | };
|
478 472 | // Catch and record a Python traceback.
|
479 473 | result.map_err(|e| {
|
480 474 | let rich_py_err =
|
481 475 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
482 476 | e.clone_ref(py)
|
483 477 | }));
|
484 478 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
485 479 | e.into()
|
486 480 | })
|
487 481 | }
|
488 482 |
|
489 - | /// Python handler for operation `SparseNullsOperation`.
|
490 - | pub(crate) async fn sparse_nulls_operation(
|
491 - | input: crate::input::SparseNullsOperationInput,
|
483 + | /// Python handler for operation `GreetingWithErrors`.
|
484 + | pub(crate) async fn greeting_with_errors(
|
485 + | input: crate::input::GreetingWithErrorsInput,
|
492 486 | state: ::aws_smithy_legacy_http_server::Extension<
|
493 487 | ::aws_smithy_http_server_python::context::PyContext,
|
494 488 | >,
|
495 489 | handler: ::aws_smithy_http_server_python::PyHandler,
|
496 490 | ) -> std::result::Result<
|
497 - | crate::output::SparseNullsOperationOutput,
|
498 - | crate::error::SparseNullsOperationError,
|
491 + | crate::output::GreetingWithErrorsOutput,
|
492 + | crate::error::GreetingWithErrorsError,
|
499 493 | > {
|
500 494 | // Async block used to run the handler and catch any Python error.
|
501 495 | let result = if handler.is_coroutine {
|
502 496 | ::tracing::trace!(
|
503 - | name = "sparse_nulls_operation",
|
497 + | name = "greeting_with_errors",
|
504 498 | "executing python handler coroutine"
|
505 499 | );
|
506 500 | let result = ::pyo3::Python::with_gil(|py| {
|
507 501 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
508 502 | let coroutine = if handler.args == 1 {
|
509 503 | pyhandler.call1((input,))?
|
510 504 | } else {
|
511 505 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
512 506 | };
|
513 507 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
514 508 | })?;
|
515 509 | result.await.and_then(|r| {
|
516 - | ::pyo3::Python::with_gil(|py| {
|
517 - | r.extract::<crate::output::SparseNullsOperationOutput>(py)
|
518 - | })
|
510 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::GreetingWithErrorsOutput>(py))
|
519 511 | })
|
520 512 | } else {
|
521 513 | ::tracing::trace!(
|
522 - | name = "sparse_nulls_operation",
|
514 + | name = "greeting_with_errors",
|
523 515 | "executing python handler function"
|
524 516 | );
|
525 517 | ::pyo3::Python::with_gil(|py| {
|
526 518 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
527 519 | let output = if handler.args == 1 {
|
528 520 | pyhandler.call1((input,))?
|
529 521 | } else {
|
530 522 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
531 523 | };
|
532 - | output.extract::<crate::output::SparseNullsOperationOutput>()
|
524 + | output.extract::<crate::output::GreetingWithErrorsOutput>()
|
533 525 | })
|
534 526 | };
|
535 527 | // Catch and record a Python traceback.
|
536 528 | result.map_err(|e| {
|
537 529 | let rich_py_err =
|
538 530 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
539 531 | e.clone_ref(py)
|
540 532 | }));
|
541 533 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
542 534 | e.into()
|
543 535 | })
|
544 536 | }
|
545 537 |
|
546 - | /// Python handler for operation `NullOperation`.
|
547 - | pub(crate) async fn null_operation(
|
548 - | input: crate::input::NullOperationInput,
|
538 + | /// Python handler for operation `JsonUnions`.
|
539 + | pub(crate) async fn json_unions(
|
540 + | input: crate::input::JsonUnionsInput,
|
549 541 | state: ::aws_smithy_legacy_http_server::Extension<
|
550 542 | ::aws_smithy_http_server_python::context::PyContext,
|
551 543 | >,
|
552 544 | handler: ::aws_smithy_http_server_python::PyHandler,
|
553 - | ) -> std::result::Result<crate::output::NullOperationOutput, crate::error::NullOperationError> {
|
545 + | ) -> std::result::Result<crate::output::JsonUnionsOutput, crate::error::JsonUnionsError> {
|
554 546 | // Async block used to run the handler and catch any Python error.
|
555 547 | let result = if handler.is_coroutine {
|
556 - | ::tracing::trace!(
|
557 - | name = "null_operation",
|
558 - | "executing python handler coroutine"
|
559 - | );
|
548 + | ::tracing::trace!(name = "json_unions", "executing python handler coroutine");
|
560 549 | let result = ::pyo3::Python::with_gil(|py| {
|
561 550 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
562 551 | let coroutine = if handler.args == 1 {
|
563 552 | pyhandler.call1((input,))?
|
564 553 | } else {
|
565 554 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
566 555 | };
|
567 556 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
568 557 | })?;
|
569 558 | result.await.and_then(|r| {
|
570 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::NullOperationOutput>(py))
|
559 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonUnionsOutput>(py))
|
571 560 | })
|
572 561 | } else {
|
573 - | ::tracing::trace!(name = "null_operation", "executing python handler function");
|
562 + | ::tracing::trace!(name = "json_unions", "executing python handler function");
|
574 563 | ::pyo3::Python::with_gil(|py| {
|
575 564 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
576 565 | let output = if handler.args == 1 {
|
577 566 | pyhandler.call1((input,))?
|
578 567 | } else {
|
579 568 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
580 569 | };
|
581 - | output.extract::<crate::output::NullOperationOutput>()
|
570 + | output.extract::<crate::output::JsonUnionsOutput>()
|
582 571 | })
|
583 572 | };
|
584 573 | // Catch and record a Python traceback.
|
585 574 | result.map_err(|e| {
|
586 575 | let rich_py_err =
|
587 576 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
588 577 | e.clone_ref(py)
|
589 578 | }));
|
590 579 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
591 580 | e.into()
|
592 581 | })
|
593 582 | }
|
594 583 |
|
595 - | /// Python handler for operation `JsonIntEnums`.
|
596 - | pub(crate) async fn json_int_enums(
|
597 - | input: crate::input::JsonIntEnumsInput,
|
584 + | /// Python handler for operation `EndpointOperation`.
|
585 + | pub(crate) async fn endpoint_operation(
|
586 + | input: crate::input::EndpointOperationInput,
|
598 587 | state: ::aws_smithy_legacy_http_server::Extension<
|
599 588 | ::aws_smithy_http_server_python::context::PyContext,
|
600 589 | >,
|
601 590 | handler: ::aws_smithy_http_server_python::PyHandler,
|
602 - | ) -> std::result::Result<crate::output::JsonIntEnumsOutput, crate::error::JsonIntEnumsError> {
|
591 + | ) -> std::result::Result<crate::output::EndpointOperationOutput, crate::error::EndpointOperationError>
|
592 + | {
|
603 593 | // Async block used to run the handler and catch any Python error.
|
604 594 | let result = if handler.is_coroutine {
|
605 595 | ::tracing::trace!(
|
606 - | name = "json_int_enums",
|
596 + | name = "endpoint_operation",
|
607 597 | "executing python handler coroutine"
|
608 598 | );
|
609 599 | let result = ::pyo3::Python::with_gil(|py| {
|
610 600 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
611 601 | let coroutine = if handler.args == 1 {
|
612 602 | pyhandler.call1((input,))?
|
613 603 | } else {
|
614 604 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
615 605 | };
|
616 606 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
617 607 | })?;
|
618 608 | result.await.and_then(|r| {
|
619 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonIntEnumsOutput>(py))
|
609 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::EndpointOperationOutput>(py))
|
620 610 | })
|
621 611 | } else {
|
622 - | ::tracing::trace!(name = "json_int_enums", "executing python handler function");
|
612 + | ::tracing::trace!(
|
613 + | name = "endpoint_operation",
|
614 + | "executing python handler function"
|
615 + | );
|
623 616 | ::pyo3::Python::with_gil(|py| {
|
624 617 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
625 618 | let output = if handler.args == 1 {
|
626 619 | pyhandler.call1((input,))?
|
627 620 | } else {
|
628 621 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
629 622 | };
|
630 - | output.extract::<crate::output::JsonIntEnumsOutput>()
|
623 + | output.extract::<crate::output::EndpointOperationOutput>()
|
631 624 | })
|
632 625 | };
|
633 626 | // Catch and record a Python traceback.
|
634 627 | result.map_err(|e| {
|
635 628 | let rich_py_err =
|
636 629 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
637 630 | e.clone_ref(py)
|
638 631 | }));
|
639 632 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
640 633 | e.into()
|
641 634 | })
|
642 635 | }
|
643 636 |
|
644 - | /// Python handler for operation `JsonEnums`.
|
645 - | pub(crate) async fn json_enums(
|
646 - | input: crate::input::JsonEnumsInput,
|
637 + | /// Python handler for operation `EndpointWithHostLabelOperation`.
|
638 + | pub(crate) async fn endpoint_with_host_label_operation(
|
639 + | input: crate::input::EndpointWithHostLabelOperationInput,
|
647 640 | state: ::aws_smithy_legacy_http_server::Extension<
|
648 641 | ::aws_smithy_http_server_python::context::PyContext,
|
649 642 | >,
|
650 643 | handler: ::aws_smithy_http_server_python::PyHandler,
|
651 - | ) -> std::result::Result<crate::output::JsonEnumsOutput, crate::error::JsonEnumsError> {
|
644 + | ) -> std::result::Result<
|
645 + | crate::output::EndpointWithHostLabelOperationOutput,
|
646 + | crate::error::EndpointWithHostLabelOperationError,
|
647 + | > {
|
652 648 | // Async block used to run the handler and catch any Python error.
|
653 649 | let result = if handler.is_coroutine {
|
654 - | ::tracing::trace!(name = "json_enums", "executing python handler coroutine");
|
650 + | ::tracing::trace!(
|
651 + | name = "endpoint_with_host_label_operation",
|
652 + | "executing python handler coroutine"
|
653 + | );
|
655 654 | let result = ::pyo3::Python::with_gil(|py| {
|
656 655 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
657 656 | let coroutine = if handler.args == 1 {
|
658 657 | pyhandler.call1((input,))?
|
659 658 | } else {
|
660 659 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
661 660 | };
|
662 661 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
663 662 | })?;
|
664 663 | result.await.and_then(|r| {
|
665 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonEnumsOutput>(py))
|
664 + | ::pyo3::Python::with_gil(|py| {
|
665 + | r.extract::<crate::output::EndpointWithHostLabelOperationOutput>(py)
|
666 + | })
|
666 667 | })
|
667 668 | } else {
|
668 - | ::tracing::trace!(name = "json_enums", "executing python handler function");
|
669 + | ::tracing::trace!(
|
670 + | name = "endpoint_with_host_label_operation",
|
671 + | "executing python handler function"
|
672 + | );
|
669 673 | ::pyo3::Python::with_gil(|py| {
|
670 674 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
671 675 | let output = if handler.args == 1 {
|
672 676 | pyhandler.call1((input,))?
|
673 677 | } else {
|
674 678 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
675 679 | };
|
676 - | output.extract::<crate::output::JsonEnumsOutput>()
|
680 + | output.extract::<crate::output::EndpointWithHostLabelOperationOutput>()
|
677 681 | })
|
678 682 | };
|
679 683 | // Catch and record a Python traceback.
|
680 684 | result.map_err(|e| {
|
681 685 | let rich_py_err =
|
682 686 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
683 687 | e.clone_ref(py)
|
684 688 | }));
|
685 689 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
686 690 | e.into()
|
687 691 | })
|
688 692 | }
|
689 693 |
|
690 - | /// Python handler for operation `PutAndGetInlineDocuments`.
|
691 - | pub(crate) async fn put_and_get_inline_documents(
|
692 - | input: crate::input::PutAndGetInlineDocumentsInput,
|
694 + | /// Python handler for operation `HostWithPathOperation`.
|
695 + | pub(crate) async fn host_with_path_operation(
|
696 + | input: crate::input::HostWithPathOperationInput,
|
693 697 | state: ::aws_smithy_legacy_http_server::Extension<
|
694 698 | ::aws_smithy_http_server_python::context::PyContext,
|
695 699 | >,
|
696 700 | handler: ::aws_smithy_http_server_python::PyHandler,
|
697 701 | ) -> std::result::Result<
|
698 - | crate::output::PutAndGetInlineDocumentsOutput,
|
699 - | crate::error::PutAndGetInlineDocumentsError,
|
702 + | crate::output::HostWithPathOperationOutput,
|
703 + | crate::error::HostWithPathOperationError,
|
700 704 | > {
|
701 705 | // Async block used to run the handler and catch any Python error.
|
702 706 | let result = if handler.is_coroutine {
|
703 707 | ::tracing::trace!(
|
704 - | name = "put_and_get_inline_documents",
|
708 + | name = "host_with_path_operation",
|
705 709 | "executing python handler coroutine"
|
706 710 | );
|
707 711 | let result = ::pyo3::Python::with_gil(|py| {
|
708 712 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
709 713 | let coroutine = if handler.args == 1 {
|
710 714 | pyhandler.call1((input,))?
|
711 715 | } else {
|
712 716 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
713 717 | };
|
714 718 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
715 719 | })?;
|
716 720 | result.await.and_then(|r| {
|
717 721 | ::pyo3::Python::with_gil(|py| {
|
718 - | r.extract::<crate::output::PutAndGetInlineDocumentsOutput>(py)
|
722 + | r.extract::<crate::output::HostWithPathOperationOutput>(py)
|
719 723 | })
|
720 724 | })
|
721 725 | } else {
|
722 726 | ::tracing::trace!(
|
723 - | name = "put_and_get_inline_documents",
|
727 + | name = "host_with_path_operation",
|
724 728 | "executing python handler function"
|
725 729 | );
|
726 730 | ::pyo3::Python::with_gil(|py| {
|
727 731 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
728 732 | let output = if handler.args == 1 {
|
729 733 | pyhandler.call1((input,))?
|
730 734 | } else {
|
731 735 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
732 736 | };
|
733 - | output.extract::<crate::output::PutAndGetInlineDocumentsOutput>()
|
737 + | output.extract::<crate::output::HostWithPathOperationOutput>()
|
734 738 | })
|
735 739 | };
|
736 740 | // Catch and record a Python traceback.
|
737 741 | result.map_err(|e| {
|
738 742 | let rich_py_err =
|
739 743 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
740 744 | e.clone_ref(py)
|
741 745 | }));
|
742 746 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
743 747 | e.into()
|
744 748 | })
|
745 749 | }
|
746 750 |
|
747 - | /// Python handler for operation `OperationWithOptionalInputOutput`.
|
748 - | pub(crate) async fn operation_with_optional_input_output(
|
749 - | input: crate::input::OperationWithOptionalInputOutputInput,
|
751 + | /// Python handler for operation `DatetimeOffsets`.
|
752 + | pub(crate) async fn datetime_offsets(
|
753 + | input: crate::input::DatetimeOffsetsInput,
|
750 754 | state: ::aws_smithy_legacy_http_server::Extension<
|
751 755 | ::aws_smithy_http_server_python::context::PyContext,
|
752 756 | >,
|
753 757 | handler: ::aws_smithy_http_server_python::PyHandler,
|
754 - | ) -> std::result::Result<
|
755 - | crate::output::OperationWithOptionalInputOutputOutput,
|
756 - | crate::error::OperationWithOptionalInputOutputError,
|
757 - | > {
|
758 + | ) -> std::result::Result<crate::output::DatetimeOffsetsOutput, crate::error::DatetimeOffsetsError> {
|
758 759 | // Async block used to run the handler and catch any Python error.
|
759 760 | let result = if handler.is_coroutine {
|
760 761 | ::tracing::trace!(
|
761 - | name = "operation_with_optional_input_output",
|
762 + | name = "datetime_offsets",
|
762 763 | "executing python handler coroutine"
|
763 764 | );
|
764 765 | let result = ::pyo3::Python::with_gil(|py| {
|
765 766 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
766 767 | let coroutine = if handler.args == 1 {
|
767 768 | pyhandler.call1((input,))?
|
768 769 | } else {
|
769 770 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
770 771 | };
|
771 772 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
772 773 | })?;
|
773 774 | result.await.and_then(|r| {
|
774 - | ::pyo3::Python::with_gil(|py| {
|
775 - | r.extract::<crate::output::OperationWithOptionalInputOutputOutput>(py)
|
776 - | })
|
775 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::DatetimeOffsetsOutput>(py))
|
777 776 | })
|
778 777 | } else {
|
779 778 | ::tracing::trace!(
|
780 - | name = "operation_with_optional_input_output",
|
779 + | name = "datetime_offsets",
|
781 780 | "executing python handler function"
|
782 781 | );
|
783 782 | ::pyo3::Python::with_gil(|py| {
|
784 783 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
785 784 | let output = if handler.args == 1 {
|
786 785 | pyhandler.call1((input,))?
|
787 786 | } else {
|
788 787 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
789 788 | };
|
790 - | output.extract::<crate::output::OperationWithOptionalInputOutputOutput>()
|
789 + | output.extract::<crate::output::DatetimeOffsetsOutput>()
|
791 790 | })
|
792 791 | };
|
793 792 | // Catch and record a Python traceback.
|
794 793 | result.map_err(|e| {
|
795 794 | let rich_py_err =
|
796 795 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
797 796 | e.clone_ref(py)
|
798 797 | }));
|
799 798 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
800 799 | e.into()
|
801 800 | })
|
802 801 | }
|
803 802 |
|
804 - | /// Python handler for operation `SimpleScalarProperties`.
|
805 - | pub(crate) async fn simple_scalar_properties(
|
806 - | input: crate::input::SimpleScalarPropertiesInput,
|
803 + | /// Python handler for operation `FractionalSeconds`.
|
804 + | pub(crate) async fn fractional_seconds(
|
805 + | input: crate::input::FractionalSecondsInput,
|
807 806 | state: ::aws_smithy_legacy_http_server::Extension<
|
808 807 | ::aws_smithy_http_server_python::context::PyContext,
|
809 808 | >,
|
810 809 | handler: ::aws_smithy_http_server_python::PyHandler,
|
811 - | ) -> std::result::Result<
|
812 - | crate::output::SimpleScalarPropertiesOutput,
|
813 - | crate::error::SimpleScalarPropertiesError,
|
814 - | > {
|
810 + | ) -> std::result::Result<crate::output::FractionalSecondsOutput, crate::error::FractionalSecondsError>
|
811 + | {
|
815 812 | // Async block used to run the handler and catch any Python error.
|
816 813 | let result = if handler.is_coroutine {
|
817 814 | ::tracing::trace!(
|
818 - | name = "simple_scalar_properties",
|
815 + | name = "fractional_seconds",
|
819 816 | "executing python handler coroutine"
|
820 817 | );
|
821 818 | let result = ::pyo3::Python::with_gil(|py| {
|
822 819 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
823 820 | let coroutine = if handler.args == 1 {
|
824 821 | pyhandler.call1((input,))?
|
825 822 | } else {
|
826 823 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
827 824 | };
|
828 825 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
829 826 | })?;
|
830 827 | result.await.and_then(|r| {
|
831 - | ::pyo3::Python::with_gil(|py| {
|
832 - | r.extract::<crate::output::SimpleScalarPropertiesOutput>(py)
|
833 - | })
|
828 + | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::FractionalSecondsOutput>(py))
|
834 829 | })
|
835 830 | } else {
|
836 831 | ::tracing::trace!(
|
837 - | name = "simple_scalar_properties",
|
832 + | name = "fractional_seconds",
|
838 833 | "executing python handler function"
|
839 834 | );
|
840 835 | ::pyo3::Python::with_gil(|py| {
|
841 836 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
842 837 | let output = if handler.args == 1 {
|
843 838 | pyhandler.call1((input,))?
|
844 839 | } else {
|
845 840 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
846 841 | };
|
847 - | output.extract::<crate::output::SimpleScalarPropertiesOutput>()
|
842 + | output.extract::<crate::output::FractionalSecondsOutput>()
|
848 843 | })
|
849 844 | };
|
850 845 | // Catch and record a Python traceback.
|
851 846 | result.map_err(|e| {
|
852 847 | let rich_py_err =
|
853 848 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
854 849 | e.clone_ref(py)
|
855 850 | }));
|
856 851 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
857 852 | e.into()
|
858 853 | })
|
859 854 | }
|
860 855 |
|
861 - | /// Python handler for operation `KitchenSinkOperation`.
|
862 - | pub(crate) async fn kitchen_sink_operation(
|
863 - | input: crate::input::KitchenSinkOperationInput,
|
856 + | /// Python handler for operation `PutWithContentEncoding`.
|
857 + | pub(crate) async fn put_with_content_encoding(
|
858 + | input: crate::input::PutWithContentEncodingInput,
|
864 859 | state: ::aws_smithy_legacy_http_server::Extension<
|
865 860 | ::aws_smithy_http_server_python::context::PyContext,
|
866 861 | >,
|
867 862 | handler: ::aws_smithy_http_server_python::PyHandler,
|
868 863 | ) -> std::result::Result<
|
869 - | crate::output::KitchenSinkOperationOutput,
|
870 - | crate::error::KitchenSinkOperationError,
|
864 + | crate::output::PutWithContentEncodingOutput,
|
865 + | crate::error::PutWithContentEncodingError,
|
871 866 | > {
|
872 867 | // Async block used to run the handler and catch any Python error.
|
873 868 | let result = if handler.is_coroutine {
|
874 869 | ::tracing::trace!(
|
875 - | name = "kitchen_sink_operation",
|
870 + | name = "put_with_content_encoding",
|
876 871 | "executing python handler coroutine"
|
877 872 | );
|
878 873 | let result = ::pyo3::Python::with_gil(|py| {
|
879 874 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
880 875 | let coroutine = if handler.args == 1 {
|
881 876 | pyhandler.call1((input,))?
|
882 877 | } else {
|
883 878 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
884 879 | };
|
885 880 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
886 881 | })?;
|
887 882 | result.await.and_then(|r| {
|
888 883 | ::pyo3::Python::with_gil(|py| {
|
889 - | r.extract::<crate::output::KitchenSinkOperationOutput>(py)
|
884 + | r.extract::<crate::output::PutWithContentEncodingOutput>(py)
|
890 885 | })
|
891 886 | })
|
892 887 | } else {
|
893 888 | ::tracing::trace!(
|
894 - | name = "kitchen_sink_operation",
|
889 + | name = "put_with_content_encoding",
|
895 890 | "executing python handler function"
|
896 891 | );
|
897 892 | ::pyo3::Python::with_gil(|py| {
|
898 893 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
899 894 | let output = if handler.args == 1 {
|
900 895 | pyhandler.call1((input,))?
|
901 896 | } else {
|
902 897 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
903 898 | };
|
904 - | output.extract::<crate::output::KitchenSinkOperationOutput>()
|
899 + | output.extract::<crate::output::PutWithContentEncodingOutput>()
|
905 900 | })
|
906 901 | };
|
907 902 | // Catch and record a Python traceback.
|
908 903 | result.map_err(|e| {
|
909 904 | let rich_py_err =
|
910 905 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
911 906 | e.clone_ref(py)
|
912 907 | }));
|
913 908 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
914 909 | e.into()
|
915 910 | })
|
916 911 | }
|
917 912 |
|
918 - | /// Python handler for operation `EmptyOperation`.
|
919 - | pub(crate) async fn empty_operation(
|
920 - | input: crate::input::EmptyOperationInput,
|
913 + | /// Python handler for operation `ContentTypeParameters`.
|
914 + | pub(crate) async fn content_type_parameters(
|
915 + | input: crate::input::ContentTypeParametersInput,
|
921 916 | state: ::aws_smithy_legacy_http_server::Extension<
|
922 917 | ::aws_smithy_http_server_python::context::PyContext,
|
923 918 | >,
|
924 919 | handler: ::aws_smithy_http_server_python::PyHandler,
|
925 - | ) -> std::result::Result<crate::output::EmptyOperationOutput, crate::error::EmptyOperationError> {
|
920 + | ) -> std::result::Result<
|
921 + | crate::output::ContentTypeParametersOutput,
|
922 + | crate::error::ContentTypeParametersError,
|
923 + | > {
|
926 924 | // Async block used to run the handler and catch any Python error.
|
927 925 | let result = if handler.is_coroutine {
|
928 926 | ::tracing::trace!(
|
929 - | name = "empty_operation",
|
927 + | name = "content_type_parameters",
|
930 928 | "executing python handler coroutine"
|
931 929 | );
|
932 930 | let result = ::pyo3::Python::with_gil(|py| {
|
933 931 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
934 932 | let coroutine = if handler.args == 1 {
|
935 933 | pyhandler.call1((input,))?
|
936 934 | } else {
|
937 935 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
938 936 | };
|
939 937 | ::pyo3_asyncio::tokio::into_future(coroutine)
|
940 938 | })?;
|
941 939 | result.await.and_then(|r| {
|
942 - | ::pyo3::Python::with_gil(|py| r.extract::<crate::output::EmptyOperationOutput>(py))
|
940 + | ::pyo3::Python::with_gil(|py| {
|
941 + | r.extract::<crate::output::ContentTypeParametersOutput>(py)
|
942 + | })
|
943 943 | })
|
944 944 | } else {
|
945 945 | ::tracing::trace!(
|
946 - | name = "empty_operation",
|
946 + | name = "content_type_parameters",
|
947 947 | "executing python handler function"
|
948 948 | );
|
949 949 | ::pyo3::Python::with_gil(|py| {
|
950 950 | let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
|
951 951 | let output = if handler.args == 1 {
|
952 952 | pyhandler.call1((input,))?
|
953 953 | } else {
|
954 954 | pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
|
955 955 | };
|
956 - | output.extract::<crate::output::EmptyOperationOutput>()
|
956 + | output.extract::<crate::output::ContentTypeParametersOutput>()
|
957 957 | })
|
958 958 | };
|
959 959 | // Catch and record a Python traceback.
|
960 960 | result.map_err(|e| {
|
961 961 | let rich_py_err =
|
962 962 | ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
|
963 963 | e.clone_ref(py)
|
964 964 | }));
|
965 965 | ::tracing::error!(error = ?rich_py_err, "handler error");
|
966 966 | e.into()
|