1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | #[allow(clippy::unnecessary_wraps)]
|
3 + | pub async fn de_streaming_blob_operation_http_request<B>(
|
4 + | #[allow(unused_variables)] request: ::http::Request<B>,
|
5 + | ) -> std::result::Result<
|
6 + | crate::input::StreamingBlobOperationInput,
|
7 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection,
|
8 + | >
|
9 + | where
|
10 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
11 + | B: Into<::aws_smithy_types::byte_stream::ByteStream>,
|
12 + | B::Data: Send,
|
13 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
14 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
15 + | {
|
16 + | Ok({
|
17 + | #[allow(unused_mut)]
|
18 + | let mut input = crate::input::streaming_blob_operation_input::Builder::default();
|
19 + | #[allow(unused_variables)]
|
20 + | let ::aws_smithy_runtime_api::http::RequestParts {
|
21 + | uri, headers, body, ..
|
22 + | } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
|
23 + | if let Some(value) = {
|
24 + | Some(crate::protocol_serde::shape_streaming_blob_operation_input::de_streaming_blob_payload(&mut body.into().into_inner())?)
|
25 + | } {
|
26 + | input = input.set_streaming_blob(value)
|
27 + | }
|
28 + | input.build()
|
29 + | })
|
30 + | }
|
31 + |
|
32 + | #[allow(clippy::unnecessary_wraps)]
|
33 + | pub fn ser_streaming_blob_operation_http_response(
|
34 + | #[allow(unused_variables)] output: crate::output::StreamingBlobOperationOutput,
|
35 + | ) -> std::result::Result<
|
36 + | ::aws_smithy_legacy_http_server::response::Response,
|
37 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
|
38 + | > {
|
39 + | Ok({
|
40 + | #[allow(unused_mut)]
|
41 + | let mut builder = ::http::Response::builder();
|
42 + | builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
|
43 + | builder,
|
44 + | ::http::header::CONTENT_TYPE,
|
45 + | "application/octet-stream",
|
46 + | );
|
47 + | let http_status: u16 = 200;
|
48 + | builder = builder.status(http_status);
|
49 + | let body = ::aws_smithy_legacy_http_server::body::boxed(::aws_smithy_legacy_http_server::body::Body::wrap_stream(
|
50 + | ::aws_smithy_legacy_http::futures_stream_adapter::FuturesStreamCompatByteStream::new(
|
51 + | crate::protocol_serde::shape_streaming_blob_operation_output::ser_streaming_blob_http_payload( output.streaming_blob)?
|
52 + | )
|
53 + | ));
|
54 + | builder.body(body)?
|
55 + | })
|
56 + | }
|