1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 2 | ::pin_project_lite::pin_project! {
|
3 3 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
4 4 | /// [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput) using modelled bindings.
|
5 5 | pub struct OperationWithNestedStructureInputFuture {
|
6 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OperationWithNestedStructureInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OperationWithNestedStructureInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7 7 | }
|
8 8 | }
|
9 9 |
|
10 10 | impl std::future::Future for OperationWithNestedStructureInputFuture {
|
11 11 | type Output = Result<
|
12 12 | crate::input::OperationWithNestedStructureInput,
|
13 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
13 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
14 14 | >;
|
15 15 |
|
16 16 | fn poll(
|
17 17 | self: std::pin::Pin<&mut Self>,
|
18 18 | cx: &mut std::task::Context<'_>,
|
19 19 | ) -> std::task::Poll<Self::Output> {
|
20 20 | let this = self.project();
|
21 21 | this.inner.as_mut().poll(cx)
|
22 22 | }
|
23 23 | }
|
24 24 |
|
25 25 | impl<B>
|
26 - | ::aws_smithy_http_server::request::FromRequest<
|
27 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
26 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
27 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
28 28 | B,
|
29 29 | > for crate::input::OperationWithNestedStructureInput
|
30 30 | where
|
31 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
31 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
32 32 | B: 'static,
|
33 33 |
|
34 34 | B::Data: Send,
|
35 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
36 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
35 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
36 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
37 37 | {
|
38 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
38 + | type Rejection =
|
39 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
39 40 | type Future = OperationWithNestedStructureInputFuture;
|
40 41 |
|
41 42 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
42 43 | let fut = async move {
|
43 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
44 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
44 45 | request.headers(),
|
45 46 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
46 47 | ) {
|
47 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
48 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
48 49 | }
|
49 50 | crate::protocol_serde::shape_operation_with_nested_structure::de_operation_with_nested_structure_http_request(request)
|
50 51 | .await
|
51 52 | };
|
52 53 | use ::futures_util::future::TryFutureExt;
|
53 - | let fut = fut.map_err(
|
54 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
55 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
56 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
57 - | e,
|
58 - | )
|
59 - | },
|
60 - | );
|
54 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
55 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
56 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
57 + | });
|
61 58 | OperationWithNestedStructureInputFuture {
|
62 59 | inner: Box::pin(fut),
|
63 60 | }
|
64 61 | }
|
65 62 | }
|
66 63 | impl
|
67 - | ::aws_smithy_http_server::response::IntoResponse<
|
68 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
64 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
65 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
69 66 | > for crate::output::OperationWithNestedStructureOutput
|
70 67 | {
|
71 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
68 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
72 69 | match crate::protocol_serde::shape_operation_with_nested_structure::ser_operation_with_nested_structure_http_response(self) {
|
73 70 | Ok(response) => response,
|
74 71 | Err(e) => {
|
75 72 | ::tracing::error!(error = %e, "failed to serialize response");
|
76 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
73 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
77 74 | }
|
78 75 | }
|
79 76 | }
|
80 77 | }
|
81 78 | impl
|
82 - | ::aws_smithy_http_server::response::IntoResponse<
|
83 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
79 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
80 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
84 81 | > for crate::error::OperationWithNestedStructureError
|
85 82 | {
|
86 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
83 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
87 84 | match crate::protocol_serde::shape_operation_with_nested_structure::ser_operation_with_nested_structure_http_error(&self) {
|
88 85 | Ok(mut response) => {
|
89 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
86 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
90 87 | response
|
91 88 | },
|
92 89 | Err(e) => {
|
93 90 | ::tracing::error!(error = %e, "failed to serialize response");
|
94 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
91 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
95 92 | }
|
96 93 | }
|
97 94 | }
|
98 95 | }
|
99 96 |
|
100 97 | ::pin_project_lite::pin_project! {
|
101 98 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
102 99 | /// [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput) using modelled bindings.
|
103 100 | pub struct OperationWithDefaultsInputFuture {
|
104 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OperationWithDefaultsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
101 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OperationWithDefaultsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
105 102 | }
|
106 103 | }
|
107 104 |
|
108 105 | impl std::future::Future for OperationWithDefaultsInputFuture {
|
109 106 | type Output = Result<
|
110 107 | crate::input::OperationWithDefaultsInput,
|
111 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
108 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
112 109 | >;
|
113 110 |
|
114 111 | fn poll(
|
115 112 | self: std::pin::Pin<&mut Self>,
|
116 113 | cx: &mut std::task::Context<'_>,
|
117 114 | ) -> std::task::Poll<Self::Output> {
|
118 115 | let this = self.project();
|
119 116 | this.inner.as_mut().poll(cx)
|
120 117 | }
|
121 118 | }
|
122 119 |
|
123 120 | impl<B>
|
124 - | ::aws_smithy_http_server::request::FromRequest<
|
125 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
121 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
122 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
126 123 | B,
|
127 124 | > for crate::input::OperationWithDefaultsInput
|
128 125 | where
|
129 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
126 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
130 127 | B: 'static,
|
131 128 |
|
132 129 | B::Data: Send,
|
133 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
134 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
130 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
131 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
135 132 | {
|
136 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
133 + | type Rejection =
|
134 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
137 135 | type Future = OperationWithDefaultsInputFuture;
|
138 136 |
|
139 137 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
140 138 | let fut = async move {
|
141 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
139 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
142 140 | request.headers(),
|
143 141 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
144 142 | ) {
|
145 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
143 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
146 144 | }
|
147 145 | crate::protocol_serde::shape_operation_with_defaults::de_operation_with_defaults_http_request(request)
|
148 146 | .await
|
149 147 | };
|
150 148 | use ::futures_util::future::TryFutureExt;
|
151 - | let fut = fut.map_err(
|
152 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
153 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
154 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
155 - | e,
|
156 - | )
|
157 - | },
|
158 - | );
|
149 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
150 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
151 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
152 + | });
|
159 153 | OperationWithDefaultsInputFuture {
|
160 154 | inner: Box::pin(fut),
|
161 155 | }
|
162 156 | }
|
163 157 | }
|
164 158 | impl
|
165 - | ::aws_smithy_http_server::response::IntoResponse<
|
166 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
159 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
160 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
167 161 | > for crate::output::OperationWithDefaultsOutput
|
168 162 | {
|
169 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
163 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
170 164 | match crate::protocol_serde::shape_operation_with_defaults::ser_operation_with_defaults_http_response(self) {
|
171 165 | Ok(response) => response,
|
172 166 | Err(e) => {
|
173 167 | ::tracing::error!(error = %e, "failed to serialize response");
|
174 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
168 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
175 169 | }
|
176 170 | }
|
177 171 | }
|
178 172 | }
|
179 173 | impl
|
180 - | ::aws_smithy_http_server::response::IntoResponse<
|
181 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
174 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
175 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
182 176 | > for crate::error::OperationWithDefaultsError
|
183 177 | {
|
184 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
178 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
185 179 | match crate::protocol_serde::shape_operation_with_defaults::ser_operation_with_defaults_http_error(&self) {
|
186 180 | Ok(mut response) => {
|
187 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
181 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
188 182 | response
|
189 183 | },
|
190 184 | Err(e) => {
|
191 185 | ::tracing::error!(error = %e, "failed to serialize response");
|
192 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
186 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
193 187 | }
|
194 188 | }
|
195 189 | }
|
196 190 | }
|
197 191 |
|
198 192 | ::pin_project_lite::pin_project! {
|
199 193 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
200 194 | /// [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput) using modelled bindings.
|
201 195 | pub struct ContentTypeParametersInputFuture {
|
202 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ContentTypeParametersInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
196 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ContentTypeParametersInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
203 197 | }
|
204 198 | }
|
205 199 |
|
206 200 | impl std::future::Future for ContentTypeParametersInputFuture {
|
207 201 | type Output = Result<
|
208 202 | crate::input::ContentTypeParametersInput,
|
209 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
203 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
210 204 | >;
|
211 205 |
|
212 206 | fn poll(
|
213 207 | self: std::pin::Pin<&mut Self>,
|
214 208 | cx: &mut std::task::Context<'_>,
|
215 209 | ) -> std::task::Poll<Self::Output> {
|
216 210 | let this = self.project();
|
217 211 | this.inner.as_mut().poll(cx)
|
218 212 | }
|
219 213 | }
|
220 214 |
|
221 215 | impl<B>
|
222 - | ::aws_smithy_http_server::request::FromRequest<
|
223 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
216 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
217 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
224 218 | B,
|
225 219 | > for crate::input::ContentTypeParametersInput
|
226 220 | where
|
227 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
221 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
228 222 | B: 'static,
|
229 223 |
|
230 224 | B::Data: Send,
|
231 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
232 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
225 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
226 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
233 227 | {
|
234 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
228 + | type Rejection =
|
229 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
235 230 | type Future = ContentTypeParametersInputFuture;
|
236 231 |
|
237 232 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
238 233 | let fut = async move {
|
239 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
234 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
240 235 | request.headers(),
|
241 236 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
242 237 | ) {
|
243 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
238 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
244 239 | }
|
245 240 | crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters_http_request(request)
|
246 241 | .await
|
247 242 | };
|
248 243 | use ::futures_util::future::TryFutureExt;
|
249 - | let fut = fut.map_err(
|
250 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
251 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
252 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
253 - | e,
|
254 - | )
|
255 - | },
|
256 - | );
|
244 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
245 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
246 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
247 + | });
|
257 248 | ContentTypeParametersInputFuture {
|
258 249 | inner: Box::pin(fut),
|
259 250 | }
|
260 251 | }
|
261 252 | }
|
262 253 | impl
|
263 - | ::aws_smithy_http_server::response::IntoResponse<
|
264 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
254 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
255 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
265 256 | > for crate::output::ContentTypeParametersOutput
|
266 257 | {
|
267 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
258 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
268 259 | match crate::protocol_serde::shape_content_type_parameters::ser_content_type_parameters_http_response(self) {
|
269 260 | Ok(response) => response,
|
270 261 | Err(e) => {
|
271 262 | ::tracing::error!(error = %e, "failed to serialize response");
|
272 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
263 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
273 264 | }
|
274 265 | }
|
275 266 | }
|
276 267 | }
|
277 268 | impl
|
278 - | ::aws_smithy_http_server::response::IntoResponse<
|
279 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
269 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
270 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
280 271 | > for crate::error::ContentTypeParametersError
|
281 272 | {
|
282 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
273 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
283 274 | match crate::protocol_serde::shape_content_type_parameters::ser_content_type_parameters_http_error(&self) {
|
284 275 | Ok(mut response) => {
|
285 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
276 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
286 277 | response
|
287 278 | },
|
288 279 | Err(e) => {
|
289 280 | ::tracing::error!(error = %e, "failed to serialize response");
|
290 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
281 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
291 282 | }
|
292 283 | }
|
293 284 | }
|
294 285 | }
|
295 286 |
|
296 287 | ::pin_project_lite::pin_project! {
|
297 288 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
298 289 | /// [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput) using modelled bindings.
|
299 290 | pub struct PutWithContentEncodingInputFuture {
|
300 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PutWithContentEncodingInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
291 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PutWithContentEncodingInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
301 292 | }
|
302 293 | }
|
303 294 |
|
304 295 | impl std::future::Future for PutWithContentEncodingInputFuture {
|
305 296 | type Output = Result<
|
306 297 | crate::input::PutWithContentEncodingInput,
|
307 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
298 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
308 299 | >;
|
309 300 |
|
310 301 | fn poll(
|
311 302 | self: std::pin::Pin<&mut Self>,
|
312 303 | cx: &mut std::task::Context<'_>,
|
313 304 | ) -> std::task::Poll<Self::Output> {
|
314 305 | let this = self.project();
|
315 306 | this.inner.as_mut().poll(cx)
|
316 307 | }
|
317 308 | }
|
318 309 |
|
319 310 | impl<B>
|
320 - | ::aws_smithy_http_server::request::FromRequest<
|
321 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
311 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
312 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
322 313 | B,
|
323 314 | > for crate::input::PutWithContentEncodingInput
|
324 315 | where
|
325 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
316 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
326 317 | B: 'static,
|
327 318 |
|
328 319 | B::Data: Send,
|
329 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
330 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
320 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
321 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
331 322 | {
|
332 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
323 + | type Rejection =
|
324 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
333 325 | type Future = PutWithContentEncodingInputFuture;
|
334 326 |
|
335 327 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
336 328 | let fut = async move {
|
337 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
329 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
338 330 | request.headers(),
|
339 331 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
340 332 | ) {
|
341 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
333 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
342 334 | }
|
343 335 | crate::protocol_serde::shape_put_with_content_encoding::de_put_with_content_encoding_http_request(request)
|
344 336 | .await
|
345 337 | };
|
346 338 | use ::futures_util::future::TryFutureExt;
|
347 - | let fut = fut.map_err(
|
348 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
349 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
350 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
351 - | e,
|
352 - | )
|
353 - | },
|
354 - | );
|
339 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
340 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
341 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
342 + | });
|
355 343 | PutWithContentEncodingInputFuture {
|
356 344 | inner: Box::pin(fut),
|
357 345 | }
|
358 346 | }
|
359 347 | }
|
360 348 | impl
|
361 - | ::aws_smithy_http_server::response::IntoResponse<
|
362 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
349 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
350 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
363 351 | > for crate::output::PutWithContentEncodingOutput
|
364 352 | {
|
365 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
353 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
366 354 | match crate::protocol_serde::shape_put_with_content_encoding::ser_put_with_content_encoding_http_response(self) {
|
367 355 | Ok(response) => response,
|
368 356 | Err(e) => {
|
369 357 | ::tracing::error!(error = %e, "failed to serialize response");
|
370 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
358 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
371 359 | }
|
372 360 | }
|
373 361 | }
|
374 362 | }
|
375 363 | impl
|
376 - | ::aws_smithy_http_server::response::IntoResponse<
|
377 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
364 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
365 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
378 366 | > for crate::error::PutWithContentEncodingError
|
379 367 | {
|
380 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
368 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
381 369 | match crate::protocol_serde::shape_put_with_content_encoding::ser_put_with_content_encoding_http_error(&self) {
|
382 370 | Ok(mut response) => {
|
383 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
371 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
384 372 | response
|
385 373 | },
|
386 374 | Err(e) => {
|
387 375 | ::tracing::error!(error = %e, "failed to serialize response");
|
388 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
376 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
389 377 | }
|
390 378 | }
|
391 379 | }
|
392 380 | }
|
393 381 |
|
394 382 | ::pin_project_lite::pin_project! {
|
395 383 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
396 384 | /// [`FractionalSecondsInput`](crate::input::FractionalSecondsInput) using modelled bindings.
|
397 385 | pub struct FractionalSecondsInputFuture {
|
398 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::FractionalSecondsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
386 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::FractionalSecondsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
399 387 | }
|
400 388 | }
|
401 389 |
|
402 390 | impl std::future::Future for FractionalSecondsInputFuture {
|
403 391 | type Output = Result<
|
404 392 | crate::input::FractionalSecondsInput,
|
405 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
393 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
406 394 | >;
|
407 395 |
|
408 396 | fn poll(
|
409 397 | self: std::pin::Pin<&mut Self>,
|
410 398 | cx: &mut std::task::Context<'_>,
|
411 399 | ) -> std::task::Poll<Self::Output> {
|
412 400 | let this = self.project();
|
413 401 | this.inner.as_mut().poll(cx)
|
414 402 | }
|
415 403 | }
|
416 404 |
|
417 405 | impl<B>
|
418 - | ::aws_smithy_http_server::request::FromRequest<
|
419 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
406 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
407 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
420 408 | B,
|
421 409 | > for crate::input::FractionalSecondsInput
|
422 410 | where
|
423 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
411 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
424 412 | B: 'static,
|
425 413 |
|
426 414 | B::Data: Send,
|
427 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
428 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
415 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
416 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
429 417 | {
|
430 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
418 + | type Rejection =
|
419 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
431 420 | type Future = FractionalSecondsInputFuture;
|
432 421 |
|
433 422 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
434 423 | let fut = async move {
|
435 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
424 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
436 425 | request.headers(),
|
437 426 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
438 427 | ) {
|
439 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
428 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
440 429 | }
|
441 430 | crate::protocol_serde::shape_fractional_seconds::de_fractional_seconds_http_request(
|
442 431 | request,
|
443 432 | )
|
444 433 | .await
|
445 434 | };
|
446 435 | use ::futures_util::future::TryFutureExt;
|
447 - | let fut = fut.map_err(
|
448 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
449 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
450 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
451 - | e,
|
452 - | )
|
453 - | },
|
454 - | );
|
436 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
437 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
438 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
439 + | });
|
455 440 | FractionalSecondsInputFuture {
|
456 441 | inner: Box::pin(fut),
|
457 442 | }
|
458 443 | }
|
459 444 | }
|
460 445 | impl
|
461 - | ::aws_smithy_http_server::response::IntoResponse<
|
462 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
446 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
447 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
463 448 | > for crate::output::FractionalSecondsOutput
|
464 449 | {
|
465 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
450 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
466 451 | match crate::protocol_serde::shape_fractional_seconds::ser_fractional_seconds_http_response(
|
467 452 | self,
|
468 453 | ) {
|
469 454 | Ok(response) => response,
|
470 455 | Err(e) => {
|
471 456 | ::tracing::error!(error = %e, "failed to serialize response");
|
472 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
457 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
473 458 | }
|
474 459 | }
|
475 460 | }
|
476 461 | }
|
477 462 | impl
|
478 - | ::aws_smithy_http_server::response::IntoResponse<
|
479 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
463 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
464 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
480 465 | > for crate::error::FractionalSecondsError
|
481 466 | {
|
482 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
467 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
483 468 | match crate::protocol_serde::shape_fractional_seconds::ser_fractional_seconds_http_error(
|
484 469 | &self,
|
485 470 | ) {
|
486 471 | Ok(mut response) => {
|
487 472 | response.extensions_mut().insert(
|
488 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
473 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
474 + | self.name(),
|
475 + | ),
|
489 476 | );
|
490 477 | response
|
491 478 | }
|
492 479 | Err(e) => {
|
493 480 | ::tracing::error!(error = %e, "failed to serialize response");
|
494 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
481 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
495 482 | }
|
496 483 | }
|
497 484 | }
|
498 485 | }
|
499 486 |
|
500 487 | ::pin_project_lite::pin_project! {
|
501 488 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
502 489 | /// [`DatetimeOffsetsInput`](crate::input::DatetimeOffsetsInput) using modelled bindings.
|
503 490 | pub struct DatetimeOffsetsInputFuture {
|
504 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DatetimeOffsetsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
491 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DatetimeOffsetsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
505 492 | }
|
506 493 | }
|
507 494 |
|
508 495 | impl std::future::Future for DatetimeOffsetsInputFuture {
|
509 496 | type Output = Result<
|
510 497 | crate::input::DatetimeOffsetsInput,
|
511 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
498 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
512 499 | >;
|
513 500 |
|
514 501 | fn poll(
|
515 502 | self: std::pin::Pin<&mut Self>,
|
516 503 | cx: &mut std::task::Context<'_>,
|
517 504 | ) -> std::task::Poll<Self::Output> {
|
518 505 | let this = self.project();
|
519 506 | this.inner.as_mut().poll(cx)
|
520 507 | }
|
521 508 | }
|
522 509 |
|
523 510 | impl<B>
|
524 - | ::aws_smithy_http_server::request::FromRequest<
|
525 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
511 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
512 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
526 513 | B,
|
527 514 | > for crate::input::DatetimeOffsetsInput
|
528 515 | where
|
529 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
516 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
530 517 | B: 'static,
|
531 518 |
|
532 519 | B::Data: Send,
|
533 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
534 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
520 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
521 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
535 522 | {
|
536 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
523 + | type Rejection =
|
524 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
537 525 | type Future = DatetimeOffsetsInputFuture;
|
538 526 |
|
539 527 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
540 528 | let fut = async move {
|
541 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
529 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
542 530 | request.headers(),
|
543 531 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
544 532 | ) {
|
545 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
533 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
546 534 | }
|
547 535 | crate::protocol_serde::shape_datetime_offsets::de_datetime_offsets_http_request(request)
|
548 536 | .await
|
549 537 | };
|
550 538 | use ::futures_util::future::TryFutureExt;
|
551 - | let fut = fut.map_err(
|
552 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
553 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
554 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
555 - | e,
|
556 - | )
|
557 - | },
|
558 - | );
|
539 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
540 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
541 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
542 + | });
|
559 543 | DatetimeOffsetsInputFuture {
|
560 544 | inner: Box::pin(fut),
|
561 545 | }
|
562 546 | }
|
563 547 | }
|
564 548 | impl
|
565 - | ::aws_smithy_http_server::response::IntoResponse<
|
566 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
549 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
550 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
567 551 | > for crate::output::DatetimeOffsetsOutput
|
568 552 | {
|
569 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
553 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
570 554 | match crate::protocol_serde::shape_datetime_offsets::ser_datetime_offsets_http_response(
|
571 555 | self,
|
572 556 | ) {
|
573 557 | Ok(response) => response,
|
574 558 | Err(e) => {
|
575 559 | ::tracing::error!(error = %e, "failed to serialize response");
|
576 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
560 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
577 561 | }
|
578 562 | }
|
579 563 | }
|
580 564 | }
|
581 565 | impl
|
582 - | ::aws_smithy_http_server::response::IntoResponse<
|
583 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
566 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
567 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
584 568 | > for crate::error::DatetimeOffsetsError
|
585 569 | {
|
586 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
570 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
587 571 | match crate::protocol_serde::shape_datetime_offsets::ser_datetime_offsets_http_error(&self)
|
588 572 | {
|
589 573 | Ok(mut response) => {
|
590 574 | response.extensions_mut().insert(
|
591 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
575 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
576 + | self.name(),
|
577 + | ),
|
592 578 | );
|
593 579 | response
|
594 580 | }
|
595 581 | Err(e) => {
|
596 582 | ::tracing::error!(error = %e, "failed to serialize response");
|
597 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
583 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
598 584 | }
|
599 585 | }
|
600 586 | }
|
601 587 | }
|
602 588 |
|
603 589 | ::pin_project_lite::pin_project! {
|
604 590 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
605 591 | /// [`TestPostNoInputNoPayloadInput`](crate::input::TestPostNoInputNoPayloadInput) using modelled bindings.
|
606 592 | pub struct TestPostNoInputNoPayloadInputFuture {
|
607 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TestPostNoInputNoPayloadInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
593 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TestPostNoInputNoPayloadInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
608 594 | }
|
609 595 | }
|
610 596 |
|
611 597 | impl std::future::Future for TestPostNoInputNoPayloadInputFuture {
|
612 598 | type Output = Result<
|
613 599 | crate::input::TestPostNoInputNoPayloadInput,
|
614 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
600 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
615 601 | >;
|
616 602 |
|
617 603 | fn poll(
|
618 604 | self: std::pin::Pin<&mut Self>,
|
619 605 | cx: &mut std::task::Context<'_>,
|
620 606 | ) -> std::task::Poll<Self::Output> {
|
621 607 | let this = self.project();
|
622 608 | this.inner.as_mut().poll(cx)
|
623 609 | }
|
624 610 | }
|
625 611 |
|
626 612 | impl<B>
|
627 - | ::aws_smithy_http_server::request::FromRequest<
|
628 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
613 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
614 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
629 615 | B,
|
630 616 | > for crate::input::TestPostNoInputNoPayloadInput
|
631 617 | where
|
632 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
618 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
633 619 | B: 'static,
|
634 620 |
|
635 621 | B::Data: Send,
|
636 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
637 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
622 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
623 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
638 624 | {
|
639 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
625 + | type Rejection =
|
626 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
640 627 | type Future = TestPostNoInputNoPayloadInputFuture;
|
641 628 |
|
642 629 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
643 630 | let fut = async move {
|
644 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
631 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
645 632 | request.headers(),
|
646 633 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
647 634 | ) {
|
648 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
635 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
649 636 | }
|
650 637 | crate::protocol_serde::shape_test_post_no_input_no_payload::de_test_post_no_input_no_payload_http_request(request)
|
651 638 | .await
|
652 639 | };
|
653 640 | use ::futures_util::future::TryFutureExt;
|
654 - | let fut = fut.map_err(
|
655 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
656 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
657 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
658 - | e,
|
659 - | )
|
660 - | },
|
661 - | );
|
641 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
642 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
643 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
644 + | });
|
662 645 | TestPostNoInputNoPayloadInputFuture {
|
663 646 | inner: Box::pin(fut),
|
664 647 | }
|
665 648 | }
|
666 649 | }
|
667 650 | impl
|
668 - | ::aws_smithy_http_server::response::IntoResponse<
|
669 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
651 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
652 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
670 653 | > for crate::output::TestPostNoInputNoPayloadOutput
|
671 654 | {
|
672 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
655 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
673 656 | match crate::protocol_serde::shape_test_post_no_input_no_payload::ser_test_post_no_input_no_payload_http_response(self) {
|
674 657 | Ok(response) => response,
|
675 658 | Err(e) => {
|
676 659 | ::tracing::error!(error = %e, "failed to serialize response");
|
677 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
660 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
678 661 | }
|
679 662 | }
|
680 663 | }
|
681 664 | }
|
682 665 | impl
|
683 - | ::aws_smithy_http_server::response::IntoResponse<
|
684 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
666 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
667 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
685 668 | > for crate::error::TestPostNoInputNoPayloadError
|
686 669 | {
|
687 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
670 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
688 671 | match crate::protocol_serde::shape_test_post_no_input_no_payload::ser_test_post_no_input_no_payload_http_error(&self) {
|
689 672 | Ok(mut response) => {
|
690 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
673 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
691 674 | response
|
692 675 | },
|
693 676 | Err(e) => {
|
694 677 | ::tracing::error!(error = %e, "failed to serialize response");
|
695 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
678 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
696 679 | }
|
697 680 | }
|
698 681 | }
|
699 682 | }
|
700 683 |
|
701 684 | ::pin_project_lite::pin_project! {
|
702 685 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
703 686 | /// [`TestGetNoInputNoPayloadInput`](crate::input::TestGetNoInputNoPayloadInput) using modelled bindings.
|
704 687 | pub struct TestGetNoInputNoPayloadInputFuture {
|
705 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TestGetNoInputNoPayloadInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
688 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TestGetNoInputNoPayloadInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
706 689 | }
|
707 690 | }
|
708 691 |
|
709 692 | impl std::future::Future for TestGetNoInputNoPayloadInputFuture {
|
710 693 | type Output = Result<
|
711 694 | crate::input::TestGetNoInputNoPayloadInput,
|
712 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
695 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
713 696 | >;
|
714 697 |
|
715 698 | fn poll(
|
716 699 | self: std::pin::Pin<&mut Self>,
|
717 700 | cx: &mut std::task::Context<'_>,
|
718 701 | ) -> std::task::Poll<Self::Output> {
|
719 702 | let this = self.project();
|
720 703 | this.inner.as_mut().poll(cx)
|
721 704 | }
|
722 705 | }
|
723 706 |
|
724 707 | impl<B>
|
725 - | ::aws_smithy_http_server::request::FromRequest<
|
726 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
708 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
709 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
727 710 | B,
|
728 711 | > for crate::input::TestGetNoInputNoPayloadInput
|
729 712 | where
|
730 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
713 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
731 714 | B: 'static,
|
732 715 |
|
733 716 | B::Data: Send,
|
734 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
735 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
717 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
718 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
736 719 | {
|
737 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
720 + | type Rejection =
|
721 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
738 722 | type Future = TestGetNoInputNoPayloadInputFuture;
|
739 723 |
|
740 724 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
741 725 | let fut = async move {
|
742 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
726 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
743 727 | request.headers(),
|
744 728 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
745 729 | ) {
|
746 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
730 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
747 731 | }
|
748 732 | crate::protocol_serde::shape_test_get_no_input_no_payload::de_test_get_no_input_no_payload_http_request(request)
|
749 733 | .await
|
750 734 | };
|
751 735 | use ::futures_util::future::TryFutureExt;
|
752 - | let fut = fut.map_err(
|
753 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
754 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
755 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
756 - | e,
|
757 - | )
|
758 - | },
|
759 - | );
|
736 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
737 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
738 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
739 + | });
|
760 740 | TestGetNoInputNoPayloadInputFuture {
|
761 741 | inner: Box::pin(fut),
|
762 742 | }
|
763 743 | }
|
764 744 | }
|
765 745 | impl
|
766 - | ::aws_smithy_http_server::response::IntoResponse<
|
767 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
746 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
747 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
768 748 | > for crate::output::TestGetNoInputNoPayloadOutput
|
769 749 | {
|
770 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
750 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
771 751 | match crate::protocol_serde::shape_test_get_no_input_no_payload::ser_test_get_no_input_no_payload_http_response(self) {
|
772 752 | Ok(response) => response,
|
773 753 | Err(e) => {
|
774 754 | ::tracing::error!(error = %e, "failed to serialize response");
|
775 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
755 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
776 756 | }
|
777 757 | }
|
778 758 | }
|
779 759 | }
|
780 760 | impl
|
781 - | ::aws_smithy_http_server::response::IntoResponse<
|
782 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
761 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
762 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
783 763 | > for crate::error::TestGetNoInputNoPayloadError
|
784 764 | {
|
785 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
765 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
786 766 | match crate::protocol_serde::shape_test_get_no_input_no_payload::ser_test_get_no_input_no_payload_http_error(&self) {
|
787 767 | Ok(mut response) => {
|
788 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
768 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
789 769 | response
|
790 770 | },
|
791 771 | Err(e) => {
|
792 772 | ::tracing::error!(error = %e, "failed to serialize response");
|
793 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
773 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
794 774 | }
|
795 775 | }
|
796 776 | }
|
797 777 | }
|
798 778 |
|
799 779 | ::pin_project_lite::pin_project! {
|
800 780 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
801 781 | /// [`TestPostNoPayloadInput`](crate::input::TestPostNoPayloadInput) using modelled bindings.
|
802 782 | pub struct TestPostNoPayloadInputFuture {
|
803 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TestPostNoPayloadInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
783 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TestPostNoPayloadInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
804 784 | }
|
805 785 | }
|
806 786 |
|
807 787 | impl std::future::Future for TestPostNoPayloadInputFuture {
|
808 788 | type Output = Result<
|
809 789 | crate::input::TestPostNoPayloadInput,
|
810 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
790 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
811 791 | >;
|
812 792 |
|
813 793 | fn poll(
|
814 794 | self: std::pin::Pin<&mut Self>,
|
815 795 | cx: &mut std::task::Context<'_>,
|
816 796 | ) -> std::task::Poll<Self::Output> {
|
817 797 | let this = self.project();
|
818 798 | this.inner.as_mut().poll(cx)
|
819 799 | }
|
820 800 | }
|
821 801 |
|
822 802 | impl<B>
|
823 - | ::aws_smithy_http_server::request::FromRequest<
|
824 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
803 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
804 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
825 805 | B,
|
826 806 | > for crate::input::TestPostNoPayloadInput
|
827 807 | where
|
828 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
808 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
829 809 | B: 'static,
|
830 810 |
|
831 811 | B::Data: Send,
|
832 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
833 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
812 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
813 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
834 814 | {
|
835 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
815 + | type Rejection =
|
816 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
836 817 | type Future = TestPostNoPayloadInputFuture;
|
837 818 |
|
838 819 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
839 820 | let fut = async move {
|
840 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
821 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
841 822 | request.headers(),
|
842 823 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
843 824 | ) {
|
844 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
825 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
845 826 | }
|
846 827 | crate::protocol_serde::shape_test_post_no_payload::de_test_post_no_payload_http_request(
|
847 828 | request,
|
848 829 | )
|
849 830 | .await
|
850 831 | };
|
851 832 | use ::futures_util::future::TryFutureExt;
|
852 - | let fut = fut.map_err(
|
853 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
854 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
855 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
856 - | e,
|
857 - | )
|
858 - | },
|
859 - | );
|
833 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
834 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
835 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
836 + | });
|
860 837 | TestPostNoPayloadInputFuture {
|
861 838 | inner: Box::pin(fut),
|
862 839 | }
|
863 840 | }
|
864 841 | }
|
865 842 | impl
|
866 - | ::aws_smithy_http_server::response::IntoResponse<
|
867 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
843 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
844 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
868 845 | > for crate::output::TestPostNoPayloadOutput
|
869 846 | {
|
870 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
847 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
871 848 | match crate::protocol_serde::shape_test_post_no_payload::ser_test_post_no_payload_http_response(self) {
|
872 849 | Ok(response) => response,
|
873 850 | Err(e) => {
|
874 851 | ::tracing::error!(error = %e, "failed to serialize response");
|
875 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
852 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
876 853 | }
|
877 854 | }
|
878 855 | }
|
879 856 | }
|
880 857 | impl
|
881 - | ::aws_smithy_http_server::response::IntoResponse<
|
882 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
858 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
859 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
883 860 | > for crate::error::TestPostNoPayloadError
|
884 861 | {
|
885 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
862 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
886 863 | match crate::protocol_serde::shape_test_post_no_payload::ser_test_post_no_payload_http_error(
|
887 864 | &self,
|
888 865 | ) {
|
889 866 | Ok(mut response) => {
|
890 867 | response.extensions_mut().insert(
|
891 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
868 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
869 + | self.name(),
|
870 + | ),
|
892 871 | );
|
893 872 | response
|
894 873 | }
|
895 874 | Err(e) => {
|
896 875 | ::tracing::error!(error = %e, "failed to serialize response");
|
897 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
876 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
898 877 | }
|
899 878 | }
|
900 879 | }
|
901 880 | }
|
902 881 |
|
903 882 | ::pin_project_lite::pin_project! {
|
904 883 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
905 884 | /// [`TestGetNoPayloadInput`](crate::input::TestGetNoPayloadInput) using modelled bindings.
|
906 885 | pub struct TestGetNoPayloadInputFuture {
|
907 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TestGetNoPayloadInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
886 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TestGetNoPayloadInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
908 887 | }
|
909 888 | }
|
910 889 |
|
911 890 | impl std::future::Future for TestGetNoPayloadInputFuture {
|
912 891 | type Output = Result<
|
913 892 | crate::input::TestGetNoPayloadInput,
|
914 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
893 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
915 894 | >;
|
916 895 |
|
917 896 | fn poll(
|
918 897 | self: std::pin::Pin<&mut Self>,
|
919 898 | cx: &mut std::task::Context<'_>,
|
920 899 | ) -> std::task::Poll<Self::Output> {
|
921 900 | let this = self.project();
|
922 901 | this.inner.as_mut().poll(cx)
|
923 902 | }
|
924 903 | }
|
925 904 |
|
926 905 | impl<B>
|
927 - | ::aws_smithy_http_server::request::FromRequest<
|
928 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
906 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
907 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
929 908 | B,
|
930 909 | > for crate::input::TestGetNoPayloadInput
|
931 910 | where
|
932 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
911 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
933 912 | B: 'static,
|
934 913 |
|
935 914 | B::Data: Send,
|
936 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
937 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
915 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
916 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
938 917 | {
|
939 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
918 + | type Rejection =
|
919 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
940 920 | type Future = TestGetNoPayloadInputFuture;
|
941 921 |
|
942 922 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
943 923 | let fut = async move {
|
944 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
924 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
945 925 | request.headers(),
|
946 926 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
947 927 | ) {
|
948 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
928 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
949 929 | }
|
950 930 | crate::protocol_serde::shape_test_get_no_payload::de_test_get_no_payload_http_request(
|
951 931 | request,
|
952 932 | )
|
953 933 | .await
|
954 934 | };
|
955 935 | use ::futures_util::future::TryFutureExt;
|
956 - | let fut = fut.map_err(
|
957 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
958 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
959 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
960 - | e,
|
961 - | )
|
962 - | },
|
963 - | );
|
936 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
937 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
938 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
939 + | });
|
964 940 | TestGetNoPayloadInputFuture {
|
965 941 | inner: Box::pin(fut),
|
966 942 | }
|
967 943 | }
|
968 944 | }
|
969 945 | impl
|
970 - | ::aws_smithy_http_server::response::IntoResponse<
|
971 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
946 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
947 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
972 948 | > for crate::output::TestGetNoPayloadOutput
|
973 949 | {
|
974 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
950 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
975 951 | match crate::protocol_serde::shape_test_get_no_payload::ser_test_get_no_payload_http_response(self) {
|
976 952 | Ok(response) => response,
|
977 953 | Err(e) => {
|
978 954 | ::tracing::error!(error = %e, "failed to serialize response");
|
979 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
955 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
980 956 | }
|
981 957 | }
|
982 958 | }
|
983 959 | }
|
984 960 | impl
|
985 - | ::aws_smithy_http_server::response::IntoResponse<
|
986 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
961 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
962 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
987 963 | > for crate::error::TestGetNoPayloadError
|
988 964 | {
|
989 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
965 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
990 966 | match crate::protocol_serde::shape_test_get_no_payload::ser_test_get_no_payload_http_error(
|
991 967 | &self,
|
992 968 | ) {
|
993 969 | Ok(mut response) => {
|
994 970 | response.extensions_mut().insert(
|
995 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
971 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
972 + | self.name(),
|
973 + | ),
|
996 974 | );
|
997 975 | response
|
998 976 | }
|
999 977 | Err(e) => {
|
1000 978 | ::tracing::error!(error = %e, "failed to serialize response");
|
1001 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
979 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1002 980 | }
|
1003 981 | }
|
1004 982 | }
|
1005 983 | }
|
1006 984 |
|
1007 985 | ::pin_project_lite::pin_project! {
|
1008 986 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
1009 987 | /// [`TestPayloadBlobInput`](crate::input::TestPayloadBlobInput) using modelled bindings.
|
1010 988 | pub struct TestPayloadBlobInputFuture {
|
1011 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TestPayloadBlobInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
989 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TestPayloadBlobInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1012 990 | }
|
1013 991 | }
|
1014 992 |
|
1015 993 | impl std::future::Future for TestPayloadBlobInputFuture {
|
1016 994 | type Output = Result<
|
1017 995 | crate::input::TestPayloadBlobInput,
|
1018 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
996 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1019 997 | >;
|
1020 998 |
|
1021 999 | fn poll(
|
1022 1000 | self: std::pin::Pin<&mut Self>,
|
1023 1001 | cx: &mut std::task::Context<'_>,
|
1024 1002 | ) -> std::task::Poll<Self::Output> {
|
1025 1003 | let this = self.project();
|
1026 1004 | this.inner.as_mut().poll(cx)
|
1027 1005 | }
|
1028 1006 | }
|
1029 1007 |
|
1030 1008 | impl<B>
|
1031 - | ::aws_smithy_http_server::request::FromRequest<
|
1032 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1009 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1010 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1033 1011 | B,
|
1034 1012 | > for crate::input::TestPayloadBlobInput
|
1035 1013 | where
|
1036 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
1014 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
1037 1015 | B: 'static,
|
1038 1016 |
|
1039 1017 | B::Data: Send,
|
1040 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1041 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
1018 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1019 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
1042 1020 | {
|
1043 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1021 + | type Rejection =
|
1022 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1044 1023 | type Future = TestPayloadBlobInputFuture;
|
1045 1024 |
|
1046 1025 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1047 1026 | let fut = async move {
|
1048 1027 | crate::protocol_serde::shape_test_payload_blob::de_test_payload_blob_http_request(
|
1049 1028 | request,
|
1050 1029 | )
|
1051 1030 | .await
|
1052 1031 | };
|
1053 1032 | use ::futures_util::future::TryFutureExt;
|
1054 - | let fut = fut.map_err(
|
1055 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1056 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1057 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
1058 - | e,
|
1059 - | )
|
1060 - | },
|
1061 - | );
|
1033 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1034 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1035 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
1036 + | });
|
1062 1037 | TestPayloadBlobInputFuture {
|
1063 1038 | inner: Box::pin(fut),
|
1064 1039 | }
|
1065 1040 | }
|
1066 1041 | }
|
1067 1042 | impl
|
1068 - | ::aws_smithy_http_server::response::IntoResponse<
|
1069 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1043 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1044 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1070 1045 | > for crate::output::TestPayloadBlobOutput
|
1071 1046 | {
|
1072 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1047 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1073 1048 | match crate::protocol_serde::shape_test_payload_blob::ser_test_payload_blob_http_response(
|
1074 1049 | self,
|
1075 1050 | ) {
|
1076 1051 | Ok(response) => response,
|
1077 1052 | Err(e) => {
|
1078 1053 | ::tracing::error!(error = %e, "failed to serialize response");
|
1079 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1054 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1080 1055 | }
|
1081 1056 | }
|
1082 1057 | }
|
1083 1058 | }
|
1084 1059 | impl
|
1085 - | ::aws_smithy_http_server::response::IntoResponse<
|
1086 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1060 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1061 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1087 1062 | > for crate::error::TestPayloadBlobError
|
1088 1063 | {
|
1089 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1064 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1090 1065 | match crate::protocol_serde::shape_test_payload_blob::ser_test_payload_blob_http_error(
|
1091 1066 | &self,
|
1092 1067 | ) {
|
1093 1068 | Ok(mut response) => {
|
1094 1069 | response.extensions_mut().insert(
|
1095 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
1070 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
1071 + | self.name(),
|
1072 + | ),
|
1096 1073 | );
|
1097 1074 | response
|
1098 1075 | }
|
1099 1076 | Err(e) => {
|
1100 1077 | ::tracing::error!(error = %e, "failed to serialize response");
|
1101 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1078 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1102 1079 | }
|
1103 1080 | }
|
1104 1081 | }
|
1105 1082 | }
|
1106 1083 |
|
1107 1084 | ::pin_project_lite::pin_project! {
|
1108 1085 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
1109 1086 | /// [`TestPayloadStructureInput`](crate::input::TestPayloadStructureInput) using modelled bindings.
|
1110 1087 | pub struct TestPayloadStructureInputFuture {
|
1111 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TestPayloadStructureInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1088 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TestPayloadStructureInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1112 1089 | }
|
1113 1090 | }
|
1114 1091 |
|
1115 1092 | impl std::future::Future for TestPayloadStructureInputFuture {
|
1116 1093 | type Output = Result<
|
1117 1094 | crate::input::TestPayloadStructureInput,
|
1118 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1095 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1119 1096 | >;
|
1120 1097 |
|
1121 1098 | fn poll(
|
1122 1099 | self: std::pin::Pin<&mut Self>,
|
1123 1100 | cx: &mut std::task::Context<'_>,
|
1124 1101 | ) -> std::task::Poll<Self::Output> {
|
1125 1102 | let this = self.project();
|
1126 1103 | this.inner.as_mut().poll(cx)
|
1127 1104 | }
|
1128 1105 | }
|
1129 1106 |
|
1130 1107 | impl<B>
|
1131 - | ::aws_smithy_http_server::request::FromRequest<
|
1132 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1108 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1109 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1133 1110 | B,
|
1134 1111 | > for crate::input::TestPayloadStructureInput
|
1135 1112 | where
|
1136 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
1113 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
1137 1114 | B: 'static,
|
1138 1115 |
|
1139 1116 | B::Data: Send,
|
1140 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1141 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
1117 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1118 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
1142 1119 | {
|
1143 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1120 + | type Rejection =
|
1121 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1144 1122 | type Future = TestPayloadStructureInputFuture;
|
1145 1123 |
|
1146 1124 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1147 1125 | let fut = async move {
|
1148 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
1126 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
1149 1127 | request.headers(),
|
1150 1128 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
1151 1129 | ) {
|
1152 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1130 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1153 1131 | }
|
1154 1132 | crate::protocol_serde::shape_test_payload_structure::de_test_payload_structure_http_request(request)
|
1155 1133 | .await
|
1156 1134 | };
|
1157 1135 | use ::futures_util::future::TryFutureExt;
|
1158 - | let fut = fut.map_err(
|
1159 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1160 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1161 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
1162 - | e,
|
1163 - | )
|
1164 - | },
|
1165 - | );
|
1136 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1137 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1138 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
1139 + | });
|
1166 1140 | TestPayloadStructureInputFuture {
|
1167 1141 | inner: Box::pin(fut),
|
1168 1142 | }
|
1169 1143 | }
|
1170 1144 | }
|
1171 1145 | impl
|
1172 - | ::aws_smithy_http_server::response::IntoResponse<
|
1173 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1146 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1147 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1174 1148 | > for crate::output::TestPayloadStructureOutput
|
1175 1149 | {
|
1176 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1150 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1177 1151 | match crate::protocol_serde::shape_test_payload_structure::ser_test_payload_structure_http_response(self) {
|
1178 1152 | Ok(response) => response,
|
1179 1153 | Err(e) => {
|
1180 1154 | ::tracing::error!(error = %e, "failed to serialize response");
|
1181 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1155 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1182 1156 | }
|
1183 1157 | }
|
1184 1158 | }
|
1185 1159 | }
|
1186 1160 | impl
|
1187 - | ::aws_smithy_http_server::response::IntoResponse<
|
1188 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1161 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1162 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1189 1163 | > for crate::error::TestPayloadStructureError
|
1190 1164 | {
|
1191 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1165 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1192 1166 | match crate::protocol_serde::shape_test_payload_structure::ser_test_payload_structure_http_error(&self) {
|
1193 1167 | Ok(mut response) => {
|
1194 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1168 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1195 1169 | response
|
1196 1170 | },
|
1197 1171 | Err(e) => {
|
1198 1172 | ::tracing::error!(error = %e, "failed to serialize response");
|
1199 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1173 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1200 1174 | }
|
1201 1175 | }
|
1202 1176 | }
|
1203 1177 | }
|
1204 1178 |
|
1205 1179 | ::pin_project_lite::pin_project! {
|
1206 1180 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
1207 1181 | /// [`TestBodyStructureInput`](crate::input::TestBodyStructureInput) using modelled bindings.
|
1208 1182 | pub struct TestBodyStructureInputFuture {
|
1209 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TestBodyStructureInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1183 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TestBodyStructureInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1210 1184 | }
|
1211 1185 | }
|
1212 1186 |
|
1213 1187 | impl std::future::Future for TestBodyStructureInputFuture {
|
1214 1188 | type Output = Result<
|
1215 1189 | crate::input::TestBodyStructureInput,
|
1216 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1190 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1217 1191 | >;
|
1218 1192 |
|
1219 1193 | fn poll(
|
1220 1194 | self: std::pin::Pin<&mut Self>,
|
1221 1195 | cx: &mut std::task::Context<'_>,
|
1222 1196 | ) -> std::task::Poll<Self::Output> {
|
1223 1197 | let this = self.project();
|
1224 1198 | this.inner.as_mut().poll(cx)
|
1225 1199 | }
|
1226 1200 | }
|
1227 1201 |
|
1228 1202 | impl<B>
|
1229 - | ::aws_smithy_http_server::request::FromRequest<
|
1230 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1203 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1204 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1231 1205 | B,
|
1232 1206 | > for crate::input::TestBodyStructureInput
|
1233 1207 | where
|
1234 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
1208 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
1235 1209 | B: 'static,
|
1236 1210 |
|
1237 1211 | B::Data: Send,
|
1238 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1239 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
1212 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1213 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
1240 1214 | {
|
1241 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1215 + | type Rejection =
|
1216 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1242 1217 | type Future = TestBodyStructureInputFuture;
|
1243 1218 |
|
1244 1219 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1245 1220 | let fut = async move {
|
1246 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
1221 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
1247 1222 | request.headers(),
|
1248 1223 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
1249 1224 | ) {
|
1250 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1225 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1251 1226 | }
|
1252 1227 | crate::protocol_serde::shape_test_body_structure::de_test_body_structure_http_request(
|
1253 1228 | request,
|
1254 1229 | )
|
1255 1230 | .await
|
1256 1231 | };
|
1257 1232 | use ::futures_util::future::TryFutureExt;
|
1258 - | let fut = fut.map_err(
|
1259 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1260 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1261 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
1262 - | e,
|
1263 - | )
|
1264 - | },
|
1265 - | );
|
1233 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1234 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1235 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
1236 + | });
|
1266 1237 | TestBodyStructureInputFuture {
|
1267 1238 | inner: Box::pin(fut),
|
1268 1239 | }
|
1269 1240 | }
|
1270 1241 | }
|
1271 1242 | impl
|
1272 - | ::aws_smithy_http_server::response::IntoResponse<
|
1273 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1243 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1244 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1274 1245 | > for crate::output::TestBodyStructureOutput
|
1275 1246 | {
|
1276 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1247 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1277 1248 | match crate::protocol_serde::shape_test_body_structure::ser_test_body_structure_http_response(self) {
|
1278 1249 | Ok(response) => response,
|
1279 1250 | Err(e) => {
|
1280 1251 | ::tracing::error!(error = %e, "failed to serialize response");
|
1281 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1252 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1282 1253 | }
|
1283 1254 | }
|
1284 1255 | }
|
1285 1256 | }
|
1286 1257 | impl
|
1287 - | ::aws_smithy_http_server::response::IntoResponse<
|
1288 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1258 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1259 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1289 1260 | > for crate::error::TestBodyStructureError
|
1290 1261 | {
|
1291 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1262 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1292 1263 | match crate::protocol_serde::shape_test_body_structure::ser_test_body_structure_http_error(
|
1293 1264 | &self,
|
1294 1265 | ) {
|
1295 1266 | Ok(mut response) => {
|
1296 1267 | response.extensions_mut().insert(
|
1297 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
1268 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
1269 + | self.name(),
|
1270 + | ),
|
1298 1271 | );
|
1299 1272 | response
|
1300 1273 | }
|
1301 1274 | Err(e) => {
|
1302 1275 | ::tracing::error!(error = %e, "failed to serialize response");
|
1303 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1276 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1304 1277 | }
|
1305 1278 | }
|
1306 1279 | }
|
1307 1280 | }
|
1308 1281 |
|
1309 1282 | ::pin_project_lite::pin_project! {
|
1310 1283 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
1311 1284 | /// [`MalformedAcceptWithGenericStringInput`](crate::input::MalformedAcceptWithGenericStringInput) using modelled bindings.
|
1312 1285 | pub struct MalformedAcceptWithGenericStringInputFuture {
|
1313 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedAcceptWithGenericStringInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1286 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedAcceptWithGenericStringInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1314 1287 | }
|
1315 1288 | }
|
1316 1289 |
|
1317 1290 | impl std::future::Future for MalformedAcceptWithGenericStringInputFuture {
|
1318 1291 | type Output = Result<
|
1319 1292 | crate::input::MalformedAcceptWithGenericStringInput,
|
1320 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1293 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1321 1294 | >;
|
1322 1295 |
|
1323 1296 | fn poll(
|
1324 1297 | self: std::pin::Pin<&mut Self>,
|
1325 1298 | cx: &mut std::task::Context<'_>,
|
1326 1299 | ) -> std::task::Poll<Self::Output> {
|
1327 1300 | let this = self.project();
|
1328 1301 | this.inner.as_mut().poll(cx)
|
1329 1302 | }
|
1330 1303 | }
|
1331 1304 |
|
1332 1305 | impl<B>
|
1333 - | ::aws_smithy_http_server::request::FromRequest<
|
1334 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1306 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1307 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1335 1308 | B,
|
1336 1309 | > for crate::input::MalformedAcceptWithGenericStringInput
|
1337 1310 | where
|
1338 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
1311 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
1339 1312 | B: 'static,
|
1340 1313 |
|
1341 1314 | B::Data: Send,
|
1342 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1343 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
1315 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1316 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
1344 1317 | {
|
1345 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1318 + | type Rejection =
|
1319 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1346 1320 | type Future = MalformedAcceptWithGenericStringInputFuture;
|
1347 1321 |
|
1348 1322 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1349 1323 | let fut = async move {
|
1350 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
1324 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
1351 1325 | request.headers(),
|
1352 1326 | &crate::mimes::CONTENT_TYPE_TEXT_PLAIN,
|
1353 1327 | ) {
|
1354 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1328 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1355 1329 | }
|
1356 1330 | crate::protocol_serde::shape_malformed_accept_with_generic_string::de_malformed_accept_with_generic_string_http_request(request)
|
1357 1331 | .await
|
1358 1332 | };
|
1359 1333 | use ::futures_util::future::TryFutureExt;
|
1360 - | let fut = fut.map_err(
|
1361 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1362 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1363 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
1364 - | e,
|
1365 - | )
|
1366 - | },
|
1367 - | );
|
1334 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1335 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1336 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
1337 + | });
|
1368 1338 | MalformedAcceptWithGenericStringInputFuture {
|
1369 1339 | inner: Box::pin(fut),
|
1370 1340 | }
|
1371 1341 | }
|
1372 1342 | }
|
1373 1343 | impl
|
1374 - | ::aws_smithy_http_server::response::IntoResponse<
|
1375 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1344 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1345 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1376 1346 | > for crate::output::MalformedAcceptWithGenericStringOutput
|
1377 1347 | {
|
1378 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1348 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1379 1349 | match crate::protocol_serde::shape_malformed_accept_with_generic_string::ser_malformed_accept_with_generic_string_http_response(self) {
|
1380 1350 | Ok(response) => response,
|
1381 1351 | Err(e) => {
|
1382 1352 | ::tracing::error!(error = %e, "failed to serialize response");
|
1383 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1353 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1384 1354 | }
|
1385 1355 | }
|
1386 1356 | }
|
1387 1357 | }
|
1388 1358 | impl
|
1389 - | ::aws_smithy_http_server::response::IntoResponse<
|
1390 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1359 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1360 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1391 1361 | > for crate::error::MalformedAcceptWithGenericStringError
|
1392 1362 | {
|
1393 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1363 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1394 1364 | match crate::protocol_serde::shape_malformed_accept_with_generic_string::ser_malformed_accept_with_generic_string_http_error(&self) {
|
1395 1365 | Ok(mut response) => {
|
1396 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1366 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1397 1367 | response
|
1398 1368 | },
|
1399 1369 | Err(e) => {
|
1400 1370 | ::tracing::error!(error = %e, "failed to serialize response");
|
1401 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1371 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1402 1372 | }
|
1403 1373 | }
|
1404 1374 | }
|
1405 1375 | }
|
1406 1376 |
|
1407 1377 | ::pin_project_lite::pin_project! {
|
1408 1378 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
1409 1379 | /// [`MalformedAcceptWithPayloadInput`](crate::input::MalformedAcceptWithPayloadInput) using modelled bindings.
|
1410 1380 | pub struct MalformedAcceptWithPayloadInputFuture {
|
1411 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedAcceptWithPayloadInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1381 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedAcceptWithPayloadInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1412 1382 | }
|
1413 1383 | }
|
1414 1384 |
|
1415 1385 | impl std::future::Future for MalformedAcceptWithPayloadInputFuture {
|
1416 1386 | type Output = Result<
|
1417 1387 | crate::input::MalformedAcceptWithPayloadInput,
|
1418 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1388 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1419 1389 | >;
|
1420 1390 |
|
1421 1391 | fn poll(
|
1422 1392 | self: std::pin::Pin<&mut Self>,
|
1423 1393 | cx: &mut std::task::Context<'_>,
|
1424 1394 | ) -> std::task::Poll<Self::Output> {
|
1425 1395 | let this = self.project();
|
1426 1396 | this.inner.as_mut().poll(cx)
|
1427 1397 | }
|
1428 1398 | }
|
1429 1399 |
|
1430 1400 | impl<B>
|
1431 - | ::aws_smithy_http_server::request::FromRequest<
|
1432 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1401 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1402 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1433 1403 | B,
|
1434 1404 | > for crate::input::MalformedAcceptWithPayloadInput
|
1435 1405 | where
|
1436 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
1406 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
1437 1407 | B: 'static,
|
1438 1408 |
|
1439 1409 | B::Data: Send,
|
1440 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1441 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
1410 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1411 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
1442 1412 | {
|
1443 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1413 + | type Rejection =
|
1414 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1444 1415 | type Future = MalformedAcceptWithPayloadInputFuture;
|
1445 1416 |
|
1446 1417 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1447 1418 | let fut = async move {
|
1448 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
1419 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
1449 1420 | request.headers(),
|
1450 1421 | &crate::mimes::CONTENT_TYPE_IMAGE_JPEG,
|
1451 1422 | ) {
|
1452 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1423 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1453 1424 | }
|
1454 1425 | crate::protocol_serde::shape_malformed_accept_with_payload::de_malformed_accept_with_payload_http_request(request)
|
1455 1426 | .await
|
1456 1427 | };
|
1457 1428 | use ::futures_util::future::TryFutureExt;
|
1458 - | let fut = fut.map_err(
|
1459 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1460 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1461 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
1462 - | e,
|
1463 - | )
|
1464 - | },
|
1465 - | );
|
1429 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1430 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1431 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
1432 + | });
|
1466 1433 | MalformedAcceptWithPayloadInputFuture {
|
1467 1434 | inner: Box::pin(fut),
|
1468 1435 | }
|
1469 1436 | }
|
1470 1437 | }
|
1471 1438 | impl
|
1472 - | ::aws_smithy_http_server::response::IntoResponse<
|
1473 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1439 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1440 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1474 1441 | > for crate::output::MalformedAcceptWithPayloadOutput
|
1475 1442 | {
|
1476 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1443 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1477 1444 | match crate::protocol_serde::shape_malformed_accept_with_payload::ser_malformed_accept_with_payload_http_response(self) {
|
1478 1445 | Ok(response) => response,
|
1479 1446 | Err(e) => {
|
1480 1447 | ::tracing::error!(error = %e, "failed to serialize response");
|
1481 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1448 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1482 1449 | }
|
1483 1450 | }
|
1484 1451 | }
|
1485 1452 | }
|
1486 1453 | impl
|
1487 - | ::aws_smithy_http_server::response::IntoResponse<
|
1488 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1454 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1455 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1489 1456 | > for crate::error::MalformedAcceptWithPayloadError
|
1490 1457 | {
|
1491 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1458 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1492 1459 | match crate::protocol_serde::shape_malformed_accept_with_payload::ser_malformed_accept_with_payload_http_error(&self) {
|
1493 1460 | Ok(mut response) => {
|
1494 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1461 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1495 1462 | response
|
1496 1463 | },
|
1497 1464 | Err(e) => {
|
1498 1465 | ::tracing::error!(error = %e, "failed to serialize response");
|
1499 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1466 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1500 1467 | }
|
1501 1468 | }
|
1502 1469 | }
|
1503 1470 | }
|
1504 1471 |
|
1505 1472 | ::pin_project_lite::pin_project! {
|
1506 1473 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
1507 1474 | /// [`MalformedAcceptWithBodyInput`](crate::input::MalformedAcceptWithBodyInput) using modelled bindings.
|
1508 1475 | pub struct MalformedAcceptWithBodyInputFuture {
|
1509 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedAcceptWithBodyInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1476 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedAcceptWithBodyInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1510 1477 | }
|
1511 1478 | }
|
1512 1479 |
|
1513 1480 | impl std::future::Future for MalformedAcceptWithBodyInputFuture {
|
1514 1481 | type Output = Result<
|
1515 1482 | crate::input::MalformedAcceptWithBodyInput,
|
1516 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1483 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1517 1484 | >;
|
1518 1485 |
|
1519 1486 | fn poll(
|
1520 1487 | self: std::pin::Pin<&mut Self>,
|
1521 1488 | cx: &mut std::task::Context<'_>,
|
1522 1489 | ) -> std::task::Poll<Self::Output> {
|
1523 1490 | let this = self.project();
|
1524 1491 | this.inner.as_mut().poll(cx)
|
1525 1492 | }
|
1526 1493 | }
|
1527 1494 |
|
1528 1495 | impl<B>
|
1529 - | ::aws_smithy_http_server::request::FromRequest<
|
1530 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1496 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1497 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1531 1498 | B,
|
1532 1499 | > for crate::input::MalformedAcceptWithBodyInput
|
1533 1500 | where
|
1534 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
1501 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
1535 1502 | B: 'static,
|
1536 1503 |
|
1537 1504 | B::Data: Send,
|
1538 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1539 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
1505 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1506 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
1540 1507 | {
|
1541 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1508 + | type Rejection =
|
1509 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1542 1510 | type Future = MalformedAcceptWithBodyInputFuture;
|
1543 1511 |
|
1544 1512 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1545 1513 | let fut = async move {
|
1546 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
1514 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
1547 1515 | request.headers(),
|
1548 1516 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
1549 1517 | ) {
|
1550 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1518 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1551 1519 | }
|
1552 1520 | crate::protocol_serde::shape_malformed_accept_with_body::de_malformed_accept_with_body_http_request(request)
|
1553 1521 | .await
|
1554 1522 | };
|
1555 1523 | use ::futures_util::future::TryFutureExt;
|
1556 - | let fut = fut.map_err(
|
1557 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1558 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1559 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
1560 - | e,
|
1561 - | )
|
1562 - | },
|
1563 - | );
|
1524 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1525 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1526 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
1527 + | });
|
1564 1528 | MalformedAcceptWithBodyInputFuture {
|
1565 1529 | inner: Box::pin(fut),
|
1566 1530 | }
|
1567 1531 | }
|
1568 1532 | }
|
1569 1533 | impl
|
1570 - | ::aws_smithy_http_server::response::IntoResponse<
|
1571 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1534 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1535 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1572 1536 | > for crate::output::MalformedAcceptWithBodyOutput
|
1573 1537 | {
|
1574 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1538 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1575 1539 | match crate::protocol_serde::shape_malformed_accept_with_body::ser_malformed_accept_with_body_http_response(self) {
|
1576 1540 | Ok(response) => response,
|
1577 1541 | Err(e) => {
|
1578 1542 | ::tracing::error!(error = %e, "failed to serialize response");
|
1579 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1543 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1580 1544 | }
|
1581 1545 | }
|
1582 1546 | }
|
1583 1547 | }
|
1584 1548 | impl
|
1585 - | ::aws_smithy_http_server::response::IntoResponse<
|
1586 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1549 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1550 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1587 1551 | > for crate::error::MalformedAcceptWithBodyError
|
1588 1552 | {
|
1589 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1553 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1590 1554 | match crate::protocol_serde::shape_malformed_accept_with_body::ser_malformed_accept_with_body_http_error(&self) {
|
1591 1555 | Ok(mut response) => {
|
1592 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1556 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1593 1557 | response
|
1594 1558 | },
|
1595 1559 | Err(e) => {
|
1596 1560 | ::tracing::error!(error = %e, "failed to serialize response");
|
1597 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1561 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1598 1562 | }
|
1599 1563 | }
|
1600 1564 | }
|
1601 1565 | }
|
1602 1566 |
|
1603 1567 | ::pin_project_lite::pin_project! {
|
1604 1568 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
1605 1569 | /// [`MalformedContentTypeWithGenericStringInput`](crate::input::MalformedContentTypeWithGenericStringInput) using modelled bindings.
|
1606 1570 | pub struct MalformedContentTypeWithGenericStringInputFuture {
|
1607 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedContentTypeWithGenericStringInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1571 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedContentTypeWithGenericStringInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1608 1572 | }
|
1609 1573 | }
|
1610 1574 |
|
1611 1575 | impl std::future::Future for MalformedContentTypeWithGenericStringInputFuture {
|
1612 1576 | type Output = Result<
|
1613 1577 | crate::input::MalformedContentTypeWithGenericStringInput,
|
1614 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1578 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1615 1579 | >;
|
1616 1580 |
|
1617 1581 | fn poll(
|
1618 1582 | self: std::pin::Pin<&mut Self>,
|
1619 1583 | cx: &mut std::task::Context<'_>,
|
1620 1584 | ) -> std::task::Poll<Self::Output> {
|
1621 1585 | let this = self.project();
|
1622 1586 | this.inner.as_mut().poll(cx)
|
1623 1587 | }
|
1624 1588 | }
|
1625 1589 |
|
1626 1590 | impl<B>
|
1627 - | ::aws_smithy_http_server::request::FromRequest<
|
1628 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1591 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1592 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1629 1593 | B,
|
1630 1594 | > for crate::input::MalformedContentTypeWithGenericStringInput
|
1631 1595 | where
|
1632 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
1596 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
1633 1597 | B: 'static,
|
1634 1598 |
|
1635 1599 | B::Data: Send,
|
1636 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1637 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
1600 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1601 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
1638 1602 | {
|
1639 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1603 + | type Rejection =
|
1604 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1640 1605 | type Future = MalformedContentTypeWithGenericStringInputFuture;
|
1641 1606 |
|
1642 1607 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1643 1608 | let fut = async move {
|
1644 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
1609 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
1645 1610 | request.headers(),
|
1646 1611 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
1647 1612 | ) {
|
1648 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1613 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1649 1614 | }
|
1650 1615 | crate::protocol_serde::shape_malformed_content_type_with_generic_string::de_malformed_content_type_with_generic_string_http_request(request)
|
1651 1616 | .await
|
1652 1617 | };
|
1653 1618 | use ::futures_util::future::TryFutureExt;
|
1654 - | let fut = fut.map_err(
|
1655 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1656 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1657 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
1658 - | e,
|
1659 - | )
|
1660 - | },
|
1661 - | );
|
1619 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1620 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1621 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
1622 + | });
|
1662 1623 | MalformedContentTypeWithGenericStringInputFuture {
|
1663 1624 | inner: Box::pin(fut),
|
1664 1625 | }
|
1665 1626 | }
|
1666 1627 | }
|
1667 1628 | impl
|
1668 - | ::aws_smithy_http_server::response::IntoResponse<
|
1669 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1629 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1630 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1670 1631 | > for crate::output::MalformedContentTypeWithGenericStringOutput
|
1671 1632 | {
|
1672 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1633 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1673 1634 | match crate::protocol_serde::shape_malformed_content_type_with_generic_string::ser_malformed_content_type_with_generic_string_http_response(self) {
|
1674 1635 | Ok(response) => response,
|
1675 1636 | Err(e) => {
|
1676 1637 | ::tracing::error!(error = %e, "failed to serialize response");
|
1677 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1638 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1678 1639 | }
|
1679 1640 | }
|
1680 1641 | }
|
1681 1642 | }
|
1682 1643 | impl
|
1683 - | ::aws_smithy_http_server::response::IntoResponse<
|
1684 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1644 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1645 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1685 1646 | > for crate::error::MalformedContentTypeWithGenericStringError
|
1686 1647 | {
|
1687 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1648 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1688 1649 | match crate::protocol_serde::shape_malformed_content_type_with_generic_string::ser_malformed_content_type_with_generic_string_http_error(&self) {
|
1689 1650 | Ok(mut response) => {
|
1690 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1651 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1691 1652 | response
|
1692 1653 | },
|
1693 1654 | Err(e) => {
|
1694 1655 | ::tracing::error!(error = %e, "failed to serialize response");
|
1695 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1656 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1696 1657 | }
|
1697 1658 | }
|
1698 1659 | }
|
1699 1660 | }
|
1700 1661 |
|
1701 1662 | ::pin_project_lite::pin_project! {
|
1702 1663 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
1703 1664 | /// [`MalformedContentTypeWithPayloadInput`](crate::input::MalformedContentTypeWithPayloadInput) using modelled bindings.
|
1704 1665 | pub struct MalformedContentTypeWithPayloadInputFuture {
|
1705 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedContentTypeWithPayloadInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1666 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedContentTypeWithPayloadInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1706 1667 | }
|
1707 1668 | }
|
1708 1669 |
|
1709 1670 | impl std::future::Future for MalformedContentTypeWithPayloadInputFuture {
|
1710 1671 | type Output = Result<
|
1711 1672 | crate::input::MalformedContentTypeWithPayloadInput,
|
1712 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1673 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1713 1674 | >;
|
1714 1675 |
|
1715 1676 | fn poll(
|
1716 1677 | self: std::pin::Pin<&mut Self>,
|
1717 1678 | cx: &mut std::task::Context<'_>,
|
1718 1679 | ) -> std::task::Poll<Self::Output> {
|
1719 1680 | let this = self.project();
|
1720 1681 | this.inner.as_mut().poll(cx)
|
1721 1682 | }
|
1722 1683 | }
|
1723 1684 |
|
1724 1685 | impl<B>
|
1725 - | ::aws_smithy_http_server::request::FromRequest<
|
1726 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1686 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1687 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1727 1688 | B,
|
1728 1689 | > for crate::input::MalformedContentTypeWithPayloadInput
|
1729 1690 | where
|
1730 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
1691 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
1731 1692 | B: 'static,
|
1732 1693 |
|
1733 1694 | B::Data: Send,
|
1734 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1735 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
1695 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1696 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
1736 1697 | {
|
1737 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1698 + | type Rejection =
|
1699 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1738 1700 | type Future = MalformedContentTypeWithPayloadInputFuture;
|
1739 1701 |
|
1740 1702 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1741 1703 | let fut = async move {
|
1742 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
1704 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
1743 1705 | request.headers(),
|
1744 1706 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
1745 1707 | ) {
|
1746 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1708 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1747 1709 | }
|
1748 1710 | crate::protocol_serde::shape_malformed_content_type_with_payload::de_malformed_content_type_with_payload_http_request(request)
|
1749 1711 | .await
|
1750 1712 | };
|
1751 1713 | use ::futures_util::future::TryFutureExt;
|
1752 - | let fut = fut.map_err(
|
1753 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1754 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1755 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
1756 - | e,
|
1757 - | )
|
1758 - | },
|
1759 - | );
|
1714 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1715 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1716 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
1717 + | });
|
1760 1718 | MalformedContentTypeWithPayloadInputFuture {
|
1761 1719 | inner: Box::pin(fut),
|
1762 1720 | }
|
1763 1721 | }
|
1764 1722 | }
|
1765 1723 | impl
|
1766 - | ::aws_smithy_http_server::response::IntoResponse<
|
1767 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1724 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1725 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1768 1726 | > for crate::output::MalformedContentTypeWithPayloadOutput
|
1769 1727 | {
|
1770 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1728 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1771 1729 | match crate::protocol_serde::shape_malformed_content_type_with_payload::ser_malformed_content_type_with_payload_http_response(self) {
|
1772 1730 | Ok(response) => response,
|
1773 1731 | Err(e) => {
|
1774 1732 | ::tracing::error!(error = %e, "failed to serialize response");
|
1775 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1733 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1776 1734 | }
|
1777 1735 | }
|
1778 1736 | }
|
1779 1737 | }
|
1780 1738 | impl
|
1781 - | ::aws_smithy_http_server::response::IntoResponse<
|
1782 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1739 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1740 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1783 1741 | > for crate::error::MalformedContentTypeWithPayloadError
|
1784 1742 | {
|
1785 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1743 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1786 1744 | match crate::protocol_serde::shape_malformed_content_type_with_payload::ser_malformed_content_type_with_payload_http_error(&self) {
|
1787 1745 | Ok(mut response) => {
|
1788 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1746 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1789 1747 | response
|
1790 1748 | },
|
1791 1749 | Err(e) => {
|
1792 1750 | ::tracing::error!(error = %e, "failed to serialize response");
|
1793 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1751 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1794 1752 | }
|
1795 1753 | }
|
1796 1754 | }
|
1797 1755 | }
|
1798 1756 |
|
1799 1757 | ::pin_project_lite::pin_project! {
|
1800 1758 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
1801 1759 | /// [`MalformedContentTypeWithBodyInput`](crate::input::MalformedContentTypeWithBodyInput) using modelled bindings.
|
1802 1760 | pub struct MalformedContentTypeWithBodyInputFuture {
|
1803 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedContentTypeWithBodyInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1761 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedContentTypeWithBodyInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1804 1762 | }
|
1805 1763 | }
|
1806 1764 |
|
1807 1765 | impl std::future::Future for MalformedContentTypeWithBodyInputFuture {
|
1808 1766 | type Output = Result<
|
1809 1767 | crate::input::MalformedContentTypeWithBodyInput,
|
1810 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1768 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1811 1769 | >;
|
1812 1770 |
|
1813 1771 | fn poll(
|
1814 1772 | self: std::pin::Pin<&mut Self>,
|
1815 1773 | cx: &mut std::task::Context<'_>,
|
1816 1774 | ) -> std::task::Poll<Self::Output> {
|
1817 1775 | let this = self.project();
|
1818 1776 | this.inner.as_mut().poll(cx)
|
1819 1777 | }
|
1820 1778 | }
|
1821 1779 |
|
1822 1780 | impl<B>
|
1823 - | ::aws_smithy_http_server::request::FromRequest<
|
1824 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1781 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1782 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1825 1783 | B,
|
1826 1784 | > for crate::input::MalformedContentTypeWithBodyInput
|
1827 1785 | where
|
1828 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
1786 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
1829 1787 | B: 'static,
|
1830 1788 |
|
1831 1789 | B::Data: Send,
|
1832 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1833 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
1790 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1791 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
1834 1792 | {
|
1835 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1793 + | type Rejection =
|
1794 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1836 1795 | type Future = MalformedContentTypeWithBodyInputFuture;
|
1837 1796 |
|
1838 1797 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1839 1798 | let fut = async move {
|
1840 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
1799 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
1841 1800 | request.headers(),
|
1842 1801 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
1843 1802 | ) {
|
1844 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1803 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1845 1804 | }
|
1846 1805 | crate::protocol_serde::shape_malformed_content_type_with_body::de_malformed_content_type_with_body_http_request(request)
|
1847 1806 | .await
|
1848 1807 | };
|
1849 1808 | use ::futures_util::future::TryFutureExt;
|
1850 - | let fut = fut.map_err(
|
1851 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1852 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1853 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
1854 - | e,
|
1855 - | )
|
1856 - | },
|
1857 - | );
|
1809 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1810 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1811 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
1812 + | });
|
1858 1813 | MalformedContentTypeWithBodyInputFuture {
|
1859 1814 | inner: Box::pin(fut),
|
1860 1815 | }
|
1861 1816 | }
|
1862 1817 | }
|
1863 1818 | impl
|
1864 - | ::aws_smithy_http_server::response::IntoResponse<
|
1865 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1819 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1820 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1866 1821 | > for crate::output::MalformedContentTypeWithBodyOutput
|
1867 1822 | {
|
1868 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1823 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1869 1824 | match crate::protocol_serde::shape_malformed_content_type_with_body::ser_malformed_content_type_with_body_http_response(self) {
|
1870 1825 | Ok(response) => response,
|
1871 1826 | Err(e) => {
|
1872 1827 | ::tracing::error!(error = %e, "failed to serialize response");
|
1873 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1828 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1874 1829 | }
|
1875 1830 | }
|
1876 1831 | }
|
1877 1832 | }
|
1878 1833 | impl
|
1879 - | ::aws_smithy_http_server::response::IntoResponse<
|
1880 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1834 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1835 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1881 1836 | > for crate::error::MalformedContentTypeWithBodyError
|
1882 1837 | {
|
1883 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1838 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1884 1839 | match crate::protocol_serde::shape_malformed_content_type_with_body::ser_malformed_content_type_with_body_http_error(&self) {
|
1885 1840 | Ok(mut response) => {
|
1886 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1841 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1887 1842 | response
|
1888 1843 | },
|
1889 1844 | Err(e) => {
|
1890 1845 | ::tracing::error!(error = %e, "failed to serialize response");
|
1891 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1846 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1892 1847 | }
|
1893 1848 | }
|
1894 1849 | }
|
1895 1850 | }
|
1896 1851 |
|
1897 1852 | ::pin_project_lite::pin_project! {
|
1898 1853 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
1899 1854 | /// [`MalformedContentTypeWithoutBodyEmptyInputInput`](crate::input::MalformedContentTypeWithoutBodyEmptyInputInput) using modelled bindings.
|
1900 1855 | pub struct MalformedContentTypeWithoutBodyEmptyInputInputFuture {
|
1901 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedContentTypeWithoutBodyEmptyInputInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1856 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedContentTypeWithoutBodyEmptyInputInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1902 1857 | }
|
1903 1858 | }
|
1904 1859 |
|
1905 1860 | impl std::future::Future for MalformedContentTypeWithoutBodyEmptyInputInputFuture {
|
1906 1861 | type Output = Result<
|
1907 1862 | crate::input::MalformedContentTypeWithoutBodyEmptyInputInput,
|
1908 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1863 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1909 1864 | >;
|
1910 1865 |
|
1911 1866 | fn poll(
|
1912 1867 | self: std::pin::Pin<&mut Self>,
|
1913 1868 | cx: &mut std::task::Context<'_>,
|
1914 1869 | ) -> std::task::Poll<Self::Output> {
|
1915 1870 | let this = self.project();
|
1916 1871 | this.inner.as_mut().poll(cx)
|
1917 1872 | }
|
1918 1873 | }
|
1919 1874 |
|
1920 1875 | impl<B>
|
1921 - | ::aws_smithy_http_server::request::FromRequest<
|
1922 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1876 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1877 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1923 1878 | B,
|
1924 1879 | > for crate::input::MalformedContentTypeWithoutBodyEmptyInputInput
|
1925 1880 | where
|
1926 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
1881 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
1927 1882 | B: 'static,
|
1928 1883 |
|
1929 1884 | B::Data: Send,
|
1930 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1931 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
1885 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1886 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
1932 1887 | {
|
1933 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1888 + | type Rejection =
|
1889 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1934 1890 | type Future = MalformedContentTypeWithoutBodyEmptyInputInputFuture;
|
1935 1891 |
|
1936 1892 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1937 1893 | let fut = async move {
|
1938 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
1894 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
1939 1895 | request.headers(),
|
1940 1896 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
1941 1897 | ) {
|
1942 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1898 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1943 1899 | }
|
1944 1900 | crate::protocol_serde::shape_malformed_content_type_without_body_empty_input::de_malformed_content_type_without_body_empty_input_http_request(request)
|
1945 1901 | .await
|
1946 1902 | };
|
1947 1903 | use ::futures_util::future::TryFutureExt;
|
1948 - | let fut = fut.map_err(
|
1949 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1950 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1951 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
1952 - | e,
|
1953 - | )
|
1954 - | },
|
1955 - | );
|
1904 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1905 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1906 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
1907 + | });
|
1956 1908 | MalformedContentTypeWithoutBodyEmptyInputInputFuture {
|
1957 1909 | inner: Box::pin(fut),
|
1958 1910 | }
|
1959 1911 | }
|
1960 1912 | }
|
1961 1913 | impl
|
1962 - | ::aws_smithy_http_server::response::IntoResponse<
|
1963 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1914 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1915 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1964 1916 | > for crate::output::MalformedContentTypeWithoutBodyEmptyInputOutput
|
1965 1917 | {
|
1966 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1918 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1967 1919 | match crate::protocol_serde::shape_malformed_content_type_without_body_empty_input::ser_malformed_content_type_without_body_empty_input_http_response(self) {
|
1968 1920 | Ok(response) => response,
|
1969 1921 | Err(e) => {
|
1970 1922 | ::tracing::error!(error = %e, "failed to serialize response");
|
1971 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1923 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1972 1924 | }
|
1973 1925 | }
|
1974 1926 | }
|
1975 1927 | }
|
1976 1928 | impl
|
1977 - | ::aws_smithy_http_server::response::IntoResponse<
|
1978 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1929 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1930 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1979 1931 | > for crate::error::MalformedContentTypeWithoutBodyEmptyInputError
|
1980 1932 | {
|
1981 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1933 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1982 1934 | match crate::protocol_serde::shape_malformed_content_type_without_body_empty_input::ser_malformed_content_type_without_body_empty_input_http_error(&self) {
|
1983 1935 | Ok(mut response) => {
|
1984 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1936 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1985 1937 | response
|
1986 1938 | },
|
1987 1939 | Err(e) => {
|
1988 1940 | ::tracing::error!(error = %e, "failed to serialize response");
|
1989 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1941 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1990 1942 | }
|
1991 1943 | }
|
1992 1944 | }
|
1993 1945 | }
|
1994 1946 |
|
1995 1947 | ::pin_project_lite::pin_project! {
|
1996 1948 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
1997 1949 | /// [`MalformedContentTypeWithoutBodyInput`](crate::input::MalformedContentTypeWithoutBodyInput) using modelled bindings.
|
1998 1950 | pub struct MalformedContentTypeWithoutBodyInputFuture {
|
1999 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedContentTypeWithoutBodyInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1951 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedContentTypeWithoutBodyInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2000 1952 | }
|
2001 1953 | }
|
2002 1954 |
|
2003 1955 | impl std::future::Future for MalformedContentTypeWithoutBodyInputFuture {
|
2004 1956 | type Output = Result<
|
2005 1957 | crate::input::MalformedContentTypeWithoutBodyInput,
|
2006 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1958 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2007 1959 | >;
|
2008 1960 |
|
2009 1961 | fn poll(
|
2010 1962 | self: std::pin::Pin<&mut Self>,
|
2011 1963 | cx: &mut std::task::Context<'_>,
|
2012 1964 | ) -> std::task::Poll<Self::Output> {
|
2013 1965 | let this = self.project();
|
2014 1966 | this.inner.as_mut().poll(cx)
|
2015 1967 | }
|
2016 1968 | }
|
2017 1969 |
|
2018 1970 | impl<B>
|
2019 - | ::aws_smithy_http_server::request::FromRequest<
|
2020 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1971 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1972 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2021 1973 | B,
|
2022 1974 | > for crate::input::MalformedContentTypeWithoutBodyInput
|
2023 1975 | where
|
2024 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
1976 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
2025 1977 | B: 'static,
|
2026 1978 |
|
2027 1979 | B::Data: Send,
|
2028 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2029 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
1980 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1981 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
2030 1982 | {
|
2031 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1983 + | type Rejection =
|
1984 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2032 1985 | type Future = MalformedContentTypeWithoutBodyInputFuture;
|
2033 1986 |
|
2034 1987 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
2035 1988 | let fut = async move {
|
2036 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
1989 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
2037 1990 | request.headers(),
|
2038 1991 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
2039 1992 | ) {
|
2040 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1993 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2041 1994 | }
|
2042 1995 | crate::protocol_serde::shape_malformed_content_type_without_body::de_malformed_content_type_without_body_http_request(request)
|
2043 1996 | .await
|
2044 1997 | };
|
2045 1998 | use ::futures_util::future::TryFutureExt;
|
2046 - | let fut = fut.map_err(
|
2047 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2048 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2049 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
2050 - | e,
|
2051 - | )
|
2052 - | },
|
2053 - | );
|
1999 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2000 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2001 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
2002 + | });
|
2054 2003 | MalformedContentTypeWithoutBodyInputFuture {
|
2055 2004 | inner: Box::pin(fut),
|
2056 2005 | }
|
2057 2006 | }
|
2058 2007 | }
|
2059 2008 | impl
|
2060 - | ::aws_smithy_http_server::response::IntoResponse<
|
2061 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2009 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2010 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2062 2011 | > for crate::output::MalformedContentTypeWithoutBodyOutput
|
2063 2012 | {
|
2064 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2013 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2065 2014 | match crate::protocol_serde::shape_malformed_content_type_without_body::ser_malformed_content_type_without_body_http_response(self) {
|
2066 2015 | Ok(response) => response,
|
2067 2016 | Err(e) => {
|
2068 2017 | ::tracing::error!(error = %e, "failed to serialize response");
|
2069 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2018 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2070 2019 | }
|
2071 2020 | }
|
2072 2021 | }
|
2073 2022 | }
|
2074 2023 | impl
|
2075 - | ::aws_smithy_http_server::response::IntoResponse<
|
2076 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2024 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2025 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2077 2026 | > for crate::error::MalformedContentTypeWithoutBodyError
|
2078 2027 | {
|
2079 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2028 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2080 2029 | match crate::protocol_serde::shape_malformed_content_type_without_body::ser_malformed_content_type_without_body_http_error(&self) {
|
2081 2030 | Ok(mut response) => {
|
2082 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2031 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2083 2032 | response
|
2084 2033 | },
|
2085 2034 | Err(e) => {
|
2086 2035 | ::tracing::error!(error = %e, "failed to serialize response");
|
2087 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2036 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2088 2037 | }
|
2089 2038 | }
|
2090 2039 | }
|
2091 2040 | }
|
2092 2041 |
|
2093 2042 | ::pin_project_lite::pin_project! {
|
2094 2043 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
2095 2044 | /// [`MalformedTimestampBodyHttpDateInput`](crate::input::MalformedTimestampBodyHttpDateInput) using modelled bindings.
|
2096 2045 | pub struct MalformedTimestampBodyHttpDateInputFuture {
|
2097 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampBodyHttpDateInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2046 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampBodyHttpDateInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2098 2047 | }
|
2099 2048 | }
|
2100 2049 |
|
2101 2050 | impl std::future::Future for MalformedTimestampBodyHttpDateInputFuture {
|
2102 2051 | type Output = Result<
|
2103 2052 | crate::input::MalformedTimestampBodyHttpDateInput,
|
2104 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2053 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2105 2054 | >;
|
2106 2055 |
|
2107 2056 | fn poll(
|
2108 2057 | self: std::pin::Pin<&mut Self>,
|
2109 2058 | cx: &mut std::task::Context<'_>,
|
2110 2059 | ) -> std::task::Poll<Self::Output> {
|
2111 2060 | let this = self.project();
|
2112 2061 | this.inner.as_mut().poll(cx)
|
2113 2062 | }
|
2114 2063 | }
|
2115 2064 |
|
2116 2065 | impl<B>
|
2117 - | ::aws_smithy_http_server::request::FromRequest<
|
2118 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2066 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
2067 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2119 2068 | B,
|
2120 2069 | > for crate::input::MalformedTimestampBodyHttpDateInput
|
2121 2070 | where
|
2122 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
2071 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
2123 2072 | B: 'static,
|
2124 2073 |
|
2125 2074 | B::Data: Send,
|
2126 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2127 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
2075 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2076 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
2128 2077 | {
|
2129 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2078 + | type Rejection =
|
2079 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2130 2080 | type Future = MalformedTimestampBodyHttpDateInputFuture;
|
2131 2081 |
|
2132 2082 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
2133 2083 | let fut = async move {
|
2134 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
2084 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
2135 2085 | request.headers(),
|
2136 2086 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
2137 2087 | ) {
|
2138 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2088 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2139 2089 | }
|
2140 2090 | crate::protocol_serde::shape_malformed_timestamp_body_http_date::de_malformed_timestamp_body_http_date_http_request(request)
|
2141 2091 | .await
|
2142 2092 | };
|
2143 2093 | use ::futures_util::future::TryFutureExt;
|
2144 - | let fut = fut.map_err(
|
2145 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2146 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2147 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
2148 - | e,
|
2149 - | )
|
2150 - | },
|
2151 - | );
|
2094 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2095 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2096 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
2097 + | });
|
2152 2098 | MalformedTimestampBodyHttpDateInputFuture {
|
2153 2099 | inner: Box::pin(fut),
|
2154 2100 | }
|
2155 2101 | }
|
2156 2102 | }
|
2157 2103 | impl
|
2158 - | ::aws_smithy_http_server::response::IntoResponse<
|
2159 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2104 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2105 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2160 2106 | > for crate::output::MalformedTimestampBodyHttpDateOutput
|
2161 2107 | {
|
2162 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2108 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2163 2109 | match crate::protocol_serde::shape_malformed_timestamp_body_http_date::ser_malformed_timestamp_body_http_date_http_response(self) {
|
2164 2110 | Ok(response) => response,
|
2165 2111 | Err(e) => {
|
2166 2112 | ::tracing::error!(error = %e, "failed to serialize response");
|
2167 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2113 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2168 2114 | }
|
2169 2115 | }
|
2170 2116 | }
|
2171 2117 | }
|
2172 2118 | impl
|
2173 - | ::aws_smithy_http_server::response::IntoResponse<
|
2174 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2119 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2120 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2175 2121 | > for crate::error::MalformedTimestampBodyHttpDateError
|
2176 2122 | {
|
2177 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2123 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2178 2124 | match crate::protocol_serde::shape_malformed_timestamp_body_http_date::ser_malformed_timestamp_body_http_date_http_error(&self) {
|
2179 2125 | Ok(mut response) => {
|
2180 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2126 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2181 2127 | response
|
2182 2128 | },
|
2183 2129 | Err(e) => {
|
2184 2130 | ::tracing::error!(error = %e, "failed to serialize response");
|
2185 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2131 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2186 2132 | }
|
2187 2133 | }
|
2188 2134 | }
|
2189 2135 | }
|
2190 2136 |
|
2191 2137 | ::pin_project_lite::pin_project! {
|
2192 2138 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
2193 2139 | /// [`MalformedTimestampBodyDateTimeInput`](crate::input::MalformedTimestampBodyDateTimeInput) using modelled bindings.
|
2194 2140 | pub struct MalformedTimestampBodyDateTimeInputFuture {
|
2195 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampBodyDateTimeInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2141 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampBodyDateTimeInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2196 2142 | }
|
2197 2143 | }
|
2198 2144 |
|
2199 2145 | impl std::future::Future for MalformedTimestampBodyDateTimeInputFuture {
|
2200 2146 | type Output = Result<
|
2201 2147 | crate::input::MalformedTimestampBodyDateTimeInput,
|
2202 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2148 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2203 2149 | >;
|
2204 2150 |
|
2205 2151 | fn poll(
|
2206 2152 | self: std::pin::Pin<&mut Self>,
|
2207 2153 | cx: &mut std::task::Context<'_>,
|
2208 2154 | ) -> std::task::Poll<Self::Output> {
|
2209 2155 | let this = self.project();
|
2210 2156 | this.inner.as_mut().poll(cx)
|
2211 2157 | }
|
2212 2158 | }
|
2213 2159 |
|
2214 2160 | impl<B>
|
2215 - | ::aws_smithy_http_server::request::FromRequest<
|
2216 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2161 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
2162 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2217 2163 | B,
|
2218 2164 | > for crate::input::MalformedTimestampBodyDateTimeInput
|
2219 2165 | where
|
2220 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
2166 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
2221 2167 | B: 'static,
|
2222 2168 |
|
2223 2169 | B::Data: Send,
|
2224 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2225 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
2170 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2171 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
2226 2172 | {
|
2227 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2173 + | type Rejection =
|
2174 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2228 2175 | type Future = MalformedTimestampBodyDateTimeInputFuture;
|
2229 2176 |
|
2230 2177 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
2231 2178 | let fut = async move {
|
2232 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
2179 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
2233 2180 | request.headers(),
|
2234 2181 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
2235 2182 | ) {
|
2236 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2183 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2237 2184 | }
|
2238 2185 | crate::protocol_serde::shape_malformed_timestamp_body_date_time::de_malformed_timestamp_body_date_time_http_request(request)
|
2239 2186 | .await
|
2240 2187 | };
|
2241 2188 | use ::futures_util::future::TryFutureExt;
|
2242 - | let fut = fut.map_err(
|
2243 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2244 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2245 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
2246 - | e,
|
2247 - | )
|
2248 - | },
|
2249 - | );
|
2189 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2190 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2191 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
2192 + | });
|
2250 2193 | MalformedTimestampBodyDateTimeInputFuture {
|
2251 2194 | inner: Box::pin(fut),
|
2252 2195 | }
|
2253 2196 | }
|
2254 2197 | }
|
2255 2198 | impl
|
2256 - | ::aws_smithy_http_server::response::IntoResponse<
|
2257 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2199 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2200 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2258 2201 | > for crate::output::MalformedTimestampBodyDateTimeOutput
|
2259 2202 | {
|
2260 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2203 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2261 2204 | match crate::protocol_serde::shape_malformed_timestamp_body_date_time::ser_malformed_timestamp_body_date_time_http_response(self) {
|
2262 2205 | Ok(response) => response,
|
2263 2206 | Err(e) => {
|
2264 2207 | ::tracing::error!(error = %e, "failed to serialize response");
|
2265 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2208 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2266 2209 | }
|
2267 2210 | }
|
2268 2211 | }
|
2269 2212 | }
|
2270 2213 | impl
|
2271 - | ::aws_smithy_http_server::response::IntoResponse<
|
2272 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2214 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2215 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2273 2216 | > for crate::error::MalformedTimestampBodyDateTimeError
|
2274 2217 | {
|
2275 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2218 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2276 2219 | match crate::protocol_serde::shape_malformed_timestamp_body_date_time::ser_malformed_timestamp_body_date_time_http_error(&self) {
|
2277 2220 | Ok(mut response) => {
|
2278 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2221 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2279 2222 | response
|
2280 2223 | },
|
2281 2224 | Err(e) => {
|
2282 2225 | ::tracing::error!(error = %e, "failed to serialize response");
|
2283 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2226 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2284 2227 | }
|
2285 2228 | }
|
2286 2229 | }
|
2287 2230 | }
|
2288 2231 |
|
2289 2232 | ::pin_project_lite::pin_project! {
|
2290 2233 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
2291 2234 | /// [`MalformedTimestampBodyDefaultInput`](crate::input::MalformedTimestampBodyDefaultInput) using modelled bindings.
|
2292 2235 | pub struct MalformedTimestampBodyDefaultInputFuture {
|
2293 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampBodyDefaultInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2236 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampBodyDefaultInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2294 2237 | }
|
2295 2238 | }
|
2296 2239 |
|
2297 2240 | impl std::future::Future for MalformedTimestampBodyDefaultInputFuture {
|
2298 2241 | type Output = Result<
|
2299 2242 | crate::input::MalformedTimestampBodyDefaultInput,
|
2300 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2243 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2301 2244 | >;
|
2302 2245 |
|
2303 2246 | fn poll(
|
2304 2247 | self: std::pin::Pin<&mut Self>,
|
2305 2248 | cx: &mut std::task::Context<'_>,
|
2306 2249 | ) -> std::task::Poll<Self::Output> {
|
2307 2250 | let this = self.project();
|
2308 2251 | this.inner.as_mut().poll(cx)
|
2309 2252 | }
|
2310 2253 | }
|
2311 2254 |
|
2312 2255 | impl<B>
|
2313 - | ::aws_smithy_http_server::request::FromRequest<
|
2314 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2256 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
2257 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2315 2258 | B,
|
2316 2259 | > for crate::input::MalformedTimestampBodyDefaultInput
|
2317 2260 | where
|
2318 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
2261 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
2319 2262 | B: 'static,
|
2320 2263 |
|
2321 2264 | B::Data: Send,
|
2322 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2323 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
2265 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2266 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
2324 2267 | {
|
2325 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2268 + | type Rejection =
|
2269 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2326 2270 | type Future = MalformedTimestampBodyDefaultInputFuture;
|
2327 2271 |
|
2328 2272 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
2329 2273 | let fut = async move {
|
2330 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
2274 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
2331 2275 | request.headers(),
|
2332 2276 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
2333 2277 | ) {
|
2334 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2278 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2335 2279 | }
|
2336 2280 | crate::protocol_serde::shape_malformed_timestamp_body_default::de_malformed_timestamp_body_default_http_request(request)
|
2337 2281 | .await
|
2338 2282 | };
|
2339 2283 | use ::futures_util::future::TryFutureExt;
|
2340 - | let fut = fut.map_err(
|
2341 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2342 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2343 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
2344 - | e,
|
2345 - | )
|
2346 - | },
|
2347 - | );
|
2284 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2285 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2286 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
2287 + | });
|
2348 2288 | MalformedTimestampBodyDefaultInputFuture {
|
2349 2289 | inner: Box::pin(fut),
|
2350 2290 | }
|
2351 2291 | }
|
2352 2292 | }
|
2353 2293 | impl
|
2354 - | ::aws_smithy_http_server::response::IntoResponse<
|
2355 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2294 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2295 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2356 2296 | > for crate::output::MalformedTimestampBodyDefaultOutput
|
2357 2297 | {
|
2358 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2298 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2359 2299 | match crate::protocol_serde::shape_malformed_timestamp_body_default::ser_malformed_timestamp_body_default_http_response(self) {
|
2360 2300 | Ok(response) => response,
|
2361 2301 | Err(e) => {
|
2362 2302 | ::tracing::error!(error = %e, "failed to serialize response");
|
2363 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2303 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2364 2304 | }
|
2365 2305 | }
|
2366 2306 | }
|
2367 2307 | }
|
2368 2308 | impl
|
2369 - | ::aws_smithy_http_server::response::IntoResponse<
|
2370 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2309 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2310 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2371 2311 | > for crate::error::MalformedTimestampBodyDefaultError
|
2372 2312 | {
|
2373 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2313 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2374 2314 | match crate::protocol_serde::shape_malformed_timestamp_body_default::ser_malformed_timestamp_body_default_http_error(&self) {
|
2375 2315 | Ok(mut response) => {
|
2376 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2316 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2377 2317 | response
|
2378 2318 | },
|
2379 2319 | Err(e) => {
|
2380 2320 | ::tracing::error!(error = %e, "failed to serialize response");
|
2381 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2321 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2382 2322 | }
|
2383 2323 | }
|
2384 2324 | }
|
2385 2325 | }
|
2386 2326 |
|
2387 2327 | ::pin_project_lite::pin_project! {
|
2388 2328 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
2389 2329 | /// [`MalformedTimestampHeaderEpochInput`](crate::input::MalformedTimestampHeaderEpochInput) using modelled bindings.
|
2390 2330 | pub struct MalformedTimestampHeaderEpochInputFuture {
|
2391 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampHeaderEpochInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2331 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampHeaderEpochInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2392 2332 | }
|
2393 2333 | }
|
2394 2334 |
|
2395 2335 | impl std::future::Future for MalformedTimestampHeaderEpochInputFuture {
|
2396 2336 | type Output = Result<
|
2397 2337 | crate::input::MalformedTimestampHeaderEpochInput,
|
2398 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2338 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2399 2339 | >;
|
2400 2340 |
|
2401 2341 | fn poll(
|
2402 2342 | self: std::pin::Pin<&mut Self>,
|
2403 2343 | cx: &mut std::task::Context<'_>,
|
2404 2344 | ) -> std::task::Poll<Self::Output> {
|
2405 2345 | let this = self.project();
|
2406 2346 | this.inner.as_mut().poll(cx)
|
2407 2347 | }
|
2408 2348 | }
|
2409 2349 |
|
2410 2350 | impl<B>
|
2411 - | ::aws_smithy_http_server::request::FromRequest<
|
2412 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2351 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
2352 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2413 2353 | B,
|
2414 2354 | > for crate::input::MalformedTimestampHeaderEpochInput
|
2415 2355 | where
|
2416 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
2356 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
2417 2357 | B: 'static,
|
2418 2358 |
|
2419 2359 | B::Data: Send,
|
2420 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2421 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
2360 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2361 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
2422 2362 | {
|
2423 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2363 + | type Rejection =
|
2364 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2424 2365 | type Future = MalformedTimestampHeaderEpochInputFuture;
|
2425 2366 |
|
2426 2367 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
2427 2368 | let fut = async move {
|
2428 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
2369 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
2429 2370 | request.headers(),
|
2430 2371 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
2431 2372 | ) {
|
2432 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2373 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2433 2374 | }
|
2434 2375 | crate::protocol_serde::shape_malformed_timestamp_header_epoch::de_malformed_timestamp_header_epoch_http_request(request)
|
2435 2376 | .await
|
2436 2377 | };
|
2437 2378 | use ::futures_util::future::TryFutureExt;
|
2438 - | let fut = fut.map_err(
|
2439 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2440 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2441 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
2442 - | e,
|
2443 - | )
|
2444 - | },
|
2445 - | );
|
2379 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2380 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2381 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
2382 + | });
|
2446 2383 | MalformedTimestampHeaderEpochInputFuture {
|
2447 2384 | inner: Box::pin(fut),
|
2448 2385 | }
|
2449 2386 | }
|
2450 2387 | }
|
2451 2388 | impl
|
2452 - | ::aws_smithy_http_server::response::IntoResponse<
|
2453 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2389 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2390 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2454 2391 | > for crate::output::MalformedTimestampHeaderEpochOutput
|
2455 2392 | {
|
2456 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2393 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2457 2394 | match crate::protocol_serde::shape_malformed_timestamp_header_epoch::ser_malformed_timestamp_header_epoch_http_response(self) {
|
2458 2395 | Ok(response) => response,
|
2459 2396 | Err(e) => {
|
2460 2397 | ::tracing::error!(error = %e, "failed to serialize response");
|
2461 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2398 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2462 2399 | }
|
2463 2400 | }
|
2464 2401 | }
|
2465 2402 | }
|
2466 2403 | impl
|
2467 - | ::aws_smithy_http_server::response::IntoResponse<
|
2468 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2404 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2405 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2469 2406 | > for crate::error::MalformedTimestampHeaderEpochError
|
2470 2407 | {
|
2471 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2408 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2472 2409 | match crate::protocol_serde::shape_malformed_timestamp_header_epoch::ser_malformed_timestamp_header_epoch_http_error(&self) {
|
2473 2410 | Ok(mut response) => {
|
2474 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2411 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2475 2412 | response
|
2476 2413 | },
|
2477 2414 | Err(e) => {
|
2478 2415 | ::tracing::error!(error = %e, "failed to serialize response");
|
2479 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2416 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2480 2417 | }
|
2481 2418 | }
|
2482 2419 | }
|
2483 2420 | }
|
2484 2421 |
|
2485 2422 | ::pin_project_lite::pin_project! {
|
2486 2423 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
2487 2424 | /// [`MalformedTimestampHeaderDateTimeInput`](crate::input::MalformedTimestampHeaderDateTimeInput) using modelled bindings.
|
2488 2425 | pub struct MalformedTimestampHeaderDateTimeInputFuture {
|
2489 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampHeaderDateTimeInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2426 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampHeaderDateTimeInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2490 2427 | }
|
2491 2428 | }
|
2492 2429 |
|
2493 2430 | impl std::future::Future for MalformedTimestampHeaderDateTimeInputFuture {
|
2494 2431 | type Output = Result<
|
2495 2432 | crate::input::MalformedTimestampHeaderDateTimeInput,
|
2496 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2433 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2497 2434 | >;
|
2498 2435 |
|
2499 2436 | fn poll(
|
2500 2437 | self: std::pin::Pin<&mut Self>,
|
2501 2438 | cx: &mut std::task::Context<'_>,
|
2502 2439 | ) -> std::task::Poll<Self::Output> {
|
2503 2440 | let this = self.project();
|
2504 2441 | this.inner.as_mut().poll(cx)
|
2505 2442 | }
|
2506 2443 | }
|
2507 2444 |
|
2508 2445 | impl<B>
|
2509 - | ::aws_smithy_http_server::request::FromRequest<
|
2510 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2446 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
2447 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2511 2448 | B,
|
2512 2449 | > for crate::input::MalformedTimestampHeaderDateTimeInput
|
2513 2450 | where
|
2514 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
2451 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
2515 2452 | B: 'static,
|
2516 2453 |
|
2517 2454 | B::Data: Send,
|
2518 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2519 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
2455 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2456 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
2520 2457 | {
|
2521 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2458 + | type Rejection =
|
2459 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2522 2460 | type Future = MalformedTimestampHeaderDateTimeInputFuture;
|
2523 2461 |
|
2524 2462 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
2525 2463 | let fut = async move {
|
2526 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
2464 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
2527 2465 | request.headers(),
|
2528 2466 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
2529 2467 | ) {
|
2530 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2468 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2531 2469 | }
|
2532 2470 | crate::protocol_serde::shape_malformed_timestamp_header_date_time::de_malformed_timestamp_header_date_time_http_request(request)
|
2533 2471 | .await
|
2534 2472 | };
|
2535 2473 | use ::futures_util::future::TryFutureExt;
|
2536 - | let fut = fut.map_err(
|
2537 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2538 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2539 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
2540 - | e,
|
2541 - | )
|
2542 - | },
|
2543 - | );
|
2474 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2475 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2476 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
2477 + | });
|
2544 2478 | MalformedTimestampHeaderDateTimeInputFuture {
|
2545 2479 | inner: Box::pin(fut),
|
2546 2480 | }
|
2547 2481 | }
|
2548 2482 | }
|
2549 2483 | impl
|
2550 - | ::aws_smithy_http_server::response::IntoResponse<
|
2551 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2484 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2485 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2552 2486 | > for crate::output::MalformedTimestampHeaderDateTimeOutput
|
2553 2487 | {
|
2554 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2488 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2555 2489 | match crate::protocol_serde::shape_malformed_timestamp_header_date_time::ser_malformed_timestamp_header_date_time_http_response(self) {
|
2556 2490 | Ok(response) => response,
|
2557 2491 | Err(e) => {
|
2558 2492 | ::tracing::error!(error = %e, "failed to serialize response");
|
2559 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2493 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2560 2494 | }
|
2561 2495 | }
|
2562 2496 | }
|
2563 2497 | }
|
2564 2498 | impl
|
2565 - | ::aws_smithy_http_server::response::IntoResponse<
|
2566 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2499 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2500 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2567 2501 | > for crate::error::MalformedTimestampHeaderDateTimeError
|
2568 2502 | {
|
2569 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2503 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2570 2504 | match crate::protocol_serde::shape_malformed_timestamp_header_date_time::ser_malformed_timestamp_header_date_time_http_error(&self) {
|
2571 2505 | Ok(mut response) => {
|
2572 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2506 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2573 2507 | response
|
2574 2508 | },
|
2575 2509 | Err(e) => {
|
2576 2510 | ::tracing::error!(error = %e, "failed to serialize response");
|
2577 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2511 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2578 2512 | }
|
2579 2513 | }
|
2580 2514 | }
|
2581 2515 | }
|
2582 2516 |
|
2583 2517 | ::pin_project_lite::pin_project! {
|
2584 2518 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
2585 2519 | /// [`MalformedTimestampHeaderDefaultInput`](crate::input::MalformedTimestampHeaderDefaultInput) using modelled bindings.
|
2586 2520 | pub struct MalformedTimestampHeaderDefaultInputFuture {
|
2587 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampHeaderDefaultInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2521 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampHeaderDefaultInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2588 2522 | }
|
2589 2523 | }
|
2590 2524 |
|
2591 2525 | impl std::future::Future for MalformedTimestampHeaderDefaultInputFuture {
|
2592 2526 | type Output = Result<
|
2593 2527 | crate::input::MalformedTimestampHeaderDefaultInput,
|
2594 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2528 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2595 2529 | >;
|
2596 2530 |
|
2597 2531 | fn poll(
|
2598 2532 | self: std::pin::Pin<&mut Self>,
|
2599 2533 | cx: &mut std::task::Context<'_>,
|
2600 2534 | ) -> std::task::Poll<Self::Output> {
|
2601 2535 | let this = self.project();
|
2602 2536 | this.inner.as_mut().poll(cx)
|
2603 2537 | }
|
2604 2538 | }
|
2605 2539 |
|
2606 2540 | impl<B>
|
2607 - | ::aws_smithy_http_server::request::FromRequest<
|
2608 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2541 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
2542 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2609 2543 | B,
|
2610 2544 | > for crate::input::MalformedTimestampHeaderDefaultInput
|
2611 2545 | where
|
2612 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
2546 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
2613 2547 | B: 'static,
|
2614 2548 |
|
2615 2549 | B::Data: Send,
|
2616 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2617 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
2550 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2551 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
2618 2552 | {
|
2619 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2553 + | type Rejection =
|
2554 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2620 2555 | type Future = MalformedTimestampHeaderDefaultInputFuture;
|
2621 2556 |
|
2622 2557 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
2623 2558 | let fut = async move {
|
2624 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
2559 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
2625 2560 | request.headers(),
|
2626 2561 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
2627 2562 | ) {
|
2628 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2563 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2629 2564 | }
|
2630 2565 | crate::protocol_serde::shape_malformed_timestamp_header_default::de_malformed_timestamp_header_default_http_request(request)
|
2631 2566 | .await
|
2632 2567 | };
|
2633 2568 | use ::futures_util::future::TryFutureExt;
|
2634 - | let fut = fut.map_err(
|
2635 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2636 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2637 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
2638 - | e,
|
2639 - | )
|
2640 - | },
|
2641 - | );
|
2569 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2570 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2571 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
2572 + | });
|
2642 2573 | MalformedTimestampHeaderDefaultInputFuture {
|
2643 2574 | inner: Box::pin(fut),
|
2644 2575 | }
|
2645 2576 | }
|
2646 2577 | }
|
2647 2578 | impl
|
2648 - | ::aws_smithy_http_server::response::IntoResponse<
|
2649 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2579 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2580 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2650 2581 | > for crate::output::MalformedTimestampHeaderDefaultOutput
|
2651 2582 | {
|
2652 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2583 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2653 2584 | match crate::protocol_serde::shape_malformed_timestamp_header_default::ser_malformed_timestamp_header_default_http_response(self) {
|
2654 2585 | Ok(response) => response,
|
2655 2586 | Err(e) => {
|
2656 2587 | ::tracing::error!(error = %e, "failed to serialize response");
|
2657 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2588 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2658 2589 | }
|
2659 2590 | }
|
2660 2591 | }
|
2661 2592 | }
|
2662 2593 | impl
|
2663 - | ::aws_smithy_http_server::response::IntoResponse<
|
2664 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2594 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2595 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2665 2596 | > for crate::error::MalformedTimestampHeaderDefaultError
|
2666 2597 | {
|
2667 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2598 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2668 2599 | match crate::protocol_serde::shape_malformed_timestamp_header_default::ser_malformed_timestamp_header_default_http_error(&self) {
|
2669 2600 | Ok(mut response) => {
|
2670 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2601 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2671 2602 | response
|
2672 2603 | },
|
2673 2604 | Err(e) => {
|
2674 2605 | ::tracing::error!(error = %e, "failed to serialize response");
|
2675 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2606 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2676 2607 | }
|
2677 2608 | }
|
2678 2609 | }
|
2679 2610 | }
|
2680 2611 |
|
2681 2612 | ::pin_project_lite::pin_project! {
|
2682 2613 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
2683 2614 | /// [`MalformedTimestampQueryEpochInput`](crate::input::MalformedTimestampQueryEpochInput) using modelled bindings.
|
2684 2615 | pub struct MalformedTimestampQueryEpochInputFuture {
|
2685 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampQueryEpochInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2616 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampQueryEpochInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2686 2617 | }
|
2687 2618 | }
|
2688 2619 |
|
2689 2620 | impl std::future::Future for MalformedTimestampQueryEpochInputFuture {
|
2690 2621 | type Output = Result<
|
2691 2622 | crate::input::MalformedTimestampQueryEpochInput,
|
2692 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2623 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2693 2624 | >;
|
2694 2625 |
|
2695 2626 | fn poll(
|
2696 2627 | self: std::pin::Pin<&mut Self>,
|
2697 2628 | cx: &mut std::task::Context<'_>,
|
2698 2629 | ) -> std::task::Poll<Self::Output> {
|
2699 2630 | let this = self.project();
|
2700 2631 | this.inner.as_mut().poll(cx)
|
2701 2632 | }
|
2702 2633 | }
|
2703 2634 |
|
2704 2635 | impl<B>
|
2705 - | ::aws_smithy_http_server::request::FromRequest<
|
2706 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2636 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
2637 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2707 2638 | B,
|
2708 2639 | > for crate::input::MalformedTimestampQueryEpochInput
|
2709 2640 | where
|
2710 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
2641 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
2711 2642 | B: 'static,
|
2712 2643 |
|
2713 2644 | B::Data: Send,
|
2714 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2715 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
2645 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2646 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
2716 2647 | {
|
2717 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2648 + | type Rejection =
|
2649 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2718 2650 | type Future = MalformedTimestampQueryEpochInputFuture;
|
2719 2651 |
|
2720 2652 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
2721 2653 | let fut = async move {
|
2722 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
2654 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
2723 2655 | request.headers(),
|
2724 2656 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
2725 2657 | ) {
|
2726 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2658 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2727 2659 | }
|
2728 2660 | crate::protocol_serde::shape_malformed_timestamp_query_epoch::de_malformed_timestamp_query_epoch_http_request(request)
|
2729 2661 | .await
|
2730 2662 | };
|
2731 2663 | use ::futures_util::future::TryFutureExt;
|
2732 - | let fut = fut.map_err(
|
2733 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2734 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2735 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
2736 - | e,
|
2737 - | )
|
2738 - | },
|
2739 - | );
|
2664 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2665 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2666 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
2667 + | });
|
2740 2668 | MalformedTimestampQueryEpochInputFuture {
|
2741 2669 | inner: Box::pin(fut),
|
2742 2670 | }
|
2743 2671 | }
|
2744 2672 | }
|
2745 2673 | impl
|
2746 - | ::aws_smithy_http_server::response::IntoResponse<
|
2747 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2674 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2675 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2748 2676 | > for crate::output::MalformedTimestampQueryEpochOutput
|
2749 2677 | {
|
2750 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2678 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2751 2679 | match crate::protocol_serde::shape_malformed_timestamp_query_epoch::ser_malformed_timestamp_query_epoch_http_response(self) {
|
2752 2680 | Ok(response) => response,
|
2753 2681 | Err(e) => {
|
2754 2682 | ::tracing::error!(error = %e, "failed to serialize response");
|
2755 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2683 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2756 2684 | }
|
2757 2685 | }
|
2758 2686 | }
|
2759 2687 | }
|
2760 2688 | impl
|
2761 - | ::aws_smithy_http_server::response::IntoResponse<
|
2762 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2689 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2690 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2763 2691 | > for crate::error::MalformedTimestampQueryEpochError
|
2764 2692 | {
|
2765 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2693 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2766 2694 | match crate::protocol_serde::shape_malformed_timestamp_query_epoch::ser_malformed_timestamp_query_epoch_http_error(&self) {
|
2767 2695 | Ok(mut response) => {
|
2768 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2696 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2769 2697 | response
|
2770 2698 | },
|
2771 2699 | Err(e) => {
|
2772 2700 | ::tracing::error!(error = %e, "failed to serialize response");
|
2773 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2701 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2774 2702 | }
|
2775 2703 | }
|
2776 2704 | }
|
2777 2705 | }
|
2778 2706 |
|
2779 2707 | ::pin_project_lite::pin_project! {
|
2780 2708 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
2781 2709 | /// [`MalformedTimestampQueryHttpDateInput`](crate::input::MalformedTimestampQueryHttpDateInput) using modelled bindings.
|
2782 2710 | pub struct MalformedTimestampQueryHttpDateInputFuture {
|
2783 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampQueryHttpDateInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2711 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampQueryHttpDateInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2784 2712 | }
|
2785 2713 | }
|
2786 2714 |
|
2787 2715 | impl std::future::Future for MalformedTimestampQueryHttpDateInputFuture {
|
2788 2716 | type Output = Result<
|
2789 2717 | crate::input::MalformedTimestampQueryHttpDateInput,
|
2790 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2718 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2791 2719 | >;
|
2792 2720 |
|
2793 2721 | fn poll(
|
2794 2722 | self: std::pin::Pin<&mut Self>,
|
2795 2723 | cx: &mut std::task::Context<'_>,
|
2796 2724 | ) -> std::task::Poll<Self::Output> {
|
2797 2725 | let this = self.project();
|
2798 2726 | this.inner.as_mut().poll(cx)
|
2799 2727 | }
|
2800 2728 | }
|
2801 2729 |
|
2802 2730 | impl<B>
|
2803 - | ::aws_smithy_http_server::request::FromRequest<
|
2804 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2731 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
2732 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2805 2733 | B,
|
2806 2734 | > for crate::input::MalformedTimestampQueryHttpDateInput
|
2807 2735 | where
|
2808 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
2736 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
2809 2737 | B: 'static,
|
2810 2738 |
|
2811 2739 | B::Data: Send,
|
2812 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2813 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
2740 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2741 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
2814 2742 | {
|
2815 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2743 + | type Rejection =
|
2744 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2816 2745 | type Future = MalformedTimestampQueryHttpDateInputFuture;
|
2817 2746 |
|
2818 2747 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
2819 2748 | let fut = async move {
|
2820 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
2749 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
2821 2750 | request.headers(),
|
2822 2751 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
2823 2752 | ) {
|
2824 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2753 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2825 2754 | }
|
2826 2755 | crate::protocol_serde::shape_malformed_timestamp_query_http_date::de_malformed_timestamp_query_http_date_http_request(request)
|
2827 2756 | .await
|
2828 2757 | };
|
2829 2758 | use ::futures_util::future::TryFutureExt;
|
2830 - | let fut = fut.map_err(
|
2831 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2832 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2833 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
2834 - | e,
|
2835 - | )
|
2836 - | },
|
2837 - | );
|
2759 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2760 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2761 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
2762 + | });
|
2838 2763 | MalformedTimestampQueryHttpDateInputFuture {
|
2839 2764 | inner: Box::pin(fut),
|
2840 2765 | }
|
2841 2766 | }
|
2842 2767 | }
|
2843 2768 | impl
|
2844 - | ::aws_smithy_http_server::response::IntoResponse<
|
2845 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2769 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2770 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2846 2771 | > for crate::output::MalformedTimestampQueryHttpDateOutput
|
2847 2772 | {
|
2848 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2773 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2849 2774 | match crate::protocol_serde::shape_malformed_timestamp_query_http_date::ser_malformed_timestamp_query_http_date_http_response(self) {
|
2850 2775 | Ok(response) => response,
|
2851 2776 | Err(e) => {
|
2852 2777 | ::tracing::error!(error = %e, "failed to serialize response");
|
2853 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2778 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2854 2779 | }
|
2855 2780 | }
|
2856 2781 | }
|
2857 2782 | }
|
2858 2783 | impl
|
2859 - | ::aws_smithy_http_server::response::IntoResponse<
|
2860 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2784 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2785 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2861 2786 | > for crate::error::MalformedTimestampQueryHttpDateError
|
2862 2787 | {
|
2863 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2788 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2864 2789 | match crate::protocol_serde::shape_malformed_timestamp_query_http_date::ser_malformed_timestamp_query_http_date_http_error(&self) {
|
2865 2790 | Ok(mut response) => {
|
2866 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2791 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2867 2792 | response
|
2868 2793 | },
|
2869 2794 | Err(e) => {
|
2870 2795 | ::tracing::error!(error = %e, "failed to serialize response");
|
2871 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2796 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2872 2797 | }
|
2873 2798 | }
|
2874 2799 | }
|
2875 2800 | }
|
2876 2801 |
|
2877 2802 | ::pin_project_lite::pin_project! {
|
2878 2803 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
2879 2804 | /// [`MalformedTimestampQueryDefaultInput`](crate::input::MalformedTimestampQueryDefaultInput) using modelled bindings.
|
2880 2805 | pub struct MalformedTimestampQueryDefaultInputFuture {
|
2881 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampQueryDefaultInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2806 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampQueryDefaultInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2882 2807 | }
|
2883 2808 | }
|
2884 2809 |
|
2885 2810 | impl std::future::Future for MalformedTimestampQueryDefaultInputFuture {
|
2886 2811 | type Output = Result<
|
2887 2812 | crate::input::MalformedTimestampQueryDefaultInput,
|
2888 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2813 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2889 2814 | >;
|
2890 2815 |
|
2891 2816 | fn poll(
|
2892 2817 | self: std::pin::Pin<&mut Self>,
|
2893 2818 | cx: &mut std::task::Context<'_>,
|
2894 2819 | ) -> std::task::Poll<Self::Output> {
|
2895 2820 | let this = self.project();
|
2896 2821 | this.inner.as_mut().poll(cx)
|
2897 2822 | }
|
2898 2823 | }
|
2899 2824 |
|
2900 2825 | impl<B>
|
2901 - | ::aws_smithy_http_server::request::FromRequest<
|
2902 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2826 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
2827 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2903 2828 | B,
|
2904 2829 | > for crate::input::MalformedTimestampQueryDefaultInput
|
2905 2830 | where
|
2906 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
2831 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
2907 2832 | B: 'static,
|
2908 2833 |
|
2909 2834 | B::Data: Send,
|
2910 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2911 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
2835 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2836 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
2912 2837 | {
|
2913 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2838 + | type Rejection =
|
2839 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2914 2840 | type Future = MalformedTimestampQueryDefaultInputFuture;
|
2915 2841 |
|
2916 2842 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
2917 2843 | let fut = async move {
|
2918 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
2844 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
2919 2845 | request.headers(),
|
2920 2846 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
2921 2847 | ) {
|
2922 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2848 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2923 2849 | }
|
2924 2850 | crate::protocol_serde::shape_malformed_timestamp_query_default::de_malformed_timestamp_query_default_http_request(request)
|
2925 2851 | .await
|
2926 2852 | };
|
2927 2853 | use ::futures_util::future::TryFutureExt;
|
2928 - | let fut = fut.map_err(
|
2929 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2930 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2931 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
2932 - | e,
|
2933 - | )
|
2934 - | },
|
2935 - | );
|
2854 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2855 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2856 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
2857 + | });
|
2936 2858 | MalformedTimestampQueryDefaultInputFuture {
|
2937 2859 | inner: Box::pin(fut),
|
2938 2860 | }
|
2939 2861 | }
|
2940 2862 | }
|
2941 2863 | impl
|
2942 - | ::aws_smithy_http_server::response::IntoResponse<
|
2943 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2864 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2865 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2944 2866 | > for crate::output::MalformedTimestampQueryDefaultOutput
|
2945 2867 | {
|
2946 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2868 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2947 2869 | match crate::protocol_serde::shape_malformed_timestamp_query_default::ser_malformed_timestamp_query_default_http_response(self) {
|
2948 2870 | Ok(response) => response,
|
2949 2871 | Err(e) => {
|
2950 2872 | ::tracing::error!(error = %e, "failed to serialize response");
|
2951 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2873 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2952 2874 | }
|
2953 2875 | }
|
2954 2876 | }
|
2955 2877 | }
|
2956 2878 | impl
|
2957 - | ::aws_smithy_http_server::response::IntoResponse<
|
2958 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2879 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2880 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
2959 2881 | > for crate::error::MalformedTimestampQueryDefaultError
|
2960 2882 | {
|
2961 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2883 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
2962 2884 | match crate::protocol_serde::shape_malformed_timestamp_query_default::ser_malformed_timestamp_query_default_http_error(&self) {
|
2963 2885 | Ok(mut response) => {
|
2964 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2886 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2965 2887 | response
|
2966 2888 | },
|
2967 2889 | Err(e) => {
|
2968 2890 | ::tracing::error!(error = %e, "failed to serialize response");
|
2969 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2891 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2970 2892 | }
|
2971 2893 | }
|
2972 2894 | }
|
2973 2895 | }
|
2974 2896 |
|
2975 2897 | ::pin_project_lite::pin_project! {
|
2976 2898 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
2977 2899 | /// [`MalformedTimestampPathEpochInput`](crate::input::MalformedTimestampPathEpochInput) using modelled bindings.
|
2978 2900 | pub struct MalformedTimestampPathEpochInputFuture {
|
2979 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampPathEpochInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2901 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampPathEpochInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2980 2902 | }
|
2981 2903 | }
|
2982 2904 |
|
2983 2905 | impl std::future::Future for MalformedTimestampPathEpochInputFuture {
|
2984 2906 | type Output = Result<
|
2985 2907 | crate::input::MalformedTimestampPathEpochInput,
|
2986 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2908 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
2987 2909 | >;
|
2988 2910 |
|
2989 2911 | fn poll(
|
2990 2912 | self: std::pin::Pin<&mut Self>,
|
2991 2913 | cx: &mut std::task::Context<'_>,
|
2992 2914 | ) -> std::task::Poll<Self::Output> {
|
2993 2915 | let this = self.project();
|
2994 2916 | this.inner.as_mut().poll(cx)
|
2995 2917 | }
|
2996 2918 | }
|
2997 2919 |
|
2998 2920 | impl<B>
|
2999 - | ::aws_smithy_http_server::request::FromRequest<
|
3000 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2921 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
2922 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3001 2923 | B,
|
3002 2924 | > for crate::input::MalformedTimestampPathEpochInput
|
3003 2925 | where
|
3004 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
2926 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
3005 2927 | B: 'static,
|
3006 2928 |
|
3007 2929 | B::Data: Send,
|
3008 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3009 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
2930 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
2931 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
3010 2932 | {
|
3011 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
2933 + | type Rejection =
|
2934 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3012 2935 | type Future = MalformedTimestampPathEpochInputFuture;
|
3013 2936 |
|
3014 2937 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
3015 2938 | let fut = async move {
|
3016 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
2939 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
3017 2940 | request.headers(),
|
3018 2941 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
3019 2942 | ) {
|
3020 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
2943 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3021 2944 | }
|
3022 2945 | crate::protocol_serde::shape_malformed_timestamp_path_epoch::de_malformed_timestamp_path_epoch_http_request(request)
|
3023 2946 | .await
|
3024 2947 | };
|
3025 2948 | use ::futures_util::future::TryFutureExt;
|
3026 - | let fut = fut.map_err(
|
3027 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3028 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3029 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
3030 - | e,
|
3031 - | )
|
3032 - | },
|
3033 - | );
|
2949 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
2950 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
2951 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
2952 + | });
|
3034 2953 | MalformedTimestampPathEpochInputFuture {
|
3035 2954 | inner: Box::pin(fut),
|
3036 2955 | }
|
3037 2956 | }
|
3038 2957 | }
|
3039 2958 | impl
|
3040 - | ::aws_smithy_http_server::response::IntoResponse<
|
3041 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2959 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2960 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3042 2961 | > for crate::output::MalformedTimestampPathEpochOutput
|
3043 2962 | {
|
3044 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2963 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3045 2964 | match crate::protocol_serde::shape_malformed_timestamp_path_epoch::ser_malformed_timestamp_path_epoch_http_response(self) {
|
3046 2965 | Ok(response) => response,
|
3047 2966 | Err(e) => {
|
3048 2967 | ::tracing::error!(error = %e, "failed to serialize response");
|
3049 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2968 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3050 2969 | }
|
3051 2970 | }
|
3052 2971 | }
|
3053 2972 | }
|
3054 2973 | impl
|
3055 - | ::aws_smithy_http_server::response::IntoResponse<
|
3056 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
2974 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
2975 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3057 2976 | > for crate::error::MalformedTimestampPathEpochError
|
3058 2977 | {
|
3059 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
2978 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3060 2979 | match crate::protocol_serde::shape_malformed_timestamp_path_epoch::ser_malformed_timestamp_path_epoch_http_error(&self) {
|
3061 2980 | Ok(mut response) => {
|
3062 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
2981 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
3063 2982 | response
|
3064 2983 | },
|
3065 2984 | Err(e) => {
|
3066 2985 | ::tracing::error!(error = %e, "failed to serialize response");
|
3067 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
2986 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3068 2987 | }
|
3069 2988 | }
|
3070 2989 | }
|
3071 2990 | }
|
3072 2991 |
|
3073 2992 | ::pin_project_lite::pin_project! {
|
3074 2993 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
3075 2994 | /// [`MalformedTimestampPathHttpDateInput`](crate::input::MalformedTimestampPathHttpDateInput) using modelled bindings.
|
3076 2995 | pub struct MalformedTimestampPathHttpDateInputFuture {
|
3077 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampPathHttpDateInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
2996 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampPathHttpDateInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3078 2997 | }
|
3079 2998 | }
|
3080 2999 |
|
3081 3000 | impl std::future::Future for MalformedTimestampPathHttpDateInputFuture {
|
3082 3001 | type Output = Result<
|
3083 3002 | crate::input::MalformedTimestampPathHttpDateInput,
|
3084 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3003 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3085 3004 | >;
|
3086 3005 |
|
3087 3006 | fn poll(
|
3088 3007 | self: std::pin::Pin<&mut Self>,
|
3089 3008 | cx: &mut std::task::Context<'_>,
|
3090 3009 | ) -> std::task::Poll<Self::Output> {
|
3091 3010 | let this = self.project();
|
3092 3011 | this.inner.as_mut().poll(cx)
|
3093 3012 | }
|
3094 3013 | }
|
3095 3014 |
|
3096 3015 | impl<B>
|
3097 - | ::aws_smithy_http_server::request::FromRequest<
|
3098 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3016 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
3017 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3099 3018 | B,
|
3100 3019 | > for crate::input::MalformedTimestampPathHttpDateInput
|
3101 3020 | where
|
3102 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
3021 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
3103 3022 | B: 'static,
|
3104 3023 |
|
3105 3024 | B::Data: Send,
|
3106 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3107 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
3025 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3026 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
3108 3027 | {
|
3109 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3028 + | type Rejection =
|
3029 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3110 3030 | type Future = MalformedTimestampPathHttpDateInputFuture;
|
3111 3031 |
|
3112 3032 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
3113 3033 | let fut = async move {
|
3114 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
3034 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
3115 3035 | request.headers(),
|
3116 3036 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
3117 3037 | ) {
|
3118 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3038 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3119 3039 | }
|
3120 3040 | crate::protocol_serde::shape_malformed_timestamp_path_http_date::de_malformed_timestamp_path_http_date_http_request(request)
|
3121 3041 | .await
|
3122 3042 | };
|
3123 3043 | use ::futures_util::future::TryFutureExt;
|
3124 - | let fut = fut.map_err(
|
3125 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3126 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3127 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
3128 - | e,
|
3129 - | )
|
3130 - | },
|
3131 - | );
|
3044 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3045 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3046 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
3047 + | });
|
3132 3048 | MalformedTimestampPathHttpDateInputFuture {
|
3133 3049 | inner: Box::pin(fut),
|
3134 3050 | }
|
3135 3051 | }
|
3136 3052 | }
|
3137 3053 | impl
|
3138 - | ::aws_smithy_http_server::response::IntoResponse<
|
3139 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3054 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3055 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3140 3056 | > for crate::output::MalformedTimestampPathHttpDateOutput
|
3141 3057 | {
|
3142 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3058 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3143 3059 | match crate::protocol_serde::shape_malformed_timestamp_path_http_date::ser_malformed_timestamp_path_http_date_http_response(self) {
|
3144 3060 | Ok(response) => response,
|
3145 3061 | Err(e) => {
|
3146 3062 | ::tracing::error!(error = %e, "failed to serialize response");
|
3147 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3063 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3148 3064 | }
|
3149 3065 | }
|
3150 3066 | }
|
3151 3067 | }
|
3152 3068 | impl
|
3153 - | ::aws_smithy_http_server::response::IntoResponse<
|
3154 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3069 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3070 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3155 3071 | > for crate::error::MalformedTimestampPathHttpDateError
|
3156 3072 | {
|
3157 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3073 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3158 3074 | match crate::protocol_serde::shape_malformed_timestamp_path_http_date::ser_malformed_timestamp_path_http_date_http_error(&self) {
|
3159 3075 | Ok(mut response) => {
|
3160 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
3076 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
3161 3077 | response
|
3162 3078 | },
|
3163 3079 | Err(e) => {
|
3164 3080 | ::tracing::error!(error = %e, "failed to serialize response");
|
3165 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3081 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3166 3082 | }
|
3167 3083 | }
|
3168 3084 | }
|
3169 3085 | }
|
3170 3086 |
|
3171 3087 | ::pin_project_lite::pin_project! {
|
3172 3088 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
3173 3089 | /// [`MalformedTimestampPathDefaultInput`](crate::input::MalformedTimestampPathDefaultInput) using modelled bindings.
|
3174 3090 | pub struct MalformedTimestampPathDefaultInputFuture {
|
3175 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampPathDefaultInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3091 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedTimestampPathDefaultInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3176 3092 | }
|
3177 3093 | }
|
3178 3094 |
|
3179 3095 | impl std::future::Future for MalformedTimestampPathDefaultInputFuture {
|
3180 3096 | type Output = Result<
|
3181 3097 | crate::input::MalformedTimestampPathDefaultInput,
|
3182 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3098 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3183 3099 | >;
|
3184 3100 |
|
3185 3101 | fn poll(
|
3186 3102 | self: std::pin::Pin<&mut Self>,
|
3187 3103 | cx: &mut std::task::Context<'_>,
|
3188 3104 | ) -> std::task::Poll<Self::Output> {
|
3189 3105 | let this = self.project();
|
3190 3106 | this.inner.as_mut().poll(cx)
|
3191 3107 | }
|
3192 3108 | }
|
3193 3109 |
|
3194 3110 | impl<B>
|
3195 - | ::aws_smithy_http_server::request::FromRequest<
|
3196 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3111 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
3112 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3197 3113 | B,
|
3198 3114 | > for crate::input::MalformedTimestampPathDefaultInput
|
3199 3115 | where
|
3200 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
3116 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
3201 3117 | B: 'static,
|
3202 3118 |
|
3203 3119 | B::Data: Send,
|
3204 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3205 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
3120 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3121 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
3206 3122 | {
|
3207 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3123 + | type Rejection =
|
3124 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3208 3125 | type Future = MalformedTimestampPathDefaultInputFuture;
|
3209 3126 |
|
3210 3127 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
3211 3128 | let fut = async move {
|
3212 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
3129 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
3213 3130 | request.headers(),
|
3214 3131 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
3215 3132 | ) {
|
3216 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3133 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3217 3134 | }
|
3218 3135 | crate::protocol_serde::shape_malformed_timestamp_path_default::de_malformed_timestamp_path_default_http_request(request)
|
3219 3136 | .await
|
3220 3137 | };
|
3221 3138 | use ::futures_util::future::TryFutureExt;
|
3222 - | let fut = fut.map_err(
|
3223 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3224 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3225 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
3226 - | e,
|
3227 - | )
|
3228 - | },
|
3229 - | );
|
3139 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3140 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3141 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
3142 + | });
|
3230 3143 | MalformedTimestampPathDefaultInputFuture {
|
3231 3144 | inner: Box::pin(fut),
|
3232 3145 | }
|
3233 3146 | }
|
3234 3147 | }
|
3235 3148 | impl
|
3236 - | ::aws_smithy_http_server::response::IntoResponse<
|
3237 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3149 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3150 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3238 3151 | > for crate::output::MalformedTimestampPathDefaultOutput
|
3239 3152 | {
|
3240 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3153 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3241 3154 | match crate::protocol_serde::shape_malformed_timestamp_path_default::ser_malformed_timestamp_path_default_http_response(self) {
|
3242 3155 | Ok(response) => response,
|
3243 3156 | Err(e) => {
|
3244 3157 | ::tracing::error!(error = %e, "failed to serialize response");
|
3245 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3158 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3246 3159 | }
|
3247 3160 | }
|
3248 3161 | }
|
3249 3162 | }
|
3250 3163 | impl
|
3251 - | ::aws_smithy_http_server::response::IntoResponse<
|
3252 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3164 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3165 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3253 3166 | > for crate::error::MalformedTimestampPathDefaultError
|
3254 3167 | {
|
3255 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3168 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3256 3169 | match crate::protocol_serde::shape_malformed_timestamp_path_default::ser_malformed_timestamp_path_default_http_error(&self) {
|
3257 3170 | Ok(mut response) => {
|
3258 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
3171 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
3259 3172 | response
|
3260 3173 | },
|
3261 3174 | Err(e) => {
|
3262 3175 | ::tracing::error!(error = %e, "failed to serialize response");
|
3263 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3176 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3264 3177 | }
|
3265 3178 | }
|
3266 3179 | }
|
3267 3180 | }
|
3268 3181 |
|
3269 3182 | ::pin_project_lite::pin_project! {
|
3270 3183 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
3271 3184 | /// [`MalformedStringInput`](crate::input::MalformedStringInput) using modelled bindings.
|
3272 3185 | pub struct MalformedStringInputFuture {
|
3273 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedStringInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3186 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedStringInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3274 3187 | }
|
3275 3188 | }
|
3276 3189 |
|
3277 3190 | impl std::future::Future for MalformedStringInputFuture {
|
3278 3191 | type Output = Result<
|
3279 3192 | crate::input::MalformedStringInput,
|
3280 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3193 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3281 3194 | >;
|
3282 3195 |
|
3283 3196 | fn poll(
|
3284 3197 | self: std::pin::Pin<&mut Self>,
|
3285 3198 | cx: &mut std::task::Context<'_>,
|
3286 3199 | ) -> std::task::Poll<Self::Output> {
|
3287 3200 | let this = self.project();
|
3288 3201 | this.inner.as_mut().poll(cx)
|
3289 3202 | }
|
3290 3203 | }
|
3291 3204 |
|
3292 3205 | impl<B>
|
3293 - | ::aws_smithy_http_server::request::FromRequest<
|
3294 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3206 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
3207 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3295 3208 | B,
|
3296 3209 | > for crate::input::MalformedStringInput
|
3297 3210 | where
|
3298 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
3211 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
3299 3212 | B: 'static,
|
3300 3213 |
|
3301 3214 | B::Data: Send,
|
3302 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3303 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
3215 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3216 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
3304 3217 | {
|
3305 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3218 + | type Rejection =
|
3219 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3306 3220 | type Future = MalformedStringInputFuture;
|
3307 3221 |
|
3308 3222 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
3309 3223 | let fut = async move {
|
3310 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
3224 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
3311 3225 | request.headers(),
|
3312 3226 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
3313 3227 | ) {
|
3314 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3228 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3315 3229 | }
|
3316 3230 | crate::protocol_serde::shape_malformed_string::de_malformed_string_http_request(request)
|
3317 3231 | .await
|
3318 3232 | };
|
3319 3233 | use ::futures_util::future::TryFutureExt;
|
3320 - | let fut = fut.map_err(
|
3321 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3322 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3323 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
3324 - | e,
|
3325 - | )
|
3326 - | },
|
3327 - | );
|
3234 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3235 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3236 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
3237 + | });
|
3328 3238 | MalformedStringInputFuture {
|
3329 3239 | inner: Box::pin(fut),
|
3330 3240 | }
|
3331 3241 | }
|
3332 3242 | }
|
3333 3243 | impl
|
3334 - | ::aws_smithy_http_server::response::IntoResponse<
|
3335 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3244 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3245 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3336 3246 | > for crate::output::MalformedStringOutput
|
3337 3247 | {
|
3338 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3248 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3339 3249 | match crate::protocol_serde::shape_malformed_string::ser_malformed_string_http_response(
|
3340 3250 | self,
|
3341 3251 | ) {
|
3342 3252 | Ok(response) => response,
|
3343 3253 | Err(e) => {
|
3344 3254 | ::tracing::error!(error = %e, "failed to serialize response");
|
3345 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3255 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3346 3256 | }
|
3347 3257 | }
|
3348 3258 | }
|
3349 3259 | }
|
3350 3260 | impl
|
3351 - | ::aws_smithy_http_server::response::IntoResponse<
|
3352 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3261 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3262 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3353 3263 | > for crate::error::MalformedStringError
|
3354 3264 | {
|
3355 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3265 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3356 3266 | match crate::protocol_serde::shape_malformed_string::ser_malformed_string_http_error(&self)
|
3357 3267 | {
|
3358 3268 | Ok(mut response) => {
|
3359 3269 | response.extensions_mut().insert(
|
3360 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
3270 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
3271 + | self.name(),
|
3272 + | ),
|
3361 3273 | );
|
3362 3274 | response
|
3363 3275 | }
|
3364 3276 | Err(e) => {
|
3365 3277 | ::tracing::error!(error = %e, "failed to serialize response");
|
3366 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3278 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3367 3279 | }
|
3368 3280 | }
|
3369 3281 | }
|
3370 3282 | }
|
3371 3283 |
|
3372 3284 | ::pin_project_lite::pin_project! {
|
3373 3285 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
3374 3286 | /// [`MalformedDoubleInput`](crate::input::MalformedDoubleInput) using modelled bindings.
|
3375 3287 | pub struct MalformedDoubleInputFuture {
|
3376 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedDoubleInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3288 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedDoubleInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3377 3289 | }
|
3378 3290 | }
|
3379 3291 |
|
3380 3292 | impl std::future::Future for MalformedDoubleInputFuture {
|
3381 3293 | type Output = Result<
|
3382 3294 | crate::input::MalformedDoubleInput,
|
3383 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3295 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3384 3296 | >;
|
3385 3297 |
|
3386 3298 | fn poll(
|
3387 3299 | self: std::pin::Pin<&mut Self>,
|
3388 3300 | cx: &mut std::task::Context<'_>,
|
3389 3301 | ) -> std::task::Poll<Self::Output> {
|
3390 3302 | let this = self.project();
|
3391 3303 | this.inner.as_mut().poll(cx)
|
3392 3304 | }
|
3393 3305 | }
|
3394 3306 |
|
3395 3307 | impl<B>
|
3396 - | ::aws_smithy_http_server::request::FromRequest<
|
3397 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3308 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
3309 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3398 3310 | B,
|
3399 3311 | > for crate::input::MalformedDoubleInput
|
3400 3312 | where
|
3401 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
3313 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
3402 3314 | B: 'static,
|
3403 3315 |
|
3404 3316 | B::Data: Send,
|
3405 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3406 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
3317 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3318 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
3407 3319 | {
|
3408 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3320 + | type Rejection =
|
3321 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3409 3322 | type Future = MalformedDoubleInputFuture;
|
3410 3323 |
|
3411 3324 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
3412 3325 | let fut = async move {
|
3413 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
3326 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
3414 3327 | request.headers(),
|
3415 3328 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
3416 3329 | ) {
|
3417 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3330 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3418 3331 | }
|
3419 3332 | crate::protocol_serde::shape_malformed_double::de_malformed_double_http_request(request)
|
3420 3333 | .await
|
3421 3334 | };
|
3422 3335 | use ::futures_util::future::TryFutureExt;
|
3423 - | let fut = fut.map_err(
|
3424 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3425 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3426 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
3427 - | e,
|
3428 - | )
|
3429 - | },
|
3430 - | );
|
3336 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3337 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3338 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
3339 + | });
|
3431 3340 | MalformedDoubleInputFuture {
|
3432 3341 | inner: Box::pin(fut),
|
3433 3342 | }
|
3434 3343 | }
|
3435 3344 | }
|
3436 3345 | impl
|
3437 - | ::aws_smithy_http_server::response::IntoResponse<
|
3438 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3346 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3347 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3439 3348 | > for crate::output::MalformedDoubleOutput
|
3440 3349 | {
|
3441 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3350 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3442 3351 | match crate::protocol_serde::shape_malformed_double::ser_malformed_double_http_response(
|
3443 3352 | self,
|
3444 3353 | ) {
|
3445 3354 | Ok(response) => response,
|
3446 3355 | Err(e) => {
|
3447 3356 | ::tracing::error!(error = %e, "failed to serialize response");
|
3448 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3357 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3449 3358 | }
|
3450 3359 | }
|
3451 3360 | }
|
3452 3361 | }
|
3453 3362 | impl
|
3454 - | ::aws_smithy_http_server::response::IntoResponse<
|
3455 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3363 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3364 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3456 3365 | > for crate::error::MalformedDoubleError
|
3457 3366 | {
|
3458 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3367 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3459 3368 | match crate::protocol_serde::shape_malformed_double::ser_malformed_double_http_error(&self)
|
3460 3369 | {
|
3461 3370 | Ok(mut response) => {
|
3462 3371 | response.extensions_mut().insert(
|
3463 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
3372 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
3373 + | self.name(),
|
3374 + | ),
|
3464 3375 | );
|
3465 3376 | response
|
3466 3377 | }
|
3467 3378 | Err(e) => {
|
3468 3379 | ::tracing::error!(error = %e, "failed to serialize response");
|
3469 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3380 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3470 3381 | }
|
3471 3382 | }
|
3472 3383 | }
|
3473 3384 | }
|
3474 3385 |
|
3475 3386 | ::pin_project_lite::pin_project! {
|
3476 3387 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
3477 3388 | /// [`MalformedFloatInput`](crate::input::MalformedFloatInput) using modelled bindings.
|
3478 3389 | pub struct MalformedFloatInputFuture {
|
3479 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedFloatInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3390 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedFloatInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3480 3391 | }
|
3481 3392 | }
|
3482 3393 |
|
3483 3394 | impl std::future::Future for MalformedFloatInputFuture {
|
3484 3395 | type Output = Result<
|
3485 3396 | crate::input::MalformedFloatInput,
|
3486 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3397 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3487 3398 | >;
|
3488 3399 |
|
3489 3400 | fn poll(
|
3490 3401 | self: std::pin::Pin<&mut Self>,
|
3491 3402 | cx: &mut std::task::Context<'_>,
|
3492 3403 | ) -> std::task::Poll<Self::Output> {
|
3493 3404 | let this = self.project();
|
3494 3405 | this.inner.as_mut().poll(cx)
|
3495 3406 | }
|
3496 3407 | }
|
3497 3408 |
|
3498 3409 | impl<B>
|
3499 - | ::aws_smithy_http_server::request::FromRequest<
|
3500 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3410 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
3411 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3501 3412 | B,
|
3502 3413 | > for crate::input::MalformedFloatInput
|
3503 3414 | where
|
3504 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
3415 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
3505 3416 | B: 'static,
|
3506 3417 |
|
3507 3418 | B::Data: Send,
|
3508 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3509 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
3419 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3420 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
3510 3421 | {
|
3511 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3422 + | type Rejection =
|
3423 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3512 3424 | type Future = MalformedFloatInputFuture;
|
3513 3425 |
|
3514 3426 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
3515 3427 | let fut = async move {
|
3516 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
3428 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
3517 3429 | request.headers(),
|
3518 3430 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
3519 3431 | ) {
|
3520 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3432 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3521 3433 | }
|
3522 3434 | crate::protocol_serde::shape_malformed_float::de_malformed_float_http_request(request)
|
3523 3435 | .await
|
3524 3436 | };
|
3525 3437 | use ::futures_util::future::TryFutureExt;
|
3526 - | let fut = fut.map_err(
|
3527 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3528 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3529 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
3530 - | e,
|
3531 - | )
|
3532 - | },
|
3533 - | );
|
3438 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3439 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3440 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
3441 + | });
|
3534 3442 | MalformedFloatInputFuture {
|
3535 3443 | inner: Box::pin(fut),
|
3536 3444 | }
|
3537 3445 | }
|
3538 3446 | }
|
3539 3447 | impl
|
3540 - | ::aws_smithy_http_server::response::IntoResponse<
|
3541 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3448 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3449 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3542 3450 | > for crate::output::MalformedFloatOutput
|
3543 3451 | {
|
3544 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3452 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3545 3453 | match crate::protocol_serde::shape_malformed_float::ser_malformed_float_http_response(self)
|
3546 3454 | {
|
3547 3455 | Ok(response) => response,
|
3548 3456 | Err(e) => {
|
3549 3457 | ::tracing::error!(error = %e, "failed to serialize response");
|
3550 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3458 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3551 3459 | }
|
3552 3460 | }
|
3553 3461 | }
|
3554 3462 | }
|
3555 3463 | impl
|
3556 - | ::aws_smithy_http_server::response::IntoResponse<
|
3557 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3464 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3465 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3558 3466 | > for crate::error::MalformedFloatError
|
3559 3467 | {
|
3560 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3468 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3561 3469 | match crate::protocol_serde::shape_malformed_float::ser_malformed_float_http_error(&self) {
|
3562 3470 | Ok(mut response) => {
|
3563 3471 | response.extensions_mut().insert(
|
3564 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
3472 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
3473 + | self.name(),
|
3474 + | ),
|
3565 3475 | );
|
3566 3476 | response
|
3567 3477 | }
|
3568 3478 | Err(e) => {
|
3569 3479 | ::tracing::error!(error = %e, "failed to serialize response");
|
3570 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3480 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3571 3481 | }
|
3572 3482 | }
|
3573 3483 | }
|
3574 3484 | }
|
3575 3485 |
|
3576 3486 | ::pin_project_lite::pin_project! {
|
3577 3487 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
3578 3488 | /// [`MalformedLongInput`](crate::input::MalformedLongInput) using modelled bindings.
|
3579 3489 | pub struct MalformedLongInputFuture {
|
3580 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedLongInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3490 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedLongInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3581 3491 | }
|
3582 3492 | }
|
3583 3493 |
|
3584 3494 | impl std::future::Future for MalformedLongInputFuture {
|
3585 3495 | type Output = Result<
|
3586 3496 | crate::input::MalformedLongInput,
|
3587 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3497 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3588 3498 | >;
|
3589 3499 |
|
3590 3500 | fn poll(
|
3591 3501 | self: std::pin::Pin<&mut Self>,
|
3592 3502 | cx: &mut std::task::Context<'_>,
|
3593 3503 | ) -> std::task::Poll<Self::Output> {
|
3594 3504 | let this = self.project();
|
3595 3505 | this.inner.as_mut().poll(cx)
|
3596 3506 | }
|
3597 3507 | }
|
3598 3508 |
|
3599 3509 | impl<B>
|
3600 - | ::aws_smithy_http_server::request::FromRequest<
|
3601 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3510 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
3511 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3602 3512 | B,
|
3603 3513 | > for crate::input::MalformedLongInput
|
3604 3514 | where
|
3605 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
3515 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
3606 3516 | B: 'static,
|
3607 3517 |
|
3608 3518 | B::Data: Send,
|
3609 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3610 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
3519 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3520 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
3611 3521 | {
|
3612 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3522 + | type Rejection =
|
3523 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3613 3524 | type Future = MalformedLongInputFuture;
|
3614 3525 |
|
3615 3526 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
3616 3527 | let fut = async move {
|
3617 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
3528 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
3618 3529 | request.headers(),
|
3619 3530 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
3620 3531 | ) {
|
3621 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3532 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3622 3533 | }
|
3623 3534 | crate::protocol_serde::shape_malformed_long::de_malformed_long_http_request(request)
|
3624 3535 | .await
|
3625 3536 | };
|
3626 3537 | use ::futures_util::future::TryFutureExt;
|
3627 - | let fut = fut.map_err(
|
3628 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3629 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3630 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
3631 - | e,
|
3632 - | )
|
3633 - | },
|
3634 - | );
|
3538 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3539 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3540 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
3541 + | });
|
3635 3542 | MalformedLongInputFuture {
|
3636 3543 | inner: Box::pin(fut),
|
3637 3544 | }
|
3638 3545 | }
|
3639 3546 | }
|
3640 3547 | impl
|
3641 - | ::aws_smithy_http_server::response::IntoResponse<
|
3642 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3548 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3549 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3643 3550 | > for crate::output::MalformedLongOutput
|
3644 3551 | {
|
3645 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3552 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3646 3553 | match crate::protocol_serde::shape_malformed_long::ser_malformed_long_http_response(self) {
|
3647 3554 | Ok(response) => response,
|
3648 3555 | Err(e) => {
|
3649 3556 | ::tracing::error!(error = %e, "failed to serialize response");
|
3650 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3557 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3651 3558 | }
|
3652 3559 | }
|
3653 3560 | }
|
3654 3561 | }
|
3655 3562 | impl
|
3656 - | ::aws_smithy_http_server::response::IntoResponse<
|
3657 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3563 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3564 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3658 3565 | > for crate::error::MalformedLongError
|
3659 3566 | {
|
3660 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3567 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3661 3568 | match crate::protocol_serde::shape_malformed_long::ser_malformed_long_http_error(&self) {
|
3662 3569 | Ok(mut response) => {
|
3663 3570 | response.extensions_mut().insert(
|
3664 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
3571 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
3572 + | self.name(),
|
3573 + | ),
|
3665 3574 | );
|
3666 3575 | response
|
3667 3576 | }
|
3668 3577 | Err(e) => {
|
3669 3578 | ::tracing::error!(error = %e, "failed to serialize response");
|
3670 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3579 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3671 3580 | }
|
3672 3581 | }
|
3673 3582 | }
|
3674 3583 | }
|
3675 3584 |
|
3676 3585 | ::pin_project_lite::pin_project! {
|
3677 3586 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
3678 3587 | /// [`MalformedShortInput`](crate::input::MalformedShortInput) using modelled bindings.
|
3679 3588 | pub struct MalformedShortInputFuture {
|
3680 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedShortInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3589 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedShortInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3681 3590 | }
|
3682 3591 | }
|
3683 3592 |
|
3684 3593 | impl std::future::Future for MalformedShortInputFuture {
|
3685 3594 | type Output = Result<
|
3686 3595 | crate::input::MalformedShortInput,
|
3687 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3596 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3688 3597 | >;
|
3689 3598 |
|
3690 3599 | fn poll(
|
3691 3600 | self: std::pin::Pin<&mut Self>,
|
3692 3601 | cx: &mut std::task::Context<'_>,
|
3693 3602 | ) -> std::task::Poll<Self::Output> {
|
3694 3603 | let this = self.project();
|
3695 3604 | this.inner.as_mut().poll(cx)
|
3696 3605 | }
|
3697 3606 | }
|
3698 3607 |
|
3699 3608 | impl<B>
|
3700 - | ::aws_smithy_http_server::request::FromRequest<
|
3701 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3609 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
3610 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3702 3611 | B,
|
3703 3612 | > for crate::input::MalformedShortInput
|
3704 3613 | where
|
3705 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
3614 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
3706 3615 | B: 'static,
|
3707 3616 |
|
3708 3617 | B::Data: Send,
|
3709 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3710 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
3618 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3619 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
3711 3620 | {
|
3712 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3621 + | type Rejection =
|
3622 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3713 3623 | type Future = MalformedShortInputFuture;
|
3714 3624 |
|
3715 3625 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
3716 3626 | let fut = async move {
|
3717 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
3627 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
3718 3628 | request.headers(),
|
3719 3629 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
3720 3630 | ) {
|
3721 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3631 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3722 3632 | }
|
3723 3633 | crate::protocol_serde::shape_malformed_short::de_malformed_short_http_request(request)
|
3724 3634 | .await
|
3725 3635 | };
|
3726 3636 | use ::futures_util::future::TryFutureExt;
|
3727 - | let fut = fut.map_err(
|
3728 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3729 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3730 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
3731 - | e,
|
3732 - | )
|
3733 - | },
|
3734 - | );
|
3637 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3638 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3639 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
3640 + | });
|
3735 3641 | MalformedShortInputFuture {
|
3736 3642 | inner: Box::pin(fut),
|
3737 3643 | }
|
3738 3644 | }
|
3739 3645 | }
|
3740 3646 | impl
|
3741 - | ::aws_smithy_http_server::response::IntoResponse<
|
3742 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3647 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3648 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3743 3649 | > for crate::output::MalformedShortOutput
|
3744 3650 | {
|
3745 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3651 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3746 3652 | match crate::protocol_serde::shape_malformed_short::ser_malformed_short_http_response(self)
|
3747 3653 | {
|
3748 3654 | Ok(response) => response,
|
3749 3655 | Err(e) => {
|
3750 3656 | ::tracing::error!(error = %e, "failed to serialize response");
|
3751 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3657 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3752 3658 | }
|
3753 3659 | }
|
3754 3660 | }
|
3755 3661 | }
|
3756 3662 | impl
|
3757 - | ::aws_smithy_http_server::response::IntoResponse<
|
3758 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3663 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3664 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3759 3665 | > for crate::error::MalformedShortError
|
3760 3666 | {
|
3761 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3667 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3762 3668 | match crate::protocol_serde::shape_malformed_short::ser_malformed_short_http_error(&self) {
|
3763 3669 | Ok(mut response) => {
|
3764 3670 | response.extensions_mut().insert(
|
3765 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
3671 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
3672 + | self.name(),
|
3673 + | ),
|
3766 3674 | );
|
3767 3675 | response
|
3768 3676 | }
|
3769 3677 | Err(e) => {
|
3770 3678 | ::tracing::error!(error = %e, "failed to serialize response");
|
3771 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3679 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3772 3680 | }
|
3773 3681 | }
|
3774 3682 | }
|
3775 3683 | }
|
3776 3684 |
|
3777 3685 | ::pin_project_lite::pin_project! {
|
3778 3686 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
3779 3687 | /// [`MalformedByteInput`](crate::input::MalformedByteInput) using modelled bindings.
|
3780 3688 | pub struct MalformedByteInputFuture {
|
3781 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedByteInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3689 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedByteInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3782 3690 | }
|
3783 3691 | }
|
3784 3692 |
|
3785 3693 | impl std::future::Future for MalformedByteInputFuture {
|
3786 3694 | type Output = Result<
|
3787 3695 | crate::input::MalformedByteInput,
|
3788 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3696 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3789 3697 | >;
|
3790 3698 |
|
3791 3699 | fn poll(
|
3792 3700 | self: std::pin::Pin<&mut Self>,
|
3793 3701 | cx: &mut std::task::Context<'_>,
|
3794 3702 | ) -> std::task::Poll<Self::Output> {
|
3795 3703 | let this = self.project();
|
3796 3704 | this.inner.as_mut().poll(cx)
|
3797 3705 | }
|
3798 3706 | }
|
3799 3707 |
|
3800 3708 | impl<B>
|
3801 - | ::aws_smithy_http_server::request::FromRequest<
|
3802 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3709 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
3710 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3803 3711 | B,
|
3804 3712 | > for crate::input::MalformedByteInput
|
3805 3713 | where
|
3806 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
3714 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
3807 3715 | B: 'static,
|
3808 3716 |
|
3809 3717 | B::Data: Send,
|
3810 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3811 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
3718 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3719 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
3812 3720 | {
|
3813 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3721 + | type Rejection =
|
3722 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3814 3723 | type Future = MalformedByteInputFuture;
|
3815 3724 |
|
3816 3725 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
3817 3726 | let fut = async move {
|
3818 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
3727 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
3819 3728 | request.headers(),
|
3820 3729 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
3821 3730 | ) {
|
3822 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3731 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3823 3732 | }
|
3824 3733 | crate::protocol_serde::shape_malformed_byte::de_malformed_byte_http_request(request)
|
3825 3734 | .await
|
3826 3735 | };
|
3827 3736 | use ::futures_util::future::TryFutureExt;
|
3828 - | let fut = fut.map_err(
|
3829 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3830 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3831 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
3832 - | e,
|
3833 - | )
|
3834 - | },
|
3835 - | );
|
3737 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3738 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3739 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
3740 + | });
|
3836 3741 | MalformedByteInputFuture {
|
3837 3742 | inner: Box::pin(fut),
|
3838 3743 | }
|
3839 3744 | }
|
3840 3745 | }
|
3841 3746 | impl
|
3842 - | ::aws_smithy_http_server::response::IntoResponse<
|
3843 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3747 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3748 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3844 3749 | > for crate::output::MalformedByteOutput
|
3845 3750 | {
|
3846 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3751 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3847 3752 | match crate::protocol_serde::shape_malformed_byte::ser_malformed_byte_http_response(self) {
|
3848 3753 | Ok(response) => response,
|
3849 3754 | Err(e) => {
|
3850 3755 | ::tracing::error!(error = %e, "failed to serialize response");
|
3851 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3756 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3852 3757 | }
|
3853 3758 | }
|
3854 3759 | }
|
3855 3760 | }
|
3856 3761 | impl
|
3857 - | ::aws_smithy_http_server::response::IntoResponse<
|
3858 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3762 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3763 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3859 3764 | > for crate::error::MalformedByteError
|
3860 3765 | {
|
3861 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3766 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3862 3767 | match crate::protocol_serde::shape_malformed_byte::ser_malformed_byte_http_error(&self) {
|
3863 3768 | Ok(mut response) => {
|
3864 3769 | response.extensions_mut().insert(
|
3865 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
3770 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
3771 + | self.name(),
|
3772 + | ),
|
3866 3773 | );
|
3867 3774 | response
|
3868 3775 | }
|
3869 3776 | Err(e) => {
|
3870 3777 | ::tracing::error!(error = %e, "failed to serialize response");
|
3871 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3778 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3872 3779 | }
|
3873 3780 | }
|
3874 3781 | }
|
3875 3782 | }
|
3876 3783 |
|
3877 3784 | ::pin_project_lite::pin_project! {
|
3878 3785 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
3879 3786 | /// [`MalformedBlobInput`](crate::input::MalformedBlobInput) using modelled bindings.
|
3880 3787 | pub struct MalformedBlobInputFuture {
|
3881 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedBlobInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3788 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedBlobInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3882 3789 | }
|
3883 3790 | }
|
3884 3791 |
|
3885 3792 | impl std::future::Future for MalformedBlobInputFuture {
|
3886 3793 | type Output = Result<
|
3887 3794 | crate::input::MalformedBlobInput,
|
3888 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3795 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3889 3796 | >;
|
3890 3797 |
|
3891 3798 | fn poll(
|
3892 3799 | self: std::pin::Pin<&mut Self>,
|
3893 3800 | cx: &mut std::task::Context<'_>,
|
3894 3801 | ) -> std::task::Poll<Self::Output> {
|
3895 3802 | let this = self.project();
|
3896 3803 | this.inner.as_mut().poll(cx)
|
3897 3804 | }
|
3898 3805 | }
|
3899 3806 |
|
3900 3807 | impl<B>
|
3901 - | ::aws_smithy_http_server::request::FromRequest<
|
3902 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3808 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
3809 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3903 3810 | B,
|
3904 3811 | > for crate::input::MalformedBlobInput
|
3905 3812 | where
|
3906 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
3813 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
3907 3814 | B: 'static,
|
3908 3815 |
|
3909 3816 | B::Data: Send,
|
3910 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3911 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
3817 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3818 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
3912 3819 | {
|
3913 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3820 + | type Rejection =
|
3821 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3914 3822 | type Future = MalformedBlobInputFuture;
|
3915 3823 |
|
3916 3824 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
3917 3825 | let fut = async move {
|
3918 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
3826 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
3919 3827 | request.headers(),
|
3920 3828 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
3921 3829 | ) {
|
3922 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3830 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3923 3831 | }
|
3924 3832 | crate::protocol_serde::shape_malformed_blob::de_malformed_blob_http_request(request)
|
3925 3833 | .await
|
3926 3834 | };
|
3927 3835 | use ::futures_util::future::TryFutureExt;
|
3928 - | let fut = fut.map_err(
|
3929 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3930 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3931 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
3932 - | e,
|
3933 - | )
|
3934 - | },
|
3935 - | );
|
3836 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3837 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3838 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
3839 + | });
|
3936 3840 | MalformedBlobInputFuture {
|
3937 3841 | inner: Box::pin(fut),
|
3938 3842 | }
|
3939 3843 | }
|
3940 3844 | }
|
3941 3845 | impl
|
3942 - | ::aws_smithy_http_server::response::IntoResponse<
|
3943 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3846 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3847 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3944 3848 | > for crate::output::MalformedBlobOutput
|
3945 3849 | {
|
3946 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3850 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3947 3851 | match crate::protocol_serde::shape_malformed_blob::ser_malformed_blob_http_response(self) {
|
3948 3852 | Ok(response) => response,
|
3949 3853 | Err(e) => {
|
3950 3854 | ::tracing::error!(error = %e, "failed to serialize response");
|
3951 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3855 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3952 3856 | }
|
3953 3857 | }
|
3954 3858 | }
|
3955 3859 | }
|
3956 3860 | impl
|
3957 - | ::aws_smithy_http_server::response::IntoResponse<
|
3958 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3861 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3862 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
3959 3863 | > for crate::error::MalformedBlobError
|
3960 3864 | {
|
3961 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3865 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
3962 3866 | match crate::protocol_serde::shape_malformed_blob::ser_malformed_blob_http_error(&self) {
|
3963 3867 | Ok(mut response) => {
|
3964 3868 | response.extensions_mut().insert(
|
3965 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
3869 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
3870 + | self.name(),
|
3871 + | ),
|
3966 3872 | );
|
3967 3873 | response
|
3968 3874 | }
|
3969 3875 | Err(e) => {
|
3970 3876 | ::tracing::error!(error = %e, "failed to serialize response");
|
3971 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3877 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3972 3878 | }
|
3973 3879 | }
|
3974 3880 | }
|
3975 3881 | }
|
3976 3882 |
|
3977 3883 | ::pin_project_lite::pin_project! {
|
3978 3884 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
3979 3885 | /// [`MalformedMapInput`](crate::input::MalformedMapInput) using modelled bindings.
|
3980 3886 | pub struct MalformedMapInputFuture {
|
3981 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedMapInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3887 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedMapInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3982 3888 | }
|
3983 3889 | }
|
3984 3890 |
|
3985 3891 | impl std::future::Future for MalformedMapInputFuture {
|
3986 3892 | type Output = Result<
|
3987 3893 | crate::input::MalformedMapInput,
|
3988 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3894 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3989 3895 | >;
|
3990 3896 |
|
3991 3897 | fn poll(
|
3992 3898 | self: std::pin::Pin<&mut Self>,
|
3993 3899 | cx: &mut std::task::Context<'_>,
|
3994 3900 | ) -> std::task::Poll<Self::Output> {
|
3995 3901 | let this = self.project();
|
3996 3902 | this.inner.as_mut().poll(cx)
|
3997 3903 | }
|
3998 3904 | }
|
3999 3905 |
|
4000 3906 | impl<B>
|
4001 - | ::aws_smithy_http_server::request::FromRequest<
|
4002 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3907 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
3908 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4003 3909 | B,
|
4004 3910 | > for crate::input::MalformedMapInput
|
4005 3911 | where
|
4006 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
3912 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
4007 3913 | B: 'static,
|
4008 3914 |
|
4009 3915 | B::Data: Send,
|
4010 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4011 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
3916 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
3917 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
4012 3918 | {
|
4013 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
3919 + | type Rejection =
|
3920 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4014 3921 | type Future = MalformedMapInputFuture;
|
4015 3922 |
|
4016 3923 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
4017 3924 | let fut = async move {
|
4018 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
3925 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
4019 3926 | request.headers(),
|
4020 3927 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
4021 3928 | ) {
|
4022 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
3929 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4023 3930 | }
|
4024 3931 | crate::protocol_serde::shape_malformed_map::de_malformed_map_http_request(request).await
|
4025 3932 | };
|
4026 3933 | use ::futures_util::future::TryFutureExt;
|
4027 - | let fut = fut.map_err(
|
4028 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4029 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4030 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
4031 - | e,
|
4032 - | )
|
4033 - | },
|
4034 - | );
|
3934 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
3935 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
3936 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
3937 + | });
|
4035 3938 | MalformedMapInputFuture {
|
4036 3939 | inner: Box::pin(fut),
|
4037 3940 | }
|
4038 3941 | }
|
4039 3942 | }
|
4040 3943 | impl
|
4041 - | ::aws_smithy_http_server::response::IntoResponse<
|
4042 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3944 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3945 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4043 3946 | > for crate::output::MalformedMapOutput
|
4044 3947 | {
|
4045 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3948 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4046 3949 | match crate::protocol_serde::shape_malformed_map::ser_malformed_map_http_response(self) {
|
4047 3950 | Ok(response) => response,
|
4048 3951 | Err(e) => {
|
4049 3952 | ::tracing::error!(error = %e, "failed to serialize response");
|
4050 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3953 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4051 3954 | }
|
4052 3955 | }
|
4053 3956 | }
|
4054 3957 | }
|
4055 3958 | impl
|
4056 - | ::aws_smithy_http_server::response::IntoResponse<
|
4057 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
3959 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
3960 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4058 3961 | > for crate::error::MalformedMapError
|
4059 3962 | {
|
4060 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
3963 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4061 3964 | match crate::protocol_serde::shape_malformed_map::ser_malformed_map_http_error(&self) {
|
4062 3965 | Ok(mut response) => {
|
4063 3966 | response.extensions_mut().insert(
|
4064 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
3967 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
3968 + | self.name(),
|
3969 + | ),
|
4065 3970 | );
|
4066 3971 | response
|
4067 3972 | }
|
4068 3973 | Err(e) => {
|
4069 3974 | ::tracing::error!(error = %e, "failed to serialize response");
|
4070 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
3975 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4071 3976 | }
|
4072 3977 | }
|
4073 3978 | }
|
4074 3979 | }
|
4075 3980 |
|
4076 3981 | ::pin_project_lite::pin_project! {
|
4077 3982 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
4078 3983 | /// [`MalformedListInput`](crate::input::MalformedListInput) using modelled bindings.
|
4079 3984 | pub struct MalformedListInputFuture {
|
4080 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedListInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
3985 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedListInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4081 3986 | }
|
4082 3987 | }
|
4083 3988 |
|
4084 3989 | impl std::future::Future for MalformedListInputFuture {
|
4085 3990 | type Output = Result<
|
4086 3991 | crate::input::MalformedListInput,
|
4087 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
3992 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4088 3993 | >;
|
4089 3994 |
|
4090 3995 | fn poll(
|
4091 3996 | self: std::pin::Pin<&mut Self>,
|
4092 3997 | cx: &mut std::task::Context<'_>,
|
4093 3998 | ) -> std::task::Poll<Self::Output> {
|
4094 3999 | let this = self.project();
|
4095 4000 | this.inner.as_mut().poll(cx)
|
4096 4001 | }
|
4097 4002 | }
|
4098 4003 |
|
4099 4004 | impl<B>
|
4100 - | ::aws_smithy_http_server::request::FromRequest<
|
4101 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4005 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
4006 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4102 4007 | B,
|
4103 4008 | > for crate::input::MalformedListInput
|
4104 4009 | where
|
4105 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
4010 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
4106 4011 | B: 'static,
|
4107 4012 |
|
4108 4013 | B::Data: Send,
|
4109 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4110 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
4014 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4015 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
4111 4016 | {
|
4112 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4017 + | type Rejection =
|
4018 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4113 4019 | type Future = MalformedListInputFuture;
|
4114 4020 |
|
4115 4021 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
4116 4022 | let fut = async move {
|
4117 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
4023 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
4118 4024 | request.headers(),
|
4119 4025 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
4120 4026 | ) {
|
4121 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4027 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4122 4028 | }
|
4123 4029 | crate::protocol_serde::shape_malformed_list::de_malformed_list_http_request(request)
|
4124 4030 | .await
|
4125 4031 | };
|
4126 4032 | use ::futures_util::future::TryFutureExt;
|
4127 - | let fut = fut.map_err(
|
4128 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4129 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4130 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
4131 - | e,
|
4132 - | )
|
4133 - | },
|
4134 - | );
|
4033 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4034 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4035 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
4036 + | });
|
4135 4037 | MalformedListInputFuture {
|
4136 4038 | inner: Box::pin(fut),
|
4137 4039 | }
|
4138 4040 | }
|
4139 4041 | }
|
4140 4042 | impl
|
4141 - | ::aws_smithy_http_server::response::IntoResponse<
|
4142 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4043 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4044 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4143 4045 | > for crate::output::MalformedListOutput
|
4144 4046 | {
|
4145 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4047 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4146 4048 | match crate::protocol_serde::shape_malformed_list::ser_malformed_list_http_response(self) {
|
4147 4049 | Ok(response) => response,
|
4148 4050 | Err(e) => {
|
4149 4051 | ::tracing::error!(error = %e, "failed to serialize response");
|
4150 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4052 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4151 4053 | }
|
4152 4054 | }
|
4153 4055 | }
|
4154 4056 | }
|
4155 4057 | impl
|
4156 - | ::aws_smithy_http_server::response::IntoResponse<
|
4157 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4058 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4059 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4158 4060 | > for crate::error::MalformedListError
|
4159 4061 | {
|
4160 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4062 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4161 4063 | match crate::protocol_serde::shape_malformed_list::ser_malformed_list_http_error(&self) {
|
4162 4064 | Ok(mut response) => {
|
4163 4065 | response.extensions_mut().insert(
|
4164 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
4066 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
4067 + | self.name(),
|
4068 + | ),
|
4165 4069 | );
|
4166 4070 | response
|
4167 4071 | }
|
4168 4072 | Err(e) => {
|
4169 4073 | ::tracing::error!(error = %e, "failed to serialize response");
|
4170 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4074 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4171 4075 | }
|
4172 4076 | }
|
4173 4077 | }
|
4174 4078 | }
|
4175 4079 |
|
4176 4080 | ::pin_project_lite::pin_project! {
|
4177 4081 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
4178 4082 | /// [`MalformedBooleanInput`](crate::input::MalformedBooleanInput) using modelled bindings.
|
4179 4083 | pub struct MalformedBooleanInputFuture {
|
4180 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedBooleanInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4084 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedBooleanInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4181 4085 | }
|
4182 4086 | }
|
4183 4087 |
|
4184 4088 | impl std::future::Future for MalformedBooleanInputFuture {
|
4185 4089 | type Output = Result<
|
4186 4090 | crate::input::MalformedBooleanInput,
|
4187 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4091 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4188 4092 | >;
|
4189 4093 |
|
4190 4094 | fn poll(
|
4191 4095 | self: std::pin::Pin<&mut Self>,
|
4192 4096 | cx: &mut std::task::Context<'_>,
|
4193 4097 | ) -> std::task::Poll<Self::Output> {
|
4194 4098 | let this = self.project();
|
4195 4099 | this.inner.as_mut().poll(cx)
|
4196 4100 | }
|
4197 4101 | }
|
4198 4102 |
|
4199 4103 | impl<B>
|
4200 - | ::aws_smithy_http_server::request::FromRequest<
|
4201 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4104 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
4105 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4202 4106 | B,
|
4203 4107 | > for crate::input::MalformedBooleanInput
|
4204 4108 | where
|
4205 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
4109 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
4206 4110 | B: 'static,
|
4207 4111 |
|
4208 4112 | B::Data: Send,
|
4209 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4210 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
4113 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4114 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
4211 4115 | {
|
4212 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4116 + | type Rejection =
|
4117 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4213 4118 | type Future = MalformedBooleanInputFuture;
|
4214 4119 |
|
4215 4120 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
4216 4121 | let fut = async move {
|
4217 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
4122 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
4218 4123 | request.headers(),
|
4219 4124 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
4220 4125 | ) {
|
4221 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4126 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4222 4127 | }
|
4223 4128 | crate::protocol_serde::shape_malformed_boolean::de_malformed_boolean_http_request(
|
4224 4129 | request,
|
4225 4130 | )
|
4226 4131 | .await
|
4227 4132 | };
|
4228 4133 | use ::futures_util::future::TryFutureExt;
|
4229 - | let fut = fut.map_err(
|
4230 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4231 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4232 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
4233 - | e,
|
4234 - | )
|
4235 - | },
|
4236 - | );
|
4134 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4135 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4136 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
4137 + | });
|
4237 4138 | MalformedBooleanInputFuture {
|
4238 4139 | inner: Box::pin(fut),
|
4239 4140 | }
|
4240 4141 | }
|
4241 4142 | }
|
4242 4143 | impl
|
4243 - | ::aws_smithy_http_server::response::IntoResponse<
|
4244 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4144 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4145 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4245 4146 | > for crate::output::MalformedBooleanOutput
|
4246 4147 | {
|
4247 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4148 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4248 4149 | match crate::protocol_serde::shape_malformed_boolean::ser_malformed_boolean_http_response(
|
4249 4150 | self,
|
4250 4151 | ) {
|
4251 4152 | Ok(response) => response,
|
4252 4153 | Err(e) => {
|
4253 4154 | ::tracing::error!(error = %e, "failed to serialize response");
|
4254 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4155 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4255 4156 | }
|
4256 4157 | }
|
4257 4158 | }
|
4258 4159 | }
|
4259 4160 | impl
|
4260 - | ::aws_smithy_http_server::response::IntoResponse<
|
4261 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4161 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4162 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4262 4163 | > for crate::error::MalformedBooleanError
|
4263 4164 | {
|
4264 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4165 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4265 4166 | match crate::protocol_serde::shape_malformed_boolean::ser_malformed_boolean_http_error(
|
4266 4167 | &self,
|
4267 4168 | ) {
|
4268 4169 | Ok(mut response) => {
|
4269 4170 | response.extensions_mut().insert(
|
4270 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
4171 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
4172 + | self.name(),
|
4173 + | ),
|
4271 4174 | );
|
4272 4175 | response
|
4273 4176 | }
|
4274 4177 | Err(e) => {
|
4275 4178 | ::tracing::error!(error = %e, "failed to serialize response");
|
4276 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4179 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4277 4180 | }
|
4278 4181 | }
|
4279 4182 | }
|
4280 4183 | }
|
4281 4184 |
|
4282 4185 | ::pin_project_lite::pin_project! {
|
4283 4186 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
4284 4187 | /// [`MalformedUnionInput`](crate::input::MalformedUnionInput) using modelled bindings.
|
4285 4188 | pub struct MalformedUnionInputFuture {
|
4286 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedUnionInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4189 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedUnionInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4287 4190 | }
|
4288 4191 | }
|
4289 4192 |
|
4290 4193 | impl std::future::Future for MalformedUnionInputFuture {
|
4291 4194 | type Output = Result<
|
4292 4195 | crate::input::MalformedUnionInput,
|
4293 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4196 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4294 4197 | >;
|
4295 4198 |
|
4296 4199 | fn poll(
|
4297 4200 | self: std::pin::Pin<&mut Self>,
|
4298 4201 | cx: &mut std::task::Context<'_>,
|
4299 4202 | ) -> std::task::Poll<Self::Output> {
|
4300 4203 | let this = self.project();
|
4301 4204 | this.inner.as_mut().poll(cx)
|
4302 4205 | }
|
4303 4206 | }
|
4304 4207 |
|
4305 4208 | impl<B>
|
4306 - | ::aws_smithy_http_server::request::FromRequest<
|
4307 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4209 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
4210 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4308 4211 | B,
|
4309 4212 | > for crate::input::MalformedUnionInput
|
4310 4213 | where
|
4311 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
4214 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
4312 4215 | B: 'static,
|
4313 4216 |
|
4314 4217 | B::Data: Send,
|
4315 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4316 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
4218 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4219 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
4317 4220 | {
|
4318 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4221 + | type Rejection =
|
4222 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4319 4223 | type Future = MalformedUnionInputFuture;
|
4320 4224 |
|
4321 4225 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
4322 4226 | let fut = async move {
|
4323 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
4227 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
4324 4228 | request.headers(),
|
4325 4229 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
4326 4230 | ) {
|
4327 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4231 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4328 4232 | }
|
4329 4233 | crate::protocol_serde::shape_malformed_union::de_malformed_union_http_request(request)
|
4330 4234 | .await
|
4331 4235 | };
|
4332 4236 | use ::futures_util::future::TryFutureExt;
|
4333 - | let fut = fut.map_err(
|
4334 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4335 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4336 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
4337 - | e,
|
4338 - | )
|
4339 - | },
|
4340 - | );
|
4237 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4238 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4239 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
4240 + | });
|
4341 4241 | MalformedUnionInputFuture {
|
4342 4242 | inner: Box::pin(fut),
|
4343 4243 | }
|
4344 4244 | }
|
4345 4245 | }
|
4346 4246 | impl
|
4347 - | ::aws_smithy_http_server::response::IntoResponse<
|
4348 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4247 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4248 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4349 4249 | > for crate::output::MalformedUnionOutput
|
4350 4250 | {
|
4351 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4251 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4352 4252 | match crate::protocol_serde::shape_malformed_union::ser_malformed_union_http_response(self)
|
4353 4253 | {
|
4354 4254 | Ok(response) => response,
|
4355 4255 | Err(e) => {
|
4356 4256 | ::tracing::error!(error = %e, "failed to serialize response");
|
4357 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4257 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4358 4258 | }
|
4359 4259 | }
|
4360 4260 | }
|
4361 4261 | }
|
4362 4262 | impl
|
4363 - | ::aws_smithy_http_server::response::IntoResponse<
|
4364 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4263 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4264 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4365 4265 | > for crate::error::MalformedUnionError
|
4366 4266 | {
|
4367 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4267 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4368 4268 | match crate::protocol_serde::shape_malformed_union::ser_malformed_union_http_error(&self) {
|
4369 4269 | Ok(mut response) => {
|
4370 4270 | response.extensions_mut().insert(
|
4371 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
4271 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
4272 + | self.name(),
|
4273 + | ),
|
4372 4274 | );
|
4373 4275 | response
|
4374 4276 | }
|
4375 4277 | Err(e) => {
|
4376 4278 | ::tracing::error!(error = %e, "failed to serialize response");
|
4377 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4279 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4378 4280 | }
|
4379 4281 | }
|
4380 4282 | }
|
4381 4283 | }
|
4382 4284 |
|
4383 4285 | ::pin_project_lite::pin_project! {
|
4384 4286 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
4385 4287 | /// [`MalformedIntegerInput`](crate::input::MalformedIntegerInput) using modelled bindings.
|
4386 4288 | pub struct MalformedIntegerInputFuture {
|
4387 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedIntegerInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4289 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedIntegerInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4388 4290 | }
|
4389 4291 | }
|
4390 4292 |
|
4391 4293 | impl std::future::Future for MalformedIntegerInputFuture {
|
4392 4294 | type Output = Result<
|
4393 4295 | crate::input::MalformedIntegerInput,
|
4394 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4296 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4395 4297 | >;
|
4396 4298 |
|
4397 4299 | fn poll(
|
4398 4300 | self: std::pin::Pin<&mut Self>,
|
4399 4301 | cx: &mut std::task::Context<'_>,
|
4400 4302 | ) -> std::task::Poll<Self::Output> {
|
4401 4303 | let this = self.project();
|
4402 4304 | this.inner.as_mut().poll(cx)
|
4403 4305 | }
|
4404 4306 | }
|
4405 4307 |
|
4406 4308 | impl<B>
|
4407 - | ::aws_smithy_http_server::request::FromRequest<
|
4408 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4309 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
4310 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4409 4311 | B,
|
4410 4312 | > for crate::input::MalformedIntegerInput
|
4411 4313 | where
|
4412 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
4314 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
4413 4315 | B: 'static,
|
4414 4316 |
|
4415 4317 | B::Data: Send,
|
4416 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4417 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
4318 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4319 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
4418 4320 | {
|
4419 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4321 + | type Rejection =
|
4322 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4420 4323 | type Future = MalformedIntegerInputFuture;
|
4421 4324 |
|
4422 4325 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
4423 4326 | let fut = async move {
|
4424 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
4327 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
4425 4328 | request.headers(),
|
4426 4329 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
4427 4330 | ) {
|
4428 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4331 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4429 4332 | }
|
4430 4333 | crate::protocol_serde::shape_malformed_integer::de_malformed_integer_http_request(
|
4431 4334 | request,
|
4432 4335 | )
|
4433 4336 | .await
|
4434 4337 | };
|
4435 4338 | use ::futures_util::future::TryFutureExt;
|
4436 - | let fut = fut.map_err(
|
4437 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4438 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4439 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
4440 - | e,
|
4441 - | )
|
4442 - | },
|
4443 - | );
|
4339 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4340 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4341 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
4342 + | });
|
4444 4343 | MalformedIntegerInputFuture {
|
4445 4344 | inner: Box::pin(fut),
|
4446 4345 | }
|
4447 4346 | }
|
4448 4347 | }
|
4449 4348 | impl
|
4450 - | ::aws_smithy_http_server::response::IntoResponse<
|
4451 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4349 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4350 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4452 4351 | > for crate::output::MalformedIntegerOutput
|
4453 4352 | {
|
4454 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4353 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4455 4354 | match crate::protocol_serde::shape_malformed_integer::ser_malformed_integer_http_response(
|
4456 4355 | self,
|
4457 4356 | ) {
|
4458 4357 | Ok(response) => response,
|
4459 4358 | Err(e) => {
|
4460 4359 | ::tracing::error!(error = %e, "failed to serialize response");
|
4461 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4360 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4462 4361 | }
|
4463 4362 | }
|
4464 4363 | }
|
4465 4364 | }
|
4466 4365 | impl
|
4467 - | ::aws_smithy_http_server::response::IntoResponse<
|
4468 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4366 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4367 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4469 4368 | > for crate::error::MalformedIntegerError
|
4470 4369 | {
|
4471 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4370 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4472 4371 | match crate::protocol_serde::shape_malformed_integer::ser_malformed_integer_http_error(
|
4473 4372 | &self,
|
4474 4373 | ) {
|
4475 4374 | Ok(mut response) => {
|
4476 4375 | response.extensions_mut().insert(
|
4477 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
4376 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
4377 + | self.name(),
|
4378 + | ),
|
4478 4379 | );
|
4479 4380 | response
|
4480 4381 | }
|
4481 4382 | Err(e) => {
|
4482 4383 | ::tracing::error!(error = %e, "failed to serialize response");
|
4483 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4384 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4484 4385 | }
|
4485 4386 | }
|
4486 4387 | }
|
4487 4388 | }
|
4488 4389 |
|
4489 4390 | ::pin_project_lite::pin_project! {
|
4490 4391 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
4491 4392 | /// [`MalformedRequestBodyInput`](crate::input::MalformedRequestBodyInput) using modelled bindings.
|
4492 4393 | pub struct MalformedRequestBodyInputFuture {
|
4493 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedRequestBodyInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4394 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MalformedRequestBodyInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4494 4395 | }
|
4495 4396 | }
|
4496 4397 |
|
4497 4398 | impl std::future::Future for MalformedRequestBodyInputFuture {
|
4498 4399 | type Output = Result<
|
4499 4400 | crate::input::MalformedRequestBodyInput,
|
4500 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4401 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4501 4402 | >;
|
4502 4403 |
|
4503 4404 | fn poll(
|
4504 4405 | self: std::pin::Pin<&mut Self>,
|
4505 4406 | cx: &mut std::task::Context<'_>,
|
4506 4407 | ) -> std::task::Poll<Self::Output> {
|
4507 4408 | let this = self.project();
|
4508 4409 | this.inner.as_mut().poll(cx)
|
4509 4410 | }
|
4510 4411 | }
|
4511 4412 |
|
4512 4413 | impl<B>
|
4513 - | ::aws_smithy_http_server::request::FromRequest<
|
4514 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4414 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
4415 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4515 4416 | B,
|
4516 4417 | > for crate::input::MalformedRequestBodyInput
|
4517 4418 | where
|
4518 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
4419 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
4519 4420 | B: 'static,
|
4520 4421 |
|
4521 4422 | B::Data: Send,
|
4522 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4523 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
4423 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4424 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
4524 4425 | {
|
4525 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4426 + | type Rejection =
|
4427 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4526 4428 | type Future = MalformedRequestBodyInputFuture;
|
4527 4429 |
|
4528 4430 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
4529 4431 | let fut = async move {
|
4530 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
4432 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
4531 4433 | request.headers(),
|
4532 4434 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
4533 4435 | ) {
|
4534 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4436 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4535 4437 | }
|
4536 4438 | crate::protocol_serde::shape_malformed_request_body::de_malformed_request_body_http_request(request)
|
4537 4439 | .await
|
4538 4440 | };
|
4539 4441 | use ::futures_util::future::TryFutureExt;
|
4540 - | let fut = fut.map_err(
|
4541 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4542 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4543 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
4544 - | e,
|
4545 - | )
|
4546 - | },
|
4547 - | );
|
4442 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4443 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4444 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
4445 + | });
|
4548 4446 | MalformedRequestBodyInputFuture {
|
4549 4447 | inner: Box::pin(fut),
|
4550 4448 | }
|
4551 4449 | }
|
4552 4450 | }
|
4553 4451 | impl
|
4554 - | ::aws_smithy_http_server::response::IntoResponse<
|
4555 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4452 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4453 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4556 4454 | > for crate::output::MalformedRequestBodyOutput
|
4557 4455 | {
|
4558 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4456 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4559 4457 | match crate::protocol_serde::shape_malformed_request_body::ser_malformed_request_body_http_response(self) {
|
4560 4458 | Ok(response) => response,
|
4561 4459 | Err(e) => {
|
4562 4460 | ::tracing::error!(error = %e, "failed to serialize response");
|
4563 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4461 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4564 4462 | }
|
4565 4463 | }
|
4566 4464 | }
|
4567 4465 | }
|
4568 4466 | impl
|
4569 - | ::aws_smithy_http_server::response::IntoResponse<
|
4570 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4467 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4468 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4571 4469 | > for crate::error::MalformedRequestBodyError
|
4572 4470 | {
|
4573 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4471 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4574 4472 | match crate::protocol_serde::shape_malformed_request_body::ser_malformed_request_body_http_error(&self) {
|
4575 4473 | Ok(mut response) => {
|
4576 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
4474 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
4577 4475 | response
|
4578 4476 | },
|
4579 4477 | Err(e) => {
|
4580 4478 | ::tracing::error!(error = %e, "failed to serialize response");
|
4581 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4479 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4582 4480 | }
|
4583 4481 | }
|
4584 4482 | }
|
4585 4483 | }
|
4586 4484 |
|
4587 4485 | ::pin_project_lite::pin_project! {
|
4588 4486 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
4589 4487 | /// [`HttpChecksumRequiredInput`](crate::input::HttpChecksumRequiredInput) using modelled bindings.
|
4590 4488 | pub struct HttpChecksumRequiredInputFuture {
|
4591 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpChecksumRequiredInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4489 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpChecksumRequiredInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4592 4490 | }
|
4593 4491 | }
|
4594 4492 |
|
4595 4493 | impl std::future::Future for HttpChecksumRequiredInputFuture {
|
4596 4494 | type Output = Result<
|
4597 4495 | crate::input::HttpChecksumRequiredInput,
|
4598 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4496 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4599 4497 | >;
|
4600 4498 |
|
4601 4499 | fn poll(
|
4602 4500 | self: std::pin::Pin<&mut Self>,
|
4603 4501 | cx: &mut std::task::Context<'_>,
|
4604 4502 | ) -> std::task::Poll<Self::Output> {
|
4605 4503 | let this = self.project();
|
4606 4504 | this.inner.as_mut().poll(cx)
|
4607 4505 | }
|
4608 4506 | }
|
4609 4507 |
|
4610 4508 | impl<B>
|
4611 - | ::aws_smithy_http_server::request::FromRequest<
|
4612 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4509 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
4510 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4613 4511 | B,
|
4614 4512 | > for crate::input::HttpChecksumRequiredInput
|
4615 4513 | where
|
4616 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
4514 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
4617 4515 | B: 'static,
|
4618 4516 |
|
4619 4517 | B::Data: Send,
|
4620 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4621 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
4518 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4519 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
4622 4520 | {
|
4623 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4521 + | type Rejection =
|
4522 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4624 4523 | type Future = HttpChecksumRequiredInputFuture;
|
4625 4524 |
|
4626 4525 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
4627 4526 | let fut = async move {
|
4628 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
4527 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
4629 4528 | request.headers(),
|
4630 4529 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
4631 4530 | ) {
|
4632 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4531 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4633 4532 | }
|
4634 4533 | crate::protocol_serde::shape_http_checksum_required::de_http_checksum_required_http_request(request)
|
4635 4534 | .await
|
4636 4535 | };
|
4637 4536 | use ::futures_util::future::TryFutureExt;
|
4638 - | let fut = fut.map_err(
|
4639 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4640 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4641 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
4642 - | e,
|
4643 - | )
|
4644 - | },
|
4645 - | );
|
4537 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4538 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4539 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
4540 + | });
|
4646 4541 | HttpChecksumRequiredInputFuture {
|
4647 4542 | inner: Box::pin(fut),
|
4648 4543 | }
|
4649 4544 | }
|
4650 4545 | }
|
4651 4546 | impl
|
4652 - | ::aws_smithy_http_server::response::IntoResponse<
|
4653 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4547 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4548 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4654 4549 | > for crate::output::HttpChecksumRequiredOutput
|
4655 4550 | {
|
4656 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4551 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4657 4552 | match crate::protocol_serde::shape_http_checksum_required::ser_http_checksum_required_http_response(self) {
|
4658 4553 | Ok(response) => response,
|
4659 4554 | Err(e) => {
|
4660 4555 | ::tracing::error!(error = %e, "failed to serialize response");
|
4661 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4556 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4662 4557 | }
|
4663 4558 | }
|
4664 4559 | }
|
4665 4560 | }
|
4666 4561 | impl
|
4667 - | ::aws_smithy_http_server::response::IntoResponse<
|
4668 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4562 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4563 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4669 4564 | > for crate::error::HttpChecksumRequiredError
|
4670 4565 | {
|
4671 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4566 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4672 4567 | match crate::protocol_serde::shape_http_checksum_required::ser_http_checksum_required_http_error(&self) {
|
4673 4568 | Ok(mut response) => {
|
4674 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
4569 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
4675 4570 | response
|
4676 4571 | },
|
4677 4572 | Err(e) => {
|
4678 4573 | ::tracing::error!(error = %e, "failed to serialize response");
|
4679 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4574 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4680 4575 | }
|
4681 4576 | }
|
4682 4577 | }
|
4683 4578 | }
|
4684 4579 |
|
4685 4580 | ::pin_project_lite::pin_project! {
|
4686 4581 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
4687 4582 | /// [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput) using modelled bindings.
|
4688 4583 | pub struct HostWithPathOperationInputFuture {
|
4689 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HostWithPathOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4584 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HostWithPathOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4690 4585 | }
|
4691 4586 | }
|
4692 4587 |
|
4693 4588 | impl std::future::Future for HostWithPathOperationInputFuture {
|
4694 4589 | type Output = Result<
|
4695 4590 | crate::input::HostWithPathOperationInput,
|
4696 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4591 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4697 4592 | >;
|
4698 4593 |
|
4699 4594 | fn poll(
|
4700 4595 | self: std::pin::Pin<&mut Self>,
|
4701 4596 | cx: &mut std::task::Context<'_>,
|
4702 4597 | ) -> std::task::Poll<Self::Output> {
|
4703 4598 | let this = self.project();
|
4704 4599 | this.inner.as_mut().poll(cx)
|
4705 4600 | }
|
4706 4601 | }
|
4707 4602 |
|
4708 4603 | impl<B>
|
4709 - | ::aws_smithy_http_server::request::FromRequest<
|
4710 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4604 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
4605 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4711 4606 | B,
|
4712 4607 | > for crate::input::HostWithPathOperationInput
|
4713 4608 | where
|
4714 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
4609 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
4715 4610 | B: 'static,
|
4716 4611 |
|
4717 4612 | B::Data: Send,
|
4718 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4719 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
4613 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4614 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
4720 4615 | {
|
4721 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4616 + | type Rejection =
|
4617 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4722 4618 | type Future = HostWithPathOperationInputFuture;
|
4723 4619 |
|
4724 4620 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
4725 4621 | let fut = async move {
|
4726 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
4622 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
4727 4623 | request.headers(),
|
4728 4624 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
4729 4625 | ) {
|
4730 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4626 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4731 4627 | }
|
4732 4628 | crate::protocol_serde::shape_host_with_path_operation::de_host_with_path_operation_http_request(request)
|
4733 4629 | .await
|
4734 4630 | };
|
4735 4631 | use ::futures_util::future::TryFutureExt;
|
4736 - | let fut = fut.map_err(
|
4737 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4738 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4739 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
4740 - | e,
|
4741 - | )
|
4742 - | },
|
4743 - | );
|
4632 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4633 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4634 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
4635 + | });
|
4744 4636 | HostWithPathOperationInputFuture {
|
4745 4637 | inner: Box::pin(fut),
|
4746 4638 | }
|
4747 4639 | }
|
4748 4640 | }
|
4749 4641 | impl
|
4750 - | ::aws_smithy_http_server::response::IntoResponse<
|
4751 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4642 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4643 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4752 4644 | > for crate::output::HostWithPathOperationOutput
|
4753 4645 | {
|
4754 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4646 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4755 4647 | match crate::protocol_serde::shape_host_with_path_operation::ser_host_with_path_operation_http_response(self) {
|
4756 4648 | Ok(response) => response,
|
4757 4649 | Err(e) => {
|
4758 4650 | ::tracing::error!(error = %e, "failed to serialize response");
|
4759 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4651 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4760 4652 | }
|
4761 4653 | }
|
4762 4654 | }
|
4763 4655 | }
|
4764 4656 | impl
|
4765 - | ::aws_smithy_http_server::response::IntoResponse<
|
4766 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4657 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4658 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4767 4659 | > for crate::error::HostWithPathOperationError
|
4768 4660 | {
|
4769 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4661 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4770 4662 | match crate::protocol_serde::shape_host_with_path_operation::ser_host_with_path_operation_http_error(&self) {
|
4771 4663 | Ok(mut response) => {
|
4772 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
4664 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
4773 4665 | response
|
4774 4666 | },
|
4775 4667 | Err(e) => {
|
4776 4668 | ::tracing::error!(error = %e, "failed to serialize response");
|
4777 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4669 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4778 4670 | }
|
4779 4671 | }
|
4780 4672 | }
|
4781 4673 | }
|
4782 4674 |
|
4783 4675 | ::pin_project_lite::pin_project! {
|
4784 4676 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
4785 4677 | /// [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput) using modelled bindings.
|
4786 4678 | pub struct EndpointWithHostLabelOperationInputFuture {
|
4787 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EndpointWithHostLabelOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4679 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EndpointWithHostLabelOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4788 4680 | }
|
4789 4681 | }
|
4790 4682 |
|
4791 4683 | impl std::future::Future for EndpointWithHostLabelOperationInputFuture {
|
4792 4684 | type Output = Result<
|
4793 4685 | crate::input::EndpointWithHostLabelOperationInput,
|
4794 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4686 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4795 4687 | >;
|
4796 4688 |
|
4797 4689 | fn poll(
|
4798 4690 | self: std::pin::Pin<&mut Self>,
|
4799 4691 | cx: &mut std::task::Context<'_>,
|
4800 4692 | ) -> std::task::Poll<Self::Output> {
|
4801 4693 | let this = self.project();
|
4802 4694 | this.inner.as_mut().poll(cx)
|
4803 4695 | }
|
4804 4696 | }
|
4805 4697 |
|
4806 4698 | impl<B>
|
4807 - | ::aws_smithy_http_server::request::FromRequest<
|
4808 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4699 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
4700 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4809 4701 | B,
|
4810 4702 | > for crate::input::EndpointWithHostLabelOperationInput
|
4811 4703 | where
|
4812 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
4704 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
4813 4705 | B: 'static,
|
4814 4706 |
|
4815 4707 | B::Data: Send,
|
4816 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4817 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
4708 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4709 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
4818 4710 | {
|
4819 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4711 + | type Rejection =
|
4712 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4820 4713 | type Future = EndpointWithHostLabelOperationInputFuture;
|
4821 4714 |
|
4822 4715 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
4823 4716 | let fut = async move {
|
4824 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
4717 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
4825 4718 | request.headers(),
|
4826 4719 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
4827 4720 | ) {
|
4828 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4721 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4829 4722 | }
|
4830 4723 | crate::protocol_serde::shape_endpoint_with_host_label_operation::de_endpoint_with_host_label_operation_http_request(request)
|
4831 4724 | .await
|
4832 4725 | };
|
4833 4726 | use ::futures_util::future::TryFutureExt;
|
4834 - | let fut = fut.map_err(
|
4835 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4836 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4837 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
4838 - | e,
|
4839 - | )
|
4840 - | },
|
4841 - | );
|
4727 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4728 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4729 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
4730 + | });
|
4842 4731 | EndpointWithHostLabelOperationInputFuture {
|
4843 4732 | inner: Box::pin(fut),
|
4844 4733 | }
|
4845 4734 | }
|
4846 4735 | }
|
4847 4736 | impl
|
4848 - | ::aws_smithy_http_server::response::IntoResponse<
|
4849 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4737 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4738 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4850 4739 | > for crate::output::EndpointWithHostLabelOperationOutput
|
4851 4740 | {
|
4852 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4741 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4853 4742 | match crate::protocol_serde::shape_endpoint_with_host_label_operation::ser_endpoint_with_host_label_operation_http_response(self) {
|
4854 4743 | Ok(response) => response,
|
4855 4744 | Err(e) => {
|
4856 4745 | ::tracing::error!(error = %e, "failed to serialize response");
|
4857 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4746 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4858 4747 | }
|
4859 4748 | }
|
4860 4749 | }
|
4861 4750 | }
|
4862 4751 | impl
|
4863 - | ::aws_smithy_http_server::response::IntoResponse<
|
4864 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4752 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4753 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4865 4754 | > for crate::error::EndpointWithHostLabelOperationError
|
4866 4755 | {
|
4867 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4756 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4868 4757 | match crate::protocol_serde::shape_endpoint_with_host_label_operation::ser_endpoint_with_host_label_operation_http_error(&self) {
|
4869 4758 | Ok(mut response) => {
|
4870 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
4759 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
4871 4760 | response
|
4872 4761 | },
|
4873 4762 | Err(e) => {
|
4874 4763 | ::tracing::error!(error = %e, "failed to serialize response");
|
4875 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4764 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4876 4765 | }
|
4877 4766 | }
|
4878 4767 | }
|
4879 4768 | }
|
4880 4769 |
|
4881 4770 | ::pin_project_lite::pin_project! {
|
4882 4771 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
4883 4772 | /// [`EndpointOperationInput`](crate::input::EndpointOperationInput) using modelled bindings.
|
4884 4773 | pub struct EndpointOperationInputFuture {
|
4885 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EndpointOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4774 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EndpointOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4886 4775 | }
|
4887 4776 | }
|
4888 4777 |
|
4889 4778 | impl std::future::Future for EndpointOperationInputFuture {
|
4890 4779 | type Output = Result<
|
4891 4780 | crate::input::EndpointOperationInput,
|
4892 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4781 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4893 4782 | >;
|
4894 4783 |
|
4895 4784 | fn poll(
|
4896 4785 | self: std::pin::Pin<&mut Self>,
|
4897 4786 | cx: &mut std::task::Context<'_>,
|
4898 4787 | ) -> std::task::Poll<Self::Output> {
|
4899 4788 | let this = self.project();
|
4900 4789 | this.inner.as_mut().poll(cx)
|
4901 4790 | }
|
4902 4791 | }
|
4903 4792 |
|
4904 4793 | impl<B>
|
4905 - | ::aws_smithy_http_server::request::FromRequest<
|
4906 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4794 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
4795 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4907 4796 | B,
|
4908 4797 | > for crate::input::EndpointOperationInput
|
4909 4798 | where
|
4910 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
4799 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
4911 4800 | B: 'static,
|
4912 4801 |
|
4913 4802 | B::Data: Send,
|
4914 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4915 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
4803 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4804 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
4916 4805 | {
|
4917 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4806 + | type Rejection =
|
4807 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4918 4808 | type Future = EndpointOperationInputFuture;
|
4919 4809 |
|
4920 4810 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
4921 4811 | let fut = async move {
|
4922 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
4812 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
4923 4813 | request.headers(),
|
4924 4814 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
4925 4815 | ) {
|
4926 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4816 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4927 4817 | }
|
4928 4818 | crate::protocol_serde::shape_endpoint_operation::de_endpoint_operation_http_request(
|
4929 4819 | request,
|
4930 4820 | )
|
4931 4821 | .await
|
4932 4822 | };
|
4933 4823 | use ::futures_util::future::TryFutureExt;
|
4934 - | let fut = fut.map_err(
|
4935 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4936 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4937 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
4938 - | e,
|
4939 - | )
|
4940 - | },
|
4941 - | );
|
4824 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4825 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4826 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
4827 + | });
|
4942 4828 | EndpointOperationInputFuture {
|
4943 4829 | inner: Box::pin(fut),
|
4944 4830 | }
|
4945 4831 | }
|
4946 4832 | }
|
4947 4833 | impl
|
4948 - | ::aws_smithy_http_server::response::IntoResponse<
|
4949 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4834 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4835 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4950 4836 | > for crate::output::EndpointOperationOutput
|
4951 4837 | {
|
4952 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4838 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4953 4839 | match crate::protocol_serde::shape_endpoint_operation::ser_endpoint_operation_http_response(
|
4954 4840 | self,
|
4955 4841 | ) {
|
4956 4842 | Ok(response) => response,
|
4957 4843 | Err(e) => {
|
4958 4844 | ::tracing::error!(error = %e, "failed to serialize response");
|
4959 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4845 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4960 4846 | }
|
4961 4847 | }
|
4962 4848 | }
|
4963 4849 | }
|
4964 4850 | impl
|
4965 - | ::aws_smithy_http_server::response::IntoResponse<
|
4966 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4851 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4852 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
4967 4853 | > for crate::error::EndpointOperationError
|
4968 4854 | {
|
4969 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4855 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
4970 4856 | match crate::protocol_serde::shape_endpoint_operation::ser_endpoint_operation_http_error(
|
4971 4857 | &self,
|
4972 4858 | ) {
|
4973 4859 | Ok(mut response) => {
|
4974 4860 | response.extensions_mut().insert(
|
4975 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
4861 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
4862 + | self.name(),
|
4863 + | ),
|
4976 4864 | );
|
4977 4865 | response
|
4978 4866 | }
|
4979 4867 | Err(e) => {
|
4980 4868 | ::tracing::error!(error = %e, "failed to serialize response");
|
4981 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4869 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4982 4870 | }
|
4983 4871 | }
|
4984 4872 | }
|
4985 4873 | }
|
4986 4874 |
|
4987 4875 | ::pin_project_lite::pin_project! {
|
4988 4876 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
4989 4877 | /// [`PostUnionWithJsonNameInput`](crate::input::PostUnionWithJsonNameInput) using modelled bindings.
|
4990 4878 | pub struct PostUnionWithJsonNameInputFuture {
|
4991 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PostUnionWithJsonNameInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4879 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PostUnionWithJsonNameInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4992 4880 | }
|
4993 4881 | }
|
4994 4882 |
|
4995 4883 | impl std::future::Future for PostUnionWithJsonNameInputFuture {
|
4996 4884 | type Output = Result<
|
4997 4885 | crate::input::PostUnionWithJsonNameInput,
|
4998 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4886 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4999 4887 | >;
|
5000 4888 |
|
5001 4889 | fn poll(
|
5002 4890 | self: std::pin::Pin<&mut Self>,
|
5003 4891 | cx: &mut std::task::Context<'_>,
|
5004 4892 | ) -> std::task::Poll<Self::Output> {
|
5005 4893 | let this = self.project();
|
5006 4894 | this.inner.as_mut().poll(cx)
|
5007 4895 | }
|
5008 4896 | }
|
5009 4897 |
|
5010 4898 | impl<B>
|
5011 - | ::aws_smithy_http_server::request::FromRequest<
|
5012 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4899 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
4900 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5013 4901 | B,
|
5014 4902 | > for crate::input::PostUnionWithJsonNameInput
|
5015 4903 | where
|
5016 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
4904 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
5017 4905 | B: 'static,
|
5018 4906 |
|
5019 4907 | B::Data: Send,
|
5020 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5021 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
4908 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
4909 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
5022 4910 | {
|
5023 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
4911 + | type Rejection =
|
4912 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5024 4913 | type Future = PostUnionWithJsonNameInputFuture;
|
5025 4914 |
|
5026 4915 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
5027 4916 | let fut = async move {
|
5028 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
4917 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
5029 4918 | request.headers(),
|
5030 4919 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
5031 4920 | ) {
|
5032 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
4921 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5033 4922 | }
|
5034 4923 | crate::protocol_serde::shape_post_union_with_json_name::de_post_union_with_json_name_http_request(request)
|
5035 4924 | .await
|
5036 4925 | };
|
5037 4926 | use ::futures_util::future::TryFutureExt;
|
5038 - | let fut = fut.map_err(
|
5039 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5040 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5041 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
5042 - | e,
|
5043 - | )
|
5044 - | },
|
5045 - | );
|
4927 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
4928 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
4929 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
4930 + | });
|
5046 4931 | PostUnionWithJsonNameInputFuture {
|
5047 4932 | inner: Box::pin(fut),
|
5048 4933 | }
|
5049 4934 | }
|
5050 4935 | }
|
5051 4936 | impl
|
5052 - | ::aws_smithy_http_server::response::IntoResponse<
|
5053 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4937 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4938 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5054 4939 | > for crate::output::PostUnionWithJsonNameOutput
|
5055 4940 | {
|
5056 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4941 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5057 4942 | match crate::protocol_serde::shape_post_union_with_json_name::ser_post_union_with_json_name_http_response(self) {
|
5058 4943 | Ok(response) => response,
|
5059 4944 | Err(e) => {
|
5060 4945 | ::tracing::error!(error = %e, "failed to serialize response");
|
5061 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4946 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5062 4947 | }
|
5063 4948 | }
|
5064 4949 | }
|
5065 4950 | }
|
5066 4951 | impl
|
5067 - | ::aws_smithy_http_server::response::IntoResponse<
|
5068 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4952 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
4953 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5069 4954 | > for crate::error::PostUnionWithJsonNameError
|
5070 4955 | {
|
5071 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
4956 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5072 4957 | match crate::protocol_serde::shape_post_union_with_json_name::ser_post_union_with_json_name_http_error(&self) {
|
5073 4958 | Ok(mut response) => {
|
5074 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
4959 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
5075 4960 | response
|
5076 4961 | },
|
5077 4962 | Err(e) => {
|
5078 4963 | ::tracing::error!(error = %e, "failed to serialize response");
|
5079 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
4964 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5080 4965 | }
|
5081 4966 | }
|
5082 4967 | }
|
5083 4968 | }
|
5084 4969 |
|
5085 4970 | ::pin_project_lite::pin_project! {
|
5086 4971 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
5087 4972 | /// [`PostPlayerActionInput`](crate::input::PostPlayerActionInput) using modelled bindings.
|
5088 4973 | pub struct PostPlayerActionInputFuture {
|
5089 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PostPlayerActionInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4974 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PostPlayerActionInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5090 4975 | }
|
5091 4976 | }
|
5092 4977 |
|
5093 4978 | impl std::future::Future for PostPlayerActionInputFuture {
|
5094 4979 | type Output = Result<
|
5095 4980 | crate::input::PostPlayerActionInput,
|
5096 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
4981 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5097 4982 | >;
|
5098 4983 |
|
5099 4984 | fn poll(
|
5100 4985 | self: std::pin::Pin<&mut Self>,
|
5101 4986 | cx: &mut std::task::Context<'_>,
|
5102 4987 | ) -> std::task::Poll<Self::Output> {
|
5103 4988 | let this = self.project();
|
5104 4989 | this.inner.as_mut().poll(cx)
|
5105 4990 | }
|
5106 4991 | }
|
5107 4992 |
|
5108 4993 | impl<B>
|
5109 - | ::aws_smithy_http_server::request::FromRequest<
|
5110 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
4994 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
4995 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5111 4996 | B,
|
5112 4997 | > for crate::input::PostPlayerActionInput
|
5113 4998 | where
|
5114 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
4999 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
5115 5000 | B: 'static,
|
5116 5001 |
|
5117 5002 | B::Data: Send,
|
5118 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5119 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
5003 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5004 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
5120 5005 | {
|
5121 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5006 + | type Rejection =
|
5007 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5122 5008 | type Future = PostPlayerActionInputFuture;
|
5123 5009 |
|
5124 5010 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
5125 5011 | let fut = async move {
|
5126 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
5012 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
5127 5013 | request.headers(),
|
5128 5014 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
5129 5015 | ) {
|
5130 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5016 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5131 5017 | }
|
5132 5018 | crate::protocol_serde::shape_post_player_action::de_post_player_action_http_request(
|
5133 5019 | request,
|
5134 5020 | )
|
5135 5021 | .await
|
5136 5022 | };
|
5137 5023 | use ::futures_util::future::TryFutureExt;
|
5138 - | let fut = fut.map_err(
|
5139 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5140 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5141 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
5142 - | e,
|
5143 - | )
|
5144 - | },
|
5145 - | );
|
5024 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5025 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5026 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
5027 + | });
|
5146 5028 | PostPlayerActionInputFuture {
|
5147 5029 | inner: Box::pin(fut),
|
5148 5030 | }
|
5149 5031 | }
|
5150 5032 | }
|
5151 5033 | impl
|
5152 - | ::aws_smithy_http_server::response::IntoResponse<
|
5153 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5034 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5035 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5154 5036 | > for crate::output::PostPlayerActionOutput
|
5155 5037 | {
|
5156 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5038 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5157 5039 | match crate::protocol_serde::shape_post_player_action::ser_post_player_action_http_response(
|
5158 5040 | self,
|
5159 5041 | ) {
|
5160 5042 | Ok(response) => response,
|
5161 5043 | Err(e) => {
|
5162 5044 | ::tracing::error!(error = %e, "failed to serialize response");
|
5163 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5045 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5164 5046 | }
|
5165 5047 | }
|
5166 5048 | }
|
5167 5049 | }
|
5168 5050 | impl
|
5169 - | ::aws_smithy_http_server::response::IntoResponse<
|
5170 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5051 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5052 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5171 5053 | > for crate::error::PostPlayerActionError
|
5172 5054 | {
|
5173 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5055 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5174 5056 | match crate::protocol_serde::shape_post_player_action::ser_post_player_action_http_error(
|
5175 5057 | &self,
|
5176 5058 | ) {
|
5177 5059 | Ok(mut response) => {
|
5178 5060 | response.extensions_mut().insert(
|
5179 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
5061 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
5062 + | self.name(),
|
5063 + | ),
|
5180 5064 | );
|
5181 5065 | response
|
5182 5066 | }
|
5183 5067 | Err(e) => {
|
5184 5068 | ::tracing::error!(error = %e, "failed to serialize response");
|
5185 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5069 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5186 5070 | }
|
5187 5071 | }
|
5188 5072 | }
|
5189 5073 | }
|
5190 5074 |
|
5191 5075 | ::pin_project_lite::pin_project! {
|
5192 5076 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
5193 5077 | /// [`JsonUnionsInput`](crate::input::JsonUnionsInput) using modelled bindings.
|
5194 5078 | pub struct JsonUnionsInputFuture {
|
5195 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::JsonUnionsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5079 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::JsonUnionsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5196 5080 | }
|
5197 5081 | }
|
5198 5082 |
|
5199 5083 | impl std::future::Future for JsonUnionsInputFuture {
|
5200 5084 | type Output = Result<
|
5201 5085 | crate::input::JsonUnionsInput,
|
5202 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5086 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5203 5087 | >;
|
5204 5088 |
|
5205 5089 | fn poll(
|
5206 5090 | self: std::pin::Pin<&mut Self>,
|
5207 5091 | cx: &mut std::task::Context<'_>,
|
5208 5092 | ) -> std::task::Poll<Self::Output> {
|
5209 5093 | let this = self.project();
|
5210 5094 | this.inner.as_mut().poll(cx)
|
5211 5095 | }
|
5212 5096 | }
|
5213 5097 |
|
5214 5098 | impl<B>
|
5215 - | ::aws_smithy_http_server::request::FromRequest<
|
5216 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5099 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
5100 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5217 5101 | B,
|
5218 5102 | > for crate::input::JsonUnionsInput
|
5219 5103 | where
|
5220 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
5104 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
5221 5105 | B: 'static,
|
5222 5106 |
|
5223 5107 | B::Data: Send,
|
5224 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5225 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
5108 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5109 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
5226 5110 | {
|
5227 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5111 + | type Rejection =
|
5112 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5228 5113 | type Future = JsonUnionsInputFuture;
|
5229 5114 |
|
5230 5115 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
5231 5116 | let fut = async move {
|
5232 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
5117 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
5233 5118 | request.headers(),
|
5234 5119 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
5235 5120 | ) {
|
5236 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5121 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5237 5122 | }
|
5238 5123 | crate::protocol_serde::shape_json_unions::de_json_unions_http_request(request).await
|
5239 5124 | };
|
5240 5125 | use ::futures_util::future::TryFutureExt;
|
5241 - | let fut = fut.map_err(
|
5242 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5243 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5244 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
5245 - | e,
|
5246 - | )
|
5247 - | },
|
5248 - | );
|
5126 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5127 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5128 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
5129 + | });
|
5249 5130 | JsonUnionsInputFuture {
|
5250 5131 | inner: Box::pin(fut),
|
5251 5132 | }
|
5252 5133 | }
|
5253 5134 | }
|
5254 5135 | impl
|
5255 - | ::aws_smithy_http_server::response::IntoResponse<
|
5256 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5136 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5137 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5257 5138 | > for crate::output::JsonUnionsOutput
|
5258 5139 | {
|
5259 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5140 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5260 5141 | match crate::protocol_serde::shape_json_unions::ser_json_unions_http_response(self) {
|
5261 5142 | Ok(response) => response,
|
5262 5143 | Err(e) => {
|
5263 5144 | ::tracing::error!(error = %e, "failed to serialize response");
|
5264 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5145 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5265 5146 | }
|
5266 5147 | }
|
5267 5148 | }
|
5268 5149 | }
|
5269 5150 | impl
|
5270 - | ::aws_smithy_http_server::response::IntoResponse<
|
5271 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5151 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5152 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5272 5153 | > for crate::error::JsonUnionsError
|
5273 5154 | {
|
5274 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5155 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5275 5156 | match crate::protocol_serde::shape_json_unions::ser_json_unions_http_error(&self) {
|
5276 5157 | Ok(mut response) => {
|
5277 5158 | response.extensions_mut().insert(
|
5278 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
5159 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
5160 + | self.name(),
|
5161 + | ),
|
5279 5162 | );
|
5280 5163 | response
|
5281 5164 | }
|
5282 5165 | Err(e) => {
|
5283 5166 | ::tracing::error!(error = %e, "failed to serialize response");
|
5284 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5167 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5285 5168 | }
|
5286 5169 | }
|
5287 5170 | }
|
5288 5171 | }
|
5289 5172 |
|
5290 5173 | ::pin_project_lite::pin_project! {
|
5291 5174 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
5292 5175 | /// [`DocumentTypeAsMapValueInput`](crate::input::DocumentTypeAsMapValueInput) using modelled bindings.
|
5293 5176 | pub struct DocumentTypeAsMapValueInputFuture {
|
5294 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DocumentTypeAsMapValueInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5177 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DocumentTypeAsMapValueInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5295 5178 | }
|
5296 5179 | }
|
5297 5180 |
|
5298 5181 | impl std::future::Future for DocumentTypeAsMapValueInputFuture {
|
5299 5182 | type Output = Result<
|
5300 5183 | crate::input::DocumentTypeAsMapValueInput,
|
5301 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5184 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5302 5185 | >;
|
5303 5186 |
|
5304 5187 | fn poll(
|
5305 5188 | self: std::pin::Pin<&mut Self>,
|
5306 5189 | cx: &mut std::task::Context<'_>,
|
5307 5190 | ) -> std::task::Poll<Self::Output> {
|
5308 5191 | let this = self.project();
|
5309 5192 | this.inner.as_mut().poll(cx)
|
5310 5193 | }
|
5311 5194 | }
|
5312 5195 |
|
5313 5196 | impl<B>
|
5314 - | ::aws_smithy_http_server::request::FromRequest<
|
5315 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5197 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
5198 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5316 5199 | B,
|
5317 5200 | > for crate::input::DocumentTypeAsMapValueInput
|
5318 5201 | where
|
5319 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
5202 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
5320 5203 | B: 'static,
|
5321 5204 |
|
5322 5205 | B::Data: Send,
|
5323 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5324 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
5206 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5207 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
5325 5208 | {
|
5326 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5209 + | type Rejection =
|
5210 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5327 5211 | type Future = DocumentTypeAsMapValueInputFuture;
|
5328 5212 |
|
5329 5213 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
5330 5214 | let fut = async move {
|
5331 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
5215 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
5332 5216 | request.headers(),
|
5333 5217 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
5334 5218 | ) {
|
5335 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5219 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5336 5220 | }
|
5337 5221 | crate::protocol_serde::shape_document_type_as_map_value::de_document_type_as_map_value_http_request(request)
|
5338 5222 | .await
|
5339 5223 | };
|
5340 5224 | use ::futures_util::future::TryFutureExt;
|
5341 - | let fut = fut.map_err(
|
5342 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5343 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5344 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
5345 - | e,
|
5346 - | )
|
5347 - | },
|
5348 - | );
|
5225 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5226 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5227 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
5228 + | });
|
5349 5229 | DocumentTypeAsMapValueInputFuture {
|
5350 5230 | inner: Box::pin(fut),
|
5351 5231 | }
|
5352 5232 | }
|
5353 5233 | }
|
5354 5234 | impl
|
5355 - | ::aws_smithy_http_server::response::IntoResponse<
|
5356 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5235 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5236 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5357 5237 | > for crate::output::DocumentTypeAsMapValueOutput
|
5358 5238 | {
|
5359 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5239 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5360 5240 | match crate::protocol_serde::shape_document_type_as_map_value::ser_document_type_as_map_value_http_response(self) {
|
5361 5241 | Ok(response) => response,
|
5362 5242 | Err(e) => {
|
5363 5243 | ::tracing::error!(error = %e, "failed to serialize response");
|
5364 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5244 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5365 5245 | }
|
5366 5246 | }
|
5367 5247 | }
|
5368 5248 | }
|
5369 5249 | impl
|
5370 - | ::aws_smithy_http_server::response::IntoResponse<
|
5371 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5250 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5251 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5372 5252 | > for crate::error::DocumentTypeAsMapValueError
|
5373 5253 | {
|
5374 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5254 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5375 5255 | match crate::protocol_serde::shape_document_type_as_map_value::ser_document_type_as_map_value_http_error(&self) {
|
5376 5256 | Ok(mut response) => {
|
5377 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
5257 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
5378 5258 | response
|
5379 5259 | },
|
5380 5260 | Err(e) => {
|
5381 5261 | ::tracing::error!(error = %e, "failed to serialize response");
|
5382 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5262 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5383 5263 | }
|
5384 5264 | }
|
5385 5265 | }
|
5386 5266 | }
|
5387 5267 |
|
5388 5268 | ::pin_project_lite::pin_project! {
|
5389 5269 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
5390 5270 | /// [`DocumentTypeAsPayloadInput`](crate::input::DocumentTypeAsPayloadInput) using modelled bindings.
|
5391 5271 | pub struct DocumentTypeAsPayloadInputFuture {
|
5392 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DocumentTypeAsPayloadInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5272 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DocumentTypeAsPayloadInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5393 5273 | }
|
5394 5274 | }
|
5395 5275 |
|
5396 5276 | impl std::future::Future for DocumentTypeAsPayloadInputFuture {
|
5397 5277 | type Output = Result<
|
5398 5278 | crate::input::DocumentTypeAsPayloadInput,
|
5399 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5279 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5400 5280 | >;
|
5401 5281 |
|
5402 5282 | fn poll(
|
5403 5283 | self: std::pin::Pin<&mut Self>,
|
5404 5284 | cx: &mut std::task::Context<'_>,
|
5405 5285 | ) -> std::task::Poll<Self::Output> {
|
5406 5286 | let this = self.project();
|
5407 5287 | this.inner.as_mut().poll(cx)
|
5408 5288 | }
|
5409 5289 | }
|
5410 5290 |
|
5411 5291 | impl<B>
|
5412 - | ::aws_smithy_http_server::request::FromRequest<
|
5413 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5292 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
5293 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5414 5294 | B,
|
5415 5295 | > for crate::input::DocumentTypeAsPayloadInput
|
5416 5296 | where
|
5417 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
5297 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
5418 5298 | B: 'static,
|
5419 5299 |
|
5420 5300 | B::Data: Send,
|
5421 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5422 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
5301 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5302 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
5423 5303 | {
|
5424 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5304 + | type Rejection =
|
5305 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5425 5306 | type Future = DocumentTypeAsPayloadInputFuture;
|
5426 5307 |
|
5427 5308 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
5428 5309 | let fut = async move {
|
5429 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
5310 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
5430 5311 | request.headers(),
|
5431 5312 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
5432 5313 | ) {
|
5433 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5314 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5434 5315 | }
|
5435 5316 | crate::protocol_serde::shape_document_type_as_payload::de_document_type_as_payload_http_request(request)
|
5436 5317 | .await
|
5437 5318 | };
|
5438 5319 | use ::futures_util::future::TryFutureExt;
|
5439 - | let fut = fut.map_err(
|
5440 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5441 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5442 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
5443 - | e,
|
5444 - | )
|
5445 - | },
|
5446 - | );
|
5320 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5321 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5322 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
5323 + | });
|
5447 5324 | DocumentTypeAsPayloadInputFuture {
|
5448 5325 | inner: Box::pin(fut),
|
5449 5326 | }
|
5450 5327 | }
|
5451 5328 | }
|
5452 5329 | impl
|
5453 - | ::aws_smithy_http_server::response::IntoResponse<
|
5454 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5330 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5331 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5455 5332 | > for crate::output::DocumentTypeAsPayloadOutput
|
5456 5333 | {
|
5457 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5334 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5458 5335 | match crate::protocol_serde::shape_document_type_as_payload::ser_document_type_as_payload_http_response(self) {
|
5459 5336 | Ok(response) => response,
|
5460 5337 | Err(e) => {
|
5461 5338 | ::tracing::error!(error = %e, "failed to serialize response");
|
5462 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5339 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5463 5340 | }
|
5464 5341 | }
|
5465 5342 | }
|
5466 5343 | }
|
5467 5344 | impl
|
5468 - | ::aws_smithy_http_server::response::IntoResponse<
|
5469 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5345 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5346 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5470 5347 | > for crate::error::DocumentTypeAsPayloadError
|
5471 5348 | {
|
5472 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5349 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5473 5350 | match crate::protocol_serde::shape_document_type_as_payload::ser_document_type_as_payload_http_error(&self) {
|
5474 5351 | Ok(mut response) => {
|
5475 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
5352 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
5476 5353 | response
|
5477 5354 | },
|
5478 5355 | Err(e) => {
|
5479 5356 | ::tracing::error!(error = %e, "failed to serialize response");
|
5480 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5357 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5481 5358 | }
|
5482 5359 | }
|
5483 5360 | }
|
5484 5361 | }
|
5485 5362 |
|
5486 5363 | ::pin_project_lite::pin_project! {
|
5487 5364 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
5488 5365 | /// [`DocumentTypeInput`](crate::input::DocumentTypeInput) using modelled bindings.
|
5489 5366 | pub struct DocumentTypeInputFuture {
|
5490 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DocumentTypeInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5367 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DocumentTypeInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5491 5368 | }
|
5492 5369 | }
|
5493 5370 |
|
5494 5371 | impl std::future::Future for DocumentTypeInputFuture {
|
5495 5372 | type Output = Result<
|
5496 5373 | crate::input::DocumentTypeInput,
|
5497 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5374 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5498 5375 | >;
|
5499 5376 |
|
5500 5377 | fn poll(
|
5501 5378 | self: std::pin::Pin<&mut Self>,
|
5502 5379 | cx: &mut std::task::Context<'_>,
|
5503 5380 | ) -> std::task::Poll<Self::Output> {
|
5504 5381 | let this = self.project();
|
5505 5382 | this.inner.as_mut().poll(cx)
|
5506 5383 | }
|
5507 5384 | }
|
5508 5385 |
|
5509 5386 | impl<B>
|
5510 - | ::aws_smithy_http_server::request::FromRequest<
|
5511 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5387 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
5388 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5512 5389 | B,
|
5513 5390 | > for crate::input::DocumentTypeInput
|
5514 5391 | where
|
5515 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
5392 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
5516 5393 | B: 'static,
|
5517 5394 |
|
5518 5395 | B::Data: Send,
|
5519 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5520 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
5396 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5397 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
5521 5398 | {
|
5522 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5399 + | type Rejection =
|
5400 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5523 5401 | type Future = DocumentTypeInputFuture;
|
5524 5402 |
|
5525 5403 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
5526 5404 | let fut = async move {
|
5527 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
5405 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
5528 5406 | request.headers(),
|
5529 5407 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
5530 5408 | ) {
|
5531 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5409 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5532 5410 | }
|
5533 5411 | crate::protocol_serde::shape_document_type::de_document_type_http_request(request).await
|
5534 5412 | };
|
5535 5413 | use ::futures_util::future::TryFutureExt;
|
5536 - | let fut = fut.map_err(
|
5537 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5538 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5539 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
5540 - | e,
|
5541 - | )
|
5542 - | },
|
5543 - | );
|
5414 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5415 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5416 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
5417 + | });
|
5544 5418 | DocumentTypeInputFuture {
|
5545 5419 | inner: Box::pin(fut),
|
5546 5420 | }
|
5547 5421 | }
|
5548 5422 | }
|
5549 5423 | impl
|
5550 - | ::aws_smithy_http_server::response::IntoResponse<
|
5551 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5424 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5425 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5552 5426 | > for crate::output::DocumentTypeOutput
|
5553 5427 | {
|
5554 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5428 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5555 5429 | match crate::protocol_serde::shape_document_type::ser_document_type_http_response(self) {
|
5556 5430 | Ok(response) => response,
|
5557 5431 | Err(e) => {
|
5558 5432 | ::tracing::error!(error = %e, "failed to serialize response");
|
5559 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5433 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5560 5434 | }
|
5561 5435 | }
|
5562 5436 | }
|
5563 5437 | }
|
5564 5438 | impl
|
5565 - | ::aws_smithy_http_server::response::IntoResponse<
|
5566 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5439 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5440 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5567 5441 | > for crate::error::DocumentTypeError
|
5568 5442 | {
|
5569 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5443 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5570 5444 | match crate::protocol_serde::shape_document_type::ser_document_type_http_error(&self) {
|
5571 5445 | Ok(mut response) => {
|
5572 5446 | response.extensions_mut().insert(
|
5573 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
5447 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
5448 + | self.name(),
|
5449 + | ),
|
5574 5450 | );
|
5575 5451 | response
|
5576 5452 | }
|
5577 5453 | Err(e) => {
|
5578 5454 | ::tracing::error!(error = %e, "failed to serialize response");
|
5579 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5455 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5580 5456 | }
|
5581 5457 | }
|
5582 5458 | }
|
5583 5459 | }
|
5584 5460 |
|
5585 5461 | ::pin_project_lite::pin_project! {
|
5586 5462 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
5587 5463 | /// [`JsonBlobsInput`](crate::input::JsonBlobsInput) using modelled bindings.
|
5588 5464 | pub struct JsonBlobsInputFuture {
|
5589 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::JsonBlobsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5465 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::JsonBlobsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5590 5466 | }
|
5591 5467 | }
|
5592 5468 |
|
5593 5469 | impl std::future::Future for JsonBlobsInputFuture {
|
5594 5470 | type Output = Result<
|
5595 5471 | crate::input::JsonBlobsInput,
|
5596 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5472 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5597 5473 | >;
|
5598 5474 |
|
5599 5475 | fn poll(
|
5600 5476 | self: std::pin::Pin<&mut Self>,
|
5601 5477 | cx: &mut std::task::Context<'_>,
|
5602 5478 | ) -> std::task::Poll<Self::Output> {
|
5603 5479 | let this = self.project();
|
5604 5480 | this.inner.as_mut().poll(cx)
|
5605 5481 | }
|
5606 5482 | }
|
5607 5483 |
|
5608 5484 | impl<B>
|
5609 - | ::aws_smithy_http_server::request::FromRequest<
|
5610 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5485 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
5486 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5611 5487 | B,
|
5612 5488 | > for crate::input::JsonBlobsInput
|
5613 5489 | where
|
5614 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
5490 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
5615 5491 | B: 'static,
|
5616 5492 |
|
5617 5493 | B::Data: Send,
|
5618 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5619 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
5494 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5495 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
5620 5496 | {
|
5621 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5497 + | type Rejection =
|
5498 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5622 5499 | type Future = JsonBlobsInputFuture;
|
5623 5500 |
|
5624 5501 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
5625 5502 | let fut = async move {
|
5626 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
5503 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
5627 5504 | request.headers(),
|
5628 5505 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
5629 5506 | ) {
|
5630 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5507 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5631 5508 | }
|
5632 5509 | crate::protocol_serde::shape_json_blobs::de_json_blobs_http_request(request).await
|
5633 5510 | };
|
5634 5511 | use ::futures_util::future::TryFutureExt;
|
5635 - | let fut = fut.map_err(
|
5636 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5637 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5638 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
5639 - | e,
|
5640 - | )
|
5641 - | },
|
5642 - | );
|
5512 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5513 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5514 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
5515 + | });
|
5643 5516 | JsonBlobsInputFuture {
|
5644 5517 | inner: Box::pin(fut),
|
5645 5518 | }
|
5646 5519 | }
|
5647 5520 | }
|
5648 5521 | impl
|
5649 - | ::aws_smithy_http_server::response::IntoResponse<
|
5650 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5522 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5523 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5651 5524 | > for crate::output::JsonBlobsOutput
|
5652 5525 | {
|
5653 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5526 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5654 5527 | match crate::protocol_serde::shape_json_blobs::ser_json_blobs_http_response(self) {
|
5655 5528 | Ok(response) => response,
|
5656 5529 | Err(e) => {
|
5657 5530 | ::tracing::error!(error = %e, "failed to serialize response");
|
5658 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5531 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5659 5532 | }
|
5660 5533 | }
|
5661 5534 | }
|
5662 5535 | }
|
5663 5536 | impl
|
5664 - | ::aws_smithy_http_server::response::IntoResponse<
|
5665 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5537 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5538 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5666 5539 | > for crate::error::JsonBlobsError
|
5667 5540 | {
|
5668 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5541 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5669 5542 | match crate::protocol_serde::shape_json_blobs::ser_json_blobs_http_error(&self) {
|
5670 5543 | Ok(mut response) => {
|
5671 5544 | response.extensions_mut().insert(
|
5672 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
5545 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
5546 + | self.name(),
|
5547 + | ),
|
5673 5548 | );
|
5674 5549 | response
|
5675 5550 | }
|
5676 5551 | Err(e) => {
|
5677 5552 | ::tracing::error!(error = %e, "failed to serialize response");
|
5678 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5553 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5679 5554 | }
|
5680 5555 | }
|
5681 5556 | }
|
5682 5557 | }
|
5683 5558 |
|
5684 5559 | ::pin_project_lite::pin_project! {
|
5685 5560 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
5686 5561 | /// [`SparseJsonMapsInput`](crate::input::SparseJsonMapsInput) using modelled bindings.
|
5687 5562 | pub struct SparseJsonMapsInputFuture {
|
5688 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::SparseJsonMapsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5563 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::SparseJsonMapsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5689 5564 | }
|
5690 5565 | }
|
5691 5566 |
|
5692 5567 | impl std::future::Future for SparseJsonMapsInputFuture {
|
5693 5568 | type Output = Result<
|
5694 5569 | crate::input::SparseJsonMapsInput,
|
5695 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5570 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5696 5571 | >;
|
5697 5572 |
|
5698 5573 | fn poll(
|
5699 5574 | self: std::pin::Pin<&mut Self>,
|
5700 5575 | cx: &mut std::task::Context<'_>,
|
5701 5576 | ) -> std::task::Poll<Self::Output> {
|
5702 5577 | let this = self.project();
|
5703 5578 | this.inner.as_mut().poll(cx)
|
5704 5579 | }
|
5705 5580 | }
|
5706 5581 |
|
5707 5582 | impl<B>
|
5708 - | ::aws_smithy_http_server::request::FromRequest<
|
5709 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5583 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
5584 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5710 5585 | B,
|
5711 5586 | > for crate::input::SparseJsonMapsInput
|
5712 5587 | where
|
5713 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
5588 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
5714 5589 | B: 'static,
|
5715 5590 |
|
5716 5591 | B::Data: Send,
|
5717 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5718 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
5592 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5593 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
5719 5594 | {
|
5720 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5595 + | type Rejection =
|
5596 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5721 5597 | type Future = SparseJsonMapsInputFuture;
|
5722 5598 |
|
5723 5599 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
5724 5600 | let fut = async move {
|
5725 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
5601 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
5726 5602 | request.headers(),
|
5727 5603 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
5728 5604 | ) {
|
5729 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5605 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5730 5606 | }
|
5731 5607 | crate::protocol_serde::shape_sparse_json_maps::de_sparse_json_maps_http_request(request)
|
5732 5608 | .await
|
5733 5609 | };
|
5734 5610 | use ::futures_util::future::TryFutureExt;
|
5735 - | let fut = fut.map_err(
|
5736 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5737 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5738 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
5739 - | e,
|
5740 - | )
|
5741 - | },
|
5742 - | );
|
5611 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5612 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5613 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
5614 + | });
|
5743 5615 | SparseJsonMapsInputFuture {
|
5744 5616 | inner: Box::pin(fut),
|
5745 5617 | }
|
5746 5618 | }
|
5747 5619 | }
|
5748 5620 | impl
|
5749 - | ::aws_smithy_http_server::response::IntoResponse<
|
5750 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5621 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5622 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5751 5623 | > for crate::output::SparseJsonMapsOutput
|
5752 5624 | {
|
5753 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5625 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5754 5626 | match crate::protocol_serde::shape_sparse_json_maps::ser_sparse_json_maps_http_response(
|
5755 5627 | self,
|
5756 5628 | ) {
|
5757 5629 | Ok(response) => response,
|
5758 5630 | Err(e) => {
|
5759 5631 | ::tracing::error!(error = %e, "failed to serialize response");
|
5760 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5632 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5761 5633 | }
|
5762 5634 | }
|
5763 5635 | }
|
5764 5636 | }
|
5765 5637 | impl
|
5766 - | ::aws_smithy_http_server::response::IntoResponse<
|
5767 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5638 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5639 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5768 5640 | > for crate::error::SparseJsonMapsError
|
5769 5641 | {
|
5770 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5642 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5771 5643 | match crate::protocol_serde::shape_sparse_json_maps::ser_sparse_json_maps_http_error(&self)
|
5772 5644 | {
|
5773 5645 | Ok(mut response) => {
|
5774 5646 | response.extensions_mut().insert(
|
5775 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
5647 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
5648 + | self.name(),
|
5649 + | ),
|
5776 5650 | );
|
5777 5651 | response
|
5778 5652 | }
|
5779 5653 | Err(e) => {
|
5780 5654 | ::tracing::error!(error = %e, "failed to serialize response");
|
5781 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5655 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5782 5656 | }
|
5783 5657 | }
|
5784 5658 | }
|
5785 5659 | }
|
5786 5660 |
|
5787 5661 | ::pin_project_lite::pin_project! {
|
5788 5662 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
5789 5663 | /// [`JsonMapsInput`](crate::input::JsonMapsInput) using modelled bindings.
|
5790 5664 | pub struct JsonMapsInputFuture {
|
5791 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::JsonMapsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5665 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::JsonMapsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5792 5666 | }
|
5793 5667 | }
|
5794 5668 |
|
5795 5669 | impl std::future::Future for JsonMapsInputFuture {
|
5796 5670 | type Output = Result<
|
5797 5671 | crate::input::JsonMapsInput,
|
5798 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5672 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5799 5673 | >;
|
5800 5674 |
|
5801 5675 | fn poll(
|
5802 5676 | self: std::pin::Pin<&mut Self>,
|
5803 5677 | cx: &mut std::task::Context<'_>,
|
5804 5678 | ) -> std::task::Poll<Self::Output> {
|
5805 5679 | let this = self.project();
|
5806 5680 | this.inner.as_mut().poll(cx)
|
5807 5681 | }
|
5808 5682 | }
|
5809 5683 |
|
5810 5684 | impl<B>
|
5811 - | ::aws_smithy_http_server::request::FromRequest<
|
5812 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5685 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
5686 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5813 5687 | B,
|
5814 5688 | > for crate::input::JsonMapsInput
|
5815 5689 | where
|
5816 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
5690 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
5817 5691 | B: 'static,
|
5818 5692 |
|
5819 5693 | B::Data: Send,
|
5820 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5821 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
5694 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5695 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
5822 5696 | {
|
5823 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5697 + | type Rejection =
|
5698 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5824 5699 | type Future = JsonMapsInputFuture;
|
5825 5700 |
|
5826 5701 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
5827 5702 | let fut = async move {
|
5828 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
5703 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
5829 5704 | request.headers(),
|
5830 5705 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
5831 5706 | ) {
|
5832 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5707 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5833 5708 | }
|
5834 5709 | crate::protocol_serde::shape_json_maps::de_json_maps_http_request(request).await
|
5835 5710 | };
|
5836 5711 | use ::futures_util::future::TryFutureExt;
|
5837 - | let fut = fut.map_err(
|
5838 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5839 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5840 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
5841 - | e,
|
5842 - | )
|
5843 - | },
|
5844 - | );
|
5712 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5713 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5714 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
5715 + | });
|
5845 5716 | JsonMapsInputFuture {
|
5846 5717 | inner: Box::pin(fut),
|
5847 5718 | }
|
5848 5719 | }
|
5849 5720 | }
|
5850 5721 | impl
|
5851 - | ::aws_smithy_http_server::response::IntoResponse<
|
5852 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5722 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5723 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5853 5724 | > for crate::output::JsonMapsOutput
|
5854 5725 | {
|
5855 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5726 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5856 5727 | match crate::protocol_serde::shape_json_maps::ser_json_maps_http_response(self) {
|
5857 5728 | Ok(response) => response,
|
5858 5729 | Err(e) => {
|
5859 5730 | ::tracing::error!(error = %e, "failed to serialize response");
|
5860 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5731 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5861 5732 | }
|
5862 5733 | }
|
5863 5734 | }
|
5864 5735 | }
|
5865 5736 | impl
|
5866 - | ::aws_smithy_http_server::response::IntoResponse<
|
5867 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5737 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5738 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5868 5739 | > for crate::error::JsonMapsError
|
5869 5740 | {
|
5870 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5741 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5871 5742 | match crate::protocol_serde::shape_json_maps::ser_json_maps_http_error(&self) {
|
5872 5743 | Ok(mut response) => {
|
5873 5744 | response.extensions_mut().insert(
|
5874 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
5745 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
5746 + | self.name(),
|
5747 + | ),
|
5875 5748 | );
|
5876 5749 | response
|
5877 5750 | }
|
5878 5751 | Err(e) => {
|
5879 5752 | ::tracing::error!(error = %e, "failed to serialize response");
|
5880 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5753 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5881 5754 | }
|
5882 5755 | }
|
5883 5756 | }
|
5884 5757 | }
|
5885 5758 |
|
5886 5759 | ::pin_project_lite::pin_project! {
|
5887 5760 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
5888 5761 | /// [`SparseJsonListsInput`](crate::input::SparseJsonListsInput) using modelled bindings.
|
5889 5762 | pub struct SparseJsonListsInputFuture {
|
5890 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::SparseJsonListsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5763 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::SparseJsonListsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5891 5764 | }
|
5892 5765 | }
|
5893 5766 |
|
5894 5767 | impl std::future::Future for SparseJsonListsInputFuture {
|
5895 5768 | type Output = Result<
|
5896 5769 | crate::input::SparseJsonListsInput,
|
5897 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5770 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5898 5771 | >;
|
5899 5772 |
|
5900 5773 | fn poll(
|
5901 5774 | self: std::pin::Pin<&mut Self>,
|
5902 5775 | cx: &mut std::task::Context<'_>,
|
5903 5776 | ) -> std::task::Poll<Self::Output> {
|
5904 5777 | let this = self.project();
|
5905 5778 | this.inner.as_mut().poll(cx)
|
5906 5779 | }
|
5907 5780 | }
|
5908 5781 |
|
5909 5782 | impl<B>
|
5910 - | ::aws_smithy_http_server::request::FromRequest<
|
5911 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5783 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
5784 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5912 5785 | B,
|
5913 5786 | > for crate::input::SparseJsonListsInput
|
5914 5787 | where
|
5915 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
5788 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
5916 5789 | B: 'static,
|
5917 5790 |
|
5918 5791 | B::Data: Send,
|
5919 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5920 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
5792 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5793 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
5921 5794 | {
|
5922 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5795 + | type Rejection =
|
5796 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5923 5797 | type Future = SparseJsonListsInputFuture;
|
5924 5798 |
|
5925 5799 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
5926 5800 | let fut = async move {
|
5927 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
5801 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
5928 5802 | request.headers(),
|
5929 5803 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
5930 5804 | ) {
|
5931 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5805 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5932 5806 | }
|
5933 5807 | crate::protocol_serde::shape_sparse_json_lists::de_sparse_json_lists_http_request(
|
5934 5808 | request,
|
5935 5809 | )
|
5936 5810 | .await
|
5937 5811 | };
|
5938 5812 | use ::futures_util::future::TryFutureExt;
|
5939 - | let fut = fut.map_err(
|
5940 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5941 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5942 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
5943 - | e,
|
5944 - | )
|
5945 - | },
|
5946 - | );
|
5813 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5814 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5815 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
5816 + | });
|
5947 5817 | SparseJsonListsInputFuture {
|
5948 5818 | inner: Box::pin(fut),
|
5949 5819 | }
|
5950 5820 | }
|
5951 5821 | }
|
5952 5822 | impl
|
5953 - | ::aws_smithy_http_server::response::IntoResponse<
|
5954 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5823 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5824 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5955 5825 | > for crate::output::SparseJsonListsOutput
|
5956 5826 | {
|
5957 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5827 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5958 5828 | match crate::protocol_serde::shape_sparse_json_lists::ser_sparse_json_lists_http_response(
|
5959 5829 | self,
|
5960 5830 | ) {
|
5961 5831 | Ok(response) => response,
|
5962 5832 | Err(e) => {
|
5963 5833 | ::tracing::error!(error = %e, "failed to serialize response");
|
5964 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5834 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5965 5835 | }
|
5966 5836 | }
|
5967 5837 | }
|
5968 5838 | }
|
5969 5839 | impl
|
5970 - | ::aws_smithy_http_server::response::IntoResponse<
|
5971 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5840 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5841 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
5972 5842 | > for crate::error::SparseJsonListsError
|
5973 5843 | {
|
5974 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5844 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
5975 5845 | match crate::protocol_serde::shape_sparse_json_lists::ser_sparse_json_lists_http_error(
|
5976 5846 | &self,
|
5977 5847 | ) {
|
5978 5848 | Ok(mut response) => {
|
5979 5849 | response.extensions_mut().insert(
|
5980 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
5850 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
5851 + | self.name(),
|
5852 + | ),
|
5981 5853 | );
|
5982 5854 | response
|
5983 5855 | }
|
5984 5856 | Err(e) => {
|
5985 5857 | ::tracing::error!(error = %e, "failed to serialize response");
|
5986 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5858 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5987 5859 | }
|
5988 5860 | }
|
5989 5861 | }
|
5990 5862 | }
|
5991 5863 |
|
5992 5864 | ::pin_project_lite::pin_project! {
|
5993 5865 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
5994 5866 | /// [`JsonListsInput`](crate::input::JsonListsInput) using modelled bindings.
|
5995 5867 | pub struct JsonListsInputFuture {
|
5996 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::JsonListsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5868 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::JsonListsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5997 5869 | }
|
5998 5870 | }
|
5999 5871 |
|
6000 5872 | impl std::future::Future for JsonListsInputFuture {
|
6001 5873 | type Output = Result<
|
6002 5874 | crate::input::JsonListsInput,
|
6003 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5875 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6004 5876 | >;
|
6005 5877 |
|
6006 5878 | fn poll(
|
6007 5879 | self: std::pin::Pin<&mut Self>,
|
6008 5880 | cx: &mut std::task::Context<'_>,
|
6009 5881 | ) -> std::task::Poll<Self::Output> {
|
6010 5882 | let this = self.project();
|
6011 5883 | this.inner.as_mut().poll(cx)
|
6012 5884 | }
|
6013 5885 | }
|
6014 5886 |
|
6015 5887 | impl<B>
|
6016 - | ::aws_smithy_http_server::request::FromRequest<
|
6017 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5888 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
5889 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6018 5890 | B,
|
6019 5891 | > for crate::input::JsonListsInput
|
6020 5892 | where
|
6021 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
5893 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
6022 5894 | B: 'static,
|
6023 5895 |
|
6024 5896 | B::Data: Send,
|
6025 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6026 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
5897 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5898 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
6027 5899 | {
|
6028 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5900 + | type Rejection =
|
5901 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6029 5902 | type Future = JsonListsInputFuture;
|
6030 5903 |
|
6031 5904 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
6032 5905 | let fut = async move {
|
6033 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
5906 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
6034 5907 | request.headers(),
|
6035 5908 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
6036 5909 | ) {
|
6037 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
5910 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6038 5911 | }
|
6039 5912 | crate::protocol_serde::shape_json_lists::de_json_lists_http_request(request).await
|
6040 5913 | };
|
6041 5914 | use ::futures_util::future::TryFutureExt;
|
6042 - | let fut = fut.map_err(
|
6043 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6044 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6045 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
6046 - | e,
|
6047 - | )
|
6048 - | },
|
6049 - | );
|
5915 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
5916 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
5917 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
5918 + | });
|
6050 5919 | JsonListsInputFuture {
|
6051 5920 | inner: Box::pin(fut),
|
6052 5921 | }
|
6053 5922 | }
|
6054 5923 | }
|
6055 5924 | impl
|
6056 - | ::aws_smithy_http_server::response::IntoResponse<
|
6057 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5925 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5926 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6058 5927 | > for crate::output::JsonListsOutput
|
6059 5928 | {
|
6060 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5929 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6061 5930 | match crate::protocol_serde::shape_json_lists::ser_json_lists_http_response(self) {
|
6062 5931 | Ok(response) => response,
|
6063 5932 | Err(e) => {
|
6064 5933 | ::tracing::error!(error = %e, "failed to serialize response");
|
6065 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5934 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6066 5935 | }
|
6067 5936 | }
|
6068 5937 | }
|
6069 5938 | }
|
6070 5939 | impl
|
6071 - | ::aws_smithy_http_server::response::IntoResponse<
|
6072 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5940 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
5941 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6073 5942 | > for crate::error::JsonListsError
|
6074 5943 | {
|
6075 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
5944 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6076 5945 | match crate::protocol_serde::shape_json_lists::ser_json_lists_http_error(&self) {
|
6077 5946 | Ok(mut response) => {
|
6078 5947 | response.extensions_mut().insert(
|
6079 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
5948 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
5949 + | self.name(),
|
5950 + | ),
|
6080 5951 | );
|
6081 5952 | response
|
6082 5953 | }
|
6083 5954 | Err(e) => {
|
6084 5955 | ::tracing::error!(error = %e, "failed to serialize response");
|
6085 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
5956 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6086 5957 | }
|
6087 5958 | }
|
6088 5959 | }
|
6089 5960 | }
|
6090 5961 |
|
6091 5962 | ::pin_project_lite::pin_project! {
|
6092 5963 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
6093 5964 | /// [`RecursiveShapesInput`](crate::input::RecursiveShapesInput) using modelled bindings.
|
6094 5965 | pub struct RecursiveShapesInputFuture {
|
6095 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RecursiveShapesInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
5966 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RecursiveShapesInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6096 5967 | }
|
6097 5968 | }
|
6098 5969 |
|
6099 5970 | impl std::future::Future for RecursiveShapesInputFuture {
|
6100 5971 | type Output = Result<
|
6101 5972 | crate::input::RecursiveShapesInput,
|
6102 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
5973 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6103 5974 | >;
|
6104 5975 |
|
6105 5976 | fn poll(
|
6106 5977 | self: std::pin::Pin<&mut Self>,
|
6107 5978 | cx: &mut std::task::Context<'_>,
|
6108 5979 | ) -> std::task::Poll<Self::Output> {
|
6109 5980 | let this = self.project();
|
6110 5981 | this.inner.as_mut().poll(cx)
|
6111 5982 | }
|
6112 5983 | }
|
6113 5984 |
|
6114 5985 | impl<B>
|
6115 - | ::aws_smithy_http_server::request::FromRequest<
|
6116 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
5986 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
5987 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6117 5988 | B,
|
6118 5989 | > for crate::input::RecursiveShapesInput
|
6119 5990 | where
|
6120 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
5991 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
6121 5992 | B: 'static,
|
6122 5993 |
|
6123 5994 | B::Data: Send,
|
6124 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6125 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
5995 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
5996 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
6126 5997 | {
|
6127 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
5998 + | type Rejection =
|
5999 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6128 6000 | type Future = RecursiveShapesInputFuture;
|
6129 6001 |
|
6130 6002 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
6131 6003 | let fut = async move {
|
6132 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
6004 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
6133 6005 | request.headers(),
|
6134 6006 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
6135 6007 | ) {
|
6136 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6008 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6137 6009 | }
|
6138 6010 | crate::protocol_serde::shape_recursive_shapes::de_recursive_shapes_http_request(request)
|
6139 6011 | .await
|
6140 6012 | };
|
6141 6013 | use ::futures_util::future::TryFutureExt;
|
6142 - | let fut = fut.map_err(
|
6143 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6144 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6145 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
6146 - | e,
|
6147 - | )
|
6148 - | },
|
6149 - | );
|
6014 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6015 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6016 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
6017 + | });
|
6150 6018 | RecursiveShapesInputFuture {
|
6151 6019 | inner: Box::pin(fut),
|
6152 6020 | }
|
6153 6021 | }
|
6154 6022 | }
|
6155 6023 | impl
|
6156 - | ::aws_smithy_http_server::response::IntoResponse<
|
6157 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6024 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6025 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6158 6026 | > for crate::output::RecursiveShapesOutput
|
6159 6027 | {
|
6160 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6028 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6161 6029 | match crate::protocol_serde::shape_recursive_shapes::ser_recursive_shapes_http_response(
|
6162 6030 | self,
|
6163 6031 | ) {
|
6164 6032 | Ok(response) => response,
|
6165 6033 | Err(e) => {
|
6166 6034 | ::tracing::error!(error = %e, "failed to serialize response");
|
6167 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6035 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6168 6036 | }
|
6169 6037 | }
|
6170 6038 | }
|
6171 6039 | }
|
6172 6040 | impl
|
6173 - | ::aws_smithy_http_server::response::IntoResponse<
|
6174 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6041 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6042 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6175 6043 | > for crate::error::RecursiveShapesError
|
6176 6044 | {
|
6177 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6045 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6178 6046 | match crate::protocol_serde::shape_recursive_shapes::ser_recursive_shapes_http_error(&self)
|
6179 6047 | {
|
6180 6048 | Ok(mut response) => {
|
6181 6049 | response.extensions_mut().insert(
|
6182 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
6050 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
6051 + | self.name(),
|
6052 + | ),
|
6183 6053 | );
|
6184 6054 | response
|
6185 6055 | }
|
6186 6056 | Err(e) => {
|
6187 6057 | ::tracing::error!(error = %e, "failed to serialize response");
|
6188 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6058 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6189 6059 | }
|
6190 6060 | }
|
6191 6061 | }
|
6192 6062 | }
|
6193 6063 |
|
6194 6064 | ::pin_project_lite::pin_project! {
|
6195 6065 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
6196 6066 | /// [`JsonIntEnumsInput`](crate::input::JsonIntEnumsInput) using modelled bindings.
|
6197 6067 | pub struct JsonIntEnumsInputFuture {
|
6198 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::JsonIntEnumsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6068 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::JsonIntEnumsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6199 6069 | }
|
6200 6070 | }
|
6201 6071 |
|
6202 6072 | impl std::future::Future for JsonIntEnumsInputFuture {
|
6203 6073 | type Output = Result<
|
6204 6074 | crate::input::JsonIntEnumsInput,
|
6205 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6075 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6206 6076 | >;
|
6207 6077 |
|
6208 6078 | fn poll(
|
6209 6079 | self: std::pin::Pin<&mut Self>,
|
6210 6080 | cx: &mut std::task::Context<'_>,
|
6211 6081 | ) -> std::task::Poll<Self::Output> {
|
6212 6082 | let this = self.project();
|
6213 6083 | this.inner.as_mut().poll(cx)
|
6214 6084 | }
|
6215 6085 | }
|
6216 6086 |
|
6217 6087 | impl<B>
|
6218 - | ::aws_smithy_http_server::request::FromRequest<
|
6219 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6088 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
6089 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6220 6090 | B,
|
6221 6091 | > for crate::input::JsonIntEnumsInput
|
6222 6092 | where
|
6223 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
6093 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
6224 6094 | B: 'static,
|
6225 6095 |
|
6226 6096 | B::Data: Send,
|
6227 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6228 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
6097 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6098 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
6229 6099 | {
|
6230 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6100 + | type Rejection =
|
6101 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6231 6102 | type Future = JsonIntEnumsInputFuture;
|
6232 6103 |
|
6233 6104 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
6234 6105 | let fut = async move {
|
6235 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
6106 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
6236 6107 | request.headers(),
|
6237 6108 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
6238 6109 | ) {
|
6239 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6110 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6240 6111 | }
|
6241 6112 | crate::protocol_serde::shape_json_int_enums::de_json_int_enums_http_request(request)
|
6242 6113 | .await
|
6243 6114 | };
|
6244 6115 | use ::futures_util::future::TryFutureExt;
|
6245 - | let fut = fut.map_err(
|
6246 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6247 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6248 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
6249 - | e,
|
6250 - | )
|
6251 - | },
|
6252 - | );
|
6116 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6117 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6118 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
6119 + | });
|
6253 6120 | JsonIntEnumsInputFuture {
|
6254 6121 | inner: Box::pin(fut),
|
6255 6122 | }
|
6256 6123 | }
|
6257 6124 | }
|
6258 6125 | impl
|
6259 - | ::aws_smithy_http_server::response::IntoResponse<
|
6260 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6126 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6127 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6261 6128 | > for crate::output::JsonIntEnumsOutput
|
6262 6129 | {
|
6263 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6130 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6264 6131 | match crate::protocol_serde::shape_json_int_enums::ser_json_int_enums_http_response(self) {
|
6265 6132 | Ok(response) => response,
|
6266 6133 | Err(e) => {
|
6267 6134 | ::tracing::error!(error = %e, "failed to serialize response");
|
6268 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6135 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6269 6136 | }
|
6270 6137 | }
|
6271 6138 | }
|
6272 6139 | }
|
6273 6140 | impl
|
6274 - | ::aws_smithy_http_server::response::IntoResponse<
|
6275 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6141 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6142 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6276 6143 | > for crate::error::JsonIntEnumsError
|
6277 6144 | {
|
6278 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6145 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6279 6146 | match crate::protocol_serde::shape_json_int_enums::ser_json_int_enums_http_error(&self) {
|
6280 6147 | Ok(mut response) => {
|
6281 6148 | response.extensions_mut().insert(
|
6282 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
6149 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
6150 + | self.name(),
|
6151 + | ),
|
6283 6152 | );
|
6284 6153 | response
|
6285 6154 | }
|
6286 6155 | Err(e) => {
|
6287 6156 | ::tracing::error!(error = %e, "failed to serialize response");
|
6288 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6157 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6289 6158 | }
|
6290 6159 | }
|
6291 6160 | }
|
6292 6161 | }
|
6293 6162 |
|
6294 6163 | ::pin_project_lite::pin_project! {
|
6295 6164 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
6296 6165 | /// [`JsonEnumsInput`](crate::input::JsonEnumsInput) using modelled bindings.
|
6297 6166 | pub struct JsonEnumsInputFuture {
|
6298 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::JsonEnumsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6167 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::JsonEnumsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6299 6168 | }
|
6300 6169 | }
|
6301 6170 |
|
6302 6171 | impl std::future::Future for JsonEnumsInputFuture {
|
6303 6172 | type Output = Result<
|
6304 6173 | crate::input::JsonEnumsInput,
|
6305 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6174 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6306 6175 | >;
|
6307 6176 |
|
6308 6177 | fn poll(
|
6309 6178 | self: std::pin::Pin<&mut Self>,
|
6310 6179 | cx: &mut std::task::Context<'_>,
|
6311 6180 | ) -> std::task::Poll<Self::Output> {
|
6312 6181 | let this = self.project();
|
6313 6182 | this.inner.as_mut().poll(cx)
|
6314 6183 | }
|
6315 6184 | }
|
6316 6185 |
|
6317 6186 | impl<B>
|
6318 - | ::aws_smithy_http_server::request::FromRequest<
|
6319 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6187 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
6188 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6320 6189 | B,
|
6321 6190 | > for crate::input::JsonEnumsInput
|
6322 6191 | where
|
6323 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
6192 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
6324 6193 | B: 'static,
|
6325 6194 |
|
6326 6195 | B::Data: Send,
|
6327 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6328 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
6196 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6197 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
6329 6198 | {
|
6330 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6199 + | type Rejection =
|
6200 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6331 6201 | type Future = JsonEnumsInputFuture;
|
6332 6202 |
|
6333 6203 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
6334 6204 | let fut = async move {
|
6335 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
6205 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
6336 6206 | request.headers(),
|
6337 6207 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
6338 6208 | ) {
|
6339 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6209 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6340 6210 | }
|
6341 6211 | crate::protocol_serde::shape_json_enums::de_json_enums_http_request(request).await
|
6342 6212 | };
|
6343 6213 | use ::futures_util::future::TryFutureExt;
|
6344 - | let fut = fut.map_err(
|
6345 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6346 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6347 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
6348 - | e,
|
6349 - | )
|
6350 - | },
|
6351 - | );
|
6214 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6215 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6216 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
6217 + | });
|
6352 6218 | JsonEnumsInputFuture {
|
6353 6219 | inner: Box::pin(fut),
|
6354 6220 | }
|
6355 6221 | }
|
6356 6222 | }
|
6357 6223 | impl
|
6358 - | ::aws_smithy_http_server::response::IntoResponse<
|
6359 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6224 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6225 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6360 6226 | > for crate::output::JsonEnumsOutput
|
6361 6227 | {
|
6362 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6228 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6363 6229 | match crate::protocol_serde::shape_json_enums::ser_json_enums_http_response(self) {
|
6364 6230 | Ok(response) => response,
|
6365 6231 | Err(e) => {
|
6366 6232 | ::tracing::error!(error = %e, "failed to serialize response");
|
6367 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6233 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6368 6234 | }
|
6369 6235 | }
|
6370 6236 | }
|
6371 6237 | }
|
6372 6238 | impl
|
6373 - | ::aws_smithy_http_server::response::IntoResponse<
|
6374 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6239 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6240 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6375 6241 | > for crate::error::JsonEnumsError
|
6376 6242 | {
|
6377 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6243 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6378 6244 | match crate::protocol_serde::shape_json_enums::ser_json_enums_http_error(&self) {
|
6379 6245 | Ok(mut response) => {
|
6380 6246 | response.extensions_mut().insert(
|
6381 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
6247 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
6248 + | self.name(),
|
6249 + | ),
|
6382 6250 | );
|
6383 6251 | response
|
6384 6252 | }
|
6385 6253 | Err(e) => {
|
6386 6254 | ::tracing::error!(error = %e, "failed to serialize response");
|
6387 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6255 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6388 6256 | }
|
6389 6257 | }
|
6390 6258 | }
|
6391 6259 | }
|
6392 6260 |
|
6393 6261 | ::pin_project_lite::pin_project! {
|
6394 6262 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
6395 6263 | /// [`JsonTimestampsInput`](crate::input::JsonTimestampsInput) using modelled bindings.
|
6396 6264 | pub struct JsonTimestampsInputFuture {
|
6397 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::JsonTimestampsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6265 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::JsonTimestampsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6398 6266 | }
|
6399 6267 | }
|
6400 6268 |
|
6401 6269 | impl std::future::Future for JsonTimestampsInputFuture {
|
6402 6270 | type Output = Result<
|
6403 6271 | crate::input::JsonTimestampsInput,
|
6404 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6272 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6405 6273 | >;
|
6406 6274 |
|
6407 6275 | fn poll(
|
6408 6276 | self: std::pin::Pin<&mut Self>,
|
6409 6277 | cx: &mut std::task::Context<'_>,
|
6410 6278 | ) -> std::task::Poll<Self::Output> {
|
6411 6279 | let this = self.project();
|
6412 6280 | this.inner.as_mut().poll(cx)
|
6413 6281 | }
|
6414 6282 | }
|
6415 6283 |
|
6416 6284 | impl<B>
|
6417 - | ::aws_smithy_http_server::request::FromRequest<
|
6418 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6285 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
6286 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6419 6287 | B,
|
6420 6288 | > for crate::input::JsonTimestampsInput
|
6421 6289 | where
|
6422 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
6290 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
6423 6291 | B: 'static,
|
6424 6292 |
|
6425 6293 | B::Data: Send,
|
6426 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6427 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
6294 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6295 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
6428 6296 | {
|
6429 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6297 + | type Rejection =
|
6298 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6430 6299 | type Future = JsonTimestampsInputFuture;
|
6431 6300 |
|
6432 6301 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
6433 6302 | let fut = async move {
|
6434 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
6303 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
6435 6304 | request.headers(),
|
6436 6305 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
6437 6306 | ) {
|
6438 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6307 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6439 6308 | }
|
6440 6309 | crate::protocol_serde::shape_json_timestamps::de_json_timestamps_http_request(request)
|
6441 6310 | .await
|
6442 6311 | };
|
6443 6312 | use ::futures_util::future::TryFutureExt;
|
6444 - | let fut = fut.map_err(
|
6445 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6446 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6447 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
6448 - | e,
|
6449 - | )
|
6450 - | },
|
6451 - | );
|
6313 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6314 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6315 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
6316 + | });
|
6452 6317 | JsonTimestampsInputFuture {
|
6453 6318 | inner: Box::pin(fut),
|
6454 6319 | }
|
6455 6320 | }
|
6456 6321 | }
|
6457 6322 | impl
|
6458 - | ::aws_smithy_http_server::response::IntoResponse<
|
6459 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6323 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6324 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6460 6325 | > for crate::output::JsonTimestampsOutput
|
6461 6326 | {
|
6462 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6327 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6463 6328 | match crate::protocol_serde::shape_json_timestamps::ser_json_timestamps_http_response(self)
|
6464 6329 | {
|
6465 6330 | Ok(response) => response,
|
6466 6331 | Err(e) => {
|
6467 6332 | ::tracing::error!(error = %e, "failed to serialize response");
|
6468 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6333 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6469 6334 | }
|
6470 6335 | }
|
6471 6336 | }
|
6472 6337 | }
|
6473 6338 | impl
|
6474 - | ::aws_smithy_http_server::response::IntoResponse<
|
6475 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6339 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6340 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6476 6341 | > for crate::error::JsonTimestampsError
|
6477 6342 | {
|
6478 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6343 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6479 6344 | match crate::protocol_serde::shape_json_timestamps::ser_json_timestamps_http_error(&self) {
|
6480 6345 | Ok(mut response) => {
|
6481 6346 | response.extensions_mut().insert(
|
6482 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
6347 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
6348 + | self.name(),
|
6349 + | ),
|
6483 6350 | );
|
6484 6351 | response
|
6485 6352 | }
|
6486 6353 | Err(e) => {
|
6487 6354 | ::tracing::error!(error = %e, "failed to serialize response");
|
6488 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6355 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6489 6356 | }
|
6490 6357 | }
|
6491 6358 | }
|
6492 6359 | }
|
6493 6360 |
|
6494 6361 | ::pin_project_lite::pin_project! {
|
6495 6362 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
6496 6363 | /// [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput) using modelled bindings.
|
6497 6364 | pub struct SimpleScalarPropertiesInputFuture {
|
6498 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::SimpleScalarPropertiesInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6365 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::SimpleScalarPropertiesInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6499 6366 | }
|
6500 6367 | }
|
6501 6368 |
|
6502 6369 | impl std::future::Future for SimpleScalarPropertiesInputFuture {
|
6503 6370 | type Output = Result<
|
6504 6371 | crate::input::SimpleScalarPropertiesInput,
|
6505 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6372 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6506 6373 | >;
|
6507 6374 |
|
6508 6375 | fn poll(
|
6509 6376 | self: std::pin::Pin<&mut Self>,
|
6510 6377 | cx: &mut std::task::Context<'_>,
|
6511 6378 | ) -> std::task::Poll<Self::Output> {
|
6512 6379 | let this = self.project();
|
6513 6380 | this.inner.as_mut().poll(cx)
|
6514 6381 | }
|
6515 6382 | }
|
6516 6383 |
|
6517 6384 | impl<B>
|
6518 - | ::aws_smithy_http_server::request::FromRequest<
|
6519 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6385 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
6386 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6520 6387 | B,
|
6521 6388 | > for crate::input::SimpleScalarPropertiesInput
|
6522 6389 | where
|
6523 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
6390 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
6524 6391 | B: 'static,
|
6525 6392 |
|
6526 6393 | B::Data: Send,
|
6527 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6528 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
6394 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6395 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
6529 6396 | {
|
6530 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6397 + | type Rejection =
|
6398 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6531 6399 | type Future = SimpleScalarPropertiesInputFuture;
|
6532 6400 |
|
6533 6401 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
6534 6402 | let fut = async move {
|
6535 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
6403 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
6536 6404 | request.headers(),
|
6537 6405 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
6538 6406 | ) {
|
6539 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6407 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6540 6408 | }
|
6541 6409 | crate::protocol_serde::shape_simple_scalar_properties::de_simple_scalar_properties_http_request(request)
|
6542 6410 | .await
|
6543 6411 | };
|
6544 6412 | use ::futures_util::future::TryFutureExt;
|
6545 - | let fut = fut.map_err(
|
6546 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6547 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6548 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
6549 - | e,
|
6550 - | )
|
6551 - | },
|
6552 - | );
|
6413 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6414 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6415 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
6416 + | });
|
6553 6417 | SimpleScalarPropertiesInputFuture {
|
6554 6418 | inner: Box::pin(fut),
|
6555 6419 | }
|
6556 6420 | }
|
6557 6421 | }
|
6558 6422 | impl
|
6559 - | ::aws_smithy_http_server::response::IntoResponse<
|
6560 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6423 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6424 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6561 6425 | > for crate::output::SimpleScalarPropertiesOutput
|
6562 6426 | {
|
6563 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6427 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6564 6428 | match crate::protocol_serde::shape_simple_scalar_properties::ser_simple_scalar_properties_http_response(self) {
|
6565 6429 | Ok(response) => response,
|
6566 6430 | Err(e) => {
|
6567 6431 | ::tracing::error!(error = %e, "failed to serialize response");
|
6568 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6432 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6569 6433 | }
|
6570 6434 | }
|
6571 6435 | }
|
6572 6436 | }
|
6573 6437 | impl
|
6574 - | ::aws_smithy_http_server::response::IntoResponse<
|
6575 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6438 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6439 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6576 6440 | > for crate::error::SimpleScalarPropertiesError
|
6577 6441 | {
|
6578 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6442 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6579 6443 | match crate::protocol_serde::shape_simple_scalar_properties::ser_simple_scalar_properties_http_error(&self) {
|
6580 6444 | Ok(mut response) => {
|
6581 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
6445 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
6582 6446 | response
|
6583 6447 | },
|
6584 6448 | Err(e) => {
|
6585 6449 | ::tracing::error!(error = %e, "failed to serialize response");
|
6586 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6450 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6587 6451 | }
|
6588 6452 | }
|
6589 6453 | }
|
6590 6454 | }
|
6591 6455 |
|
6592 6456 | ::pin_project_lite::pin_project! {
|
6593 6457 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
6594 6458 | /// [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput) using modelled bindings.
|
6595 6459 | pub struct GreetingWithErrorsInputFuture {
|
6596 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GreetingWithErrorsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6460 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GreetingWithErrorsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6597 6461 | }
|
6598 6462 | }
|
6599 6463 |
|
6600 6464 | impl std::future::Future for GreetingWithErrorsInputFuture {
|
6601 6465 | type Output = Result<
|
6602 6466 | crate::input::GreetingWithErrorsInput,
|
6603 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6467 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6604 6468 | >;
|
6605 6469 |
|
6606 6470 | fn poll(
|
6607 6471 | self: std::pin::Pin<&mut Self>,
|
6608 6472 | cx: &mut std::task::Context<'_>,
|
6609 6473 | ) -> std::task::Poll<Self::Output> {
|
6610 6474 | let this = self.project();
|
6611 6475 | this.inner.as_mut().poll(cx)
|
6612 6476 | }
|
6613 6477 | }
|
6614 6478 |
|
6615 6479 | impl<B>
|
6616 - | ::aws_smithy_http_server::request::FromRequest<
|
6617 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6480 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
6481 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6618 6482 | B,
|
6619 6483 | > for crate::input::GreetingWithErrorsInput
|
6620 6484 | where
|
6621 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
6485 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
6622 6486 | B: 'static,
|
6623 6487 |
|
6624 6488 | B::Data: Send,
|
6625 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6626 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
6489 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6490 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
6627 6491 | {
|
6628 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6492 + | type Rejection =
|
6493 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6629 6494 | type Future = GreetingWithErrorsInputFuture;
|
6630 6495 |
|
6631 6496 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
6632 6497 | let fut = async move {
|
6633 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
6498 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
6634 6499 | request.headers(),
|
6635 6500 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
6636 6501 | ) {
|
6637 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6502 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6638 6503 | }
|
6639 6504 | crate::protocol_serde::shape_greeting_with_errors::de_greeting_with_errors_http_request(
|
6640 6505 | request,
|
6641 6506 | )
|
6642 6507 | .await
|
6643 6508 | };
|
6644 6509 | use ::futures_util::future::TryFutureExt;
|
6645 - | let fut = fut.map_err(
|
6646 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6647 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6648 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
6649 - | e,
|
6650 - | )
|
6651 - | },
|
6652 - | );
|
6510 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6511 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6512 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
6513 + | });
|
6653 6514 | GreetingWithErrorsInputFuture {
|
6654 6515 | inner: Box::pin(fut),
|
6655 6516 | }
|
6656 6517 | }
|
6657 6518 | }
|
6658 6519 | impl
|
6659 - | ::aws_smithy_http_server::response::IntoResponse<
|
6660 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6520 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6521 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6661 6522 | > for crate::output::GreetingWithErrorsOutput
|
6662 6523 | {
|
6663 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6524 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6664 6525 | match crate::protocol_serde::shape_greeting_with_errors::ser_greeting_with_errors_http_response(self) {
|
6665 6526 | Ok(response) => response,
|
6666 6527 | Err(e) => {
|
6667 6528 | ::tracing::error!(error = %e, "failed to serialize response");
|
6668 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6529 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6669 6530 | }
|
6670 6531 | }
|
6671 6532 | }
|
6672 6533 | }
|
6673 6534 | impl
|
6674 - | ::aws_smithy_http_server::response::IntoResponse<
|
6675 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6535 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6536 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6676 6537 | > for crate::error::GreetingWithErrorsError
|
6677 6538 | {
|
6678 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6539 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6679 6540 | match crate::protocol_serde::shape_greeting_with_errors::ser_greeting_with_errors_http_error(
|
6680 6541 | &self,
|
6681 6542 | ) {
|
6682 6543 | Ok(mut response) => {
|
6683 6544 | response.extensions_mut().insert(
|
6684 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
6545 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
6546 + | self.name(),
|
6547 + | ),
|
6685 6548 | );
|
6686 6549 | response
|
6687 6550 | }
|
6688 6551 | Err(e) => {
|
6689 6552 | ::tracing::error!(error = %e, "failed to serialize response");
|
6690 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6553 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6691 6554 | }
|
6692 6555 | }
|
6693 6556 | }
|
6694 6557 | }
|
6695 6558 |
|
6696 6559 | ::pin_project_lite::pin_project! {
|
6697 6560 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
6698 6561 | /// [`StreamingTraitsWithMediaTypeInput`](crate::input::StreamingTraitsWithMediaTypeInput) using modelled bindings.
|
6699 6562 | pub struct StreamingTraitsWithMediaTypeInputFuture {
|
6700 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StreamingTraitsWithMediaTypeInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6563 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StreamingTraitsWithMediaTypeInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6701 6564 | }
|
6702 6565 | }
|
6703 6566 |
|
6704 6567 | impl std::future::Future for StreamingTraitsWithMediaTypeInputFuture {
|
6705 6568 | type Output = Result<
|
6706 6569 | crate::input::StreamingTraitsWithMediaTypeInput,
|
6707 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6570 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6708 6571 | >;
|
6709 6572 |
|
6710 6573 | fn poll(
|
6711 6574 | self: std::pin::Pin<&mut Self>,
|
6712 6575 | cx: &mut std::task::Context<'_>,
|
6713 6576 | ) -> std::task::Poll<Self::Output> {
|
6714 6577 | let this = self.project();
|
6715 6578 | this.inner.as_mut().poll(cx)
|
6716 6579 | }
|
6717 6580 | }
|
6718 6581 |
|
6719 6582 | impl<B>
|
6720 - | ::aws_smithy_http_server::request::FromRequest<
|
6721 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6583 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
6584 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6722 6585 | B,
|
6723 6586 | > for crate::input::StreamingTraitsWithMediaTypeInput
|
6724 6587 | where
|
6725 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
6588 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
6726 6589 | B: 'static,
|
6727 6590 |
|
6728 6591 | B: Into<::aws_smithy_types::byte_stream::ByteStream>,
|
6729 6592 | B::Data: Send,
|
6730 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6731 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
6593 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6594 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
6732 6595 | {
|
6733 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6596 + | type Rejection =
|
6597 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6734 6598 | type Future = StreamingTraitsWithMediaTypeInputFuture;
|
6735 6599 |
|
6736 6600 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
6737 6601 | let fut = async move {
|
6738 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
6602 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
6739 6603 | request.headers(),
|
6740 6604 | &crate::mimes::CONTENT_TYPE_TEXT_PLAIN,
|
6741 6605 | ) {
|
6742 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6606 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6743 6607 | }
|
6744 6608 | crate::protocol_serde::shape_streaming_traits_with_media_type::de_streaming_traits_with_media_type_http_request(request)
|
6745 6609 | .await
|
6746 6610 | };
|
6747 6611 | use ::futures_util::future::TryFutureExt;
|
6748 - | let fut = fut.map_err(
|
6749 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6750 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6751 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
6752 - | e,
|
6753 - | )
|
6754 - | },
|
6755 - | );
|
6612 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6613 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6614 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
6615 + | });
|
6756 6616 | StreamingTraitsWithMediaTypeInputFuture {
|
6757 6617 | inner: Box::pin(fut),
|
6758 6618 | }
|
6759 6619 | }
|
6760 6620 | }
|
6761 6621 | impl
|
6762 - | ::aws_smithy_http_server::response::IntoResponse<
|
6763 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6622 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6623 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6764 6624 | > for crate::output::StreamingTraitsWithMediaTypeOutput
|
6765 6625 | {
|
6766 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6626 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6767 6627 | match crate::protocol_serde::shape_streaming_traits_with_media_type::ser_streaming_traits_with_media_type_http_response(self) {
|
6768 6628 | Ok(response) => response,
|
6769 6629 | Err(e) => {
|
6770 6630 | ::tracing::error!(error = %e, "failed to serialize response");
|
6771 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6631 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6772 6632 | }
|
6773 6633 | }
|
6774 6634 | }
|
6775 6635 | }
|
6776 6636 | impl
|
6777 - | ::aws_smithy_http_server::response::IntoResponse<
|
6778 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6637 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6638 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6779 6639 | > for crate::error::StreamingTraitsWithMediaTypeError
|
6780 6640 | {
|
6781 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6641 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6782 6642 | match crate::protocol_serde::shape_streaming_traits_with_media_type::ser_streaming_traits_with_media_type_http_error(&self) {
|
6783 6643 | Ok(mut response) => {
|
6784 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
6644 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
6785 6645 | response
|
6786 6646 | },
|
6787 6647 | Err(e) => {
|
6788 6648 | ::tracing::error!(error = %e, "failed to serialize response");
|
6789 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6649 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6790 6650 | }
|
6791 6651 | }
|
6792 6652 | }
|
6793 6653 | }
|
6794 6654 |
|
6795 6655 | ::pin_project_lite::pin_project! {
|
6796 6656 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
6797 6657 | /// [`StreamingTraitsRequireLengthInput`](crate::input::StreamingTraitsRequireLengthInput) using modelled bindings.
|
6798 6658 | pub struct StreamingTraitsRequireLengthInputFuture {
|
6799 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StreamingTraitsRequireLengthInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6659 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StreamingTraitsRequireLengthInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6800 6660 | }
|
6801 6661 | }
|
6802 6662 |
|
6803 6663 | impl std::future::Future for StreamingTraitsRequireLengthInputFuture {
|
6804 6664 | type Output = Result<
|
6805 6665 | crate::input::StreamingTraitsRequireLengthInput,
|
6806 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6666 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6807 6667 | >;
|
6808 6668 |
|
6809 6669 | fn poll(
|
6810 6670 | self: std::pin::Pin<&mut Self>,
|
6811 6671 | cx: &mut std::task::Context<'_>,
|
6812 6672 | ) -> std::task::Poll<Self::Output> {
|
6813 6673 | let this = self.project();
|
6814 6674 | this.inner.as_mut().poll(cx)
|
6815 6675 | }
|
6816 6676 | }
|
6817 6677 |
|
6818 6678 | impl<B>
|
6819 - | ::aws_smithy_http_server::request::FromRequest<
|
6820 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6679 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
6680 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6821 6681 | B,
|
6822 6682 | > for crate::input::StreamingTraitsRequireLengthInput
|
6823 6683 | where
|
6824 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
6684 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
6825 6685 | B: 'static,
|
6826 6686 |
|
6827 6687 | B: Into<::aws_smithy_types::byte_stream::ByteStream>,
|
6828 6688 | B::Data: Send,
|
6829 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6830 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
6689 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6690 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
6831 6691 | {
|
6832 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6692 + | type Rejection =
|
6693 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6833 6694 | type Future = StreamingTraitsRequireLengthInputFuture;
|
6834 6695 |
|
6835 6696 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
6836 6697 | let fut = async move {
|
6837 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
6698 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
6838 6699 | request.headers(),
|
6839 6700 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
6840 6701 | ) {
|
6841 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6702 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6842 6703 | }
|
6843 6704 | crate::protocol_serde::shape_streaming_traits_require_length::de_streaming_traits_require_length_http_request(request)
|
6844 6705 | .await
|
6845 6706 | };
|
6846 6707 | use ::futures_util::future::TryFutureExt;
|
6847 - | let fut = fut.map_err(
|
6848 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6849 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6850 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
6851 - | e,
|
6852 - | )
|
6853 - | },
|
6854 - | );
|
6708 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6709 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6710 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
6711 + | });
|
6855 6712 | StreamingTraitsRequireLengthInputFuture {
|
6856 6713 | inner: Box::pin(fut),
|
6857 6714 | }
|
6858 6715 | }
|
6859 6716 | }
|
6860 6717 | impl
|
6861 - | ::aws_smithy_http_server::response::IntoResponse<
|
6862 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6718 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6719 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6863 6720 | > for crate::output::StreamingTraitsRequireLengthOutput
|
6864 6721 | {
|
6865 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6722 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6866 6723 | match crate::protocol_serde::shape_streaming_traits_require_length::ser_streaming_traits_require_length_http_response(self) {
|
6867 6724 | Ok(response) => response,
|
6868 6725 | Err(e) => {
|
6869 6726 | ::tracing::error!(error = %e, "failed to serialize response");
|
6870 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6727 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6871 6728 | }
|
6872 6729 | }
|
6873 6730 | }
|
6874 6731 | }
|
6875 6732 | impl
|
6876 - | ::aws_smithy_http_server::response::IntoResponse<
|
6877 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6733 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6734 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6878 6735 | > for crate::error::StreamingTraitsRequireLengthError
|
6879 6736 | {
|
6880 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6737 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6881 6738 | match crate::protocol_serde::shape_streaming_traits_require_length::ser_streaming_traits_require_length_http_error(&self) {
|
6882 6739 | Ok(mut response) => {
|
6883 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
6740 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
6884 6741 | response
|
6885 6742 | },
|
6886 6743 | Err(e) => {
|
6887 6744 | ::tracing::error!(error = %e, "failed to serialize response");
|
6888 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6745 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6889 6746 | }
|
6890 6747 | }
|
6891 6748 | }
|
6892 6749 | }
|
6893 6750 |
|
6894 6751 | ::pin_project_lite::pin_project! {
|
6895 6752 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
6896 6753 | /// [`StreamingTraitsInput`](crate::input::StreamingTraitsInput) using modelled bindings.
|
6897 6754 | pub struct StreamingTraitsInputFuture {
|
6898 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StreamingTraitsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6755 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StreamingTraitsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6899 6756 | }
|
6900 6757 | }
|
6901 6758 |
|
6902 6759 | impl std::future::Future for StreamingTraitsInputFuture {
|
6903 6760 | type Output = Result<
|
6904 6761 | crate::input::StreamingTraitsInput,
|
6905 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6762 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6906 6763 | >;
|
6907 6764 |
|
6908 6765 | fn poll(
|
6909 6766 | self: std::pin::Pin<&mut Self>,
|
6910 6767 | cx: &mut std::task::Context<'_>,
|
6911 6768 | ) -> std::task::Poll<Self::Output> {
|
6912 6769 | let this = self.project();
|
6913 6770 | this.inner.as_mut().poll(cx)
|
6914 6771 | }
|
6915 6772 | }
|
6916 6773 |
|
6917 6774 | impl<B>
|
6918 - | ::aws_smithy_http_server::request::FromRequest<
|
6919 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6775 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
6776 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6920 6777 | B,
|
6921 6778 | > for crate::input::StreamingTraitsInput
|
6922 6779 | where
|
6923 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
6780 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
6924 6781 | B: 'static,
|
6925 6782 |
|
6926 6783 | B: Into<::aws_smithy_types::byte_stream::ByteStream>,
|
6927 6784 | B::Data: Send,
|
6928 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6929 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
6785 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6786 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
6930 6787 | {
|
6931 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6788 + | type Rejection =
|
6789 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6932 6790 | type Future = StreamingTraitsInputFuture;
|
6933 6791 |
|
6934 6792 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
6935 6793 | let fut = async move {
|
6936 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
6794 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
6937 6795 | request.headers(),
|
6938 6796 | &crate::mimes::CONTENT_TYPE_APPLICATION_OCTET_STREAM,
|
6939 6797 | ) {
|
6940 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6798 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6941 6799 | }
|
6942 6800 | crate::protocol_serde::shape_streaming_traits::de_streaming_traits_http_request(request)
|
6943 6801 | .await
|
6944 6802 | };
|
6945 6803 | use ::futures_util::future::TryFutureExt;
|
6946 - | let fut = fut.map_err(
|
6947 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6948 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6949 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
6950 - | e,
|
6951 - | )
|
6952 - | },
|
6953 - | );
|
6804 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6805 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6806 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
6807 + | });
|
6954 6808 | StreamingTraitsInputFuture {
|
6955 6809 | inner: Box::pin(fut),
|
6956 6810 | }
|
6957 6811 | }
|
6958 6812 | }
|
6959 6813 | impl
|
6960 - | ::aws_smithy_http_server::response::IntoResponse<
|
6961 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6814 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6815 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6962 6816 | > for crate::output::StreamingTraitsOutput
|
6963 6817 | {
|
6964 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6818 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6965 6819 | match crate::protocol_serde::shape_streaming_traits::ser_streaming_traits_http_response(
|
6966 6820 | self,
|
6967 6821 | ) {
|
6968 6822 | Ok(response) => response,
|
6969 6823 | Err(e) => {
|
6970 6824 | ::tracing::error!(error = %e, "failed to serialize response");
|
6971 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6825 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6972 6826 | }
|
6973 6827 | }
|
6974 6828 | }
|
6975 6829 | }
|
6976 6830 | impl
|
6977 - | ::aws_smithy_http_server::response::IntoResponse<
|
6978 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6831 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6832 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
6979 6833 | > for crate::error::StreamingTraitsError
|
6980 6834 | {
|
6981 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6835 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
6982 6836 | match crate::protocol_serde::shape_streaming_traits::ser_streaming_traits_http_error(&self)
|
6983 6837 | {
|
6984 6838 | Ok(mut response) => {
|
6985 6839 | response.extensions_mut().insert(
|
6986 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
6840 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
6841 + | self.name(),
|
6842 + | ),
|
6987 6843 | );
|
6988 6844 | response
|
6989 6845 | }
|
6990 6846 | Err(e) => {
|
6991 6847 | ::tracing::error!(error = %e, "failed to serialize response");
|
6992 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6848 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6993 6849 | }
|
6994 6850 | }
|
6995 6851 | }
|
6996 6852 | }
|
6997 6853 |
|
6998 6854 | ::pin_project_lite::pin_project! {
|
6999 6855 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
7000 6856 | /// [`ResponseCodeHttpFallbackInput`](crate::input::ResponseCodeHttpFallbackInput) using modelled bindings.
|
7001 6857 | pub struct ResponseCodeHttpFallbackInputFuture {
|
7002 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeHttpFallbackInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6858 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeHttpFallbackInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7003 6859 | }
|
7004 6860 | }
|
7005 6861 |
|
7006 6862 | impl std::future::Future for ResponseCodeHttpFallbackInputFuture {
|
7007 6863 | type Output = Result<
|
7008 6864 | crate::input::ResponseCodeHttpFallbackInput,
|
7009 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6865 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7010 6866 | >;
|
7011 6867 |
|
7012 6868 | fn poll(
|
7013 6869 | self: std::pin::Pin<&mut Self>,
|
7014 6870 | cx: &mut std::task::Context<'_>,
|
7015 6871 | ) -> std::task::Poll<Self::Output> {
|
7016 6872 | let this = self.project();
|
7017 6873 | this.inner.as_mut().poll(cx)
|
7018 6874 | }
|
7019 6875 | }
|
7020 6876 |
|
7021 6877 | impl<B>
|
7022 - | ::aws_smithy_http_server::request::FromRequest<
|
7023 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6878 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
6879 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7024 6880 | B,
|
7025 6881 | > for crate::input::ResponseCodeHttpFallbackInput
|
7026 6882 | where
|
7027 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
6883 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
7028 6884 | B: 'static,
|
7029 6885 |
|
7030 6886 | B::Data: Send,
|
7031 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7032 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
6887 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6888 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
7033 6889 | {
|
7034 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6890 + | type Rejection =
|
6891 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7035 6892 | type Future = ResponseCodeHttpFallbackInputFuture;
|
7036 6893 |
|
7037 6894 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
7038 6895 | let fut = async move {
|
7039 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
6896 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
7040 6897 | request.headers(),
|
7041 6898 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
7042 6899 | ) {
|
7043 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6900 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7044 6901 | }
|
7045 6902 | crate::protocol_serde::shape_response_code_http_fallback::de_response_code_http_fallback_http_request(request)
|
7046 6903 | .await
|
7047 6904 | };
|
7048 6905 | use ::futures_util::future::TryFutureExt;
|
7049 - | let fut = fut.map_err(
|
7050 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7051 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7052 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
7053 - | e,
|
7054 - | )
|
7055 - | },
|
7056 - | );
|
6906 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
6907 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
6908 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
6909 + | });
|
7057 6910 | ResponseCodeHttpFallbackInputFuture {
|
7058 6911 | inner: Box::pin(fut),
|
7059 6912 | }
|
7060 6913 | }
|
7061 6914 | }
|
7062 6915 | impl
|
7063 - | ::aws_smithy_http_server::response::IntoResponse<
|
7064 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6916 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6917 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7065 6918 | > for crate::output::ResponseCodeHttpFallbackOutput
|
7066 6919 | {
|
7067 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6920 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7068 6921 | match crate::protocol_serde::shape_response_code_http_fallback::ser_response_code_http_fallback_http_response(self) {
|
7069 6922 | Ok(response) => response,
|
7070 6923 | Err(e) => {
|
7071 6924 | ::tracing::error!(error = %e, "failed to serialize response");
|
7072 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6925 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7073 6926 | }
|
7074 6927 | }
|
7075 6928 | }
|
7076 6929 | }
|
7077 6930 | impl
|
7078 - | ::aws_smithy_http_server::response::IntoResponse<
|
7079 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6931 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
6932 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7080 6933 | > for crate::error::ResponseCodeHttpFallbackError
|
7081 6934 | {
|
7082 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
6935 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7083 6936 | match crate::protocol_serde::shape_response_code_http_fallback::ser_response_code_http_fallback_http_error(&self) {
|
7084 6937 | Ok(mut response) => {
|
7085 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
6938 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
7086 6939 | response
|
7087 6940 | },
|
7088 6941 | Err(e) => {
|
7089 6942 | ::tracing::error!(error = %e, "failed to serialize response");
|
7090 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
6943 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7091 6944 | }
|
7092 6945 | }
|
7093 6946 | }
|
7094 6947 | }
|
7095 6948 |
|
7096 6949 | ::pin_project_lite::pin_project! {
|
7097 6950 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
7098 6951 | /// [`ResponseCodeRequiredInput`](crate::input::ResponseCodeRequiredInput) using modelled bindings.
|
7099 6952 | pub struct ResponseCodeRequiredInputFuture {
|
7100 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeRequiredInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6953 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeRequiredInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7101 6954 | }
|
7102 6955 | }
|
7103 6956 |
|
7104 6957 | impl std::future::Future for ResponseCodeRequiredInputFuture {
|
7105 6958 | type Output = Result<
|
7106 6959 | crate::input::ResponseCodeRequiredInput,
|
7107 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
6960 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7108 6961 | >;
|
7109 6962 |
|
7110 6963 | fn poll(
|
7111 6964 | self: std::pin::Pin<&mut Self>,
|
7112 6965 | cx: &mut std::task::Context<'_>,
|
7113 6966 | ) -> std::task::Poll<Self::Output> {
|
7114 6967 | let this = self.project();
|
7115 6968 | this.inner.as_mut().poll(cx)
|
7116 6969 | }
|
7117 6970 | }
|
7118 6971 |
|
7119 6972 | impl<B>
|
7120 - | ::aws_smithy_http_server::request::FromRequest<
|
7121 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
6973 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
6974 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7122 6975 | B,
|
7123 6976 | > for crate::input::ResponseCodeRequiredInput
|
7124 6977 | where
|
7125 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
6978 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
7126 6979 | B: 'static,
|
7127 6980 |
|
7128 6981 | B::Data: Send,
|
7129 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7130 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
6982 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
6983 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
7131 6984 | {
|
7132 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
6985 + | type Rejection =
|
6986 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7133 6987 | type Future = ResponseCodeRequiredInputFuture;
|
7134 6988 |
|
7135 6989 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
7136 6990 | let fut = async move {
|
7137 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
6991 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
7138 6992 | request.headers(),
|
7139 6993 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
7140 6994 | ) {
|
7141 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
6995 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7142 6996 | }
|
7143 6997 | crate::protocol_serde::shape_response_code_required::de_response_code_required_http_request(request)
|
7144 6998 | .await
|
7145 6999 | };
|
7146 7000 | use ::futures_util::future::TryFutureExt;
|
7147 - | let fut = fut.map_err(
|
7148 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7149 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7150 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
7151 - | e,
|
7152 - | )
|
7153 - | },
|
7154 - | );
|
7001 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7002 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7003 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
7004 + | });
|
7155 7005 | ResponseCodeRequiredInputFuture {
|
7156 7006 | inner: Box::pin(fut),
|
7157 7007 | }
|
7158 7008 | }
|
7159 7009 | }
|
7160 7010 | impl
|
7161 - | ::aws_smithy_http_server::response::IntoResponse<
|
7162 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7011 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7012 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7163 7013 | > for crate::output::ResponseCodeRequiredOutput
|
7164 7014 | {
|
7165 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7015 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7166 7016 | match crate::protocol_serde::shape_response_code_required::ser_response_code_required_http_response(self) {
|
7167 7017 | Ok(response) => response,
|
7168 7018 | Err(e) => {
|
7169 7019 | ::tracing::error!(error = %e, "failed to serialize response");
|
7170 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7020 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7171 7021 | }
|
7172 7022 | }
|
7173 7023 | }
|
7174 7024 | }
|
7175 7025 | impl
|
7176 - | ::aws_smithy_http_server::response::IntoResponse<
|
7177 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7026 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7027 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7178 7028 | > for crate::error::ResponseCodeRequiredError
|
7179 7029 | {
|
7180 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7030 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7181 7031 | match crate::protocol_serde::shape_response_code_required::ser_response_code_required_http_error(&self) {
|
7182 7032 | Ok(mut response) => {
|
7183 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
7033 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
7184 7034 | response
|
7185 7035 | },
|
7186 7036 | Err(e) => {
|
7187 7037 | ::tracing::error!(error = %e, "failed to serialize response");
|
7188 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7038 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7189 7039 | }
|
7190 7040 | }
|
7191 7041 | }
|
7192 7042 | }
|
7193 7043 |
|
7194 7044 | ::pin_project_lite::pin_project! {
|
7195 7045 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
7196 7046 | /// [`HttpResponseCodeInput`](crate::input::HttpResponseCodeInput) using modelled bindings.
|
7197 7047 | pub struct HttpResponseCodeInputFuture {
|
7198 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpResponseCodeInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7048 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpResponseCodeInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7199 7049 | }
|
7200 7050 | }
|
7201 7051 |
|
7202 7052 | impl std::future::Future for HttpResponseCodeInputFuture {
|
7203 7053 | type Output = Result<
|
7204 7054 | crate::input::HttpResponseCodeInput,
|
7205 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7055 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7206 7056 | >;
|
7207 7057 |
|
7208 7058 | fn poll(
|
7209 7059 | self: std::pin::Pin<&mut Self>,
|
7210 7060 | cx: &mut std::task::Context<'_>,
|
7211 7061 | ) -> std::task::Poll<Self::Output> {
|
7212 7062 | let this = self.project();
|
7213 7063 | this.inner.as_mut().poll(cx)
|
7214 7064 | }
|
7215 7065 | }
|
7216 7066 |
|
7217 7067 | impl<B>
|
7218 - | ::aws_smithy_http_server::request::FromRequest<
|
7219 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7068 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
7069 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7220 7070 | B,
|
7221 7071 | > for crate::input::HttpResponseCodeInput
|
7222 7072 | where
|
7223 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
7073 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
7224 7074 | B: 'static,
|
7225 7075 |
|
7226 7076 | B::Data: Send,
|
7227 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7228 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
7077 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7078 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
7229 7079 | {
|
7230 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7080 + | type Rejection =
|
7081 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7231 7082 | type Future = HttpResponseCodeInputFuture;
|
7232 7083 |
|
7233 7084 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
7234 7085 | let fut = async move {
|
7235 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
7086 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
7236 7087 | request.headers(),
|
7237 7088 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
7238 7089 | ) {
|
7239 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7090 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7240 7091 | }
|
7241 7092 | crate::protocol_serde::shape_http_response_code::de_http_response_code_http_request(
|
7242 7093 | request,
|
7243 7094 | )
|
7244 7095 | .await
|
7245 7096 | };
|
7246 7097 | use ::futures_util::future::TryFutureExt;
|
7247 - | let fut = fut.map_err(
|
7248 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7249 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7250 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
7251 - | e,
|
7252 - | )
|
7253 - | },
|
7254 - | );
|
7098 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7099 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7100 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
7101 + | });
|
7255 7102 | HttpResponseCodeInputFuture {
|
7256 7103 | inner: Box::pin(fut),
|
7257 7104 | }
|
7258 7105 | }
|
7259 7106 | }
|
7260 7107 | impl
|
7261 - | ::aws_smithy_http_server::response::IntoResponse<
|
7262 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7108 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7109 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7263 7110 | > for crate::output::HttpResponseCodeOutput
|
7264 7111 | {
|
7265 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7112 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7266 7113 | match crate::protocol_serde::shape_http_response_code::ser_http_response_code_http_response(
|
7267 7114 | self,
|
7268 7115 | ) {
|
7269 7116 | Ok(response) => response,
|
7270 7117 | Err(e) => {
|
7271 7118 | ::tracing::error!(error = %e, "failed to serialize response");
|
7272 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7119 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7273 7120 | }
|
7274 7121 | }
|
7275 7122 | }
|
7276 7123 | }
|
7277 7124 | impl
|
7278 - | ::aws_smithy_http_server::response::IntoResponse<
|
7279 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7125 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7126 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7280 7127 | > for crate::error::HttpResponseCodeError
|
7281 7128 | {
|
7282 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7129 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7283 7130 | match crate::protocol_serde::shape_http_response_code::ser_http_response_code_http_error(
|
7284 7131 | &self,
|
7285 7132 | ) {
|
7286 7133 | Ok(mut response) => {
|
7287 7134 | response.extensions_mut().insert(
|
7288 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
7135 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
7136 + | self.name(),
|
7137 + | ),
|
7289 7138 | );
|
7290 7139 | response
|
7291 7140 | }
|
7292 7141 | Err(e) => {
|
7293 7142 | ::tracing::error!(error = %e, "failed to serialize response");
|
7294 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7143 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7295 7144 | }
|
7296 7145 | }
|
7297 7146 | }
|
7298 7147 | }
|
7299 7148 |
|
7300 7149 | ::pin_project_lite::pin_project! {
|
7301 7150 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
7302 7151 | /// [`HttpPayloadWithUnionInput`](crate::input::HttpPayloadWithUnionInput) using modelled bindings.
|
7303 7152 | pub struct HttpPayloadWithUnionInputFuture {
|
7304 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpPayloadWithUnionInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7153 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpPayloadWithUnionInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7305 7154 | }
|
7306 7155 | }
|
7307 7156 |
|
7308 7157 | impl std::future::Future for HttpPayloadWithUnionInputFuture {
|
7309 7158 | type Output = Result<
|
7310 7159 | crate::input::HttpPayloadWithUnionInput,
|
7311 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7160 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7312 7161 | >;
|
7313 7162 |
|
7314 7163 | fn poll(
|
7315 7164 | self: std::pin::Pin<&mut Self>,
|
7316 7165 | cx: &mut std::task::Context<'_>,
|
7317 7166 | ) -> std::task::Poll<Self::Output> {
|
7318 7167 | let this = self.project();
|
7319 7168 | this.inner.as_mut().poll(cx)
|
7320 7169 | }
|
7321 7170 | }
|
7322 7171 |
|
7323 7172 | impl<B>
|
7324 - | ::aws_smithy_http_server::request::FromRequest<
|
7325 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7173 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
7174 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7326 7175 | B,
|
7327 7176 | > for crate::input::HttpPayloadWithUnionInput
|
7328 7177 | where
|
7329 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
7178 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
7330 7179 | B: 'static,
|
7331 7180 |
|
7332 7181 | B::Data: Send,
|
7333 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7334 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
7182 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7183 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
7335 7184 | {
|
7336 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7185 + | type Rejection =
|
7186 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7337 7187 | type Future = HttpPayloadWithUnionInputFuture;
|
7338 7188 |
|
7339 7189 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
7340 7190 | let fut = async move {
|
7341 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
7191 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
7342 7192 | request.headers(),
|
7343 7193 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
7344 7194 | ) {
|
7345 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7195 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7346 7196 | }
|
7347 7197 | crate::protocol_serde::shape_http_payload_with_union::de_http_payload_with_union_http_request(request)
|
7348 7198 | .await
|
7349 7199 | };
|
7350 7200 | use ::futures_util::future::TryFutureExt;
|
7351 - | let fut = fut.map_err(
|
7352 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7353 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7354 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
7355 - | e,
|
7356 - | )
|
7357 - | },
|
7358 - | );
|
7201 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7202 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7203 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
7204 + | });
|
7359 7205 | HttpPayloadWithUnionInputFuture {
|
7360 7206 | inner: Box::pin(fut),
|
7361 7207 | }
|
7362 7208 | }
|
7363 7209 | }
|
7364 7210 | impl
|
7365 - | ::aws_smithy_http_server::response::IntoResponse<
|
7366 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7211 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7212 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7367 7213 | > for crate::output::HttpPayloadWithUnionOutput
|
7368 7214 | {
|
7369 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7215 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7370 7216 | match crate::protocol_serde::shape_http_payload_with_union::ser_http_payload_with_union_http_response(self) {
|
7371 7217 | Ok(response) => response,
|
7372 7218 | Err(e) => {
|
7373 7219 | ::tracing::error!(error = %e, "failed to serialize response");
|
7374 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7220 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7375 7221 | }
|
7376 7222 | }
|
7377 7223 | }
|
7378 7224 | }
|
7379 7225 | impl
|
7380 - | ::aws_smithy_http_server::response::IntoResponse<
|
7381 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7226 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7227 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7382 7228 | > for crate::error::HttpPayloadWithUnionError
|
7383 7229 | {
|
7384 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7230 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7385 7231 | match crate::protocol_serde::shape_http_payload_with_union::ser_http_payload_with_union_http_error(&self) {
|
7386 7232 | Ok(mut response) => {
|
7387 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
7233 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
7388 7234 | response
|
7389 7235 | },
|
7390 7236 | Err(e) => {
|
7391 7237 | ::tracing::error!(error = %e, "failed to serialize response");
|
7392 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7238 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7393 7239 | }
|
7394 7240 | }
|
7395 7241 | }
|
7396 7242 | }
|
7397 7243 |
|
7398 7244 | ::pin_project_lite::pin_project! {
|
7399 7245 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
7400 7246 | /// [`HttpStringPayloadInput`](crate::input::HttpStringPayloadInput) using modelled bindings.
|
7401 7247 | pub struct HttpStringPayloadInputFuture {
|
7402 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpStringPayloadInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7248 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpStringPayloadInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7403 7249 | }
|
7404 7250 | }
|
7405 7251 |
|
7406 7252 | impl std::future::Future for HttpStringPayloadInputFuture {
|
7407 7253 | type Output = Result<
|
7408 7254 | crate::input::HttpStringPayloadInput,
|
7409 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7255 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7410 7256 | >;
|
7411 7257 |
|
7412 7258 | fn poll(
|
7413 7259 | self: std::pin::Pin<&mut Self>,
|
7414 7260 | cx: &mut std::task::Context<'_>,
|
7415 7261 | ) -> std::task::Poll<Self::Output> {
|
7416 7262 | let this = self.project();
|
7417 7263 | this.inner.as_mut().poll(cx)
|
7418 7264 | }
|
7419 7265 | }
|
7420 7266 |
|
7421 7267 | impl<B>
|
7422 - | ::aws_smithy_http_server::request::FromRequest<
|
7423 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7268 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
7269 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7424 7270 | B,
|
7425 7271 | > for crate::input::HttpStringPayloadInput
|
7426 7272 | where
|
7427 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
7273 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
7428 7274 | B: 'static,
|
7429 7275 |
|
7430 7276 | B::Data: Send,
|
7431 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7432 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
7277 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7278 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
7433 7279 | {
|
7434 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7280 + | type Rejection =
|
7281 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7435 7282 | type Future = HttpStringPayloadInputFuture;
|
7436 7283 |
|
7437 7284 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
7438 7285 | let fut = async move {
|
7439 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
7286 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
7440 7287 | request.headers(),
|
7441 7288 | &crate::mimes::CONTENT_TYPE_TEXT_PLAIN,
|
7442 7289 | ) {
|
7443 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7290 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7444 7291 | }
|
7445 7292 | crate::protocol_serde::shape_http_string_payload::de_http_string_payload_http_request(
|
7446 7293 | request,
|
7447 7294 | )
|
7448 7295 | .await
|
7449 7296 | };
|
7450 7297 | use ::futures_util::future::TryFutureExt;
|
7451 - | let fut = fut.map_err(
|
7452 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7453 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7454 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
7455 - | e,
|
7456 - | )
|
7457 - | },
|
7458 - | );
|
7298 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7299 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7300 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
7301 + | });
|
7459 7302 | HttpStringPayloadInputFuture {
|
7460 7303 | inner: Box::pin(fut),
|
7461 7304 | }
|
7462 7305 | }
|
7463 7306 | }
|
7464 7307 | impl
|
7465 - | ::aws_smithy_http_server::response::IntoResponse<
|
7466 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7308 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7309 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7467 7310 | > for crate::output::HttpStringPayloadOutput
|
7468 7311 | {
|
7469 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7312 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7470 7313 | match crate::protocol_serde::shape_http_string_payload::ser_http_string_payload_http_response(self) {
|
7471 7314 | Ok(response) => response,
|
7472 7315 | Err(e) => {
|
7473 7316 | ::tracing::error!(error = %e, "failed to serialize response");
|
7474 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7317 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7475 7318 | }
|
7476 7319 | }
|
7477 7320 | }
|
7478 7321 | }
|
7479 7322 | impl
|
7480 - | ::aws_smithy_http_server::response::IntoResponse<
|
7481 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7323 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7324 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7482 7325 | > for crate::error::HttpStringPayloadError
|
7483 7326 | {
|
7484 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7327 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7485 7328 | match crate::protocol_serde::shape_http_string_payload::ser_http_string_payload_http_error(
|
7486 7329 | &self,
|
7487 7330 | ) {
|
7488 7331 | Ok(mut response) => {
|
7489 7332 | response.extensions_mut().insert(
|
7490 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
7333 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
7334 + | self.name(),
|
7335 + | ),
|
7491 7336 | );
|
7492 7337 | response
|
7493 7338 | }
|
7494 7339 | Err(e) => {
|
7495 7340 | ::tracing::error!(error = %e, "failed to serialize response");
|
7496 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7341 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7497 7342 | }
|
7498 7343 | }
|
7499 7344 | }
|
7500 7345 | }
|
7501 7346 |
|
7502 7347 | ::pin_project_lite::pin_project! {
|
7503 7348 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
7504 7349 | /// [`HttpEnumPayloadInput`](crate::input::HttpEnumPayloadInput) using modelled bindings.
|
7505 7350 | pub struct HttpEnumPayloadInputFuture {
|
7506 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpEnumPayloadInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7351 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpEnumPayloadInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7507 7352 | }
|
7508 7353 | }
|
7509 7354 |
|
7510 7355 | impl std::future::Future for HttpEnumPayloadInputFuture {
|
7511 7356 | type Output = Result<
|
7512 7357 | crate::input::HttpEnumPayloadInput,
|
7513 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7358 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7514 7359 | >;
|
7515 7360 |
|
7516 7361 | fn poll(
|
7517 7362 | self: std::pin::Pin<&mut Self>,
|
7518 7363 | cx: &mut std::task::Context<'_>,
|
7519 7364 | ) -> std::task::Poll<Self::Output> {
|
7520 7365 | let this = self.project();
|
7521 7366 | this.inner.as_mut().poll(cx)
|
7522 7367 | }
|
7523 7368 | }
|
7524 7369 |
|
7525 7370 | impl<B>
|
7526 - | ::aws_smithy_http_server::request::FromRequest<
|
7527 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7371 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
7372 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7528 7373 | B,
|
7529 7374 | > for crate::input::HttpEnumPayloadInput
|
7530 7375 | where
|
7531 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
7376 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
7532 7377 | B: 'static,
|
7533 7378 |
|
7534 7379 | B::Data: Send,
|
7535 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7536 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
7380 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7381 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
7537 7382 | {
|
7538 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7383 + | type Rejection =
|
7384 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7539 7385 | type Future = HttpEnumPayloadInputFuture;
|
7540 7386 |
|
7541 7387 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
7542 7388 | let fut = async move {
|
7543 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
7389 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
7544 7390 | request.headers(),
|
7545 7391 | &crate::mimes::CONTENT_TYPE_TEXT_PLAIN,
|
7546 7392 | ) {
|
7547 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7393 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7548 7394 | }
|
7549 7395 | crate::protocol_serde::shape_http_enum_payload::de_http_enum_payload_http_request(
|
7550 7396 | request,
|
7551 7397 | )
|
7552 7398 | .await
|
7553 7399 | };
|
7554 7400 | use ::futures_util::future::TryFutureExt;
|
7555 - | let fut = fut.map_err(
|
7556 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7557 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7558 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
7559 - | e,
|
7560 - | )
|
7561 - | },
|
7562 - | );
|
7401 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7402 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7403 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
7404 + | });
|
7563 7405 | HttpEnumPayloadInputFuture {
|
7564 7406 | inner: Box::pin(fut),
|
7565 7407 | }
|
7566 7408 | }
|
7567 7409 | }
|
7568 7410 | impl
|
7569 - | ::aws_smithy_http_server::response::IntoResponse<
|
7570 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7411 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7412 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7571 7413 | > for crate::output::HttpEnumPayloadOutput
|
7572 7414 | {
|
7573 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7415 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7574 7416 | match crate::protocol_serde::shape_http_enum_payload::ser_http_enum_payload_http_response(
|
7575 7417 | self,
|
7576 7418 | ) {
|
7577 7419 | Ok(response) => response,
|
7578 7420 | Err(e) => {
|
7579 7421 | ::tracing::error!(error = %e, "failed to serialize response");
|
7580 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7422 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7581 7423 | }
|
7582 7424 | }
|
7583 7425 | }
|
7584 7426 | }
|
7585 7427 | impl
|
7586 - | ::aws_smithy_http_server::response::IntoResponse<
|
7587 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7428 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7429 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7588 7430 | > for crate::error::HttpEnumPayloadError
|
7589 7431 | {
|
7590 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7432 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7591 7433 | match crate::protocol_serde::shape_http_enum_payload::ser_http_enum_payload_http_error(
|
7592 7434 | &self,
|
7593 7435 | ) {
|
7594 7436 | Ok(mut response) => {
|
7595 7437 | response.extensions_mut().insert(
|
7596 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
7438 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
7439 + | self.name(),
|
7440 + | ),
|
7597 7441 | );
|
7598 7442 | response
|
7599 7443 | }
|
7600 7444 | Err(e) => {
|
7601 7445 | ::tracing::error!(error = %e, "failed to serialize response");
|
7602 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7446 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7603 7447 | }
|
7604 7448 | }
|
7605 7449 | }
|
7606 7450 | }
|
7607 7451 |
|
7608 7452 | ::pin_project_lite::pin_project! {
|
7609 7453 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
7610 7454 | /// [`HttpPayloadWithStructureInput`](crate::input::HttpPayloadWithStructureInput) using modelled bindings.
|
7611 7455 | pub struct HttpPayloadWithStructureInputFuture {
|
7612 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpPayloadWithStructureInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7456 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpPayloadWithStructureInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7613 7457 | }
|
7614 7458 | }
|
7615 7459 |
|
7616 7460 | impl std::future::Future for HttpPayloadWithStructureInputFuture {
|
7617 7461 | type Output = Result<
|
7618 7462 | crate::input::HttpPayloadWithStructureInput,
|
7619 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7463 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7620 7464 | >;
|
7621 7465 |
|
7622 7466 | fn poll(
|
7623 7467 | self: std::pin::Pin<&mut Self>,
|
7624 7468 | cx: &mut std::task::Context<'_>,
|
7625 7469 | ) -> std::task::Poll<Self::Output> {
|
7626 7470 | let this = self.project();
|
7627 7471 | this.inner.as_mut().poll(cx)
|
7628 7472 | }
|
7629 7473 | }
|
7630 7474 |
|
7631 7475 | impl<B>
|
7632 - | ::aws_smithy_http_server::request::FromRequest<
|
7633 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7476 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
7477 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7634 7478 | B,
|
7635 7479 | > for crate::input::HttpPayloadWithStructureInput
|
7636 7480 | where
|
7637 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
7481 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
7638 7482 | B: 'static,
|
7639 7483 |
|
7640 7484 | B::Data: Send,
|
7641 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7642 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
7485 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7486 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
7643 7487 | {
|
7644 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7488 + | type Rejection =
|
7489 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7645 7490 | type Future = HttpPayloadWithStructureInputFuture;
|
7646 7491 |
|
7647 7492 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
7648 7493 | let fut = async move {
|
7649 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
7494 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
7650 7495 | request.headers(),
|
7651 7496 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
7652 7497 | ) {
|
7653 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7498 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7654 7499 | }
|
7655 7500 | crate::protocol_serde::shape_http_payload_with_structure::de_http_payload_with_structure_http_request(request)
|
7656 7501 | .await
|
7657 7502 | };
|
7658 7503 | use ::futures_util::future::TryFutureExt;
|
7659 - | let fut = fut.map_err(
|
7660 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7661 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7662 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
7663 - | e,
|
7664 - | )
|
7665 - | },
|
7666 - | );
|
7504 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7505 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7506 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
7507 + | });
|
7667 7508 | HttpPayloadWithStructureInputFuture {
|
7668 7509 | inner: Box::pin(fut),
|
7669 7510 | }
|
7670 7511 | }
|
7671 7512 | }
|
7672 7513 | impl
|
7673 - | ::aws_smithy_http_server::response::IntoResponse<
|
7674 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7514 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7515 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7675 7516 | > for crate::output::HttpPayloadWithStructureOutput
|
7676 7517 | {
|
7677 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7518 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7678 7519 | match crate::protocol_serde::shape_http_payload_with_structure::ser_http_payload_with_structure_http_response(self) {
|
7679 7520 | Ok(response) => response,
|
7680 7521 | Err(e) => {
|
7681 7522 | ::tracing::error!(error = %e, "failed to serialize response");
|
7682 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7523 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7683 7524 | }
|
7684 7525 | }
|
7685 7526 | }
|
7686 7527 | }
|
7687 7528 | impl
|
7688 - | ::aws_smithy_http_server::response::IntoResponse<
|
7689 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7529 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7530 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7690 7531 | > for crate::error::HttpPayloadWithStructureError
|
7691 7532 | {
|
7692 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7533 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7693 7534 | match crate::protocol_serde::shape_http_payload_with_structure::ser_http_payload_with_structure_http_error(&self) {
|
7694 7535 | Ok(mut response) => {
|
7695 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
7536 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
7696 7537 | response
|
7697 7538 | },
|
7698 7539 | Err(e) => {
|
7699 7540 | ::tracing::error!(error = %e, "failed to serialize response");
|
7700 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7541 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7701 7542 | }
|
7702 7543 | }
|
7703 7544 | }
|
7704 7545 | }
|
7705 7546 |
|
7706 7547 | ::pin_project_lite::pin_project! {
|
7707 7548 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
7708 7549 | /// [`HttpPayloadTraitsWithMediaTypeInput`](crate::input::HttpPayloadTraitsWithMediaTypeInput) using modelled bindings.
|
7709 7550 | pub struct HttpPayloadTraitsWithMediaTypeInputFuture {
|
7710 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpPayloadTraitsWithMediaTypeInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7551 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpPayloadTraitsWithMediaTypeInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7711 7552 | }
|
7712 7553 | }
|
7713 7554 |
|
7714 7555 | impl std::future::Future for HttpPayloadTraitsWithMediaTypeInputFuture {
|
7715 7556 | type Output = Result<
|
7716 7557 | crate::input::HttpPayloadTraitsWithMediaTypeInput,
|
7717 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7558 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7718 7559 | >;
|
7719 7560 |
|
7720 7561 | fn poll(
|
7721 7562 | self: std::pin::Pin<&mut Self>,
|
7722 7563 | cx: &mut std::task::Context<'_>,
|
7723 7564 | ) -> std::task::Poll<Self::Output> {
|
7724 7565 | let this = self.project();
|
7725 7566 | this.inner.as_mut().poll(cx)
|
7726 7567 | }
|
7727 7568 | }
|
7728 7569 |
|
7729 7570 | impl<B>
|
7730 - | ::aws_smithy_http_server::request::FromRequest<
|
7731 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7571 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
7572 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7732 7573 | B,
|
7733 7574 | > for crate::input::HttpPayloadTraitsWithMediaTypeInput
|
7734 7575 | where
|
7735 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
7576 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
7736 7577 | B: 'static,
|
7737 7578 |
|
7738 7579 | B::Data: Send,
|
7739 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7740 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
7580 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7581 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
7741 7582 | {
|
7742 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7583 + | type Rejection =
|
7584 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7743 7585 | type Future = HttpPayloadTraitsWithMediaTypeInputFuture;
|
7744 7586 |
|
7745 7587 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
7746 7588 | let fut = async move {
|
7747 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
7589 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
7748 7590 | request.headers(),
|
7749 7591 | &crate::mimes::CONTENT_TYPE_TEXT_PLAIN,
|
7750 7592 | ) {
|
7751 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7593 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7752 7594 | }
|
7753 7595 | crate::protocol_serde::shape_http_payload_traits_with_media_type::de_http_payload_traits_with_media_type_http_request(request)
|
7754 7596 | .await
|
7755 7597 | };
|
7756 7598 | use ::futures_util::future::TryFutureExt;
|
7757 - | let fut = fut.map_err(
|
7758 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7759 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7760 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
7761 - | e,
|
7762 - | )
|
7763 - | },
|
7764 - | );
|
7599 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7600 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7601 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
7602 + | });
|
7765 7603 | HttpPayloadTraitsWithMediaTypeInputFuture {
|
7766 7604 | inner: Box::pin(fut),
|
7767 7605 | }
|
7768 7606 | }
|
7769 7607 | }
|
7770 7608 | impl
|
7771 - | ::aws_smithy_http_server::response::IntoResponse<
|
7772 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7609 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7610 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7773 7611 | > for crate::output::HttpPayloadTraitsWithMediaTypeOutput
|
7774 7612 | {
|
7775 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7613 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7776 7614 | match crate::protocol_serde::shape_http_payload_traits_with_media_type::ser_http_payload_traits_with_media_type_http_response(self) {
|
7777 7615 | Ok(response) => response,
|
7778 7616 | Err(e) => {
|
7779 7617 | ::tracing::error!(error = %e, "failed to serialize response");
|
7780 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7618 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7781 7619 | }
|
7782 7620 | }
|
7783 7621 | }
|
7784 7622 | }
|
7785 7623 | impl
|
7786 - | ::aws_smithy_http_server::response::IntoResponse<
|
7787 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7624 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7625 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7788 7626 | > for crate::error::HttpPayloadTraitsWithMediaTypeError
|
7789 7627 | {
|
7790 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7628 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7791 7629 | match crate::protocol_serde::shape_http_payload_traits_with_media_type::ser_http_payload_traits_with_media_type_http_error(&self) {
|
7792 7630 | Ok(mut response) => {
|
7793 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
7631 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
7794 7632 | response
|
7795 7633 | },
|
7796 7634 | Err(e) => {
|
7797 7635 | ::tracing::error!(error = %e, "failed to serialize response");
|
7798 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7636 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7799 7637 | }
|
7800 7638 | }
|
7801 7639 | }
|
7802 7640 | }
|
7803 7641 |
|
7804 7642 | ::pin_project_lite::pin_project! {
|
7805 7643 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
7806 7644 | /// [`HttpPayloadTraitsInput`](crate::input::HttpPayloadTraitsInput) using modelled bindings.
|
7807 7645 | pub struct HttpPayloadTraitsInputFuture {
|
7808 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpPayloadTraitsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7646 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpPayloadTraitsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7809 7647 | }
|
7810 7648 | }
|
7811 7649 |
|
7812 7650 | impl std::future::Future for HttpPayloadTraitsInputFuture {
|
7813 7651 | type Output = Result<
|
7814 7652 | crate::input::HttpPayloadTraitsInput,
|
7815 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7653 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7816 7654 | >;
|
7817 7655 |
|
7818 7656 | fn poll(
|
7819 7657 | self: std::pin::Pin<&mut Self>,
|
7820 7658 | cx: &mut std::task::Context<'_>,
|
7821 7659 | ) -> std::task::Poll<Self::Output> {
|
7822 7660 | let this = self.project();
|
7823 7661 | this.inner.as_mut().poll(cx)
|
7824 7662 | }
|
7825 7663 | }
|
7826 7664 |
|
7827 7665 | impl<B>
|
7828 - | ::aws_smithy_http_server::request::FromRequest<
|
7829 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7666 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
7667 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7830 7668 | B,
|
7831 7669 | > for crate::input::HttpPayloadTraitsInput
|
7832 7670 | where
|
7833 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
7671 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
7834 7672 | B: 'static,
|
7835 7673 |
|
7836 7674 | B::Data: Send,
|
7837 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7838 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
7675 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7676 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
7839 7677 | {
|
7840 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7678 + | type Rejection =
|
7679 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7841 7680 | type Future = HttpPayloadTraitsInputFuture;
|
7842 7681 |
|
7843 7682 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
7844 7683 | let fut = async move {
|
7845 7684 | crate::protocol_serde::shape_http_payload_traits::de_http_payload_traits_http_request(
|
7846 7685 | request,
|
7847 7686 | )
|
7848 7687 | .await
|
7849 7688 | };
|
7850 7689 | use ::futures_util::future::TryFutureExt;
|
7851 - | let fut = fut.map_err(
|
7852 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7853 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7854 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
7855 - | e,
|
7856 - | )
|
7857 - | },
|
7858 - | );
|
7690 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7691 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7692 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
7693 + | });
|
7859 7694 | HttpPayloadTraitsInputFuture {
|
7860 7695 | inner: Box::pin(fut),
|
7861 7696 | }
|
7862 7697 | }
|
7863 7698 | }
|
7864 7699 | impl
|
7865 - | ::aws_smithy_http_server::response::IntoResponse<
|
7866 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7700 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7701 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7867 7702 | > for crate::output::HttpPayloadTraitsOutput
|
7868 7703 | {
|
7869 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7704 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7870 7705 | match crate::protocol_serde::shape_http_payload_traits::ser_http_payload_traits_http_response(self) {
|
7871 7706 | Ok(response) => response,
|
7872 7707 | Err(e) => {
|
7873 7708 | ::tracing::error!(error = %e, "failed to serialize response");
|
7874 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7709 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7875 7710 | }
|
7876 7711 | }
|
7877 7712 | }
|
7878 7713 | }
|
7879 7714 | impl
|
7880 - | ::aws_smithy_http_server::response::IntoResponse<
|
7881 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7715 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7716 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7882 7717 | > for crate::error::HttpPayloadTraitsError
|
7883 7718 | {
|
7884 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7719 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7885 7720 | match crate::protocol_serde::shape_http_payload_traits::ser_http_payload_traits_http_error(
|
7886 7721 | &self,
|
7887 7722 | ) {
|
7888 7723 | Ok(mut response) => {
|
7889 7724 | response.extensions_mut().insert(
|
7890 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
7725 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
7726 + | self.name(),
|
7727 + | ),
|
7891 7728 | );
|
7892 7729 | response
|
7893 7730 | }
|
7894 7731 | Err(e) => {
|
7895 7732 | ::tracing::error!(error = %e, "failed to serialize response");
|
7896 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7733 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7897 7734 | }
|
7898 7735 | }
|
7899 7736 | }
|
7900 7737 | }
|
7901 7738 |
|
7902 7739 | ::pin_project_lite::pin_project! {
|
7903 7740 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
7904 7741 | /// [`HttpEmptyPrefixHeadersInput`](crate::input::HttpEmptyPrefixHeadersInput) using modelled bindings.
|
7905 7742 | pub struct HttpEmptyPrefixHeadersInputFuture {
|
7906 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpEmptyPrefixHeadersInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7743 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpEmptyPrefixHeadersInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7907 7744 | }
|
7908 7745 | }
|
7909 7746 |
|
7910 7747 | impl std::future::Future for HttpEmptyPrefixHeadersInputFuture {
|
7911 7748 | type Output = Result<
|
7912 7749 | crate::input::HttpEmptyPrefixHeadersInput,
|
7913 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7750 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7914 7751 | >;
|
7915 7752 |
|
7916 7753 | fn poll(
|
7917 7754 | self: std::pin::Pin<&mut Self>,
|
7918 7755 | cx: &mut std::task::Context<'_>,
|
7919 7756 | ) -> std::task::Poll<Self::Output> {
|
7920 7757 | let this = self.project();
|
7921 7758 | this.inner.as_mut().poll(cx)
|
7922 7759 | }
|
7923 7760 | }
|
7924 7761 |
|
7925 7762 | impl<B>
|
7926 - | ::aws_smithy_http_server::request::FromRequest<
|
7927 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7763 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
7764 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7928 7765 | B,
|
7929 7766 | > for crate::input::HttpEmptyPrefixHeadersInput
|
7930 7767 | where
|
7931 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
7768 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
7932 7769 | B: 'static,
|
7933 7770 |
|
7934 7771 | B::Data: Send,
|
7935 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7936 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
7772 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7773 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
7937 7774 | {
|
7938 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7775 + | type Rejection =
|
7776 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7939 7777 | type Future = HttpEmptyPrefixHeadersInputFuture;
|
7940 7778 |
|
7941 7779 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
7942 7780 | let fut = async move {
|
7943 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
7781 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
7944 7782 | request.headers(),
|
7945 7783 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
7946 7784 | ) {
|
7947 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7785 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7948 7786 | }
|
7949 7787 | crate::protocol_serde::shape_http_empty_prefix_headers::de_http_empty_prefix_headers_http_request(request)
|
7950 7788 | .await
|
7951 7789 | };
|
7952 7790 | use ::futures_util::future::TryFutureExt;
|
7953 - | let fut = fut.map_err(
|
7954 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7955 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7956 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
7957 - | e,
|
7958 - | )
|
7959 - | },
|
7960 - | );
|
7791 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7792 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7793 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
7794 + | });
|
7961 7795 | HttpEmptyPrefixHeadersInputFuture {
|
7962 7796 | inner: Box::pin(fut),
|
7963 7797 | }
|
7964 7798 | }
|
7965 7799 | }
|
7966 7800 | impl
|
7967 - | ::aws_smithy_http_server::response::IntoResponse<
|
7968 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7801 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7802 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7969 7803 | > for crate::output::HttpEmptyPrefixHeadersOutput
|
7970 7804 | {
|
7971 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7805 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7972 7806 | match crate::protocol_serde::shape_http_empty_prefix_headers::ser_http_empty_prefix_headers_http_response(self) {
|
7973 7807 | Ok(response) => response,
|
7974 7808 | Err(e) => {
|
7975 7809 | ::tracing::error!(error = %e, "failed to serialize response");
|
7976 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7810 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7977 7811 | }
|
7978 7812 | }
|
7979 7813 | }
|
7980 7814 | }
|
7981 7815 | impl
|
7982 - | ::aws_smithy_http_server::response::IntoResponse<
|
7983 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7816 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7817 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
7984 7818 | > for crate::error::HttpEmptyPrefixHeadersError
|
7985 7819 | {
|
7986 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7820 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
7987 7821 | match crate::protocol_serde::shape_http_empty_prefix_headers::ser_http_empty_prefix_headers_http_error(&self) {
|
7988 7822 | Ok(mut response) => {
|
7989 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
7823 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
7990 7824 | response
|
7991 7825 | },
|
7992 7826 | Err(e) => {
|
7993 7827 | ::tracing::error!(error = %e, "failed to serialize response");
|
7994 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7828 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7995 7829 | }
|
7996 7830 | }
|
7997 7831 | }
|
7998 7832 | }
|
7999 7833 |
|
8000 7834 | ::pin_project_lite::pin_project! {
|
8001 7835 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
8002 7836 | /// [`HttpPrefixHeadersInResponseInput`](crate::input::HttpPrefixHeadersInResponseInput) using modelled bindings.
|
8003 7837 | pub struct HttpPrefixHeadersInResponseInputFuture {
|
8004 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpPrefixHeadersInResponseInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7838 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpPrefixHeadersInResponseInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8005 7839 | }
|
8006 7840 | }
|
8007 7841 |
|
8008 7842 | impl std::future::Future for HttpPrefixHeadersInResponseInputFuture {
|
8009 7843 | type Output = Result<
|
8010 7844 | crate::input::HttpPrefixHeadersInResponseInput,
|
8011 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7845 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8012 7846 | >;
|
8013 7847 |
|
8014 7848 | fn poll(
|
8015 7849 | self: std::pin::Pin<&mut Self>,
|
8016 7850 | cx: &mut std::task::Context<'_>,
|
8017 7851 | ) -> std::task::Poll<Self::Output> {
|
8018 7852 | let this = self.project();
|
8019 7853 | this.inner.as_mut().poll(cx)
|
8020 7854 | }
|
8021 7855 | }
|
8022 7856 |
|
8023 7857 | impl<B>
|
8024 - | ::aws_smithy_http_server::request::FromRequest<
|
8025 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7858 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
7859 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8026 7860 | B,
|
8027 7861 | > for crate::input::HttpPrefixHeadersInResponseInput
|
8028 7862 | where
|
8029 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
7863 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
8030 7864 | B: 'static,
|
8031 7865 |
|
8032 7866 | B::Data: Send,
|
8033 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8034 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
7867 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7868 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
8035 7869 | {
|
8036 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7870 + | type Rejection =
|
7871 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8037 7872 | type Future = HttpPrefixHeadersInResponseInputFuture;
|
8038 7873 |
|
8039 7874 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
8040 7875 | let fut = async move {
|
8041 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
7876 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
8042 7877 | request.headers(),
|
8043 7878 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
8044 7879 | ) {
|
8045 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7880 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8046 7881 | }
|
8047 7882 | crate::protocol_serde::shape_http_prefix_headers_in_response::de_http_prefix_headers_in_response_http_request(request)
|
8048 7883 | .await
|
8049 7884 | };
|
8050 7885 | use ::futures_util::future::TryFutureExt;
|
8051 - | let fut = fut.map_err(
|
8052 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8053 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8054 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
8055 - | e,
|
8056 - | )
|
8057 - | },
|
8058 - | );
|
7886 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7887 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7888 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
7889 + | });
|
8059 7890 | HttpPrefixHeadersInResponseInputFuture {
|
8060 7891 | inner: Box::pin(fut),
|
8061 7892 | }
|
8062 7893 | }
|
8063 7894 | }
|
8064 7895 | impl
|
8065 - | ::aws_smithy_http_server::response::IntoResponse<
|
8066 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7896 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7897 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8067 7898 | > for crate::output::HttpPrefixHeadersInResponseOutput
|
8068 7899 | {
|
8069 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7900 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8070 7901 | match crate::protocol_serde::shape_http_prefix_headers_in_response::ser_http_prefix_headers_in_response_http_response(self) {
|
8071 7902 | Ok(response) => response,
|
8072 7903 | Err(e) => {
|
8073 7904 | ::tracing::error!(error = %e, "failed to serialize response");
|
8074 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7905 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8075 7906 | }
|
8076 7907 | }
|
8077 7908 | }
|
8078 7909 | }
|
8079 7910 | impl
|
8080 - | ::aws_smithy_http_server::response::IntoResponse<
|
8081 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7911 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7912 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8082 7913 | > for crate::error::HttpPrefixHeadersInResponseError
|
8083 7914 | {
|
8084 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7915 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8085 7916 | match crate::protocol_serde::shape_http_prefix_headers_in_response::ser_http_prefix_headers_in_response_http_error(&self) {
|
8086 7917 | Ok(mut response) => {
|
8087 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
7918 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8088 7919 | response
|
8089 7920 | },
|
8090 7921 | Err(e) => {
|
8091 7922 | ::tracing::error!(error = %e, "failed to serialize response");
|
8092 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
7923 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8093 7924 | }
|
8094 7925 | }
|
8095 7926 | }
|
8096 7927 | }
|
8097 7928 |
|
8098 7929 | ::pin_project_lite::pin_project! {
|
8099 7930 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
8100 7931 | /// [`HttpPrefixHeadersInput`](crate::input::HttpPrefixHeadersInput) using modelled bindings.
|
8101 7932 | pub struct HttpPrefixHeadersInputFuture {
|
8102 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpPrefixHeadersInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7933 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpPrefixHeadersInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8103 7934 | }
|
8104 7935 | }
|
8105 7936 |
|
8106 7937 | impl std::future::Future for HttpPrefixHeadersInputFuture {
|
8107 7938 | type Output = Result<
|
8108 7939 | crate::input::HttpPrefixHeadersInput,
|
8109 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
7940 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8110 7941 | >;
|
8111 7942 |
|
8112 7943 | fn poll(
|
8113 7944 | self: std::pin::Pin<&mut Self>,
|
8114 7945 | cx: &mut std::task::Context<'_>,
|
8115 7946 | ) -> std::task::Poll<Self::Output> {
|
8116 7947 | let this = self.project();
|
8117 7948 | this.inner.as_mut().poll(cx)
|
8118 7949 | }
|
8119 7950 | }
|
8120 7951 |
|
8121 7952 | impl<B>
|
8122 - | ::aws_smithy_http_server::request::FromRequest<
|
8123 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7953 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
7954 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8124 7955 | B,
|
8125 7956 | > for crate::input::HttpPrefixHeadersInput
|
8126 7957 | where
|
8127 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
7958 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
8128 7959 | B: 'static,
|
8129 7960 |
|
8130 7961 | B::Data: Send,
|
8131 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8132 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
7962 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
7963 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
8133 7964 | {
|
8134 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
7965 + | type Rejection =
|
7966 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8135 7967 | type Future = HttpPrefixHeadersInputFuture;
|
8136 7968 |
|
8137 7969 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
8138 7970 | let fut = async move {
|
8139 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
7971 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
8140 7972 | request.headers(),
|
8141 7973 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
8142 7974 | ) {
|
8143 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
7975 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8144 7976 | }
|
8145 7977 | crate::protocol_serde::shape_http_prefix_headers::de_http_prefix_headers_http_request(
|
8146 7978 | request,
|
8147 7979 | )
|
8148 7980 | .await
|
8149 7981 | };
|
8150 7982 | use ::futures_util::future::TryFutureExt;
|
8151 - | let fut = fut.map_err(
|
8152 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8153 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8154 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
8155 - | e,
|
8156 - | )
|
8157 - | },
|
8158 - | );
|
7983 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
7984 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
7985 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
7986 + | });
|
8159 7987 | HttpPrefixHeadersInputFuture {
|
8160 7988 | inner: Box::pin(fut),
|
8161 7989 | }
|
8162 7990 | }
|
8163 7991 | }
|
8164 7992 | impl
|
8165 - | ::aws_smithy_http_server::response::IntoResponse<
|
8166 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
7993 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
7994 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8167 7995 | > for crate::output::HttpPrefixHeadersOutput
|
8168 7996 | {
|
8169 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
7997 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8170 7998 | match crate::protocol_serde::shape_http_prefix_headers::ser_http_prefix_headers_http_response(self) {
|
8171 7999 | Ok(response) => response,
|
8172 8000 | Err(e) => {
|
8173 8001 | ::tracing::error!(error = %e, "failed to serialize response");
|
8174 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8002 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8175 8003 | }
|
8176 8004 | }
|
8177 8005 | }
|
8178 8006 | }
|
8179 8007 | impl
|
8180 - | ::aws_smithy_http_server::response::IntoResponse<
|
8181 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8008 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8009 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8182 8010 | > for crate::error::HttpPrefixHeadersError
|
8183 8011 | {
|
8184 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8012 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8185 8013 | match crate::protocol_serde::shape_http_prefix_headers::ser_http_prefix_headers_http_error(
|
8186 8014 | &self,
|
8187 8015 | ) {
|
8188 8016 | Ok(mut response) => {
|
8189 8017 | response.extensions_mut().insert(
|
8190 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
8018 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
8019 + | self.name(),
|
8020 + | ),
|
8191 8021 | );
|
8192 8022 | response
|
8193 8023 | }
|
8194 8024 | Err(e) => {
|
8195 8025 | ::tracing::error!(error = %e, "failed to serialize response");
|
8196 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8026 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8197 8027 | }
|
8198 8028 | }
|
8199 8029 | }
|
8200 8030 | }
|
8201 8031 |
|
8202 8032 | ::pin_project_lite::pin_project! {
|
8203 8033 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
8204 8034 | /// [`QueryParamsAsStringListMapInput`](crate::input::QueryParamsAsStringListMapInput) using modelled bindings.
|
8205 8035 | pub struct QueryParamsAsStringListMapInputFuture {
|
8206 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::QueryParamsAsStringListMapInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8036 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::QueryParamsAsStringListMapInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8207 8037 | }
|
8208 8038 | }
|
8209 8039 |
|
8210 8040 | impl std::future::Future for QueryParamsAsStringListMapInputFuture {
|
8211 8041 | type Output = Result<
|
8212 8042 | crate::input::QueryParamsAsStringListMapInput,
|
8213 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8043 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8214 8044 | >;
|
8215 8045 |
|
8216 8046 | fn poll(
|
8217 8047 | self: std::pin::Pin<&mut Self>,
|
8218 8048 | cx: &mut std::task::Context<'_>,
|
8219 8049 | ) -> std::task::Poll<Self::Output> {
|
8220 8050 | let this = self.project();
|
8221 8051 | this.inner.as_mut().poll(cx)
|
8222 8052 | }
|
8223 8053 | }
|
8224 8054 |
|
8225 8055 | impl<B>
|
8226 - | ::aws_smithy_http_server::request::FromRequest<
|
8227 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8056 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
8057 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8228 8058 | B,
|
8229 8059 | > for crate::input::QueryParamsAsStringListMapInput
|
8230 8060 | where
|
8231 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
8061 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
8232 8062 | B: 'static,
|
8233 8063 |
|
8234 8064 | B::Data: Send,
|
8235 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8236 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
8065 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8066 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
8237 8067 | {
|
8238 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8068 + | type Rejection =
|
8069 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8239 8070 | type Future = QueryParamsAsStringListMapInputFuture;
|
8240 8071 |
|
8241 8072 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
8242 8073 | let fut = async move {
|
8243 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
8074 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
8244 8075 | request.headers(),
|
8245 8076 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
8246 8077 | ) {
|
8247 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8078 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8248 8079 | }
|
8249 8080 | crate::protocol_serde::shape_query_params_as_string_list_map::de_query_params_as_string_list_map_http_request(request)
|
8250 8081 | .await
|
8251 8082 | };
|
8252 8083 | use ::futures_util::future::TryFutureExt;
|
8253 - | let fut = fut.map_err(
|
8254 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8255 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8256 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
8257 - | e,
|
8258 - | )
|
8259 - | },
|
8260 - | );
|
8084 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8085 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8086 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
8087 + | });
|
8261 8088 | QueryParamsAsStringListMapInputFuture {
|
8262 8089 | inner: Box::pin(fut),
|
8263 8090 | }
|
8264 8091 | }
|
8265 8092 | }
|
8266 8093 | impl
|
8267 - | ::aws_smithy_http_server::response::IntoResponse<
|
8268 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8094 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8095 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8269 8096 | > for crate::output::QueryParamsAsStringListMapOutput
|
8270 8097 | {
|
8271 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8098 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8272 8099 | match crate::protocol_serde::shape_query_params_as_string_list_map::ser_query_params_as_string_list_map_http_response(self) {
|
8273 8100 | Ok(response) => response,
|
8274 8101 | Err(e) => {
|
8275 8102 | ::tracing::error!(error = %e, "failed to serialize response");
|
8276 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8103 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8277 8104 | }
|
8278 8105 | }
|
8279 8106 | }
|
8280 8107 | }
|
8281 8108 | impl
|
8282 - | ::aws_smithy_http_server::response::IntoResponse<
|
8283 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8109 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8110 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8284 8111 | > for crate::error::QueryParamsAsStringListMapError
|
8285 8112 | {
|
8286 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8113 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8287 8114 | match crate::protocol_serde::shape_query_params_as_string_list_map::ser_query_params_as_string_list_map_http_error(&self) {
|
8288 8115 | Ok(mut response) => {
|
8289 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8116 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8290 8117 | response
|
8291 8118 | },
|
8292 8119 | Err(e) => {
|
8293 8120 | ::tracing::error!(error = %e, "failed to serialize response");
|
8294 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8121 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8295 8122 | }
|
8296 8123 | }
|
8297 8124 | }
|
8298 8125 | }
|
8299 8126 |
|
8300 8127 | ::pin_project_lite::pin_project! {
|
8301 8128 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
8302 8129 | /// [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput) using modelled bindings.
|
8303 8130 | pub struct QueryPrecedenceInputFuture {
|
8304 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::QueryPrecedenceInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8131 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::QueryPrecedenceInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8305 8132 | }
|
8306 8133 | }
|
8307 8134 |
|
8308 8135 | impl std::future::Future for QueryPrecedenceInputFuture {
|
8309 8136 | type Output = Result<
|
8310 8137 | crate::input::QueryPrecedenceInput,
|
8311 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8138 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8312 8139 | >;
|
8313 8140 |
|
8314 8141 | fn poll(
|
8315 8142 | self: std::pin::Pin<&mut Self>,
|
8316 8143 | cx: &mut std::task::Context<'_>,
|
8317 8144 | ) -> std::task::Poll<Self::Output> {
|
8318 8145 | let this = self.project();
|
8319 8146 | this.inner.as_mut().poll(cx)
|
8320 8147 | }
|
8321 8148 | }
|
8322 8149 |
|
8323 8150 | impl<B>
|
8324 - | ::aws_smithy_http_server::request::FromRequest<
|
8325 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8151 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
8152 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8326 8153 | B,
|
8327 8154 | > for crate::input::QueryPrecedenceInput
|
8328 8155 | where
|
8329 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
8156 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
8330 8157 | B: 'static,
|
8331 8158 |
|
8332 8159 | B::Data: Send,
|
8333 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8334 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
8160 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8161 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
8335 8162 | {
|
8336 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8163 + | type Rejection =
|
8164 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8337 8165 | type Future = QueryPrecedenceInputFuture;
|
8338 8166 |
|
8339 8167 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
8340 8168 | let fut = async move {
|
8341 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
8169 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
8342 8170 | request.headers(),
|
8343 8171 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
8344 8172 | ) {
|
8345 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8173 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8346 8174 | }
|
8347 8175 | crate::protocol_serde::shape_query_precedence::de_query_precedence_http_request(request)
|
8348 8176 | .await
|
8349 8177 | };
|
8350 8178 | use ::futures_util::future::TryFutureExt;
|
8351 - | let fut = fut.map_err(
|
8352 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8353 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8354 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
8355 - | e,
|
8356 - | )
|
8357 - | },
|
8358 - | );
|
8179 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8180 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8181 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
8182 + | });
|
8359 8183 | QueryPrecedenceInputFuture {
|
8360 8184 | inner: Box::pin(fut),
|
8361 8185 | }
|
8362 8186 | }
|
8363 8187 | }
|
8364 8188 | impl
|
8365 - | ::aws_smithy_http_server::response::IntoResponse<
|
8366 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8189 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8190 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8367 8191 | > for crate::output::QueryPrecedenceOutput
|
8368 8192 | {
|
8369 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8193 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8370 8194 | match crate::protocol_serde::shape_query_precedence::ser_query_precedence_http_response(
|
8371 8195 | self,
|
8372 8196 | ) {
|
8373 8197 | Ok(response) => response,
|
8374 8198 | Err(e) => {
|
8375 8199 | ::tracing::error!(error = %e, "failed to serialize response");
|
8376 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8200 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8377 8201 | }
|
8378 8202 | }
|
8379 8203 | }
|
8380 8204 | }
|
8381 8205 | impl
|
8382 - | ::aws_smithy_http_server::response::IntoResponse<
|
8383 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8206 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8207 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8384 8208 | > for crate::error::QueryPrecedenceError
|
8385 8209 | {
|
8386 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8210 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8387 8211 | match crate::protocol_serde::shape_query_precedence::ser_query_precedence_http_error(&self)
|
8388 8212 | {
|
8389 8213 | Ok(mut response) => {
|
8390 8214 | response.extensions_mut().insert(
|
8391 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
8215 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
8216 + | self.name(),
|
8217 + | ),
|
8392 8218 | );
|
8393 8219 | response
|
8394 8220 | }
|
8395 8221 | Err(e) => {
|
8396 8222 | ::tracing::error!(error = %e, "failed to serialize response");
|
8397 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8223 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8398 8224 | }
|
8399 8225 | }
|
8400 8226 | }
|
8401 8227 | }
|
8402 8228 |
|
8403 8229 | ::pin_project_lite::pin_project! {
|
8404 8230 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
8405 8231 | /// [`QueryIdempotencyTokenAutoFillInput`](crate::input::QueryIdempotencyTokenAutoFillInput) using modelled bindings.
|
8406 8232 | pub struct QueryIdempotencyTokenAutoFillInputFuture {
|
8407 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::QueryIdempotencyTokenAutoFillInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8233 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::QueryIdempotencyTokenAutoFillInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8408 8234 | }
|
8409 8235 | }
|
8410 8236 |
|
8411 8237 | impl std::future::Future for QueryIdempotencyTokenAutoFillInputFuture {
|
8412 8238 | type Output = Result<
|
8413 8239 | crate::input::QueryIdempotencyTokenAutoFillInput,
|
8414 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8240 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8415 8241 | >;
|
8416 8242 |
|
8417 8243 | fn poll(
|
8418 8244 | self: std::pin::Pin<&mut Self>,
|
8419 8245 | cx: &mut std::task::Context<'_>,
|
8420 8246 | ) -> std::task::Poll<Self::Output> {
|
8421 8247 | let this = self.project();
|
8422 8248 | this.inner.as_mut().poll(cx)
|
8423 8249 | }
|
8424 8250 | }
|
8425 8251 |
|
8426 8252 | impl<B>
|
8427 - | ::aws_smithy_http_server::request::FromRequest<
|
8428 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8253 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
8254 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8429 8255 | B,
|
8430 8256 | > for crate::input::QueryIdempotencyTokenAutoFillInput
|
8431 8257 | where
|
8432 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
8258 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
8433 8259 | B: 'static,
|
8434 8260 |
|
8435 8261 | B::Data: Send,
|
8436 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8437 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
8262 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8263 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
8438 8264 | {
|
8439 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8265 + | type Rejection =
|
8266 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8440 8267 | type Future = QueryIdempotencyTokenAutoFillInputFuture;
|
8441 8268 |
|
8442 8269 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
8443 8270 | let fut = async move {
|
8444 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
8271 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
8445 8272 | request.headers(),
|
8446 8273 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
8447 8274 | ) {
|
8448 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8275 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8449 8276 | }
|
8450 8277 | crate::protocol_serde::shape_query_idempotency_token_auto_fill::de_query_idempotency_token_auto_fill_http_request(request)
|
8451 8278 | .await
|
8452 8279 | };
|
8453 8280 | use ::futures_util::future::TryFutureExt;
|
8454 - | let fut = fut.map_err(
|
8455 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8456 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8457 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
8458 - | e,
|
8459 - | )
|
8460 - | },
|
8461 - | );
|
8281 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8282 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8283 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
8284 + | });
|
8462 8285 | QueryIdempotencyTokenAutoFillInputFuture {
|
8463 8286 | inner: Box::pin(fut),
|
8464 8287 | }
|
8465 8288 | }
|
8466 8289 | }
|
8467 8290 | impl
|
8468 - | ::aws_smithy_http_server::response::IntoResponse<
|
8469 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8291 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8292 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8470 8293 | > for crate::output::QueryIdempotencyTokenAutoFillOutput
|
8471 8294 | {
|
8472 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8295 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8473 8296 | match crate::protocol_serde::shape_query_idempotency_token_auto_fill::ser_query_idempotency_token_auto_fill_http_response(self) {
|
8474 8297 | Ok(response) => response,
|
8475 8298 | Err(e) => {
|
8476 8299 | ::tracing::error!(error = %e, "failed to serialize response");
|
8477 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8300 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8478 8301 | }
|
8479 8302 | }
|
8480 8303 | }
|
8481 8304 | }
|
8482 8305 | impl
|
8483 - | ::aws_smithy_http_server::response::IntoResponse<
|
8484 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8306 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8307 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8485 8308 | > for crate::error::QueryIdempotencyTokenAutoFillError
|
8486 8309 | {
|
8487 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8310 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8488 8311 | match crate::protocol_serde::shape_query_idempotency_token_auto_fill::ser_query_idempotency_token_auto_fill_http_error(&self) {
|
8489 8312 | Ok(mut response) => {
|
8490 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8313 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8491 8314 | response
|
8492 8315 | },
|
8493 8316 | Err(e) => {
|
8494 8317 | ::tracing::error!(error = %e, "failed to serialize response");
|
8495 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8318 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8496 8319 | }
|
8497 8320 | }
|
8498 8321 | }
|
8499 8322 | }
|
8500 8323 |
|
8501 8324 | ::pin_project_lite::pin_project! {
|
8502 8325 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
8503 8326 | /// [`OmitsSerializingEmptyListsInput`](crate::input::OmitsSerializingEmptyListsInput) using modelled bindings.
|
8504 8327 | pub struct OmitsSerializingEmptyListsInputFuture {
|
8505 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OmitsSerializingEmptyListsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8328 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OmitsSerializingEmptyListsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8506 8329 | }
|
8507 8330 | }
|
8508 8331 |
|
8509 8332 | impl std::future::Future for OmitsSerializingEmptyListsInputFuture {
|
8510 8333 | type Output = Result<
|
8511 8334 | crate::input::OmitsSerializingEmptyListsInput,
|
8512 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8335 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8513 8336 | >;
|
8514 8337 |
|
8515 8338 | fn poll(
|
8516 8339 | self: std::pin::Pin<&mut Self>,
|
8517 8340 | cx: &mut std::task::Context<'_>,
|
8518 8341 | ) -> std::task::Poll<Self::Output> {
|
8519 8342 | let this = self.project();
|
8520 8343 | this.inner.as_mut().poll(cx)
|
8521 8344 | }
|
8522 8345 | }
|
8523 8346 |
|
8524 8347 | impl<B>
|
8525 - | ::aws_smithy_http_server::request::FromRequest<
|
8526 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8348 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
8349 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8527 8350 | B,
|
8528 8351 | > for crate::input::OmitsSerializingEmptyListsInput
|
8529 8352 | where
|
8530 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
8353 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
8531 8354 | B: 'static,
|
8532 8355 |
|
8533 8356 | B::Data: Send,
|
8534 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8535 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
8357 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8358 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
8536 8359 | {
|
8537 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8360 + | type Rejection =
|
8361 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8538 8362 | type Future = OmitsSerializingEmptyListsInputFuture;
|
8539 8363 |
|
8540 8364 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
8541 8365 | let fut = async move {
|
8542 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
8366 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
8543 8367 | request.headers(),
|
8544 8368 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
8545 8369 | ) {
|
8546 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8370 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8547 8371 | }
|
8548 8372 | crate::protocol_serde::shape_omits_serializing_empty_lists::de_omits_serializing_empty_lists_http_request(request)
|
8549 8373 | .await
|
8550 8374 | };
|
8551 8375 | use ::futures_util::future::TryFutureExt;
|
8552 - | let fut = fut.map_err(
|
8553 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8554 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8555 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
8556 - | e,
|
8557 - | )
|
8558 - | },
|
8559 - | );
|
8376 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8377 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8378 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
8379 + | });
|
8560 8380 | OmitsSerializingEmptyListsInputFuture {
|
8561 8381 | inner: Box::pin(fut),
|
8562 8382 | }
|
8563 8383 | }
|
8564 8384 | }
|
8565 8385 | impl
|
8566 - | ::aws_smithy_http_server::response::IntoResponse<
|
8567 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8386 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8387 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8568 8388 | > for crate::output::OmitsSerializingEmptyListsOutput
|
8569 8389 | {
|
8570 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8390 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8571 8391 | match crate::protocol_serde::shape_omits_serializing_empty_lists::ser_omits_serializing_empty_lists_http_response(self) {
|
8572 8392 | Ok(response) => response,
|
8573 8393 | Err(e) => {
|
8574 8394 | ::tracing::error!(error = %e, "failed to serialize response");
|
8575 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8395 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8576 8396 | }
|
8577 8397 | }
|
8578 8398 | }
|
8579 8399 | }
|
8580 8400 | impl
|
8581 - | ::aws_smithy_http_server::response::IntoResponse<
|
8582 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8401 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8402 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8583 8403 | > for crate::error::OmitsSerializingEmptyListsError
|
8584 8404 | {
|
8585 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8405 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8586 8406 | match crate::protocol_serde::shape_omits_serializing_empty_lists::ser_omits_serializing_empty_lists_http_error(&self) {
|
8587 8407 | Ok(mut response) => {
|
8588 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8408 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8589 8409 | response
|
8590 8410 | },
|
8591 8411 | Err(e) => {
|
8592 8412 | ::tracing::error!(error = %e, "failed to serialize response");
|
8593 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8413 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8594 8414 | }
|
8595 8415 | }
|
8596 8416 | }
|
8597 8417 | }
|
8598 8418 |
|
8599 8419 | ::pin_project_lite::pin_project! {
|
8600 8420 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
8601 8421 | /// [`OmitsNullSerializesEmptyStringInput`](crate::input::OmitsNullSerializesEmptyStringInput) using modelled bindings.
|
8602 8422 | pub struct OmitsNullSerializesEmptyStringInputFuture {
|
8603 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OmitsNullSerializesEmptyStringInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8423 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OmitsNullSerializesEmptyStringInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8604 8424 | }
|
8605 8425 | }
|
8606 8426 |
|
8607 8427 | impl std::future::Future for OmitsNullSerializesEmptyStringInputFuture {
|
8608 8428 | type Output = Result<
|
8609 8429 | crate::input::OmitsNullSerializesEmptyStringInput,
|
8610 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8430 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8611 8431 | >;
|
8612 8432 |
|
8613 8433 | fn poll(
|
8614 8434 | self: std::pin::Pin<&mut Self>,
|
8615 8435 | cx: &mut std::task::Context<'_>,
|
8616 8436 | ) -> std::task::Poll<Self::Output> {
|
8617 8437 | let this = self.project();
|
8618 8438 | this.inner.as_mut().poll(cx)
|
8619 8439 | }
|
8620 8440 | }
|
8621 8441 |
|
8622 8442 | impl<B>
|
8623 - | ::aws_smithy_http_server::request::FromRequest<
|
8624 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8443 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
8444 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8625 8445 | B,
|
8626 8446 | > for crate::input::OmitsNullSerializesEmptyStringInput
|
8627 8447 | where
|
8628 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
8448 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
8629 8449 | B: 'static,
|
8630 8450 |
|
8631 8451 | B::Data: Send,
|
8632 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8633 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
8452 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8453 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
8634 8454 | {
|
8635 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8455 + | type Rejection =
|
8456 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8636 8457 | type Future = OmitsNullSerializesEmptyStringInputFuture;
|
8637 8458 |
|
8638 8459 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
8639 8460 | let fut = async move {
|
8640 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
8461 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
8641 8462 | request.headers(),
|
8642 8463 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
8643 8464 | ) {
|
8644 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8465 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8645 8466 | }
|
8646 8467 | crate::protocol_serde::shape_omits_null_serializes_empty_string::de_omits_null_serializes_empty_string_http_request(request)
|
8647 8468 | .await
|
8648 8469 | };
|
8649 8470 | use ::futures_util::future::TryFutureExt;
|
8650 - | let fut = fut.map_err(
|
8651 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8652 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8653 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
8654 - | e,
|
8655 - | )
|
8656 - | },
|
8657 - | );
|
8471 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8472 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8473 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
8474 + | });
|
8658 8475 | OmitsNullSerializesEmptyStringInputFuture {
|
8659 8476 | inner: Box::pin(fut),
|
8660 8477 | }
|
8661 8478 | }
|
8662 8479 | }
|
8663 8480 | impl
|
8664 - | ::aws_smithy_http_server::response::IntoResponse<
|
8665 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8481 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8482 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8666 8483 | > for crate::output::OmitsNullSerializesEmptyStringOutput
|
8667 8484 | {
|
8668 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8485 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8669 8486 | match crate::protocol_serde::shape_omits_null_serializes_empty_string::ser_omits_null_serializes_empty_string_http_response(self) {
|
8670 8487 | Ok(response) => response,
|
8671 8488 | Err(e) => {
|
8672 8489 | ::tracing::error!(error = %e, "failed to serialize response");
|
8673 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8490 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8674 8491 | }
|
8675 8492 | }
|
8676 8493 | }
|
8677 8494 | }
|
8678 8495 | impl
|
8679 - | ::aws_smithy_http_server::response::IntoResponse<
|
8680 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8496 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8497 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8681 8498 | > for crate::error::OmitsNullSerializesEmptyStringError
|
8682 8499 | {
|
8683 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8500 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8684 8501 | match crate::protocol_serde::shape_omits_null_serializes_empty_string::ser_omits_null_serializes_empty_string_http_error(&self) {
|
8685 8502 | Ok(mut response) => {
|
8686 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8503 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8687 8504 | response
|
8688 8505 | },
|
8689 8506 | Err(e) => {
|
8690 8507 | ::tracing::error!(error = %e, "failed to serialize response");
|
8691 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8508 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8692 8509 | }
|
8693 8510 | }
|
8694 8511 | }
|
8695 8512 | }
|
8696 8513 |
|
8697 8514 | ::pin_project_lite::pin_project! {
|
8698 8515 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
8699 8516 | /// [`IgnoreQueryParamsInResponseInput`](crate::input::IgnoreQueryParamsInResponseInput) using modelled bindings.
|
8700 8517 | pub struct IgnoreQueryParamsInResponseInputFuture {
|
8701 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::IgnoreQueryParamsInResponseInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8518 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::IgnoreQueryParamsInResponseInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8702 8519 | }
|
8703 8520 | }
|
8704 8521 |
|
8705 8522 | impl std::future::Future for IgnoreQueryParamsInResponseInputFuture {
|
8706 8523 | type Output = Result<
|
8707 8524 | crate::input::IgnoreQueryParamsInResponseInput,
|
8708 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8525 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8709 8526 | >;
|
8710 8527 |
|
8711 8528 | fn poll(
|
8712 8529 | self: std::pin::Pin<&mut Self>,
|
8713 8530 | cx: &mut std::task::Context<'_>,
|
8714 8531 | ) -> std::task::Poll<Self::Output> {
|
8715 8532 | let this = self.project();
|
8716 8533 | this.inner.as_mut().poll(cx)
|
8717 8534 | }
|
8718 8535 | }
|
8719 8536 |
|
8720 8537 | impl<B>
|
8721 - | ::aws_smithy_http_server::request::FromRequest<
|
8722 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8538 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
8539 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8723 8540 | B,
|
8724 8541 | > for crate::input::IgnoreQueryParamsInResponseInput
|
8725 8542 | where
|
8726 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
8543 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
8727 8544 | B: 'static,
|
8728 8545 |
|
8729 8546 | B::Data: Send,
|
8730 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8731 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
8547 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8548 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
8732 8549 | {
|
8733 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8550 + | type Rejection =
|
8551 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8734 8552 | type Future = IgnoreQueryParamsInResponseInputFuture;
|
8735 8553 |
|
8736 8554 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
8737 8555 | let fut = async move {
|
8738 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
8556 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
8739 8557 | request.headers(),
|
8740 8558 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
8741 8559 | ) {
|
8742 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8560 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8743 8561 | }
|
8744 8562 | crate::protocol_serde::shape_ignore_query_params_in_response::de_ignore_query_params_in_response_http_request(request)
|
8745 8563 | .await
|
8746 8564 | };
|
8747 8565 | use ::futures_util::future::TryFutureExt;
|
8748 - | let fut = fut.map_err(
|
8749 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8750 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8751 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
8752 - | e,
|
8753 - | )
|
8754 - | },
|
8755 - | );
|
8566 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8567 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8568 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
8569 + | });
|
8756 8570 | IgnoreQueryParamsInResponseInputFuture {
|
8757 8571 | inner: Box::pin(fut),
|
8758 8572 | }
|
8759 8573 | }
|
8760 8574 | }
|
8761 8575 | impl
|
8762 - | ::aws_smithy_http_server::response::IntoResponse<
|
8763 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8576 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8577 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8764 8578 | > for crate::output::IgnoreQueryParamsInResponseOutput
|
8765 8579 | {
|
8766 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8580 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8767 8581 | match crate::protocol_serde::shape_ignore_query_params_in_response::ser_ignore_query_params_in_response_http_response(self) {
|
8768 8582 | Ok(response) => response,
|
8769 8583 | Err(e) => {
|
8770 8584 | ::tracing::error!(error = %e, "failed to serialize response");
|
8771 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8585 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8772 8586 | }
|
8773 8587 | }
|
8774 8588 | }
|
8775 8589 | }
|
8776 8590 | impl
|
8777 - | ::aws_smithy_http_server::response::IntoResponse<
|
8778 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8591 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8592 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8779 8593 | > for crate::error::IgnoreQueryParamsInResponseError
|
8780 8594 | {
|
8781 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8595 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8782 8596 | match crate::protocol_serde::shape_ignore_query_params_in_response::ser_ignore_query_params_in_response_http_error(&self) {
|
8783 8597 | Ok(mut response) => {
|
8784 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8598 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8785 8599 | response
|
8786 8600 | },
|
8787 8601 | Err(e) => {
|
8788 8602 | ::tracing::error!(error = %e, "failed to serialize response");
|
8789 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8603 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8790 8604 | }
|
8791 8605 | }
|
8792 8606 | }
|
8793 8607 | }
|
8794 8608 |
|
8795 8609 | ::pin_project_lite::pin_project! {
|
8796 8610 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
8797 8611 | /// [`ConstantAndVariableQueryStringInput`](crate::input::ConstantAndVariableQueryStringInput) using modelled bindings.
|
8798 8612 | pub struct ConstantAndVariableQueryStringInputFuture {
|
8799 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ConstantAndVariableQueryStringInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8613 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ConstantAndVariableQueryStringInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8800 8614 | }
|
8801 8615 | }
|
8802 8616 |
|
8803 8617 | impl std::future::Future for ConstantAndVariableQueryStringInputFuture {
|
8804 8618 | type Output = Result<
|
8805 8619 | crate::input::ConstantAndVariableQueryStringInput,
|
8806 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8620 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8807 8621 | >;
|
8808 8622 |
|
8809 8623 | fn poll(
|
8810 8624 | self: std::pin::Pin<&mut Self>,
|
8811 8625 | cx: &mut std::task::Context<'_>,
|
8812 8626 | ) -> std::task::Poll<Self::Output> {
|
8813 8627 | let this = self.project();
|
8814 8628 | this.inner.as_mut().poll(cx)
|
8815 8629 | }
|
8816 8630 | }
|
8817 8631 |
|
8818 8632 | impl<B>
|
8819 - | ::aws_smithy_http_server::request::FromRequest<
|
8820 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8633 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
8634 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8821 8635 | B,
|
8822 8636 | > for crate::input::ConstantAndVariableQueryStringInput
|
8823 8637 | where
|
8824 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
8638 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
8825 8639 | B: 'static,
|
8826 8640 |
|
8827 8641 | B::Data: Send,
|
8828 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8829 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
8642 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8643 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
8830 8644 | {
|
8831 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8645 + | type Rejection =
|
8646 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8832 8647 | type Future = ConstantAndVariableQueryStringInputFuture;
|
8833 8648 |
|
8834 8649 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
8835 8650 | let fut = async move {
|
8836 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
8651 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
8837 8652 | request.headers(),
|
8838 8653 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
8839 8654 | ) {
|
8840 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8655 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8841 8656 | }
|
8842 8657 | crate::protocol_serde::shape_constant_and_variable_query_string::de_constant_and_variable_query_string_http_request(request)
|
8843 8658 | .await
|
8844 8659 | };
|
8845 8660 | use ::futures_util::future::TryFutureExt;
|
8846 - | let fut = fut.map_err(
|
8847 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8848 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8849 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
8850 - | e,
|
8851 - | )
|
8852 - | },
|
8853 - | );
|
8661 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8662 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8663 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
8664 + | });
|
8854 8665 | ConstantAndVariableQueryStringInputFuture {
|
8855 8666 | inner: Box::pin(fut),
|
8856 8667 | }
|
8857 8668 | }
|
8858 8669 | }
|
8859 8670 | impl
|
8860 - | ::aws_smithy_http_server::response::IntoResponse<
|
8861 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8671 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8672 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8862 8673 | > for crate::output::ConstantAndVariableQueryStringOutput
|
8863 8674 | {
|
8864 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8675 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8865 8676 | match crate::protocol_serde::shape_constant_and_variable_query_string::ser_constant_and_variable_query_string_http_response(self) {
|
8866 8677 | Ok(response) => response,
|
8867 8678 | Err(e) => {
|
8868 8679 | ::tracing::error!(error = %e, "failed to serialize response");
|
8869 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8680 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8870 8681 | }
|
8871 8682 | }
|
8872 8683 | }
|
8873 8684 | }
|
8874 8685 | impl
|
8875 - | ::aws_smithy_http_server::response::IntoResponse<
|
8876 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8686 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8687 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8877 8688 | > for crate::error::ConstantAndVariableQueryStringError
|
8878 8689 | {
|
8879 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8690 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8880 8691 | match crate::protocol_serde::shape_constant_and_variable_query_string::ser_constant_and_variable_query_string_http_error(&self) {
|
8881 8692 | Ok(mut response) => {
|
8882 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8693 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8883 8694 | response
|
8884 8695 | },
|
8885 8696 | Err(e) => {
|
8886 8697 | ::tracing::error!(error = %e, "failed to serialize response");
|
8887 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8698 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8888 8699 | }
|
8889 8700 | }
|
8890 8701 | }
|
8891 8702 | }
|
8892 8703 |
|
8893 8704 | ::pin_project_lite::pin_project! {
|
8894 8705 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
8895 8706 | /// [`ConstantQueryStringInput`](crate::input::ConstantQueryStringInput) using modelled bindings.
|
8896 8707 | pub struct ConstantQueryStringInputFuture {
|
8897 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ConstantQueryStringInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8708 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ConstantQueryStringInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8898 8709 | }
|
8899 8710 | }
|
8900 8711 |
|
8901 8712 | impl std::future::Future for ConstantQueryStringInputFuture {
|
8902 8713 | type Output = Result<
|
8903 8714 | crate::input::ConstantQueryStringInput,
|
8904 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8715 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8905 8716 | >;
|
8906 8717 |
|
8907 8718 | fn poll(
|
8908 8719 | self: std::pin::Pin<&mut Self>,
|
8909 8720 | cx: &mut std::task::Context<'_>,
|
8910 8721 | ) -> std::task::Poll<Self::Output> {
|
8911 8722 | let this = self.project();
|
8912 8723 | this.inner.as_mut().poll(cx)
|
8913 8724 | }
|
8914 8725 | }
|
8915 8726 |
|
8916 8727 | impl<B>
|
8917 - | ::aws_smithy_http_server::request::FromRequest<
|
8918 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8728 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
8729 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8919 8730 | B,
|
8920 8731 | > for crate::input::ConstantQueryStringInput
|
8921 8732 | where
|
8922 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
8733 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
8923 8734 | B: 'static,
|
8924 8735 |
|
8925 8736 | B::Data: Send,
|
8926 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8927 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
8737 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8738 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
8928 8739 | {
|
8929 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8740 + | type Rejection =
|
8741 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8930 8742 | type Future = ConstantQueryStringInputFuture;
|
8931 8743 |
|
8932 8744 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
8933 8745 | let fut = async move {
|
8934 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
8746 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
8935 8747 | request.headers(),
|
8936 8748 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
8937 8749 | ) {
|
8938 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8750 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8939 8751 | }
|
8940 8752 | crate::protocol_serde::shape_constant_query_string::de_constant_query_string_http_request(request)
|
8941 8753 | .await
|
8942 8754 | };
|
8943 8755 | use ::futures_util::future::TryFutureExt;
|
8944 - | let fut = fut.map_err(
|
8945 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8946 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8947 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
8948 - | e,
|
8949 - | )
|
8950 - | },
|
8951 - | );
|
8756 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8757 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8758 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
8759 + | });
|
8952 8760 | ConstantQueryStringInputFuture {
|
8953 8761 | inner: Box::pin(fut),
|
8954 8762 | }
|
8955 8763 | }
|
8956 8764 | }
|
8957 8765 | impl
|
8958 - | ::aws_smithy_http_server::response::IntoResponse<
|
8959 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8766 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8767 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8960 8768 | > for crate::output::ConstantQueryStringOutput
|
8961 8769 | {
|
8962 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8770 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8963 8771 | match crate::protocol_serde::shape_constant_query_string::ser_constant_query_string_http_response(self) {
|
8964 8772 | Ok(response) => response,
|
8965 8773 | Err(e) => {
|
8966 8774 | ::tracing::error!(error = %e, "failed to serialize response");
|
8967 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8775 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8968 8776 | }
|
8969 8777 | }
|
8970 8778 | }
|
8971 8779 | }
|
8972 8780 | impl
|
8973 - | ::aws_smithy_http_server::response::IntoResponse<
|
8974 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8781 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8782 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
8975 8783 | > for crate::error::ConstantQueryStringError
|
8976 8784 | {
|
8977 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8785 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
8978 8786 | match crate::protocol_serde::shape_constant_query_string::ser_constant_query_string_http_error(&self) {
|
8979 8787 | Ok(mut response) => {
|
8980 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8788 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8981 8789 | response
|
8982 8790 | },
|
8983 8791 | Err(e) => {
|
8984 8792 | ::tracing::error!(error = %e, "failed to serialize response");
|
8985 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8793 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8986 8794 | }
|
8987 8795 | }
|
8988 8796 | }
|
8989 8797 | }
|
8990 8798 |
|
8991 8799 | ::pin_project_lite::pin_project! {
|
8992 8800 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
8993 8801 | /// [`AllQueryStringTypesInput`](crate::input::AllQueryStringTypesInput) using modelled bindings.
|
8994 8802 | pub struct AllQueryStringTypesInputFuture {
|
8995 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::AllQueryStringTypesInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8803 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::AllQueryStringTypesInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8996 8804 | }
|
8997 8805 | }
|
8998 8806 |
|
8999 8807 | impl std::future::Future for AllQueryStringTypesInputFuture {
|
9000 8808 | type Output = Result<
|
9001 8809 | crate::input::AllQueryStringTypesInput,
|
9002 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8810 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9003 8811 | >;
|
9004 8812 |
|
9005 8813 | fn poll(
|
9006 8814 | self: std::pin::Pin<&mut Self>,
|
9007 8815 | cx: &mut std::task::Context<'_>,
|
9008 8816 | ) -> std::task::Poll<Self::Output> {
|
9009 8817 | let this = self.project();
|
9010 8818 | this.inner.as_mut().poll(cx)
|
9011 8819 | }
|
9012 8820 | }
|
9013 8821 |
|
9014 8822 | impl<B>
|
9015 - | ::aws_smithy_http_server::request::FromRequest<
|
9016 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8823 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
8824 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9017 8825 | B,
|
9018 8826 | > for crate::input::AllQueryStringTypesInput
|
9019 8827 | where
|
9020 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
8828 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
9021 8829 | B: 'static,
|
9022 8830 |
|
9023 8831 | B::Data: Send,
|
9024 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9025 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
8832 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8833 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
9026 8834 | {
|
9027 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8835 + | type Rejection =
|
8836 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9028 8837 | type Future = AllQueryStringTypesInputFuture;
|
9029 8838 |
|
9030 8839 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
9031 8840 | let fut = async move {
|
9032 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
8841 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
9033 8842 | request.headers(),
|
9034 8843 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
9035 8844 | ) {
|
9036 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8845 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9037 8846 | }
|
9038 8847 | crate::protocol_serde::shape_all_query_string_types::de_all_query_string_types_http_request(request)
|
9039 8848 | .await
|
9040 8849 | };
|
9041 8850 | use ::futures_util::future::TryFutureExt;
|
9042 - | let fut = fut.map_err(
|
9043 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9044 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9045 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
9046 - | e,
|
9047 - | )
|
9048 - | },
|
9049 - | );
|
8851 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8852 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8853 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
8854 + | });
|
9050 8855 | AllQueryStringTypesInputFuture {
|
9051 8856 | inner: Box::pin(fut),
|
9052 8857 | }
|
9053 8858 | }
|
9054 8859 | }
|
9055 8860 | impl
|
9056 - | ::aws_smithy_http_server::response::IntoResponse<
|
9057 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8861 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8862 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9058 8863 | > for crate::output::AllQueryStringTypesOutput
|
9059 8864 | {
|
9060 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8865 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9061 8866 | match crate::protocol_serde::shape_all_query_string_types::ser_all_query_string_types_http_response(self) {
|
9062 8867 | Ok(response) => response,
|
9063 8868 | Err(e) => {
|
9064 8869 | ::tracing::error!(error = %e, "failed to serialize response");
|
9065 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8870 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9066 8871 | }
|
9067 8872 | }
|
9068 8873 | }
|
9069 8874 | }
|
9070 8875 | impl
|
9071 - | ::aws_smithy_http_server::response::IntoResponse<
|
9072 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8876 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8877 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9073 8878 | > for crate::error::AllQueryStringTypesError
|
9074 8879 | {
|
9075 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8880 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9076 8881 | match crate::protocol_serde::shape_all_query_string_types::ser_all_query_string_types_http_error(&self) {
|
9077 8882 | Ok(mut response) => {
|
9078 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8883 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9079 8884 | response
|
9080 8885 | },
|
9081 8886 | Err(e) => {
|
9082 8887 | ::tracing::error!(error = %e, "failed to serialize response");
|
9083 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8888 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9084 8889 | }
|
9085 8890 | }
|
9086 8891 | }
|
9087 8892 | }
|
9088 8893 |
|
9089 8894 | ::pin_project_lite::pin_project! {
|
9090 8895 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
9091 8896 | /// [`HttpRequestWithRegexLiteralInput`](crate::input::HttpRequestWithRegexLiteralInput) using modelled bindings.
|
9092 8897 | pub struct HttpRequestWithRegexLiteralInputFuture {
|
9093 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpRequestWithRegexLiteralInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8898 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpRequestWithRegexLiteralInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9094 8899 | }
|
9095 8900 | }
|
9096 8901 |
|
9097 8902 | impl std::future::Future for HttpRequestWithRegexLiteralInputFuture {
|
9098 8903 | type Output = Result<
|
9099 8904 | crate::input::HttpRequestWithRegexLiteralInput,
|
9100 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
8905 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9101 8906 | >;
|
9102 8907 |
|
9103 8908 | fn poll(
|
9104 8909 | self: std::pin::Pin<&mut Self>,
|
9105 8910 | cx: &mut std::task::Context<'_>,
|
9106 8911 | ) -> std::task::Poll<Self::Output> {
|
9107 8912 | let this = self.project();
|
9108 8913 | this.inner.as_mut().poll(cx)
|
9109 8914 | }
|
9110 8915 | }
|
9111 8916 |
|
9112 8917 | impl<B>
|
9113 - | ::aws_smithy_http_server::request::FromRequest<
|
9114 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8918 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
8919 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9115 8920 | B,
|
9116 8921 | > for crate::input::HttpRequestWithRegexLiteralInput
|
9117 8922 | where
|
9118 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
8923 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
9119 8924 | B: 'static,
|
9120 8925 |
|
9121 8926 | B::Data: Send,
|
9122 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9123 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
8927 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
8928 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
9124 8929 | {
|
9125 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
8930 + | type Rejection =
|
8931 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9126 8932 | type Future = HttpRequestWithRegexLiteralInputFuture;
|
9127 8933 |
|
9128 8934 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
9129 8935 | let fut = async move {
|
9130 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
8936 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
9131 8937 | request.headers(),
|
9132 8938 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
9133 8939 | ) {
|
9134 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
8940 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9135 8941 | }
|
9136 8942 | crate::protocol_serde::shape_http_request_with_regex_literal::de_http_request_with_regex_literal_http_request(request)
|
9137 8943 | .await
|
9138 8944 | };
|
9139 8945 | use ::futures_util::future::TryFutureExt;
|
9140 - | let fut = fut.map_err(
|
9141 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9142 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9143 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
9144 - | e,
|
9145 - | )
|
9146 - | },
|
9147 - | );
|
8946 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
8947 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
8948 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
8949 + | });
|
9148 8950 | HttpRequestWithRegexLiteralInputFuture {
|
9149 8951 | inner: Box::pin(fut),
|
9150 8952 | }
|
9151 8953 | }
|
9152 8954 | }
|
9153 8955 | impl
|
9154 - | ::aws_smithy_http_server::response::IntoResponse<
|
9155 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8956 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8957 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9156 8958 | > for crate::output::HttpRequestWithRegexLiteralOutput
|
9157 8959 | {
|
9158 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8960 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9159 8961 | match crate::protocol_serde::shape_http_request_with_regex_literal::ser_http_request_with_regex_literal_http_response(self) {
|
9160 8962 | Ok(response) => response,
|
9161 8963 | Err(e) => {
|
9162 8964 | ::tracing::error!(error = %e, "failed to serialize response");
|
9163 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8965 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9164 8966 | }
|
9165 8967 | }
|
9166 8968 | }
|
9167 8969 | }
|
9168 8970 | impl
|
9169 - | ::aws_smithy_http_server::response::IntoResponse<
|
9170 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
8971 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
8972 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9171 8973 | > for crate::error::HttpRequestWithRegexLiteralError
|
9172 8974 | {
|
9173 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
8975 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9174 8976 | match crate::protocol_serde::shape_http_request_with_regex_literal::ser_http_request_with_regex_literal_http_error(&self) {
|
9175 8977 | Ok(mut response) => {
|
9176 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
8978 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9177 8979 | response
|
9178 8980 | },
|
9179 8981 | Err(e) => {
|
9180 8982 | ::tracing::error!(error = %e, "failed to serialize response");
|
9181 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
8983 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9182 8984 | }
|
9183 8985 | }
|
9184 8986 | }
|
9185 8987 | }
|
9186 8988 |
|
9187 8989 | ::pin_project_lite::pin_project! {
|
9188 8990 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
9189 8991 | /// [`HttpRequestWithFloatLabelsInput`](crate::input::HttpRequestWithFloatLabelsInput) using modelled bindings.
|
9190 8992 | pub struct HttpRequestWithFloatLabelsInputFuture {
|
9191 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpRequestWithFloatLabelsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
8993 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpRequestWithFloatLabelsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9192 8994 | }
|
9193 8995 | }
|
9194 8996 |
|
9195 8997 | impl std::future::Future for HttpRequestWithFloatLabelsInputFuture {
|
9196 8998 | type Output = Result<
|
9197 8999 | crate::input::HttpRequestWithFloatLabelsInput,
|
9198 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9000 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9199 9001 | >;
|
9200 9002 |
|
9201 9003 | fn poll(
|
9202 9004 | self: std::pin::Pin<&mut Self>,
|
9203 9005 | cx: &mut std::task::Context<'_>,
|
9204 9006 | ) -> std::task::Poll<Self::Output> {
|
9205 9007 | let this = self.project();
|
9206 9008 | this.inner.as_mut().poll(cx)
|
9207 9009 | }
|
9208 9010 | }
|
9209 9011 |
|
9210 9012 | impl<B>
|
9211 - | ::aws_smithy_http_server::request::FromRequest<
|
9212 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9013 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
9014 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9213 9015 | B,
|
9214 9016 | > for crate::input::HttpRequestWithFloatLabelsInput
|
9215 9017 | where
|
9216 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
9018 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
9217 9019 | B: 'static,
|
9218 9020 |
|
9219 9021 | B::Data: Send,
|
9220 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9221 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
9022 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9023 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
9222 9024 | {
|
9223 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9025 + | type Rejection =
|
9026 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9224 9027 | type Future = HttpRequestWithFloatLabelsInputFuture;
|
9225 9028 |
|
9226 9029 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
9227 9030 | let fut = async move {
|
9228 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
9031 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
9229 9032 | request.headers(),
|
9230 9033 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
9231 9034 | ) {
|
9232 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9035 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9233 9036 | }
|
9234 9037 | crate::protocol_serde::shape_http_request_with_float_labels::de_http_request_with_float_labels_http_request(request)
|
9235 9038 | .await
|
9236 9039 | };
|
9237 9040 | use ::futures_util::future::TryFutureExt;
|
9238 - | let fut = fut.map_err(
|
9239 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9240 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9241 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
9242 - | e,
|
9243 - | )
|
9244 - | },
|
9245 - | );
|
9041 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9042 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9043 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
9044 + | });
|
9246 9045 | HttpRequestWithFloatLabelsInputFuture {
|
9247 9046 | inner: Box::pin(fut),
|
9248 9047 | }
|
9249 9048 | }
|
9250 9049 | }
|
9251 9050 | impl
|
9252 - | ::aws_smithy_http_server::response::IntoResponse<
|
9253 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9051 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9052 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9254 9053 | > for crate::output::HttpRequestWithFloatLabelsOutput
|
9255 9054 | {
|
9256 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9055 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9257 9056 | match crate::protocol_serde::shape_http_request_with_float_labels::ser_http_request_with_float_labels_http_response(self) {
|
9258 9057 | Ok(response) => response,
|
9259 9058 | Err(e) => {
|
9260 9059 | ::tracing::error!(error = %e, "failed to serialize response");
|
9261 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9060 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9262 9061 | }
|
9263 9062 | }
|
9264 9063 | }
|
9265 9064 | }
|
9266 9065 | impl
|
9267 - | ::aws_smithy_http_server::response::IntoResponse<
|
9268 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9066 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9067 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9269 9068 | > for crate::error::HttpRequestWithFloatLabelsError
|
9270 9069 | {
|
9271 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9070 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9272 9071 | match crate::protocol_serde::shape_http_request_with_float_labels::ser_http_request_with_float_labels_http_error(&self) {
|
9273 9072 | Ok(mut response) => {
|
9274 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9073 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9275 9074 | response
|
9276 9075 | },
|
9277 9076 | Err(e) => {
|
9278 9077 | ::tracing::error!(error = %e, "failed to serialize response");
|
9279 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9078 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9280 9079 | }
|
9281 9080 | }
|
9282 9081 | }
|
9283 9082 | }
|
9284 9083 |
|
9285 9084 | ::pin_project_lite::pin_project! {
|
9286 9085 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
9287 9086 | /// [`HttpRequestWithGreedyLabelInPathInput`](crate::input::HttpRequestWithGreedyLabelInPathInput) using modelled bindings.
|
9288 9087 | pub struct HttpRequestWithGreedyLabelInPathInputFuture {
|
9289 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpRequestWithGreedyLabelInPathInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9088 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpRequestWithGreedyLabelInPathInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9290 9089 | }
|
9291 9090 | }
|
9292 9091 |
|
9293 9092 | impl std::future::Future for HttpRequestWithGreedyLabelInPathInputFuture {
|
9294 9093 | type Output = Result<
|
9295 9094 | crate::input::HttpRequestWithGreedyLabelInPathInput,
|
9296 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9095 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9297 9096 | >;
|
9298 9097 |
|
9299 9098 | fn poll(
|
9300 9099 | self: std::pin::Pin<&mut Self>,
|
9301 9100 | cx: &mut std::task::Context<'_>,
|
9302 9101 | ) -> std::task::Poll<Self::Output> {
|
9303 9102 | let this = self.project();
|
9304 9103 | this.inner.as_mut().poll(cx)
|
9305 9104 | }
|
9306 9105 | }
|
9307 9106 |
|
9308 9107 | impl<B>
|
9309 - | ::aws_smithy_http_server::request::FromRequest<
|
9310 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9108 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
9109 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9311 9110 | B,
|
9312 9111 | > for crate::input::HttpRequestWithGreedyLabelInPathInput
|
9313 9112 | where
|
9314 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
9113 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
9315 9114 | B: 'static,
|
9316 9115 |
|
9317 9116 | B::Data: Send,
|
9318 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9319 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
9117 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9118 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
9320 9119 | {
|
9321 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9120 + | type Rejection =
|
9121 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9322 9122 | type Future = HttpRequestWithGreedyLabelInPathInputFuture;
|
9323 9123 |
|
9324 9124 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
9325 9125 | let fut = async move {
|
9326 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
9126 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
9327 9127 | request.headers(),
|
9328 9128 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
9329 9129 | ) {
|
9330 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9130 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9331 9131 | }
|
9332 9132 | crate::protocol_serde::shape_http_request_with_greedy_label_in_path::de_http_request_with_greedy_label_in_path_http_request(request)
|
9333 9133 | .await
|
9334 9134 | };
|
9335 9135 | use ::futures_util::future::TryFutureExt;
|
9336 - | let fut = fut.map_err(
|
9337 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9338 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9339 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
9340 - | e,
|
9341 - | )
|
9342 - | },
|
9343 - | );
|
9136 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9137 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9138 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
9139 + | });
|
9344 9140 | HttpRequestWithGreedyLabelInPathInputFuture {
|
9345 9141 | inner: Box::pin(fut),
|
9346 9142 | }
|
9347 9143 | }
|
9348 9144 | }
|
9349 9145 | impl
|
9350 - | ::aws_smithy_http_server::response::IntoResponse<
|
9351 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9146 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9147 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9352 9148 | > for crate::output::HttpRequestWithGreedyLabelInPathOutput
|
9353 9149 | {
|
9354 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9150 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9355 9151 | match crate::protocol_serde::shape_http_request_with_greedy_label_in_path::ser_http_request_with_greedy_label_in_path_http_response(self) {
|
9356 9152 | Ok(response) => response,
|
9357 9153 | Err(e) => {
|
9358 9154 | ::tracing::error!(error = %e, "failed to serialize response");
|
9359 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9155 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9360 9156 | }
|
9361 9157 | }
|
9362 9158 | }
|
9363 9159 | }
|
9364 9160 | impl
|
9365 - | ::aws_smithy_http_server::response::IntoResponse<
|
9366 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9161 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9162 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9367 9163 | > for crate::error::HttpRequestWithGreedyLabelInPathError
|
9368 9164 | {
|
9369 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9165 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9370 9166 | match crate::protocol_serde::shape_http_request_with_greedy_label_in_path::ser_http_request_with_greedy_label_in_path_http_error(&self) {
|
9371 9167 | Ok(mut response) => {
|
9372 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9168 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9373 9169 | response
|
9374 9170 | },
|
9375 9171 | Err(e) => {
|
9376 9172 | ::tracing::error!(error = %e, "failed to serialize response");
|
9377 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9173 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9378 9174 | }
|
9379 9175 | }
|
9380 9176 | }
|
9381 9177 | }
|
9382 9178 |
|
9383 9179 | ::pin_project_lite::pin_project! {
|
9384 9180 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
9385 9181 | /// [`HttpRequestWithLabelsAndTimestampFormatInput`](crate::input::HttpRequestWithLabelsAndTimestampFormatInput) using modelled bindings.
|
9386 9182 | pub struct HttpRequestWithLabelsAndTimestampFormatInputFuture {
|
9387 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpRequestWithLabelsAndTimestampFormatInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9183 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpRequestWithLabelsAndTimestampFormatInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9388 9184 | }
|
9389 9185 | }
|
9390 9186 |
|
9391 9187 | impl std::future::Future for HttpRequestWithLabelsAndTimestampFormatInputFuture {
|
9392 9188 | type Output = Result<
|
9393 9189 | crate::input::HttpRequestWithLabelsAndTimestampFormatInput,
|
9394 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9190 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9395 9191 | >;
|
9396 9192 |
|
9397 9193 | fn poll(
|
9398 9194 | self: std::pin::Pin<&mut Self>,
|
9399 9195 | cx: &mut std::task::Context<'_>,
|
9400 9196 | ) -> std::task::Poll<Self::Output> {
|
9401 9197 | let this = self.project();
|
9402 9198 | this.inner.as_mut().poll(cx)
|
9403 9199 | }
|
9404 9200 | }
|
9405 9201 |
|
9406 9202 | impl<B>
|
9407 - | ::aws_smithy_http_server::request::FromRequest<
|
9408 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9203 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
9204 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9409 9205 | B,
|
9410 9206 | > for crate::input::HttpRequestWithLabelsAndTimestampFormatInput
|
9411 9207 | where
|
9412 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
9208 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
9413 9209 | B: 'static,
|
9414 9210 |
|
9415 9211 | B::Data: Send,
|
9416 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9417 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
9212 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9213 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
9418 9214 | {
|
9419 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9215 + | type Rejection =
|
9216 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9420 9217 | type Future = HttpRequestWithLabelsAndTimestampFormatInputFuture;
|
9421 9218 |
|
9422 9219 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
9423 9220 | let fut = async move {
|
9424 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
9221 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
9425 9222 | request.headers(),
|
9426 9223 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
9427 9224 | ) {
|
9428 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9225 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9429 9226 | }
|
9430 9227 | crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format::de_http_request_with_labels_and_timestamp_format_http_request(request)
|
9431 9228 | .await
|
9432 9229 | };
|
9433 9230 | use ::futures_util::future::TryFutureExt;
|
9434 - | let fut = fut.map_err(
|
9435 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9436 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9437 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
9438 - | e,
|
9439 - | )
|
9440 - | },
|
9441 - | );
|
9231 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9232 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9233 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
9234 + | });
|
9442 9235 | HttpRequestWithLabelsAndTimestampFormatInputFuture {
|
9443 9236 | inner: Box::pin(fut),
|
9444 9237 | }
|
9445 9238 | }
|
9446 9239 | }
|
9447 9240 | impl
|
9448 - | ::aws_smithy_http_server::response::IntoResponse<
|
9449 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9241 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9242 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9450 9243 | > for crate::output::HttpRequestWithLabelsAndTimestampFormatOutput
|
9451 9244 | {
|
9452 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9245 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9453 9246 | match crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format::ser_http_request_with_labels_and_timestamp_format_http_response(self) {
|
9454 9247 | Ok(response) => response,
|
9455 9248 | Err(e) => {
|
9456 9249 | ::tracing::error!(error = %e, "failed to serialize response");
|
9457 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9250 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9458 9251 | }
|
9459 9252 | }
|
9460 9253 | }
|
9461 9254 | }
|
9462 9255 | impl
|
9463 - | ::aws_smithy_http_server::response::IntoResponse<
|
9464 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9256 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9257 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9465 9258 | > for crate::error::HttpRequestWithLabelsAndTimestampFormatError
|
9466 9259 | {
|
9467 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9260 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9468 9261 | match crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format::ser_http_request_with_labels_and_timestamp_format_http_error(&self) {
|
9469 9262 | Ok(mut response) => {
|
9470 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9263 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9471 9264 | response
|
9472 9265 | },
|
9473 9266 | Err(e) => {
|
9474 9267 | ::tracing::error!(error = %e, "failed to serialize response");
|
9475 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9268 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9476 9269 | }
|
9477 9270 | }
|
9478 9271 | }
|
9479 9272 | }
|
9480 9273 |
|
9481 9274 | ::pin_project_lite::pin_project! {
|
9482 9275 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
9483 9276 | /// [`HttpRequestWithLabelsInput`](crate::input::HttpRequestWithLabelsInput) using modelled bindings.
|
9484 9277 | pub struct HttpRequestWithLabelsInputFuture {
|
9485 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpRequestWithLabelsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9278 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpRequestWithLabelsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9486 9279 | }
|
9487 9280 | }
|
9488 9281 |
|
9489 9282 | impl std::future::Future for HttpRequestWithLabelsInputFuture {
|
9490 9283 | type Output = Result<
|
9491 9284 | crate::input::HttpRequestWithLabelsInput,
|
9492 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9285 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9493 9286 | >;
|
9494 9287 |
|
9495 9288 | fn poll(
|
9496 9289 | self: std::pin::Pin<&mut Self>,
|
9497 9290 | cx: &mut std::task::Context<'_>,
|
9498 9291 | ) -> std::task::Poll<Self::Output> {
|
9499 9292 | let this = self.project();
|
9500 9293 | this.inner.as_mut().poll(cx)
|
9501 9294 | }
|
9502 9295 | }
|
9503 9296 |
|
9504 9297 | impl<B>
|
9505 - | ::aws_smithy_http_server::request::FromRequest<
|
9506 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9298 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
9299 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9507 9300 | B,
|
9508 9301 | > for crate::input::HttpRequestWithLabelsInput
|
9509 9302 | where
|
9510 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
9303 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
9511 9304 | B: 'static,
|
9512 9305 |
|
9513 9306 | B::Data: Send,
|
9514 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9515 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
9307 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9308 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
9516 9309 | {
|
9517 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9310 + | type Rejection =
|
9311 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9518 9312 | type Future = HttpRequestWithLabelsInputFuture;
|
9519 9313 |
|
9520 9314 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
9521 9315 | let fut = async move {
|
9522 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
9316 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
9523 9317 | request.headers(),
|
9524 9318 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
9525 9319 | ) {
|
9526 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9320 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9527 9321 | }
|
9528 9322 | crate::protocol_serde::shape_http_request_with_labels::de_http_request_with_labels_http_request(request)
|
9529 9323 | .await
|
9530 9324 | };
|
9531 9325 | use ::futures_util::future::TryFutureExt;
|
9532 - | let fut = fut.map_err(
|
9533 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9534 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9535 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
9536 - | e,
|
9537 - | )
|
9538 - | },
|
9539 - | );
|
9326 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9327 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9328 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
9329 + | });
|
9540 9330 | HttpRequestWithLabelsInputFuture {
|
9541 9331 | inner: Box::pin(fut),
|
9542 9332 | }
|
9543 9333 | }
|
9544 9334 | }
|
9545 9335 | impl
|
9546 - | ::aws_smithy_http_server::response::IntoResponse<
|
9547 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9336 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9337 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9548 9338 | > for crate::output::HttpRequestWithLabelsOutput
|
9549 9339 | {
|
9550 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9340 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9551 9341 | match crate::protocol_serde::shape_http_request_with_labels::ser_http_request_with_labels_http_response(self) {
|
9552 9342 | Ok(response) => response,
|
9553 9343 | Err(e) => {
|
9554 9344 | ::tracing::error!(error = %e, "failed to serialize response");
|
9555 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9345 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9556 9346 | }
|
9557 9347 | }
|
9558 9348 | }
|
9559 9349 | }
|
9560 9350 | impl
|
9561 - | ::aws_smithy_http_server::response::IntoResponse<
|
9562 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9351 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9352 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9563 9353 | > for crate::error::HttpRequestWithLabelsError
|
9564 9354 | {
|
9565 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9355 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9566 9356 | match crate::protocol_serde::shape_http_request_with_labels::ser_http_request_with_labels_http_error(&self) {
|
9567 9357 | Ok(mut response) => {
|
9568 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9358 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9569 9359 | response
|
9570 9360 | },
|
9571 9361 | Err(e) => {
|
9572 9362 | ::tracing::error!(error = %e, "failed to serialize response");
|
9573 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9363 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9574 9364 | }
|
9575 9365 | }
|
9576 9366 | }
|
9577 9367 | }
|
9578 9368 |
|
9579 9369 | ::pin_project_lite::pin_project! {
|
9580 9370 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
9581 9371 | /// [`MediaTypeHeaderInput`](crate::input::MediaTypeHeaderInput) using modelled bindings.
|
9582 9372 | pub struct MediaTypeHeaderInputFuture {
|
9583 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MediaTypeHeaderInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9373 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MediaTypeHeaderInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9584 9374 | }
|
9585 9375 | }
|
9586 9376 |
|
9587 9377 | impl std::future::Future for MediaTypeHeaderInputFuture {
|
9588 9378 | type Output = Result<
|
9589 9379 | crate::input::MediaTypeHeaderInput,
|
9590 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9380 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9591 9381 | >;
|
9592 9382 |
|
9593 9383 | fn poll(
|
9594 9384 | self: std::pin::Pin<&mut Self>,
|
9595 9385 | cx: &mut std::task::Context<'_>,
|
9596 9386 | ) -> std::task::Poll<Self::Output> {
|
9597 9387 | let this = self.project();
|
9598 9388 | this.inner.as_mut().poll(cx)
|
9599 9389 | }
|
9600 9390 | }
|
9601 9391 |
|
9602 9392 | impl<B>
|
9603 - | ::aws_smithy_http_server::request::FromRequest<
|
9604 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9393 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
9394 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9605 9395 | B,
|
9606 9396 | > for crate::input::MediaTypeHeaderInput
|
9607 9397 | where
|
9608 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
9398 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
9609 9399 | B: 'static,
|
9610 9400 |
|
9611 9401 | B::Data: Send,
|
9612 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9613 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
9402 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9403 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
9614 9404 | {
|
9615 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9405 + | type Rejection =
|
9406 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9616 9407 | type Future = MediaTypeHeaderInputFuture;
|
9617 9408 |
|
9618 9409 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
9619 9410 | let fut = async move {
|
9620 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
9411 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
9621 9412 | request.headers(),
|
9622 9413 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
9623 9414 | ) {
|
9624 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9415 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9625 9416 | }
|
9626 9417 | crate::protocol_serde::shape_media_type_header::de_media_type_header_http_request(
|
9627 9418 | request,
|
9628 9419 | )
|
9629 9420 | .await
|
9630 9421 | };
|
9631 9422 | use ::futures_util::future::TryFutureExt;
|
9632 - | let fut = fut.map_err(
|
9633 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9634 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9635 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
9636 - | e,
|
9637 - | )
|
9638 - | },
|
9639 - | );
|
9423 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9424 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9425 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
9426 + | });
|
9640 9427 | MediaTypeHeaderInputFuture {
|
9641 9428 | inner: Box::pin(fut),
|
9642 9429 | }
|
9643 9430 | }
|
9644 9431 | }
|
9645 9432 | impl
|
9646 - | ::aws_smithy_http_server::response::IntoResponse<
|
9647 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9433 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9434 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9648 9435 | > for crate::output::MediaTypeHeaderOutput
|
9649 9436 | {
|
9650 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9437 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9651 9438 | match crate::protocol_serde::shape_media_type_header::ser_media_type_header_http_response(
|
9652 9439 | self,
|
9653 9440 | ) {
|
9654 9441 | Ok(response) => response,
|
9655 9442 | Err(e) => {
|
9656 9443 | ::tracing::error!(error = %e, "failed to serialize response");
|
9657 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9444 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9658 9445 | }
|
9659 9446 | }
|
9660 9447 | }
|
9661 9448 | }
|
9662 9449 | impl
|
9663 - | ::aws_smithy_http_server::response::IntoResponse<
|
9664 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9450 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9451 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9665 9452 | > for crate::error::MediaTypeHeaderError
|
9666 9453 | {
|
9667 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9454 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9668 9455 | match crate::protocol_serde::shape_media_type_header::ser_media_type_header_http_error(
|
9669 9456 | &self,
|
9670 9457 | ) {
|
9671 9458 | Ok(mut response) => {
|
9672 9459 | response.extensions_mut().insert(
|
9673 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
9460 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
9461 + | self.name(),
|
9462 + | ),
|
9674 9463 | );
|
9675 9464 | response
|
9676 9465 | }
|
9677 9466 | Err(e) => {
|
9678 9467 | ::tracing::error!(error = %e, "failed to serialize response");
|
9679 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9468 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9680 9469 | }
|
9681 9470 | }
|
9682 9471 | }
|
9683 9472 | }
|
9684 9473 |
|
9685 9474 | ::pin_project_lite::pin_project! {
|
9686 9475 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
9687 9476 | /// [`TimestampFormatHeadersInput`](crate::input::TimestampFormatHeadersInput) using modelled bindings.
|
9688 9477 | pub struct TimestampFormatHeadersInputFuture {
|
9689 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TimestampFormatHeadersInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9478 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TimestampFormatHeadersInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9690 9479 | }
|
9691 9480 | }
|
9692 9481 |
|
9693 9482 | impl std::future::Future for TimestampFormatHeadersInputFuture {
|
9694 9483 | type Output = Result<
|
9695 9484 | crate::input::TimestampFormatHeadersInput,
|
9696 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9485 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9697 9486 | >;
|
9698 9487 |
|
9699 9488 | fn poll(
|
9700 9489 | self: std::pin::Pin<&mut Self>,
|
9701 9490 | cx: &mut std::task::Context<'_>,
|
9702 9491 | ) -> std::task::Poll<Self::Output> {
|
9703 9492 | let this = self.project();
|
9704 9493 | this.inner.as_mut().poll(cx)
|
9705 9494 | }
|
9706 9495 | }
|
9707 9496 |
|
9708 9497 | impl<B>
|
9709 - | ::aws_smithy_http_server::request::FromRequest<
|
9710 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9498 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
9499 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9711 9500 | B,
|
9712 9501 | > for crate::input::TimestampFormatHeadersInput
|
9713 9502 | where
|
9714 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
9503 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
9715 9504 | B: 'static,
|
9716 9505 |
|
9717 9506 | B::Data: Send,
|
9718 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9719 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
9507 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9508 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
9720 9509 | {
|
9721 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9510 + | type Rejection =
|
9511 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9722 9512 | type Future = TimestampFormatHeadersInputFuture;
|
9723 9513 |
|
9724 9514 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
9725 9515 | let fut = async move {
|
9726 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
9516 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
9727 9517 | request.headers(),
|
9728 9518 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
9729 9519 | ) {
|
9730 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9520 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9731 9521 | }
|
9732 9522 | crate::protocol_serde::shape_timestamp_format_headers::de_timestamp_format_headers_http_request(request)
|
9733 9523 | .await
|
9734 9524 | };
|
9735 9525 | use ::futures_util::future::TryFutureExt;
|
9736 - | let fut = fut.map_err(
|
9737 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9738 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9739 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
9740 - | e,
|
9741 - | )
|
9742 - | },
|
9743 - | );
|
9526 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9527 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9528 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
9529 + | });
|
9744 9530 | TimestampFormatHeadersInputFuture {
|
9745 9531 | inner: Box::pin(fut),
|
9746 9532 | }
|
9747 9533 | }
|
9748 9534 | }
|
9749 9535 | impl
|
9750 - | ::aws_smithy_http_server::response::IntoResponse<
|
9751 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9536 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9537 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9752 9538 | > for crate::output::TimestampFormatHeadersOutput
|
9753 9539 | {
|
9754 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9540 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9755 9541 | match crate::protocol_serde::shape_timestamp_format_headers::ser_timestamp_format_headers_http_response(self) {
|
9756 9542 | Ok(response) => response,
|
9757 9543 | Err(e) => {
|
9758 9544 | ::tracing::error!(error = %e, "failed to serialize response");
|
9759 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9545 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9760 9546 | }
|
9761 9547 | }
|
9762 9548 | }
|
9763 9549 | }
|
9764 9550 | impl
|
9765 - | ::aws_smithy_http_server::response::IntoResponse<
|
9766 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9551 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9552 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9767 9553 | > for crate::error::TimestampFormatHeadersError
|
9768 9554 | {
|
9769 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9555 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9770 9556 | match crate::protocol_serde::shape_timestamp_format_headers::ser_timestamp_format_headers_http_error(&self) {
|
9771 9557 | Ok(mut response) => {
|
9772 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9558 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9773 9559 | response
|
9774 9560 | },
|
9775 9561 | Err(e) => {
|
9776 9562 | ::tracing::error!(error = %e, "failed to serialize response");
|
9777 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9563 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9778 9564 | }
|
9779 9565 | }
|
9780 9566 | }
|
9781 9567 | }
|
9782 9568 |
|
9783 9569 | ::pin_project_lite::pin_project! {
|
9784 9570 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
9785 9571 | /// [`NullAndEmptyHeadersServerInput`](crate::input::NullAndEmptyHeadersServerInput) using modelled bindings.
|
9786 9572 | pub struct NullAndEmptyHeadersServerInputFuture {
|
9787 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NullAndEmptyHeadersServerInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9573 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NullAndEmptyHeadersServerInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9788 9574 | }
|
9789 9575 | }
|
9790 9576 |
|
9791 9577 | impl std::future::Future for NullAndEmptyHeadersServerInputFuture {
|
9792 9578 | type Output = Result<
|
9793 9579 | crate::input::NullAndEmptyHeadersServerInput,
|
9794 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9580 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9795 9581 | >;
|
9796 9582 |
|
9797 9583 | fn poll(
|
9798 9584 | self: std::pin::Pin<&mut Self>,
|
9799 9585 | cx: &mut std::task::Context<'_>,
|
9800 9586 | ) -> std::task::Poll<Self::Output> {
|
9801 9587 | let this = self.project();
|
9802 9588 | this.inner.as_mut().poll(cx)
|
9803 9589 | }
|
9804 9590 | }
|
9805 9591 |
|
9806 9592 | impl<B>
|
9807 - | ::aws_smithy_http_server::request::FromRequest<
|
9808 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9593 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
9594 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9809 9595 | B,
|
9810 9596 | > for crate::input::NullAndEmptyHeadersServerInput
|
9811 9597 | where
|
9812 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
9598 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
9813 9599 | B: 'static,
|
9814 9600 |
|
9815 9601 | B::Data: Send,
|
9816 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9817 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
9602 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9603 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
9818 9604 | {
|
9819 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9605 + | type Rejection =
|
9606 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9820 9607 | type Future = NullAndEmptyHeadersServerInputFuture;
|
9821 9608 |
|
9822 9609 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
9823 9610 | let fut = async move {
|
9824 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
9611 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
9825 9612 | request.headers(),
|
9826 9613 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
9827 9614 | ) {
|
9828 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9615 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9829 9616 | }
|
9830 9617 | crate::protocol_serde::shape_null_and_empty_headers_server::de_null_and_empty_headers_server_http_request(request)
|
9831 9618 | .await
|
9832 9619 | };
|
9833 9620 | use ::futures_util::future::TryFutureExt;
|
9834 - | let fut = fut.map_err(
|
9835 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9836 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9837 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
9838 - | e,
|
9839 - | )
|
9840 - | },
|
9841 - | );
|
9621 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9622 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9623 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
9624 + | });
|
9842 9625 | NullAndEmptyHeadersServerInputFuture {
|
9843 9626 | inner: Box::pin(fut),
|
9844 9627 | }
|
9845 9628 | }
|
9846 9629 | }
|
9847 9630 | impl
|
9848 - | ::aws_smithy_http_server::response::IntoResponse<
|
9849 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9631 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9632 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9850 9633 | > for crate::output::NullAndEmptyHeadersServerOutput
|
9851 9634 | {
|
9852 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9635 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9853 9636 | match crate::protocol_serde::shape_null_and_empty_headers_server::ser_null_and_empty_headers_server_http_response(self) {
|
9854 9637 | Ok(response) => response,
|
9855 9638 | Err(e) => {
|
9856 9639 | ::tracing::error!(error = %e, "failed to serialize response");
|
9857 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9640 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9858 9641 | }
|
9859 9642 | }
|
9860 9643 | }
|
9861 9644 | }
|
9862 9645 | impl
|
9863 - | ::aws_smithy_http_server::response::IntoResponse<
|
9864 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9646 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9647 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9865 9648 | > for crate::error::NullAndEmptyHeadersServerError
|
9866 9649 | {
|
9867 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9650 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9868 9651 | match crate::protocol_serde::shape_null_and_empty_headers_server::ser_null_and_empty_headers_server_http_error(&self) {
|
9869 9652 | Ok(mut response) => {
|
9870 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9653 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9871 9654 | response
|
9872 9655 | },
|
9873 9656 | Err(e) => {
|
9874 9657 | ::tracing::error!(error = %e, "failed to serialize response");
|
9875 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9658 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9876 9659 | }
|
9877 9660 | }
|
9878 9661 | }
|
9879 9662 | }
|
9880 9663 |
|
9881 9664 | ::pin_project_lite::pin_project! {
|
9882 9665 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
9883 9666 | /// [`NullAndEmptyHeadersClientInput`](crate::input::NullAndEmptyHeadersClientInput) using modelled bindings.
|
9884 9667 | pub struct NullAndEmptyHeadersClientInputFuture {
|
9885 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NullAndEmptyHeadersClientInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9668 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NullAndEmptyHeadersClientInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9886 9669 | }
|
9887 9670 | }
|
9888 9671 |
|
9889 9672 | impl std::future::Future for NullAndEmptyHeadersClientInputFuture {
|
9890 9673 | type Output = Result<
|
9891 9674 | crate::input::NullAndEmptyHeadersClientInput,
|
9892 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9675 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9893 9676 | >;
|
9894 9677 |
|
9895 9678 | fn poll(
|
9896 9679 | self: std::pin::Pin<&mut Self>,
|
9897 9680 | cx: &mut std::task::Context<'_>,
|
9898 9681 | ) -> std::task::Poll<Self::Output> {
|
9899 9682 | let this = self.project();
|
9900 9683 | this.inner.as_mut().poll(cx)
|
9901 9684 | }
|
9902 9685 | }
|
9903 9686 |
|
9904 9687 | impl<B>
|
9905 - | ::aws_smithy_http_server::request::FromRequest<
|
9906 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9688 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
9689 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9907 9690 | B,
|
9908 9691 | > for crate::input::NullAndEmptyHeadersClientInput
|
9909 9692 | where
|
9910 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
9693 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
9911 9694 | B: 'static,
|
9912 9695 |
|
9913 9696 | B::Data: Send,
|
9914 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9915 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
9697 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9698 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
9916 9699 | {
|
9917 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9700 + | type Rejection =
|
9701 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9918 9702 | type Future = NullAndEmptyHeadersClientInputFuture;
|
9919 9703 |
|
9920 9704 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
9921 9705 | let fut = async move {
|
9922 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
9706 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
9923 9707 | request.headers(),
|
9924 9708 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
9925 9709 | ) {
|
9926 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9710 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9927 9711 | }
|
9928 9712 | crate::protocol_serde::shape_null_and_empty_headers_client::de_null_and_empty_headers_client_http_request(request)
|
9929 9713 | .await
|
9930 9714 | };
|
9931 9715 | use ::futures_util::future::TryFutureExt;
|
9932 - | let fut = fut.map_err(
|
9933 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9934 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9935 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
9936 - | e,
|
9937 - | )
|
9938 - | },
|
9939 - | );
|
9716 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9717 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9718 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
9719 + | });
|
9940 9720 | NullAndEmptyHeadersClientInputFuture {
|
9941 9721 | inner: Box::pin(fut),
|
9942 9722 | }
|
9943 9723 | }
|
9944 9724 | }
|
9945 9725 | impl
|
9946 - | ::aws_smithy_http_server::response::IntoResponse<
|
9947 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9726 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9727 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9948 9728 | > for crate::output::NullAndEmptyHeadersClientOutput
|
9949 9729 | {
|
9950 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9730 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9951 9731 | match crate::protocol_serde::shape_null_and_empty_headers_client::ser_null_and_empty_headers_client_http_response(self) {
|
9952 9732 | Ok(response) => response,
|
9953 9733 | Err(e) => {
|
9954 9734 | ::tracing::error!(error = %e, "failed to serialize response");
|
9955 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9735 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9956 9736 | }
|
9957 9737 | }
|
9958 9738 | }
|
9959 9739 | }
|
9960 9740 | impl
|
9961 - | ::aws_smithy_http_server::response::IntoResponse<
|
9962 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9741 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9742 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
9963 9743 | > for crate::error::NullAndEmptyHeadersClientError
|
9964 9744 | {
|
9965 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9745 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
9966 9746 | match crate::protocol_serde::shape_null_and_empty_headers_client::ser_null_and_empty_headers_client_http_error(&self) {
|
9967 9747 | Ok(mut response) => {
|
9968 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9748 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9969 9749 | response
|
9970 9750 | },
|
9971 9751 | Err(e) => {
|
9972 9752 | ::tracing::error!(error = %e, "failed to serialize response");
|
9973 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9753 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9974 9754 | }
|
9975 9755 | }
|
9976 9756 | }
|
9977 9757 | }
|
9978 9758 |
|
9979 9759 | ::pin_project_lite::pin_project! {
|
9980 9760 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
9981 9761 | /// [`InputAndOutputWithHeadersInput`](crate::input::InputAndOutputWithHeadersInput) using modelled bindings.
|
9982 9762 | pub struct InputAndOutputWithHeadersInputFuture {
|
9983 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::InputAndOutputWithHeadersInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9763 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::InputAndOutputWithHeadersInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9984 9764 | }
|
9985 9765 | }
|
9986 9766 |
|
9987 9767 | impl std::future::Future for InputAndOutputWithHeadersInputFuture {
|
9988 9768 | type Output = Result<
|
9989 9769 | crate::input::InputAndOutputWithHeadersInput,
|
9990 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9770 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9991 9771 | >;
|
9992 9772 |
|
9993 9773 | fn poll(
|
9994 9774 | self: std::pin::Pin<&mut Self>,
|
9995 9775 | cx: &mut std::task::Context<'_>,
|
9996 9776 | ) -> std::task::Poll<Self::Output> {
|
9997 9777 | let this = self.project();
|
9998 9778 | this.inner.as_mut().poll(cx)
|
9999 9779 | }
|
10000 9780 | }
|
10001 9781 |
|
10002 9782 | impl<B>
|
10003 - | ::aws_smithy_http_server::request::FromRequest<
|
10004 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9783 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
9784 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10005 9785 | B,
|
10006 9786 | > for crate::input::InputAndOutputWithHeadersInput
|
10007 9787 | where
|
10008 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
9788 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
10009 9789 | B: 'static,
|
10010 9790 |
|
10011 9791 | B::Data: Send,
|
10012 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
10013 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
9792 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9793 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
10014 9794 | {
|
10015 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9795 + | type Rejection =
|
9796 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
10016 9797 | type Future = InputAndOutputWithHeadersInputFuture;
|
10017 9798 |
|
10018 9799 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
10019 9800 | let fut = async move {
|
10020 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
9801 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
10021 9802 | request.headers(),
|
10022 9803 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
10023 9804 | ) {
|
10024 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9805 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
10025 9806 | }
|
10026 9807 | crate::protocol_serde::shape_input_and_output_with_headers::de_input_and_output_with_headers_http_request(request)
|
10027 9808 | .await
|
10028 9809 | };
|
10029 9810 | use ::futures_util::future::TryFutureExt;
|
10030 - | let fut = fut.map_err(
|
10031 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
10032 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
10033 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
10034 - | e,
|
10035 - | )
|
10036 - | },
|
10037 - | );
|
9811 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9812 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9813 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
9814 + | });
|
10038 9815 | InputAndOutputWithHeadersInputFuture {
|
10039 9816 | inner: Box::pin(fut),
|
10040 9817 | }
|
10041 9818 | }
|
10042 9819 | }
|
10043 9820 | impl
|
10044 - | ::aws_smithy_http_server::response::IntoResponse<
|
10045 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9821 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9822 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10046 9823 | > for crate::output::InputAndOutputWithHeadersOutput
|
10047 9824 | {
|
10048 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9825 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
10049 9826 | match crate::protocol_serde::shape_input_and_output_with_headers::ser_input_and_output_with_headers_http_response(self) {
|
10050 9827 | Ok(response) => response,
|
10051 9828 | Err(e) => {
|
10052 9829 | ::tracing::error!(error = %e, "failed to serialize response");
|
10053 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9830 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10054 9831 | }
|
10055 9832 | }
|
10056 9833 | }
|
10057 9834 | }
|
10058 9835 | impl
|
10059 - | ::aws_smithy_http_server::response::IntoResponse<
|
10060 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9836 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9837 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10061 9838 | > for crate::error::InputAndOutputWithHeadersError
|
10062 9839 | {
|
10063 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9840 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
10064 9841 | match crate::protocol_serde::shape_input_and_output_with_headers::ser_input_and_output_with_headers_http_error(&self) {
|
10065 9842 | Ok(mut response) => {
|
10066 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9843 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
10067 9844 | response
|
10068 9845 | },
|
10069 9846 | Err(e) => {
|
10070 9847 | ::tracing::error!(error = %e, "failed to serialize response");
|
10071 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9848 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10072 9849 | }
|
10073 9850 | }
|
10074 9851 | }
|
10075 9852 | }
|
10076 9853 |
|
10077 9854 | ::pin_project_lite::pin_project! {
|
10078 9855 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
10079 9856 | /// [`UnitInputAndOutputInput`](crate::input::UnitInputAndOutputInput) using modelled bindings.
|
10080 9857 | pub struct UnitInputAndOutputInputFuture {
|
10081 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::UnitInputAndOutputInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9858 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::UnitInputAndOutputInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
10082 9859 | }
|
10083 9860 | }
|
10084 9861 |
|
10085 9862 | impl std::future::Future for UnitInputAndOutputInputFuture {
|
10086 9863 | type Output = Result<
|
10087 9864 | crate::input::UnitInputAndOutputInput,
|
10088 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9865 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
10089 9866 | >;
|
10090 9867 |
|
10091 9868 | fn poll(
|
10092 9869 | self: std::pin::Pin<&mut Self>,
|
10093 9870 | cx: &mut std::task::Context<'_>,
|
10094 9871 | ) -> std::task::Poll<Self::Output> {
|
10095 9872 | let this = self.project();
|
10096 9873 | this.inner.as_mut().poll(cx)
|
10097 9874 | }
|
10098 9875 | }
|
10099 9876 |
|
10100 9877 | impl<B>
|
10101 - | ::aws_smithy_http_server::request::FromRequest<
|
10102 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9878 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
9879 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10103 9880 | B,
|
10104 9881 | > for crate::input::UnitInputAndOutputInput
|
10105 9882 | where
|
10106 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
9883 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
10107 9884 | B: 'static,
|
10108 9885 |
|
10109 9886 | B::Data: Send,
|
10110 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
10111 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
9887 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9888 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
10112 9889 | {
|
10113 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9890 + | type Rejection =
|
9891 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
10114 9892 | type Future = UnitInputAndOutputInputFuture;
|
10115 9893 |
|
10116 9894 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
10117 9895 | let fut = async move {
|
10118 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
9896 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
10119 9897 | request.headers(),
|
10120 9898 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
10121 9899 | ) {
|
10122 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9900 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
10123 9901 | }
|
10124 9902 | crate::protocol_serde::shape_unit_input_and_output::de_unit_input_and_output_http_request(request)
|
10125 9903 | .await
|
10126 9904 | };
|
10127 9905 | use ::futures_util::future::TryFutureExt;
|
10128 - | let fut = fut.map_err(
|
10129 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
10130 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
10131 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
10132 - | e,
|
10133 - | )
|
10134 - | },
|
10135 - | );
|
9906 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
9907 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
9908 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
9909 + | });
|
10136 9910 | UnitInputAndOutputInputFuture {
|
10137 9911 | inner: Box::pin(fut),
|
10138 9912 | }
|
10139 9913 | }
|
10140 9914 | }
|
10141 9915 | impl
|
10142 - | ::aws_smithy_http_server::response::IntoResponse<
|
10143 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9916 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9917 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10144 9918 | > for crate::output::UnitInputAndOutputOutput
|
10145 9919 | {
|
10146 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9920 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
10147 9921 | match crate::protocol_serde::shape_unit_input_and_output::ser_unit_input_and_output_http_response(self) {
|
10148 9922 | Ok(response) => response,
|
10149 9923 | Err(e) => {
|
10150 9924 | ::tracing::error!(error = %e, "failed to serialize response");
|
10151 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9925 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10152 9926 | }
|
10153 9927 | }
|
10154 9928 | }
|
10155 9929 | }
|
10156 9930 | impl
|
10157 - | ::aws_smithy_http_server::response::IntoResponse<
|
10158 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9931 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
9932 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10159 9933 | > for crate::error::UnitInputAndOutputError
|
10160 9934 | {
|
10161 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
9935 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
10162 9936 | match crate::protocol_serde::shape_unit_input_and_output::ser_unit_input_and_output_http_error(&self) {
|
10163 9937 | Ok(mut response) => {
|
10164 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
9938 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
10165 9939 | response
|
10166 9940 | },
|
10167 9941 | Err(e) => {
|
10168 9942 | ::tracing::error!(error = %e, "failed to serialize response");
|
10169 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
9943 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10170 9944 | }
|
10171 9945 | }
|
10172 9946 | }
|
10173 9947 | }
|
10174 9948 |
|
10175 9949 | ::pin_project_lite::pin_project! {
|
10176 9950 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
10177 9951 | /// [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput) using modelled bindings.
|
10178 9952 | pub struct EmptyInputAndEmptyOutputInputFuture {
|
10179 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EmptyInputAndEmptyOutputInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
9953 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EmptyInputAndEmptyOutputInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
10180 9954 | }
|
10181 9955 | }
|
10182 9956 |
|
10183 9957 | impl std::future::Future for EmptyInputAndEmptyOutputInputFuture {
|
10184 9958 | type Output = Result<
|
10185 9959 | crate::input::EmptyInputAndEmptyOutputInput,
|
10186 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
9960 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
10187 9961 | >;
|
10188 9962 |
|
10189 9963 | fn poll(
|
10190 9964 | self: std::pin::Pin<&mut Self>,
|
10191 9965 | cx: &mut std::task::Context<'_>,
|
10192 9966 | ) -> std::task::Poll<Self::Output> {
|
10193 9967 | let this = self.project();
|
10194 9968 | this.inner.as_mut().poll(cx)
|
10195 9969 | }
|
10196 9970 | }
|
10197 9971 |
|
10198 9972 | impl<B>
|
10199 - | ::aws_smithy_http_server::request::FromRequest<
|
10200 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
9973 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
9974 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10201 9975 | B,
|
10202 9976 | > for crate::input::EmptyInputAndEmptyOutputInput
|
10203 9977 | where
|
10204 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
9978 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
10205 9979 | B: 'static,
|
10206 9980 |
|
10207 9981 | B::Data: Send,
|
10208 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
10209 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
9982 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
9983 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
10210 9984 | {
|
10211 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
9985 + | type Rejection =
|
9986 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
10212 9987 | type Future = EmptyInputAndEmptyOutputInputFuture;
|
10213 9988 |
|
10214 9989 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
10215 9990 | let fut = async move {
|
10216 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
9991 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
10217 9992 | request.headers(),
|
10218 9993 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
10219 9994 | ) {
|
10220 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
9995 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
10221 9996 | }
|
10222 9997 | crate::protocol_serde::shape_empty_input_and_empty_output::de_empty_input_and_empty_output_http_request(request)
|
10223 9998 | .await
|
10224 9999 | };
|
10225 10000 | use ::futures_util::future::TryFutureExt;
|
10226 - | let fut = fut.map_err(
|
10227 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
10228 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
10229 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
10230 - | e,
|
10231 - | )
|
10232 - | },
|
10233 - | );
|
10001 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
10002 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
10003 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
10004 + | });
|
10234 10005 | EmptyInputAndEmptyOutputInputFuture {
|
10235 10006 | inner: Box::pin(fut),
|
10236 10007 | }
|
10237 10008 | }
|
10238 10009 | }
|
10239 10010 | impl
|
10240 - | ::aws_smithy_http_server::response::IntoResponse<
|
10241 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
10011 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
10012 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10242 10013 | > for crate::output::EmptyInputAndEmptyOutputOutput
|
10243 10014 | {
|
10244 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
10015 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
10245 10016 | match crate::protocol_serde::shape_empty_input_and_empty_output::ser_empty_input_and_empty_output_http_response(self) {
|
10246 10017 | Ok(response) => response,
|
10247 10018 | Err(e) => {
|
10248 10019 | ::tracing::error!(error = %e, "failed to serialize response");
|
10249 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10020 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10250 10021 | }
|
10251 10022 | }
|
10252 10023 | }
|
10253 10024 | }
|
10254 10025 | impl
|
10255 - | ::aws_smithy_http_server::response::IntoResponse<
|
10256 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
10026 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
10027 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10257 10028 | > for crate::error::EmptyInputAndEmptyOutputError
|
10258 10029 | {
|
10259 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
10030 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
10260 10031 | match crate::protocol_serde::shape_empty_input_and_empty_output::ser_empty_input_and_empty_output_http_error(&self) {
|
10261 10032 | Ok(mut response) => {
|
10262 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
10033 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
10263 10034 | response
|
10264 10035 | },
|
10265 10036 | Err(e) => {
|
10266 10037 | ::tracing::error!(error = %e, "failed to serialize response");
|
10267 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10038 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10268 10039 | }
|
10269 10040 | }
|
10270 10041 | }
|
10271 10042 | }
|
10272 10043 |
|
10273 10044 | ::pin_project_lite::pin_project! {
|
10274 10045 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
10275 10046 | /// [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput) using modelled bindings.
|
10276 10047 | pub struct NoInputAndOutputInputFuture {
|
10277 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NoInputAndOutputInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
10048 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NoInputAndOutputInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
10278 10049 | }
|
10279 10050 | }
|
10280 10051 |
|
10281 10052 | impl std::future::Future for NoInputAndOutputInputFuture {
|
10282 10053 | type Output = Result<
|
10283 10054 | crate::input::NoInputAndOutputInput,
|
10284 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
10055 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
10285 10056 | >;
|
10286 10057 |
|
10287 10058 | fn poll(
|
10288 10059 | self: std::pin::Pin<&mut Self>,
|
10289 10060 | cx: &mut std::task::Context<'_>,
|
10290 10061 | ) -> std::task::Poll<Self::Output> {
|
10291 10062 | let this = self.project();
|
10292 10063 | this.inner.as_mut().poll(cx)
|
10293 10064 | }
|
10294 10065 | }
|
10295 10066 |
|
10296 10067 | impl<B>
|
10297 - | ::aws_smithy_http_server::request::FromRequest<
|
10298 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
10068 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
10069 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10299 10070 | B,
|
10300 10071 | > for crate::input::NoInputAndOutputInput
|
10301 10072 | where
|
10302 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
10073 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
10303 10074 | B: 'static,
|
10304 10075 |
|
10305 10076 | B::Data: Send,
|
10306 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
10307 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
10077 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
10078 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
10308 10079 | {
|
10309 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
10080 + | type Rejection =
|
10081 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
10310 10082 | type Future = NoInputAndOutputInputFuture;
|
10311 10083 |
|
10312 10084 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
10313 10085 | let fut = async move {
|
10314 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
10086 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
10315 10087 | request.headers(),
|
10316 10088 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
10317 10089 | ) {
|
10318 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
10090 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
10319 10091 | }
|
10320 10092 | crate::protocol_serde::shape_no_input_and_output::de_no_input_and_output_http_request(
|
10321 10093 | request,
|
10322 10094 | )
|
10323 10095 | .await
|
10324 10096 | };
|
10325 10097 | use ::futures_util::future::TryFutureExt;
|
10326 - | let fut = fut.map_err(
|
10327 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
10328 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
10329 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
10330 - | e,
|
10331 - | )
|
10332 - | },
|
10333 - | );
|
10098 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
10099 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
10100 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
10101 + | });
|
10334 10102 | NoInputAndOutputInputFuture {
|
10335 10103 | inner: Box::pin(fut),
|
10336 10104 | }
|
10337 10105 | }
|
10338 10106 | }
|
10339 10107 | impl
|
10340 - | ::aws_smithy_http_server::response::IntoResponse<
|
10341 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
10108 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
10109 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10342 10110 | > for crate::output::NoInputAndOutputOutput
|
10343 10111 | {
|
10344 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
10112 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
10345 10113 | match crate::protocol_serde::shape_no_input_and_output::ser_no_input_and_output_http_response(self) {
|
10346 10114 | Ok(response) => response,
|
10347 10115 | Err(e) => {
|
10348 10116 | ::tracing::error!(error = %e, "failed to serialize response");
|
10349 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10117 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10350 10118 | }
|
10351 10119 | }
|
10352 10120 | }
|
10353 10121 | }
|
10354 10122 | impl
|
10355 - | ::aws_smithy_http_server::response::IntoResponse<
|
10356 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
10123 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
10124 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10357 10125 | > for crate::error::NoInputAndOutputError
|
10358 10126 | {
|
10359 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
10127 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
10360 10128 | match crate::protocol_serde::shape_no_input_and_output::ser_no_input_and_output_http_error(
|
10361 10129 | &self,
|
10362 10130 | ) {
|
10363 10131 | Ok(mut response) => {
|
10364 10132 | response.extensions_mut().insert(
|
10365 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
10133 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
10134 + | self.name(),
|
10135 + | ),
|
10366 10136 | );
|
10367 10137 | response
|
10368 10138 | }
|
10369 10139 | Err(e) => {
|
10370 10140 | ::tracing::error!(error = %e, "failed to serialize response");
|
10371 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10141 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10372 10142 | }
|
10373 10143 | }
|
10374 10144 | }
|
10375 10145 | }
|
10376 10146 |
|
10377 10147 | ::pin_project_lite::pin_project! {
|
10378 10148 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
10379 10149 | /// [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput) using modelled bindings.
|
10380 10150 | pub struct NoInputAndNoOutputInputFuture {
|
10381 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NoInputAndNoOutputInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
10151 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NoInputAndNoOutputInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
10382 10152 | }
|
10383 10153 | }
|
10384 10154 |
|
10385 10155 | impl std::future::Future for NoInputAndNoOutputInputFuture {
|
10386 10156 | type Output = Result<
|
10387 10157 | crate::input::NoInputAndNoOutputInput,
|
10388 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
10158 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
10389 10159 | >;
|
10390 10160 |
|
10391 10161 | fn poll(
|
10392 10162 | self: std::pin::Pin<&mut Self>,
|
10393 10163 | cx: &mut std::task::Context<'_>,
|
10394 10164 | ) -> std::task::Poll<Self::Output> {
|
10395 10165 | let this = self.project();
|
10396 10166 | this.inner.as_mut().poll(cx)
|
10397 10167 | }
|
10398 10168 | }
|
10399 10169 |
|
10400 10170 | impl<B>
|
10401 - | ::aws_smithy_http_server::request::FromRequest<
|
10402 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
10171 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
10172 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10403 10173 | B,
|
10404 10174 | > for crate::input::NoInputAndNoOutputInput
|
10405 10175 | where
|
10406 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
10176 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
10407 10177 | B: 'static,
|
10408 10178 |
|
10409 10179 | B::Data: Send,
|
10410 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
10411 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
10180 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
10181 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
10412 10182 | {
|
10413 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
10183 + | type Rejection =
|
10184 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
10414 10185 | type Future = NoInputAndNoOutputInputFuture;
|
10415 10186 |
|
10416 10187 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
10417 10188 | let fut = async move {
|
10418 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
10189 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
10419 10190 | request.headers(),
|
10420 10191 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
10421 10192 | ) {
|
10422 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
10193 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
10423 10194 | }
|
10424 10195 | crate::protocol_serde::shape_no_input_and_no_output::de_no_input_and_no_output_http_request(request)
|
10425 10196 | .await
|
10426 10197 | };
|
10427 10198 | use ::futures_util::future::TryFutureExt;
|
10428 - | let fut = fut.map_err(
|
10429 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
10430 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
10431 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
10432 - | e,
|
10433 - | )
|
10434 - | },
|
10435 - | );
|
10199 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
10200 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
10201 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
10202 + | });
|
10436 10203 | NoInputAndNoOutputInputFuture {
|
10437 10204 | inner: Box::pin(fut),
|
10438 10205 | }
|
10439 10206 | }
|
10440 10207 | }
|
10441 10208 | impl
|
10442 - | ::aws_smithy_http_server::response::IntoResponse<
|
10443 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
10209 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
10210 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10444 10211 | > for crate::output::NoInputAndNoOutputOutput
|
10445 10212 | {
|
10446 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
10213 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
10447 10214 | match crate::protocol_serde::shape_no_input_and_no_output::ser_no_input_and_no_output_http_response(self) {
|
10448 10215 | Ok(response) => response,
|
10449 10216 | Err(e) => {
|
10450 10217 | ::tracing::error!(error = %e, "failed to serialize response");
|
10451 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10218 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10452 10219 | }
|
10453 10220 | }
|
10454 10221 | }
|
10455 10222 | }
|
10456 10223 | impl
|
10457 - | ::aws_smithy_http_server::response::IntoResponse<
|
10458 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
10224 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
10225 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
10459 10226 | > for crate::error::NoInputAndNoOutputError
|
10460 10227 | {
|
10461 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
10228 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
10462 10229 | match crate::protocol_serde::shape_no_input_and_no_output::ser_no_input_and_no_output_http_error(&self) {
|
10463 10230 | Ok(mut response) => {
|
10464 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
10231 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
10465 10232 | response
|
10466 10233 | },
|
10467 10234 | Err(e) => {
|
10468 10235 | ::tracing::error!(error = %e, "failed to serialize response");
|
10469 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10236 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
10470 10237 | }
|
10471 10238 | }
|
10472 10239 | }
|
10473 10240 | }
|