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 | /// [`GetStorageInput`](crate::input::GetStorageInput) using modelled bindings.
|
5 5 | pub struct GetStorageInputFuture {
|
6 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetStorageInput, ::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::GetStorageInput, ::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 GetStorageInputFuture {
|
11 11 | type Output = Result<
|
12 12 | crate::input::GetStorageInput,
|
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::GetStorageInput
|
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 = GetStorageInputFuture;
|
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_get_storage::de_get_storage_http_request(request).await
|
50 51 | };
|
51 52 | use ::futures_util::future::TryFutureExt;
|
52 - | let fut = fut.map_err(
|
53 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
54 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
55 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
56 - | e,
|
57 - | )
|
58 - | },
|
59 - | );
|
53 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
54 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
55 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
56 + | });
|
60 57 | GetStorageInputFuture {
|
61 58 | inner: Box::pin(fut),
|
62 59 | }
|
63 60 | }
|
64 61 | }
|
65 62 | impl
|
66 - | ::aws_smithy_http_server::response::IntoResponse<
|
67 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
63 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
64 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
68 65 | > for crate::output::GetStorageOutput
|
69 66 | {
|
70 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
67 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
71 68 | match crate::protocol_serde::shape_get_storage::ser_get_storage_http_response(self) {
|
72 69 | Ok(response) => response,
|
73 70 | Err(e) => {
|
74 71 | ::tracing::error!(error = %e, "failed to serialize response");
|
75 - | ::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))
|
72 + | ::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))
|
76 73 | }
|
77 74 | }
|
78 75 | }
|
79 76 | }
|
80 77 | impl
|
81 - | ::aws_smithy_http_server::response::IntoResponse<
|
82 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
78 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
79 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
83 80 | > for crate::error::GetStorageError
|
84 81 | {
|
85 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
82 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
86 83 | match crate::protocol_serde::shape_get_storage::ser_get_storage_http_error(&self) {
|
87 84 | Ok(mut response) => {
|
88 85 | response.extensions_mut().insert(
|
89 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
86 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
87 + | self.name(),
|
88 + | ),
|
90 89 | );
|
91 90 | response
|
92 91 | }
|
93 92 | Err(e) => {
|
94 93 | ::tracing::error!(error = %e, "failed to serialize response");
|
95 - | ::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))
|
94 + | ::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))
|
96 95 | }
|
97 96 | }
|
98 97 | }
|
99 98 | }
|
100 99 |
|
101 100 | ::pin_project_lite::pin_project! {
|
102 101 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
103 102 | /// [`GetPokemonSpeciesInput`](crate::input::GetPokemonSpeciesInput) using modelled bindings.
|
104 103 | pub struct GetPokemonSpeciesInputFuture {
|
105 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetPokemonSpeciesInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
104 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetPokemonSpeciesInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
106 105 | }
|
107 106 | }
|
108 107 |
|
109 108 | impl std::future::Future for GetPokemonSpeciesInputFuture {
|
110 109 | type Output = Result<
|
111 110 | crate::input::GetPokemonSpeciesInput,
|
112 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
111 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
113 112 | >;
|
114 113 |
|
115 114 | fn poll(
|
116 115 | self: std::pin::Pin<&mut Self>,
|
117 116 | cx: &mut std::task::Context<'_>,
|
118 117 | ) -> std::task::Poll<Self::Output> {
|
119 118 | let this = self.project();
|
120 119 | this.inner.as_mut().poll(cx)
|
121 120 | }
|
122 121 | }
|
123 122 |
|
124 123 | impl<B>
|
125 - | ::aws_smithy_http_server::request::FromRequest<
|
126 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
124 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
125 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
127 126 | B,
|
128 127 | > for crate::input::GetPokemonSpeciesInput
|
129 128 | where
|
130 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
129 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
131 130 | B: 'static,
|
132 131 |
|
133 132 | B::Data: Send,
|
134 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
135 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
133 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
134 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
136 135 | {
|
137 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
136 + | type Rejection =
|
137 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
138 138 | type Future = GetPokemonSpeciesInputFuture;
|
139 139 |
|
140 140 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
141 141 | let fut = async move {
|
142 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
142 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
143 143 | request.headers(),
|
144 144 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
145 145 | ) {
|
146 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
146 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
147 147 | }
|
148 148 | crate::protocol_serde::shape_get_pokemon_species::de_get_pokemon_species_http_request(
|
149 149 | request,
|
150 150 | )
|
151 151 | .await
|
152 152 | };
|
153 153 | use ::futures_util::future::TryFutureExt;
|
154 - | let fut = fut.map_err(
|
155 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
156 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
157 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
158 - | e,
|
159 - | )
|
160 - | },
|
161 - | );
|
154 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
155 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
156 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
157 + | });
|
162 158 | GetPokemonSpeciesInputFuture {
|
163 159 | inner: Box::pin(fut),
|
164 160 | }
|
165 161 | }
|
166 162 | }
|
167 163 | impl
|
168 - | ::aws_smithy_http_server::response::IntoResponse<
|
169 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
164 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
165 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
170 166 | > for crate::output::GetPokemonSpeciesOutput
|
171 167 | {
|
172 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
168 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
173 169 | match crate::protocol_serde::shape_get_pokemon_species::ser_get_pokemon_species_http_response(self) {
|
174 170 | Ok(response) => response,
|
175 171 | Err(e) => {
|
176 172 | ::tracing::error!(error = %e, "failed to serialize response");
|
177 - | ::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))
|
173 + | ::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))
|
178 174 | }
|
179 175 | }
|
180 176 | }
|
181 177 | }
|
182 178 | impl
|
183 - | ::aws_smithy_http_server::response::IntoResponse<
|
184 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
179 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
180 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
185 181 | > for crate::error::GetPokemonSpeciesError
|
186 182 | {
|
187 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
183 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
188 184 | match crate::protocol_serde::shape_get_pokemon_species::ser_get_pokemon_species_http_error(
|
189 185 | &self,
|
190 186 | ) {
|
191 187 | Ok(mut response) => {
|
192 188 | response.extensions_mut().insert(
|
193 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
189 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
190 + | self.name(),
|
191 + | ),
|
194 192 | );
|
195 193 | response
|
196 194 | }
|
197 195 | Err(e) => {
|
198 196 | ::tracing::error!(error = %e, "failed to serialize response");
|
199 - | ::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))
|
197 + | ::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))
|
200 198 | }
|
201 199 | }
|
202 200 | }
|
203 201 | }
|
204 202 |
|
205 203 | ::pin_project_lite::pin_project! {
|
206 204 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
207 205 | /// [`StreamPokemonRadioInput`](crate::input::StreamPokemonRadioInput) using modelled bindings.
|
208 206 | pub struct StreamPokemonRadioInputFuture {
|
209 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StreamPokemonRadioInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
207 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StreamPokemonRadioInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
210 208 | }
|
211 209 | }
|
212 210 |
|
213 211 | impl std::future::Future for StreamPokemonRadioInputFuture {
|
214 212 | type Output = Result<
|
215 213 | crate::input::StreamPokemonRadioInput,
|
216 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
214 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
217 215 | >;
|
218 216 |
|
219 217 | fn poll(
|
220 218 | self: std::pin::Pin<&mut Self>,
|
221 219 | cx: &mut std::task::Context<'_>,
|
222 220 | ) -> std::task::Poll<Self::Output> {
|
223 221 | let this = self.project();
|
224 222 | this.inner.as_mut().poll(cx)
|
225 223 | }
|
226 224 | }
|
227 225 |
|
228 226 | impl<B>
|
229 - | ::aws_smithy_http_server::request::FromRequest<
|
230 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
227 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
228 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
231 229 | B,
|
232 230 | > for crate::input::StreamPokemonRadioInput
|
233 231 | where
|
234 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
232 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
235 233 | B: 'static,
|
236 234 |
|
237 235 | B::Data: Send,
|
238 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
239 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
236 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
237 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
240 238 | {
|
241 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
239 + | type Rejection =
|
240 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
242 241 | type Future = StreamPokemonRadioInputFuture;
|
243 242 |
|
244 243 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
245 244 | let fut = async move {
|
246 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
245 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
247 246 | request.headers(),
|
248 247 | &crate::mimes::CONTENT_TYPE_APPLICATION_OCTET_STREAM,
|
249 248 | ) {
|
250 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
249 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
251 250 | }
|
252 251 | crate::protocol_serde::shape_stream_pokemon_radio::de_stream_pokemon_radio_http_request(
|
253 252 | request,
|
254 253 | )
|
255 254 | .await
|
256 255 | };
|
257 256 | use ::futures_util::future::TryFutureExt;
|
258 - | let fut = fut.map_err(
|
259 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
260 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
261 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
262 - | e,
|
263 - | )
|
264 - | },
|
265 - | );
|
257 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
258 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
259 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
260 + | });
|
266 261 | StreamPokemonRadioInputFuture {
|
267 262 | inner: Box::pin(fut),
|
268 263 | }
|
269 264 | }
|
270 265 | }
|
271 266 | impl
|
272 - | ::aws_smithy_http_server::response::IntoResponse<
|
273 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
267 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
268 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
274 269 | > for crate::output::StreamPokemonRadioOutput
|
275 270 | {
|
276 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
271 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
277 272 | match crate::protocol_serde::shape_stream_pokemon_radio::ser_stream_pokemon_radio_http_response(self) {
|
278 273 | Ok(response) => response,
|
279 274 | Err(e) => {
|
280 275 | ::tracing::error!(error = %e, "failed to serialize response");
|
281 - | ::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))
|
276 + | ::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))
|
282 277 | }
|
283 278 | }
|
284 279 | }
|
285 280 | }
|
286 281 | impl
|
287 - | ::aws_smithy_http_server::response::IntoResponse<
|
288 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
282 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
283 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
289 284 | > for crate::error::StreamPokemonRadioError
|
290 285 | {
|
291 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
286 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
292 287 | match crate::protocol_serde::shape_stream_pokemon_radio::ser_stream_pokemon_radio_http_error(
|
293 288 | &self,
|
294 289 | ) {
|
295 290 | Ok(mut response) => {
|
296 291 | response.extensions_mut().insert(
|
297 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
292 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
293 + | self.name(),
|
294 + | ),
|
298 295 | );
|
299 296 | response
|
300 297 | }
|
301 298 | Err(e) => {
|
302 299 | ::tracing::error!(error = %e, "failed to serialize response");
|
303 - | ::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))
|
300 + | ::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))
|
304 301 | }
|
305 302 | }
|
306 303 | }
|
307 304 | }
|
308 305 |
|
309 306 | ::pin_project_lite::pin_project! {
|
310 307 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
311 308 | /// [`CheckHealthInput`](crate::input::CheckHealthInput) using modelled bindings.
|
312 309 | pub struct CheckHealthInputFuture {
|
313 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CheckHealthInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
310 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CheckHealthInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
314 311 | }
|
315 312 | }
|
316 313 |
|
317 314 | impl std::future::Future for CheckHealthInputFuture {
|
318 315 | type Output = Result<
|
319 316 | crate::input::CheckHealthInput,
|
320 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
317 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
321 318 | >;
|
322 319 |
|
323 320 | fn poll(
|
324 321 | self: std::pin::Pin<&mut Self>,
|
325 322 | cx: &mut std::task::Context<'_>,
|
326 323 | ) -> std::task::Poll<Self::Output> {
|
327 324 | let this = self.project();
|
328 325 | this.inner.as_mut().poll(cx)
|
329 326 | }
|
330 327 | }
|
331 328 |
|
332 329 | impl<B>
|
333 - | ::aws_smithy_http_server::request::FromRequest<
|
334 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
330 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
331 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
335 332 | B,
|
336 333 | > for crate::input::CheckHealthInput
|
337 334 | where
|
338 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
335 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
339 336 | B: 'static,
|
340 337 |
|
341 338 | B::Data: Send,
|
342 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
343 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
339 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
340 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
344 341 | {
|
345 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
342 + | type Rejection =
|
343 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
346 344 | type Future = CheckHealthInputFuture;
|
347 345 |
|
348 346 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
349 347 | let fut = async move {
|
350 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
348 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
351 349 | request.headers(),
|
352 350 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
353 351 | ) {
|
354 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
352 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
355 353 | }
|
356 354 | crate::protocol_serde::shape_check_health::de_check_health_http_request(request).await
|
357 355 | };
|
358 356 | use ::futures_util::future::TryFutureExt;
|
359 - | let fut = fut.map_err(
|
360 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
361 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
362 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
363 - | e,
|
364 - | )
|
365 - | },
|
366 - | );
|
357 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
358 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
359 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
360 + | });
|
367 361 | CheckHealthInputFuture {
|
368 362 | inner: Box::pin(fut),
|
369 363 | }
|
370 364 | }
|
371 365 | }
|
372 366 | impl
|
373 - | ::aws_smithy_http_server::response::IntoResponse<
|
374 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
367 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
368 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
375 369 | > for crate::output::CheckHealthOutput
|
376 370 | {
|
377 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
371 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
378 372 | match crate::protocol_serde::shape_check_health::ser_check_health_http_response(self) {
|
379 373 | Ok(response) => response,
|
380 374 | Err(e) => {
|
381 375 | ::tracing::error!(error = %e, "failed to serialize response");
|
382 - | ::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))
|
383 377 | }
|
384 378 | }
|
385 379 | }
|
386 380 | }
|
387 381 | impl
|
388 - | ::aws_smithy_http_server::response::IntoResponse<
|
389 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
382 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
383 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
390 384 | > for crate::error::CheckHealthError
|
391 385 | {
|
392 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
386 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
393 387 | match crate::protocol_serde::shape_check_health::ser_check_health_http_error(&self) {
|
394 388 | Ok(mut response) => {
|
395 389 | response.extensions_mut().insert(
|
396 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
390 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
391 + | self.name(),
|
392 + | ),
|
397 393 | );
|
398 394 | response
|
399 395 | }
|
400 396 | Err(e) => {
|
401 397 | ::tracing::error!(error = %e, "failed to serialize response");
|
402 - | ::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))
|
398 + | ::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))
|
403 399 | }
|
404 400 | }
|
405 401 | }
|
406 402 | }
|
407 403 |
|
408 404 | ::pin_project_lite::pin_project! {
|
409 405 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
410 406 | /// [`CapturePokemonInput`](crate::input::CapturePokemonInput) using modelled bindings.
|
411 407 | pub struct CapturePokemonInputFuture {
|
412 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CapturePokemonInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
408 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CapturePokemonInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
413 409 | }
|
414 410 | }
|
415 411 |
|
416 412 | impl std::future::Future for CapturePokemonInputFuture {
|
417 413 | type Output = Result<
|
418 414 | crate::input::CapturePokemonInput,
|
419 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
415 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
420 416 | >;
|
421 417 |
|
422 418 | fn poll(
|
423 419 | self: std::pin::Pin<&mut Self>,
|
424 420 | cx: &mut std::task::Context<'_>,
|
425 421 | ) -> std::task::Poll<Self::Output> {
|
426 422 | let this = self.project();
|
427 423 | this.inner.as_mut().poll(cx)
|
428 424 | }
|
429 425 | }
|
430 426 |
|
431 427 | impl<B>
|
432 - | ::aws_smithy_http_server::request::FromRequest<
|
433 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
428 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
429 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
434 430 | B,
|
435 431 | > for crate::input::CapturePokemonInput
|
436 432 | where
|
437 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
433 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
438 434 | B: 'static,
|
439 435 |
|
440 436 | B: Into<::aws_smithy_types::byte_stream::ByteStream>,
|
441 437 | B::Data: Send,
|
442 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
443 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
438 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
439 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
444 440 | {
|
445 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
441 + | type Rejection =
|
442 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
446 443 | type Future = CapturePokemonInputFuture;
|
447 444 |
|
448 445 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
449 446 | let fut = async move {
|
450 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
447 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
451 448 | request.headers(),
|
452 449 | &crate::mimes::CONTENT_TYPE_APPLICATION_VND_AMAZON_EVENTSTREAM,
|
453 450 | ) {
|
454 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
451 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
455 452 | }
|
456 453 | crate::protocol_serde::shape_capture_pokemon::de_capture_pokemon_http_request(request)
|
457 454 | .await
|
458 455 | };
|
459 456 | use ::futures_util::future::TryFutureExt;
|
460 - | let fut = fut.map_err(
|
461 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
462 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
463 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
464 - | e,
|
465 - | )
|
466 - | },
|
467 - | );
|
457 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
458 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
459 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
460 + | });
|
468 461 | CapturePokemonInputFuture {
|
469 462 | inner: Box::pin(fut),
|
470 463 | }
|
471 464 | }
|
472 465 | }
|
473 466 | impl
|
474 - | ::aws_smithy_http_server::response::IntoResponse<
|
475 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
467 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
468 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
476 469 | > for crate::output::CapturePokemonOutput
|
477 470 | {
|
478 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
471 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
479 472 | match crate::protocol_serde::shape_capture_pokemon::ser_capture_pokemon_http_response(self)
|
480 473 | {
|
481 474 | Ok(response) => response,
|
482 475 | Err(e) => {
|
483 476 | ::tracing::error!(error = %e, "failed to serialize response");
|
484 - | ::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))
|
477 + | ::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))
|
485 478 | }
|
486 479 | }
|
487 480 | }
|
488 481 | }
|
489 482 | impl
|
490 - | ::aws_smithy_http_server::response::IntoResponse<
|
491 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
483 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
484 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
492 485 | > for crate::error::CapturePokemonError
|
493 486 | {
|
494 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
487 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
495 488 | match crate::protocol_serde::shape_capture_pokemon::ser_capture_pokemon_http_error(&self) {
|
496 489 | Ok(mut response) => {
|
497 490 | response.extensions_mut().insert(
|
498 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
491 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
492 + | self.name(),
|
493 + | ),
|
499 494 | );
|
500 495 | response
|
501 496 | }
|
502 497 | Err(e) => {
|
503 498 | ::tracing::error!(error = %e, "failed to serialize response");
|
504 - | ::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))
|
499 + | ::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))
|
505 500 | }
|
506 501 | }
|
507 502 | }
|
508 503 | }
|
509 504 |
|
510 505 | ::pin_project_lite::pin_project! {
|
511 506 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
512 507 | /// [`DoNothingInput`](crate::input::DoNothingInput) using modelled bindings.
|
513 508 | pub struct DoNothingInputFuture {
|
514 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DoNothingInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
509 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DoNothingInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
515 510 | }
|
516 511 | }
|
517 512 |
|
518 513 | impl std::future::Future for DoNothingInputFuture {
|
519 514 | type Output = Result<
|
520 515 | crate::input::DoNothingInput,
|
521 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
516 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
522 517 | >;
|
523 518 |
|
524 519 | fn poll(
|
525 520 | self: std::pin::Pin<&mut Self>,
|
526 521 | cx: &mut std::task::Context<'_>,
|
527 522 | ) -> std::task::Poll<Self::Output> {
|
528 523 | let this = self.project();
|
529 524 | this.inner.as_mut().poll(cx)
|
530 525 | }
|
531 526 | }
|
532 527 |
|
533 528 | impl<B>
|
534 - | ::aws_smithy_http_server::request::FromRequest<
|
535 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
529 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
530 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
536 531 | B,
|
537 532 | > for crate::input::DoNothingInput
|
538 533 | where
|
539 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
534 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
540 535 | B: 'static,
|
541 536 |
|
542 537 | B::Data: Send,
|
543 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
544 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
538 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
539 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
545 540 | {
|
546 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
541 + | type Rejection =
|
542 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
547 543 | type Future = DoNothingInputFuture;
|
548 544 |
|
549 545 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
550 546 | let fut = async move {
|
551 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
547 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
552 548 | request.headers(),
|
553 549 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
554 550 | ) {
|
555 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
551 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
556 552 | }
|
557 553 | crate::protocol_serde::shape_do_nothing::de_do_nothing_http_request(request).await
|
558 554 | };
|
559 555 | use ::futures_util::future::TryFutureExt;
|
560 - | let fut = fut.map_err(
|
561 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
562 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
563 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
564 - | e,
|
565 - | )
|
566 - | },
|
567 - | );
|
556 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
557 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
558 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
559 + | });
|
568 560 | DoNothingInputFuture {
|
569 561 | inner: Box::pin(fut),
|
570 562 | }
|
571 563 | }
|
572 564 | }
|
573 565 | impl
|
574 - | ::aws_smithy_http_server::response::IntoResponse<
|
575 - | ::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,
|
576 568 | > for crate::output::DoNothingOutput
|
577 569 | {
|
578 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
570 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
579 571 | match crate::protocol_serde::shape_do_nothing::ser_do_nothing_http_response(self) {
|
580 572 | Ok(response) => response,
|
581 573 | Err(e) => {
|
582 574 | ::tracing::error!(error = %e, "failed to serialize response");
|
583 - | ::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))
|
575 + | ::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))
|
584 576 | }
|
585 577 | }
|
586 578 | }
|
587 579 | }
|
588 580 | impl
|
589 - | ::aws_smithy_http_server::response::IntoResponse<
|
590 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
581 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
582 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
591 583 | > for crate::error::DoNothingError
|
592 584 | {
|
593 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
585 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
594 586 | match crate::protocol_serde::shape_do_nothing::ser_do_nothing_http_error(&self) {
|
595 587 | Ok(mut response) => {
|
596 588 | response.extensions_mut().insert(
|
597 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
589 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
590 + | self.name(),
|
591 + | ),
|
598 592 | );
|
599 593 | response
|
600 594 | }
|
601 595 | Err(e) => {
|
602 596 | ::tracing::error!(error = %e, "failed to serialize response");
|
603 - | ::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))
|
597 + | ::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))
|
604 598 | }
|
605 599 | }
|
606 600 | }
|
607 601 | }
|
608 602 |
|
609 603 | ::pin_project_lite::pin_project! {
|
610 604 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
611 605 | /// [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput) using modelled bindings.
|
612 606 | pub struct GetServerStatisticsInputFuture {
|
613 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetServerStatisticsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
607 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetServerStatisticsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
614 608 | }
|
615 609 | }
|
616 610 |
|
617 611 | impl std::future::Future for GetServerStatisticsInputFuture {
|
618 612 | type Output = Result<
|
619 613 | crate::input::GetServerStatisticsInput,
|
620 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
614 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
621 615 | >;
|
622 616 |
|
623 617 | fn poll(
|
624 618 | self: std::pin::Pin<&mut Self>,
|
625 619 | cx: &mut std::task::Context<'_>,
|
626 620 | ) -> std::task::Poll<Self::Output> {
|
627 621 | let this = self.project();
|
628 622 | this.inner.as_mut().poll(cx)
|
629 623 | }
|
630 624 | }
|
631 625 |
|
632 626 | impl<B>
|
633 - | ::aws_smithy_http_server::request::FromRequest<
|
634 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
627 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
628 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
635 629 | B,
|
636 630 | > for crate::input::GetServerStatisticsInput
|
637 631 | where
|
638 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
632 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
639 633 | B: 'static,
|
640 634 |
|
641 635 | B::Data: Send,
|
642 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
643 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
636 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
637 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
644 638 | {
|
645 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
639 + | type Rejection =
|
640 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
646 641 | type Future = GetServerStatisticsInputFuture;
|
647 642 |
|
648 643 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
649 644 | let fut = async move {
|
650 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
645 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
651 646 | request.headers(),
|
652 647 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
653 648 | ) {
|
654 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
649 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
655 650 | }
|
656 651 | crate::protocol_serde::shape_get_server_statistics::de_get_server_statistics_http_request(request)
|
657 652 | .await
|
658 653 | };
|
659 654 | use ::futures_util::future::TryFutureExt;
|
660 - | let fut = fut.map_err(
|
661 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
662 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
663 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
664 - | e,
|
665 - | )
|
666 - | },
|
667 - | );
|
655 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
656 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
657 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
658 + | });
|
668 659 | GetServerStatisticsInputFuture {
|
669 660 | inner: Box::pin(fut),
|
670 661 | }
|
671 662 | }
|
672 663 | }
|
673 664 | impl
|
674 - | ::aws_smithy_http_server::response::IntoResponse<
|
675 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
665 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
666 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
676 667 | > for crate::output::GetServerStatisticsOutput
|
677 668 | {
|
678 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
669 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
679 670 | match crate::protocol_serde::shape_get_server_statistics::ser_get_server_statistics_http_response(self) {
|
680 671 | Ok(response) => response,
|
681 672 | Err(e) => {
|
682 673 | ::tracing::error!(error = %e, "failed to serialize response");
|
683 - | ::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))
|
674 + | ::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))
|
684 675 | }
|
685 676 | }
|
686 677 | }
|
687 678 | }
|
688 679 | impl
|
689 - | ::aws_smithy_http_server::response::IntoResponse<
|
690 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
680 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
681 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
691 682 | > for crate::error::GetServerStatisticsError
|
692 683 | {
|
693 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
684 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
694 685 | match crate::protocol_serde::shape_get_server_statistics::ser_get_server_statistics_http_error(&self) {
|
695 686 | Ok(mut response) => {
|
696 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
687 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
697 688 | response
|
698 689 | },
|
699 690 | Err(e) => {
|
700 691 | ::tracing::error!(error = %e, "failed to serialize response");
|
701 - | ::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))
|
692 + | ::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))
|
702 693 | }
|
703 694 | }
|
704 695 | }
|
705 696 | }
|