1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* RustType.kt:516 */
|
2 3 | #[allow(clippy::unnecessary_wraps)]
|
4 + | /* ServerHttpBoundProtocolGenerator.kt:383 */
|
3 5 | pub async fn de_empty_input_output_http_request<B>(
|
4 6 | #[allow(unused_variables)] request: ::http::Request<B>,
|
5 7 | ) -> std::result::Result<
|
6 8 | crate::input::EmptyInputOutputInput,
|
7 9 | ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection,
|
8 10 | >
|
9 11 | where
|
10 12 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
11 13 | B::Data: Send,
|
12 14 | ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
|
13 15 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
14 16 | {
|
17 + | /* ServerHttpBoundProtocolGenerator.kt:399 */
|
15 18 | Ok({
|
19 + | /* RustType.kt:516 */
|
16 20 | #[allow(unused_mut)]
|
21 + | /* ServerHttpBoundProtocolGenerator.kt:723 */
|
17 22 | let mut input = crate::input::empty_input_output_input::Builder::default();
|
23 + | /* RustType.kt:516 */
|
18 24 | #[allow(unused_variables)]
|
25 + | /* ServerHttpBoundProtocolGenerator.kt:728 */
|
19 26 | let ::aws_smithy_runtime_api::http::RequestParts {
|
20 27 | uri, headers, body, ..
|
21 28 | } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
|
29 + | /* ServerHttpBoundProtocolGenerator.kt:834 */
|
22 30 | input.build()
|
31 + | /* ServerHttpBoundProtocolGenerator.kt:399 */
|
23 32 | })
|
33 + | /* ServerHttpBoundProtocolGenerator.kt:383 */
|
24 34 | }
|
25 35 |
|
36 + | /* RustType.kt:516 */
|
26 37 | #[allow(clippy::unnecessary_wraps)]
|
38 + | /* ServerHttpBoundProtocolGenerator.kt:421 */
|
27 39 | pub fn ser_empty_input_output_http_response(
|
28 40 | #[allow(unused_variables)] output: crate::output::EmptyInputOutputOutput,
|
29 41 | ) -> std::result::Result<
|
30 42 | ::aws_smithy_http_server::response::Response,
|
31 43 | ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::ResponseRejection,
|
32 44 | > {
|
45 + | /* ServerHttpBoundProtocolGenerator.kt:433 */
|
33 46 | Ok({
|
47 + | /* RustType.kt:516 */
|
34 48 | #[allow(unused_mut)]
|
49 + | /* ServerHttpBoundProtocolGenerator.kt:523 */
|
35 50 | let mut builder = ::http::Response::builder();
|
51 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
36 52 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
37 53 | builder,
|
38 54 | ::http::header::CONTENT_TYPE,
|
39 55 | "application/cbor",
|
40 56 | );
|
57 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
41 58 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
42 59 | builder,
|
43 60 | ::http::header::HeaderName::from_static("smithy-protocol"),
|
44 61 | "rpc-v2-cbor",
|
45 62 | );
|
63 + | /* ServerHttpBoundProtocolGenerator.kt:682 */
|
46 64 | let http_status: u16 = 200;
|
47 65 | builder = builder.status(http_status);
|
66 + | /* ServerHttpBoundProtocolGenerator.kt:561 */
|
48 67 | let payload =
|
49 - | crate::protocol_serde::shape_empty_input_output_output::ser_empty_input_output_output_output_output(&output)?
|
50 - | ;
|
68 + | /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_empty_input_output_output::ser_empty_input_output_output_output_output(&output)?
|
69 + | /* ServerHttpBoundProtocolGenerator.kt:561 */;
|
70 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
51 71 | let content_length = payload.len();
|
52 72 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
53 73 | builder,
|
54 74 | ::http::header::CONTENT_LENGTH,
|
55 75 | content_length,
|
56 76 | );
|
77 + | /* ServerHttpBoundProtocolGenerator.kt:567 */
|
57 78 | let body = ::aws_smithy_http_server::body::to_boxed(payload);
|
79 + | /* ServerHttpBoundProtocolGenerator.kt:575 */
|
58 80 | builder.body(body)?
|
81 + | /* ServerHttpBoundProtocolGenerator.kt:433 */
|
59 82 | })
|
83 + | /* ServerHttpBoundProtocolGenerator.kt:421 */
|
60 84 | }
|