61 61 | pub fn ser_streaming_traits_http_response(
|
62 62 | #[allow(unused_variables)] output: crate::output::StreamingTraitsOutput,
|
63 63 | ) -> std::result::Result<
|
64 64 | ::aws_smithy_http_server::response::Response,
|
65 65 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
|
66 66 | > {
|
67 67 | /* ServerHttpBoundProtocolGenerator.kt:461 */
|
68 68 | Ok({
|
69 69 | /* RustType.kt:534 */
|
70 70 | #[allow(unused_mut)]
|
71 71 | /* ServerHttpBoundProtocolGenerator.kt:551 */
|
72 72 | let mut builder = ::http_1x::Response::builder();
|
73 73 | /* ServerHttpBoundProtocolGenerator.kt:679 */
|
74 74 | builder = crate::protocol_serde::shape_streaming_traits::ser_streaming_traits_headers(
|
75 75 | &output, builder,
|
76 76 | )?;
|
77 77 | /* ServerHttpBoundProtocolGenerator.kt:647 */
|
78 78 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
79 79 | builder,
|
80 80 | ::http_1x::header::CONTENT_TYPE,
|
81 81 | "application/octet-stream",
|
82 82 | );
|
83 83 | /* ServerHttpBoundProtocolGenerator.kt:732 */
|
84 84 | let http_status: u16 = 200;
|
85 85 | builder = builder.status(http_status);
|
86 86 | /* ServerHttpBoundProtocolGenerator.kt:589 */
|
87 87 | let body =
|
88 88 | ::aws_smithy_http_server::body::boxed(::aws_smithy_http_server::body::wrap_stream(
|
89 89 | /* ServerProtocolLoader.kt:42 */
|
90 90 | ::aws_smithy_http::futures_stream_adapter::FuturesStreamCompatByteStream::new(
|
91 - | /* HttpBoundProtocolPayloadGenerator.kt:348 */
|
91 + | /* HttpBoundProtocolPayloadGenerator.kt:353 */
|
92 92 | crate::protocol_serde::shape_streaming_traits_output::ser_blob_http_payload(
|
93 93 | output.blob,
|
94 94 | )?, /* ServerProtocolLoader.kt:42 */
|
95 95 | ), /* ServerHttpBoundProtocolGenerator.kt:589 */
|
96 96 | ));
|
97 97 | /* ServerHttpBoundProtocolGenerator.kt:625 */
|
98 98 | builder.body(body)?
|
99 99 | /* ServerHttpBoundProtocolGenerator.kt:461 */
|
100 100 | })
|
101 101 | /* ServerHttpBoundProtocolGenerator.kt:449 */
|
102 102 | }
|
103 103 |
|
104 104 | /* HttpBindingGenerator.kt:565 */
|
105 105 | pub fn ser_streaming_traits_headers(
|
106 106 | input: &crate::output::StreamingTraitsOutput,
|
107 107 | mut builder: ::http_1x::response::Builder,
|
108 108 | ) -> std::result::Result<
|
109 109 | ::http_1x::response::Builder,
|
110 110 | ::aws_smithy_types::error::operation::BuildError,
|
111 111 | > {
|
112 112 | /* HttpBindingGenerator.kt:615 */
|
113 113 | if let ::std::option::Option::Some(inner_1) = &input.foo {
|
114 114 | /* HttpBindingGenerator.kt:727 */
|
115 115 | let formatted_2 = inner_1.as_str();
|
116 116 | /* HttpBindingGenerator.kt:728 */
|
117 117 | if !formatted_2.is_empty() {
|
118 118 | /* HttpBindingGenerator.kt:729 */
|
119 119 | let header_value = formatted_2;
|
120 120 | let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
|
121 121 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|