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 - | /// [`HttpQueryParamsOnlyOperationInput`](crate::input::HttpQueryParamsOnlyOperationInput) using modelled bindings.
|
5 - | pub struct HttpQueryParamsOnlyOperationInputFuture {
|
6 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpQueryParamsOnlyOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7 - | }
|
8 - | }
|
9 - |
|
10 - | impl std::future::Future for HttpQueryParamsOnlyOperationInputFuture {
|
11 - | type Output = Result<
|
12 - | crate::input::HttpQueryParamsOnlyOperationInput,
|
13 - | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
14 - | >;
|
15 - |
|
16 - | fn poll(
|
17 - | self: std::pin::Pin<&mut Self>,
|
18 - | cx: &mut std::task::Context<'_>,
|
19 - | ) -> std::task::Poll<Self::Output> {
|
20 - | let this = self.project();
|
21 - | this.inner.as_mut().poll(cx)
|
22 - | }
|
23 - | }
|
24 - |
|
25 - | impl<B>
|
26 - | ::aws_smithy_legacy_http_server::request::FromRequest<
|
27 - | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
28 - | B,
|
29 - | > for crate::input::HttpQueryParamsOnlyOperationInput
|
30 - | where
|
31 - | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
32 - | B: 'static,
|
33 - |
|
34 - | B::Data: Send,
|
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 - | {
|
38 - | type Rejection =
|
39 - | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
40 - | type Future = HttpQueryParamsOnlyOperationInputFuture;
|
41 - |
|
42 - | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
43 - | let fut = async move {
|
44 - | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
45 - | request.headers(),
|
46 - | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
47 - | ) {
|
48 - | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
49 - | }
|
50 - | crate::protocol_serde::shape_http_query_params_only_operation::de_http_query_params_only_operation_http_request(request)
|
51 - | .await
|
52 - | };
|
53 - | use ::futures_util::future::TryFutureExt;
|
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 - | });
|
58 - | HttpQueryParamsOnlyOperationInputFuture {
|
59 - | inner: Box::pin(fut),
|
60 - | }
|
61 - | }
|
62 - | }
|
63 - | impl
|
64 - | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
65 - | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
66 - | > for crate::output::HttpQueryParamsOnlyOperationOutput
|
67 - | {
|
68 - | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
69 - | match crate::protocol_serde::shape_http_query_params_only_operation::ser_http_query_params_only_operation_http_response(self) {
|
70 - | Ok(response) => response,
|
71 - | Err(e) => {
|
72 - | ::tracing::error!(error = %e, "failed to serialize response");
|
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))
|
74 - | }
|
75 - | }
|
76 - | }
|
77 - | }
|
78 - | impl
|
79 - | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
80 - | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
81 - | > for crate::error::HttpQueryParamsOnlyOperationError
|
82 - | {
|
83 - | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
84 - | match crate::protocol_serde::shape_http_query_params_only_operation::ser_http_query_params_only_operation_http_error(&self) {
|
85 - | Ok(mut response) => {
|
86 - | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
87 - | response
|
88 - | },
|
89 - | Err(e) => {
|
90 - | ::tracing::error!(error = %e, "failed to serialize response");
|
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))
|
92 - | }
|
93 - | }
|
94 - | }
|
95 - | }
|
96 - |
|
97 - | ::pin_project_lite::pin_project! {
|
98 - | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
99 - | /// [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput) using modelled bindings.
|
100 - | pub struct QueryPrecedenceInputFuture {
|
101 - | 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>>
|
4 + | /// [`StringPayloadInput`](crate::input::StringPayloadInput) using modelled bindings.
|
5 + | pub struct StringPayloadInputFuture {
|
6 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StringPayloadInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
102 7 | }
|
103 8 | }
|
104 9 |
|
105 - | impl std::future::Future for QueryPrecedenceInputFuture {
|
10 + | impl std::future::Future for StringPayloadInputFuture {
|
106 11 | type Output = Result<
|
107 - | crate::input::QueryPrecedenceInput,
|
12 + | crate::input::StringPayloadInput,
|
108 13 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
109 14 | >;
|
110 15 |
|
111 16 | fn poll(
|
112 17 | self: std::pin::Pin<&mut Self>,
|
113 18 | cx: &mut std::task::Context<'_>,
|
114 19 | ) -> std::task::Poll<Self::Output> {
|
115 20 | let this = self.project();
|
116 21 | this.inner.as_mut().poll(cx)
|
117 22 | }
|
118 23 | }
|
119 24 |
|
120 25 | impl<B>
|
121 26 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
122 27 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
123 28 | B,
|
124 - | > for crate::input::QueryPrecedenceInput
|
29 + | > for crate::input::StringPayloadInput
|
125 30 | where
|
126 31 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
127 32 | B: 'static,
|
128 33 |
|
129 34 | B::Data: Send,
|
130 35 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
131 36 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
132 37 | {
|
133 38 | type Rejection =
|
134 39 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
135 - | type Future = QueryPrecedenceInputFuture;
|
40 + | type Future = StringPayloadInputFuture;
|
136 41 |
|
137 42 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
138 43 | let fut = async move {
|
139 44 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
140 45 | request.headers(),
|
141 - | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
46 + | &crate::mimes::CONTENT_TYPE_TEXT_PLAIN,
|
142 47 | ) {
|
143 48 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
144 49 | }
|
145 - | crate::protocol_serde::shape_query_precedence::de_query_precedence_http_request(request)
|
50 + | crate::protocol_serde::shape_string_payload::de_string_payload_http_request(request)
|
146 51 | .await
|
147 52 | };
|
148 53 | use ::futures_util::future::TryFutureExt;
|
149 54 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
150 55 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
151 56 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
152 57 | });
|
153 - | QueryPrecedenceInputFuture {
|
58 + | StringPayloadInputFuture {
|
154 59 | inner: Box::pin(fut),
|
155 60 | }
|
156 61 | }
|
157 62 | }
|
158 63 | impl
|
159 64 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
160 65 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
161 - | > for crate::output::QueryPrecedenceOutput
|
66 + | > for crate::output::StringPayloadOutput
|
162 67 | {
|
163 68 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
164 - | match crate::protocol_serde::shape_query_precedence::ser_query_precedence_http_response(
|
165 - | self,
|
166 - | ) {
|
69 + | match crate::protocol_serde::shape_string_payload::ser_string_payload_http_response(self) {
|
167 70 | Ok(response) => response,
|
168 71 | Err(e) => {
|
169 72 | ::tracing::error!(error = %e, "failed to serialize response");
|
170 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))
|
171 74 | }
|
172 75 | }
|
173 76 | }
|
174 77 | }
|
175 78 | impl
|
176 79 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
177 80 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
178 - | > for crate::error::QueryPrecedenceError
|
81 + | > for crate::error::StringPayloadError
|
179 82 | {
|
180 83 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
181 - | match crate::protocol_serde::shape_query_precedence::ser_query_precedence_http_error(&self)
|
182 - | {
|
84 + | match crate::protocol_serde::shape_string_payload::ser_string_payload_http_error(&self) {
|
183 85 | Ok(mut response) => {
|
184 86 | response.extensions_mut().insert(
|
185 87 | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
186 88 | self.name(),
|
187 89 | ),
|
188 90 | );
|
189 91 | response
|
190 92 | }
|
191 93 | Err(e) => {
|
192 94 | ::tracing::error!(error = %e, "failed to serialize response");
|
193 95 | ::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))
|
194 96 | }
|
195 97 | }
|
196 98 | }
|
197 99 | }
|
198 100 |
|
199 101 | ::pin_project_lite::pin_project! {
|
200 102 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
201 - | /// [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput) using modelled bindings.
|
202 - | pub struct EmptyStructWithContentOnWireOpInputFuture {
|
203 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EmptyStructWithContentOnWireOpInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
103 + | /// [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput) using modelled bindings.
|
104 + | pub struct PrimitiveIntHeaderInputFuture {
|
105 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PrimitiveIntHeaderInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
204 106 | }
|
205 107 | }
|
206 108 |
|
207 - | impl std::future::Future for EmptyStructWithContentOnWireOpInputFuture {
|
109 + | impl std::future::Future for PrimitiveIntHeaderInputFuture {
|
208 110 | type Output = Result<
|
209 - | crate::input::EmptyStructWithContentOnWireOpInput,
|
111 + | crate::input::PrimitiveIntHeaderInput,
|
210 112 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
211 113 | >;
|
212 114 |
|
213 115 | fn poll(
|
214 116 | self: std::pin::Pin<&mut Self>,
|
215 117 | cx: &mut std::task::Context<'_>,
|
216 118 | ) -> std::task::Poll<Self::Output> {
|
217 119 | let this = self.project();
|
218 120 | this.inner.as_mut().poll(cx)
|
219 121 | }
|
220 122 | }
|
221 123 |
|
222 124 | impl<B>
|
223 125 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
224 126 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
225 127 | B,
|
226 - | > for crate::input::EmptyStructWithContentOnWireOpInput
|
128 + | > for crate::input::PrimitiveIntHeaderInput
|
227 129 | where
|
228 130 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
229 131 | B: 'static,
|
230 132 |
|
231 133 | B::Data: Send,
|
232 134 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
233 135 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
234 136 | {
|
235 137 | type Rejection =
|
236 138 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
237 - | type Future = EmptyStructWithContentOnWireOpInputFuture;
|
139 + | type Future = PrimitiveIntHeaderInputFuture;
|
238 140 |
|
239 141 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
240 142 | let fut = async move {
|
241 143 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
242 144 | request.headers(),
|
243 145 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
244 146 | ) {
|
245 147 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
246 148 | }
|
247 - | crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::de_empty_struct_with_content_on_wire_op_http_request(request)
|
248 - | .await
|
149 + | crate::protocol_serde::shape_primitive_int_header::de_primitive_int_header_http_request(
|
150 + | request,
|
151 + | )
|
152 + | .await
|
249 153 | };
|
250 154 | use ::futures_util::future::TryFutureExt;
|
251 155 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
252 156 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
253 157 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
254 158 | });
|
255 - | EmptyStructWithContentOnWireOpInputFuture {
|
159 + | PrimitiveIntHeaderInputFuture {
|
256 160 | inner: Box::pin(fut),
|
257 161 | }
|
258 162 | }
|
259 163 | }
|
260 164 | impl
|
261 165 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
262 166 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
263 - | > for crate::output::EmptyStructWithContentOnWireOpOutput
|
167 + | > for crate::output::PrimitiveIntHeaderOutput
|
264 168 | {
|
265 169 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
266 - | match crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::ser_empty_struct_with_content_on_wire_op_http_response(self) {
|
170 + | match crate::protocol_serde::shape_primitive_int_header::ser_primitive_int_header_http_response(self) {
|
267 171 | Ok(response) => response,
|
268 172 | Err(e) => {
|
269 173 | ::tracing::error!(error = %e, "failed to serialize response");
|
270 174 | ::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))
|
271 175 | }
|
272 176 | }
|
273 177 | }
|
274 178 | }
|
275 179 | impl
|
276 180 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
277 181 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
278 - | > for crate::error::EmptyStructWithContentOnWireOpError
|
182 + | > for crate::error::PrimitiveIntHeaderError
|
279 183 | {
|
280 184 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
281 - | match crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::ser_empty_struct_with_content_on_wire_op_http_error(&self) {
|
185 + | match crate::protocol_serde::shape_primitive_int_header::ser_primitive_int_header_http_error(
|
186 + | &self,
|
187 + | ) {
|
282 188 | Ok(mut response) => {
|
283 - | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
189 + | response.extensions_mut().insert(
|
190 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
191 + | self.name(),
|
192 + | ),
|
193 + | );
|
284 194 | response
|
285 - | },
|
195 + | }
|
286 196 | Err(e) => {
|
287 197 | ::tracing::error!(error = %e, "failed to serialize response");
|
288 198 | ::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))
|
289 199 | }
|
290 200 | }
|
291 201 | }
|
292 202 | }
|
293 203 |
|
294 204 | ::pin_project_lite::pin_project! {
|
295 205 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
296 - | /// [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput) using modelled bindings.
|
297 - | pub struct CaseInsensitiveErrorOperationInputFuture {
|
298 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CaseInsensitiveErrorOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
206 + | /// [`EnumQueryInput`](crate::input::EnumQueryInput) using modelled bindings.
|
207 + | pub struct EnumQueryInputFuture {
|
208 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EnumQueryInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
299 209 | }
|
300 210 | }
|
301 211 |
|
302 - | impl std::future::Future for CaseInsensitiveErrorOperationInputFuture {
|
212 + | impl std::future::Future for EnumQueryInputFuture {
|
303 213 | type Output = Result<
|
304 - | crate::input::CaseInsensitiveErrorOperationInput,
|
214 + | crate::input::EnumQueryInput,
|
305 215 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
306 216 | >;
|
307 217 |
|
308 218 | fn poll(
|
309 219 | self: std::pin::Pin<&mut Self>,
|
310 220 | cx: &mut std::task::Context<'_>,
|
311 221 | ) -> std::task::Poll<Self::Output> {
|
312 222 | let this = self.project();
|
313 223 | this.inner.as_mut().poll(cx)
|
314 224 | }
|
315 225 | }
|
316 226 |
|
317 227 | impl<B>
|
318 228 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
319 229 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
320 230 | B,
|
321 - | > for crate::input::CaseInsensitiveErrorOperationInput
|
231 + | > for crate::input::EnumQueryInput
|
322 232 | where
|
323 233 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
324 234 | B: 'static,
|
325 235 |
|
326 236 | B::Data: Send,
|
327 237 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
328 238 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
329 239 | {
|
330 240 | type Rejection =
|
331 241 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
332 - | type Future = CaseInsensitiveErrorOperationInputFuture;
|
242 + | type Future = EnumQueryInputFuture;
|
333 243 |
|
334 244 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
335 245 | let fut = async move {
|
336 246 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
337 247 | request.headers(),
|
338 248 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
339 249 | ) {
|
340 250 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
341 251 | }
|
342 - | crate::protocol_serde::shape_case_insensitive_error_operation::de_case_insensitive_error_operation_http_request(request)
|
343 - | .await
|
252 + | crate::protocol_serde::shape_enum_query::de_enum_query_http_request(request).await
|
344 253 | };
|
345 254 | use ::futures_util::future::TryFutureExt;
|
346 255 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
347 256 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
348 257 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
349 258 | });
|
350 - | CaseInsensitiveErrorOperationInputFuture {
|
259 + | EnumQueryInputFuture {
|
351 260 | inner: Box::pin(fut),
|
352 261 | }
|
353 262 | }
|
354 263 | }
|
355 264 | impl
|
356 265 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
357 266 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
358 - | > for crate::output::CaseInsensitiveErrorOperationOutput
|
267 + | > for crate::output::EnumQueryOutput
|
359 268 | {
|
360 269 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
361 - | match crate::protocol_serde::shape_case_insensitive_error_operation::ser_case_insensitive_error_operation_http_response(self) {
|
362 - | Ok(response) => response,
|
363 - | Err(e) => {
|
364 - | ::tracing::error!(error = %e, "failed to serialize response");
|
365 - | ::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))
|
366 - | }
|
367 - | }
|
270 + | match crate::protocol_serde::shape_enum_query::ser_enum_query_http_response(self) {
|
271 + | Ok(response) => response,
|
272 + | Err(e) => {
|
273 + | ::tracing::error!(error = %e, "failed to serialize response");
|
274 + | ::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))
|
275 + | }
|
276 + | }
|
368 277 | }
|
369 278 | }
|
370 279 | impl
|
371 280 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
372 281 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
373 - | > for crate::error::CaseInsensitiveErrorOperationError
|
282 + | > for crate::error::EnumQueryError
|
374 283 | {
|
375 284 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
376 - | match crate::protocol_serde::shape_case_insensitive_error_operation::ser_case_insensitive_error_operation_http_error(&self) {
|
285 + | match crate::protocol_serde::shape_enum_query::ser_enum_query_http_error(&self) {
|
377 286 | Ok(mut response) => {
|
378 - | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
287 + | response.extensions_mut().insert(
|
288 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
289 + | self.name(),
|
290 + | ),
|
291 + | );
|
379 292 | response
|
380 - | },
|
293 + | }
|
381 294 | Err(e) => {
|
382 295 | ::tracing::error!(error = %e, "failed to serialize response");
|
383 296 | ::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))
|
384 297 | }
|
385 298 | }
|
386 299 | }
|
387 300 | }
|
388 301 |
|
389 302 | ::pin_project_lite::pin_project! {
|
390 303 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
391 - | /// [`NullInNonSparseInput`](crate::input::NullInNonSparseInput) using modelled bindings.
|
392 - | pub struct NullInNonSparseInputFuture {
|
393 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NullInNonSparseInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
304 + | /// [`StatusResponseInput`](crate::input::StatusResponseInput) using modelled bindings.
|
305 + | pub struct StatusResponseInputFuture {
|
306 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StatusResponseInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
394 307 | }
|
395 308 | }
|
396 309 |
|
397 - | impl std::future::Future for NullInNonSparseInputFuture {
|
310 + | impl std::future::Future for StatusResponseInputFuture {
|
398 311 | type Output = Result<
|
399 - | crate::input::NullInNonSparseInput,
|
312 + | crate::input::StatusResponseInput,
|
400 313 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
401 314 | >;
|
402 315 |
|
403 316 | fn poll(
|
404 317 | self: std::pin::Pin<&mut Self>,
|
405 318 | cx: &mut std::task::Context<'_>,
|
406 319 | ) -> std::task::Poll<Self::Output> {
|
407 320 | let this = self.project();
|
408 321 | this.inner.as_mut().poll(cx)
|
409 322 | }
|
410 323 | }
|
411 324 |
|
412 325 | impl<B>
|
413 326 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
414 327 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
415 328 | B,
|
416 - | > for crate::input::NullInNonSparseInput
|
329 + | > for crate::input::StatusResponseInput
|
417 330 | where
|
418 331 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
419 332 | B: 'static,
|
420 333 |
|
421 334 | B::Data: Send,
|
422 335 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
423 336 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
424 337 | {
|
425 338 | type Rejection =
|
426 339 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
427 - | type Future = NullInNonSparseInputFuture;
|
340 + | type Future = StatusResponseInputFuture;
|
428 341 |
|
429 342 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
430 343 | let fut = async move {
|
431 344 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
432 345 | request.headers(),
|
433 346 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
434 347 | ) {
|
435 348 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
436 349 | }
|
437 - | crate::protocol_serde::shape_null_in_non_sparse::de_null_in_non_sparse_http_request(
|
438 - | request,
|
439 - | )
|
440 - | .await
|
350 + | crate::protocol_serde::shape_status_response::de_status_response_http_request(request)
|
351 + | .await
|
441 352 | };
|
442 353 | use ::futures_util::future::TryFutureExt;
|
443 354 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
444 355 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
445 356 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
446 357 | });
|
447 - | NullInNonSparseInputFuture {
|
358 + | StatusResponseInputFuture {
|
448 359 | inner: Box::pin(fut),
|
449 360 | }
|
450 361 | }
|
451 362 | }
|
452 363 | impl
|
453 364 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
454 365 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
455 - | > for crate::output::NullInNonSparseOutput
|
366 + | > for crate::output::StatusResponseOutput
|
456 367 | {
|
457 368 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
458 - | match crate::protocol_serde::shape_null_in_non_sparse::ser_null_in_non_sparse_http_response(
|
459 - | self,
|
460 - | ) {
|
369 + | match crate::protocol_serde::shape_status_response::ser_status_response_http_response(self)
|
370 + | {
|
461 371 | Ok(response) => response,
|
462 372 | Err(e) => {
|
463 373 | ::tracing::error!(error = %e, "failed to serialize response");
|
464 374 | ::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))
|
465 375 | }
|
466 376 | }
|
467 377 | }
|
468 378 | }
|
469 379 | impl
|
470 380 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
471 381 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
472 - | > for crate::error::NullInNonSparseError
|
382 + | > for crate::error::StatusResponseError
|
473 383 | {
|
474 384 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
475 - | match crate::protocol_serde::shape_null_in_non_sparse::ser_null_in_non_sparse_http_error(
|
476 - | &self,
|
477 - | ) {
|
385 + | match crate::protocol_serde::shape_status_response::ser_status_response_http_error(&self) {
|
478 386 | Ok(mut response) => {
|
479 387 | response.extensions_mut().insert(
|
480 388 | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
481 389 | self.name(),
|
482 390 | ),
|
483 391 | );
|
484 392 | response
|
485 393 | }
|
486 394 | Err(e) => {
|
487 395 | ::tracing::error!(error = %e, "failed to serialize response");
|
488 396 | ::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))
|
489 397 | }
|
490 398 | }
|
491 399 | }
|
492 400 | }
|
493 401 |
|
494 402 | ::pin_project_lite::pin_project! {
|
495 403 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
496 - | /// [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput) using modelled bindings.
|
497 - | pub struct EscapedStringValuesInputFuture {
|
498 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EscapedStringValuesInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
404 + | /// [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput) using modelled bindings.
|
405 + | pub struct MapWithEnumKeyOpInputFuture {
|
406 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MapWithEnumKeyOpInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
499 407 | }
|
500 408 | }
|
501 409 |
|
502 - | impl std::future::Future for EscapedStringValuesInputFuture {
|
410 + | impl std::future::Future for MapWithEnumKeyOpInputFuture {
|
503 411 | type Output = Result<
|
504 - | crate::input::EscapedStringValuesInput,
|
412 + | crate::input::MapWithEnumKeyOpInput,
|
505 413 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
506 414 | >;
|
507 415 |
|
508 416 | fn poll(
|
509 417 | self: std::pin::Pin<&mut Self>,
|
510 418 | cx: &mut std::task::Context<'_>,
|
511 419 | ) -> std::task::Poll<Self::Output> {
|
512 420 | let this = self.project();
|
513 421 | this.inner.as_mut().poll(cx)
|
514 422 | }
|
515 423 | }
|
516 424 |
|
517 425 | impl<B>
|
518 426 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
519 427 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
520 428 | B,
|
521 - | > for crate::input::EscapedStringValuesInput
|
429 + | > for crate::input::MapWithEnumKeyOpInput
|
522 430 | where
|
523 431 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
524 432 | B: 'static,
|
525 433 |
|
526 434 | B::Data: Send,
|
527 435 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
528 436 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
529 437 | {
|
530 438 | type Rejection =
|
531 439 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
532 - | type Future = EscapedStringValuesInputFuture;
|
440 + | type Future = MapWithEnumKeyOpInputFuture;
|
533 441 |
|
534 442 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
535 443 | let fut = async move {
|
536 444 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
537 445 | request.headers(),
|
538 446 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
539 447 | ) {
|
540 448 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
541 449 | }
|
542 - | crate::protocol_serde::shape_escaped_string_values::de_escaped_string_values_http_request(request)
|
543 - | .await
|
450 + | crate::protocol_serde::shape_map_with_enum_key_op::de_map_with_enum_key_op_http_request(
|
451 + | request,
|
452 + | )
|
453 + | .await
|
544 454 | };
|
545 455 | use ::futures_util::future::TryFutureExt;
|
546 456 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
547 457 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
548 458 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
549 459 | });
|
550 - | EscapedStringValuesInputFuture {
|
460 + | MapWithEnumKeyOpInputFuture {
|
551 461 | inner: Box::pin(fut),
|
552 462 | }
|
553 463 | }
|
554 464 | }
|
555 465 | impl
|
556 466 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
557 467 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
558 - | > for crate::output::EscapedStringValuesOutput
|
468 + | > for crate::output::MapWithEnumKeyOpOutput
|
559 469 | {
|
560 470 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
561 - | match crate::protocol_serde::shape_escaped_string_values::ser_escaped_string_values_http_response(self) {
|
471 + | match crate::protocol_serde::shape_map_with_enum_key_op::ser_map_with_enum_key_op_http_response(self) {
|
562 472 | Ok(response) => response,
|
563 473 | Err(e) => {
|
564 474 | ::tracing::error!(error = %e, "failed to serialize response");
|
565 475 | ::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))
|
566 476 | }
|
567 477 | }
|
568 478 | }
|
569 479 | }
|
570 480 | impl
|
571 481 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
572 482 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
573 - | > for crate::error::EscapedStringValuesError
|
483 + | > for crate::error::MapWithEnumKeyOpError
|
574 484 | {
|
575 485 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
576 - | match crate::protocol_serde::shape_escaped_string_values::ser_escaped_string_values_http_error(&self) {
|
486 + | match crate::protocol_serde::shape_map_with_enum_key_op::ser_map_with_enum_key_op_http_error(
|
487 + | &self,
|
488 + | ) {
|
577 489 | Ok(mut response) => {
|
578 - | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
490 + | response.extensions_mut().insert(
|
491 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
492 + | self.name(),
|
493 + | ),
|
494 + | );
|
579 495 | response
|
580 - | },
|
496 + | }
|
581 497 | Err(e) => {
|
582 498 | ::tracing::error!(error = %e, "failed to serialize response");
|
583 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))
|
584 500 | }
|
585 501 | }
|
586 502 | }
|
587 503 | }
|
588 504 |
|
589 505 | ::pin_project_lite::pin_project! {
|
590 506 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
683 599 | Err(e) => {
|
684 600 | ::tracing::error!(error = %e, "failed to serialize response");
|
685 601 | ::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))
|
686 602 | }
|
687 603 | }
|
688 604 | }
|
689 605 | }
|
690 606 |
|
691 607 | ::pin_project_lite::pin_project! {
|
692 608 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
693 - | /// [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput) using modelled bindings.
|
694 - | pub struct MapWithEnumKeyOpInputFuture {
|
695 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MapWithEnumKeyOpInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
609 + | /// [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput) using modelled bindings.
|
610 + | pub struct EscapedStringValuesInputFuture {
|
611 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EscapedStringValuesInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
696 612 | }
|
697 613 | }
|
698 614 |
|
699 - | impl std::future::Future for MapWithEnumKeyOpInputFuture {
|
615 + | impl std::future::Future for EscapedStringValuesInputFuture {
|
700 616 | type Output = Result<
|
701 - | crate::input::MapWithEnumKeyOpInput,
|
617 + | crate::input::EscapedStringValuesInput,
|
702 618 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
703 619 | >;
|
704 620 |
|
705 621 | fn poll(
|
706 622 | self: std::pin::Pin<&mut Self>,
|
707 623 | cx: &mut std::task::Context<'_>,
|
708 624 | ) -> std::task::Poll<Self::Output> {
|
709 625 | let this = self.project();
|
710 626 | this.inner.as_mut().poll(cx)
|
711 627 | }
|
712 628 | }
|
713 629 |
|
714 630 | impl<B>
|
715 631 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
716 632 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
717 633 | B,
|
718 - | > for crate::input::MapWithEnumKeyOpInput
|
634 + | > for crate::input::EscapedStringValuesInput
|
719 635 | where
|
720 636 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
721 637 | B: 'static,
|
722 638 |
|
723 639 | B::Data: Send,
|
724 640 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
725 641 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
726 642 | {
|
727 643 | type Rejection =
|
728 644 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
729 - | type Future = MapWithEnumKeyOpInputFuture;
|
645 + | type Future = EscapedStringValuesInputFuture;
|
730 646 |
|
731 647 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
732 648 | let fut = async move {
|
733 649 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
734 650 | request.headers(),
|
735 651 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
736 652 | ) {
|
737 653 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
738 654 | }
|
739 - | crate::protocol_serde::shape_map_with_enum_key_op::de_map_with_enum_key_op_http_request(
|
740 - | request,
|
741 - | )
|
742 - | .await
|
655 + | crate::protocol_serde::shape_escaped_string_values::de_escaped_string_values_http_request(request)
|
656 + | .await
|
743 657 | };
|
744 658 | use ::futures_util::future::TryFutureExt;
|
745 659 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
746 660 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
747 661 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
748 662 | });
|
749 - | MapWithEnumKeyOpInputFuture {
|
663 + | EscapedStringValuesInputFuture {
|
750 664 | inner: Box::pin(fut),
|
751 665 | }
|
752 666 | }
|
753 667 | }
|
754 668 | impl
|
755 669 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
756 670 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
757 - | > for crate::output::MapWithEnumKeyOpOutput
|
671 + | > for crate::output::EscapedStringValuesOutput
|
758 672 | {
|
759 673 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
760 - | match crate::protocol_serde::shape_map_with_enum_key_op::ser_map_with_enum_key_op_http_response(self) {
|
674 + | match crate::protocol_serde::shape_escaped_string_values::ser_escaped_string_values_http_response(self) {
|
761 675 | Ok(response) => response,
|
762 676 | Err(e) => {
|
763 677 | ::tracing::error!(error = %e, "failed to serialize response");
|
764 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))
|
765 679 | }
|
766 680 | }
|
767 681 | }
|
768 682 | }
|
769 683 | impl
|
770 684 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
771 685 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
772 - | > for crate::error::MapWithEnumKeyOpError
|
686 + | > for crate::error::EscapedStringValuesError
|
773 687 | {
|
774 688 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
775 - | match crate::protocol_serde::shape_map_with_enum_key_op::ser_map_with_enum_key_op_http_error(
|
776 - | &self,
|
777 - | ) {
|
689 + | match crate::protocol_serde::shape_escaped_string_values::ser_escaped_string_values_http_error(&self) {
|
778 690 | Ok(mut response) => {
|
779 - | response.extensions_mut().insert(
|
780 - | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
781 - | self.name(),
|
782 - | ),
|
783 - | );
|
691 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
784 692 | response
|
785 - | }
|
693 + | },
|
786 694 | Err(e) => {
|
787 695 | ::tracing::error!(error = %e, "failed to serialize response");
|
788 696 | ::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))
|
789 697 | }
|
790 698 | }
|
791 699 | }
|
792 700 | }
|
793 701 |
|
794 702 | ::pin_project_lite::pin_project! {
|
795 703 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
796 - | /// [`StatusResponseInput`](crate::input::StatusResponseInput) using modelled bindings.
|
797 - | pub struct StatusResponseInputFuture {
|
798 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StatusResponseInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
704 + | /// [`NullInNonSparseInput`](crate::input::NullInNonSparseInput) using modelled bindings.
|
705 + | pub struct NullInNonSparseInputFuture {
|
706 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NullInNonSparseInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
799 707 | }
|
800 708 | }
|
801 709 |
|
802 - | impl std::future::Future for StatusResponseInputFuture {
|
710 + | impl std::future::Future for NullInNonSparseInputFuture {
|
803 711 | type Output = Result<
|
804 - | crate::input::StatusResponseInput,
|
712 + | crate::input::NullInNonSparseInput,
|
805 713 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
806 714 | >;
|
807 715 |
|
808 716 | fn poll(
|
809 717 | self: std::pin::Pin<&mut Self>,
|
810 718 | cx: &mut std::task::Context<'_>,
|
811 719 | ) -> std::task::Poll<Self::Output> {
|
812 720 | let this = self.project();
|
813 721 | this.inner.as_mut().poll(cx)
|
814 722 | }
|
815 723 | }
|
816 724 |
|
817 725 | impl<B>
|
818 726 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
819 727 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
820 728 | B,
|
821 - | > for crate::input::StatusResponseInput
|
729 + | > for crate::input::NullInNonSparseInput
|
822 730 | where
|
823 731 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
824 732 | B: 'static,
|
825 733 |
|
826 734 | B::Data: Send,
|
827 735 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
828 736 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
829 737 | {
|
830 738 | type Rejection =
|
831 739 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
832 - | type Future = StatusResponseInputFuture;
|
740 + | type Future = NullInNonSparseInputFuture;
|
833 741 |
|
834 742 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
835 743 | let fut = async move {
|
836 744 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
837 745 | request.headers(),
|
838 746 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
839 747 | ) {
|
840 748 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
841 749 | }
|
842 - | crate::protocol_serde::shape_status_response::de_status_response_http_request(request)
|
843 - | .await
|
750 + | crate::protocol_serde::shape_null_in_non_sparse::de_null_in_non_sparse_http_request(
|
751 + | request,
|
752 + | )
|
753 + | .await
|
844 754 | };
|
845 755 | use ::futures_util::future::TryFutureExt;
|
846 756 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
847 757 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
848 758 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
849 759 | });
|
850 - | StatusResponseInputFuture {
|
760 + | NullInNonSparseInputFuture {
|
851 761 | inner: Box::pin(fut),
|
852 762 | }
|
853 763 | }
|
854 764 | }
|
855 765 | impl
|
856 766 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
857 767 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
858 - | > for crate::output::StatusResponseOutput
|
768 + | > for crate::output::NullInNonSparseOutput
|
859 769 | {
|
860 770 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
861 - | match crate::protocol_serde::shape_status_response::ser_status_response_http_response(self)
|
862 - | {
|
771 + | match crate::protocol_serde::shape_null_in_non_sparse::ser_null_in_non_sparse_http_response(
|
772 + | self,
|
773 + | ) {
|
863 774 | Ok(response) => response,
|
864 775 | Err(e) => {
|
865 776 | ::tracing::error!(error = %e, "failed to serialize response");
|
866 777 | ::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))
|
867 778 | }
|
868 779 | }
|
869 780 | }
|
870 781 | }
|
871 782 | impl
|
872 783 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
873 784 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
874 - | > for crate::error::StatusResponseError
|
785 + | > for crate::error::NullInNonSparseError
|
875 786 | {
|
876 787 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
877 - | match crate::protocol_serde::shape_status_response::ser_status_response_http_error(&self) {
|
788 + | match crate::protocol_serde::shape_null_in_non_sparse::ser_null_in_non_sparse_http_error(
|
789 + | &self,
|
790 + | ) {
|
878 791 | Ok(mut response) => {
|
879 792 | response.extensions_mut().insert(
|
880 793 | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
881 794 | self.name(),
|
882 795 | ),
|
883 796 | );
|
884 797 | response
|
885 798 | }
|
886 799 | Err(e) => {
|
887 800 | ::tracing::error!(error = %e, "failed to serialize response");
|
888 801 | ::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))
|
889 802 | }
|
890 803 | }
|
891 804 | }
|
892 805 | }
|
893 806 |
|
894 807 | ::pin_project_lite::pin_project! {
|
895 808 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
896 - | /// [`EnumQueryInput`](crate::input::EnumQueryInput) using modelled bindings.
|
897 - | pub struct EnumQueryInputFuture {
|
898 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EnumQueryInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
809 + | /// [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput) using modelled bindings.
|
810 + | pub struct CaseInsensitiveErrorOperationInputFuture {
|
811 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CaseInsensitiveErrorOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
899 812 | }
|
900 813 | }
|
901 814 |
|
902 - | impl std::future::Future for EnumQueryInputFuture {
|
815 + | impl std::future::Future for CaseInsensitiveErrorOperationInputFuture {
|
903 816 | type Output = Result<
|
904 - | crate::input::EnumQueryInput,
|
817 + | crate::input::CaseInsensitiveErrorOperationInput,
|
905 818 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
906 819 | >;
|
907 820 |
|
908 821 | fn poll(
|
909 822 | self: std::pin::Pin<&mut Self>,
|
910 823 | cx: &mut std::task::Context<'_>,
|
911 824 | ) -> std::task::Poll<Self::Output> {
|
912 825 | let this = self.project();
|
913 826 | this.inner.as_mut().poll(cx)
|
914 827 | }
|
915 828 | }
|
916 829 |
|
917 830 | impl<B>
|
918 831 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
919 832 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
920 833 | B,
|
921 - | > for crate::input::EnumQueryInput
|
834 + | > for crate::input::CaseInsensitiveErrorOperationInput
|
922 835 | where
|
923 836 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
924 837 | B: 'static,
|
925 838 |
|
926 839 | B::Data: Send,
|
927 840 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
928 841 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
929 842 | {
|
930 843 | type Rejection =
|
931 844 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
932 - | type Future = EnumQueryInputFuture;
|
845 + | type Future = CaseInsensitiveErrorOperationInputFuture;
|
933 846 |
|
934 847 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
935 848 | let fut = async move {
|
936 849 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
937 850 | request.headers(),
|
938 851 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
939 852 | ) {
|
940 853 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
941 854 | }
|
942 - | crate::protocol_serde::shape_enum_query::de_enum_query_http_request(request).await
|
855 + | crate::protocol_serde::shape_case_insensitive_error_operation::de_case_insensitive_error_operation_http_request(request)
|
856 + | .await
|
943 857 | };
|
944 858 | use ::futures_util::future::TryFutureExt;
|
945 859 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
946 860 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
947 861 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
948 862 | });
|
949 - | EnumQueryInputFuture {
|
863 + | CaseInsensitiveErrorOperationInputFuture {
|
950 864 | inner: Box::pin(fut),
|
951 865 | }
|
952 866 | }
|
953 867 | }
|
954 868 | impl
|
955 869 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
956 870 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
957 - | > for crate::output::EnumQueryOutput
|
871 + | > for crate::output::CaseInsensitiveErrorOperationOutput
|
958 872 | {
|
959 873 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
960 - | match crate::protocol_serde::shape_enum_query::ser_enum_query_http_response(self) {
|
961 - | Ok(response) => response,
|
962 - | Err(e) => {
|
963 - | ::tracing::error!(error = %e, "failed to serialize response");
|
964 - | ::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))
|
965 - | }
|
966 - | }
|
874 + | match crate::protocol_serde::shape_case_insensitive_error_operation::ser_case_insensitive_error_operation_http_response(self) {
|
875 + | Ok(response) => response,
|
876 + | Err(e) => {
|
877 + | ::tracing::error!(error = %e, "failed to serialize response");
|
878 + | ::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))
|
879 + | }
|
880 + | }
|
967 881 | }
|
968 882 | }
|
969 883 | impl
|
970 884 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
971 885 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
972 - | > for crate::error::EnumQueryError
|
886 + | > for crate::error::CaseInsensitiveErrorOperationError
|
973 887 | {
|
974 888 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
975 - | match crate::protocol_serde::shape_enum_query::ser_enum_query_http_error(&self) {
|
889 + | match crate::protocol_serde::shape_case_insensitive_error_operation::ser_case_insensitive_error_operation_http_error(&self) {
|
976 890 | Ok(mut response) => {
|
977 - | response.extensions_mut().insert(
|
978 - | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
979 - | self.name(),
|
980 - | ),
|
981 - | );
|
891 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
982 892 | response
|
983 - | }
|
893 + | },
|
984 894 | Err(e) => {
|
985 895 | ::tracing::error!(error = %e, "failed to serialize response");
|
986 896 | ::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))
|
987 897 | }
|
988 898 | }
|
989 899 | }
|
990 900 | }
|
991 901 |
|
992 902 | ::pin_project_lite::pin_project! {
|
993 903 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
994 - | /// [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput) using modelled bindings.
|
995 - | pub struct PrimitiveIntHeaderInputFuture {
|
996 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PrimitiveIntHeaderInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
904 + | /// [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput) using modelled bindings.
|
905 + | pub struct EmptyStructWithContentOnWireOpInputFuture {
|
906 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EmptyStructWithContentOnWireOpInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
997 907 | }
|
998 908 | }
|
999 909 |
|
1000 - | impl std::future::Future for PrimitiveIntHeaderInputFuture {
|
910 + | impl std::future::Future for EmptyStructWithContentOnWireOpInputFuture {
|
1001 911 | type Output = Result<
|
1002 - | crate::input::PrimitiveIntHeaderInput,
|
912 + | crate::input::EmptyStructWithContentOnWireOpInput,
|
1003 913 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1004 914 | >;
|
1005 915 |
|
1006 916 | fn poll(
|
1007 917 | self: std::pin::Pin<&mut Self>,
|
1008 918 | cx: &mut std::task::Context<'_>,
|
1009 919 | ) -> std::task::Poll<Self::Output> {
|
1010 920 | let this = self.project();
|
1011 921 | this.inner.as_mut().poll(cx)
|
1012 922 | }
|
1013 923 | }
|
1014 924 |
|
1015 925 | impl<B>
|
1016 926 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1017 927 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1018 928 | B,
|
1019 - | > for crate::input::PrimitiveIntHeaderInput
|
929 + | > for crate::input::EmptyStructWithContentOnWireOpInput
|
1020 930 | where
|
1021 931 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
1022 932 | B: 'static,
|
1023 933 |
|
1024 934 | B::Data: Send,
|
1025 935 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1026 936 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
1027 937 | {
|
1028 938 | type Rejection =
|
1029 939 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1030 - | type Future = PrimitiveIntHeaderInputFuture;
|
940 + | type Future = EmptyStructWithContentOnWireOpInputFuture;
|
1031 941 |
|
1032 942 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1033 943 | let fut = async move {
|
1034 944 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
1035 945 | request.headers(),
|
1036 946 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
1037 947 | ) {
|
1038 948 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1039 949 | }
|
1040 - | crate::protocol_serde::shape_primitive_int_header::de_primitive_int_header_http_request(
|
1041 - | request,
|
1042 - | )
|
1043 - | .await
|
950 + | crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::de_empty_struct_with_content_on_wire_op_http_request(request)
|
951 + | .await
|
1044 952 | };
|
1045 953 | use ::futures_util::future::TryFutureExt;
|
1046 954 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1047 955 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1048 956 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
1049 957 | });
|
1050 - | PrimitiveIntHeaderInputFuture {
|
958 + | EmptyStructWithContentOnWireOpInputFuture {
|
1051 959 | inner: Box::pin(fut),
|
1052 960 | }
|
1053 961 | }
|
1054 962 | }
|
1055 963 | impl
|
1056 964 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1057 965 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1058 - | > for crate::output::PrimitiveIntHeaderOutput
|
966 + | > for crate::output::EmptyStructWithContentOnWireOpOutput
|
1059 967 | {
|
1060 968 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1061 - | match crate::protocol_serde::shape_primitive_int_header::ser_primitive_int_header_http_response(self) {
|
969 + | match crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::ser_empty_struct_with_content_on_wire_op_http_response(self) {
|
1062 970 | Ok(response) => response,
|
1063 971 | Err(e) => {
|
1064 972 | ::tracing::error!(error = %e, "failed to serialize response");
|
1065 973 | ::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))
|
1066 974 | }
|
1067 975 | }
|
1068 976 | }
|
1069 977 | }
|
1070 978 | impl
|
1071 979 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1072 980 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1073 - | > for crate::error::PrimitiveIntHeaderError
|
981 + | > for crate::error::EmptyStructWithContentOnWireOpError
|
1074 982 | {
|
1075 983 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1076 - | match crate::protocol_serde::shape_primitive_int_header::ser_primitive_int_header_http_error(
|
1077 - | &self,
|
1078 - | ) {
|
984 + | match crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::ser_empty_struct_with_content_on_wire_op_http_error(&self) {
|
1079 985 | Ok(mut response) => {
|
1080 - | response.extensions_mut().insert(
|
1081 - | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
1082 - | self.name(),
|
1083 - | ),
|
1084 - | );
|
986 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
1085 987 | response
|
1086 - | }
|
988 + | },
|
1087 989 | Err(e) => {
|
1088 990 | ::tracing::error!(error = %e, "failed to serialize response");
|
1089 991 | ::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))
|
1090 992 | }
|
1091 993 | }
|
1092 994 | }
|
1093 995 | }
|
1094 996 |
|
1095 997 | ::pin_project_lite::pin_project! {
|
1096 998 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
1097 - | /// [`StringPayloadInput`](crate::input::StringPayloadInput) using modelled bindings.
|
1098 - | pub struct StringPayloadInputFuture {
|
1099 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StringPayloadInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
999 + | /// [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput) using modelled bindings.
|
1000 + | pub struct QueryPrecedenceInputFuture {
|
1001 + | 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>>
|
1100 1002 | }
|
1101 1003 | }
|
1102 1004 |
|
1103 - | impl std::future::Future for StringPayloadInputFuture {
|
1005 + | impl std::future::Future for QueryPrecedenceInputFuture {
|
1104 1006 | type Output = Result<
|
1105 - | crate::input::StringPayloadInput,
|
1007 + | crate::input::QueryPrecedenceInput,
|
1106 1008 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1107 1009 | >;
|
1108 1010 |
|
1109 1011 | fn poll(
|
1110 1012 | self: std::pin::Pin<&mut Self>,
|
1111 1013 | cx: &mut std::task::Context<'_>,
|
1112 1014 | ) -> std::task::Poll<Self::Output> {
|
1113 1015 | let this = self.project();
|
1114 1016 | this.inner.as_mut().poll(cx)
|
1115 1017 | }
|
1116 1018 | }
|
1117 1019 |
|
1118 1020 | impl<B>
|
1119 1021 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1120 1022 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1121 1023 | B,
|
1122 - | > for crate::input::StringPayloadInput
|
1024 + | > for crate::input::QueryPrecedenceInput
|
1123 1025 | where
|
1124 1026 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
1125 1027 | B: 'static,
|
1126 1028 |
|
1127 1029 | B::Data: Send,
|
1128 1030 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1129 1031 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
1130 1032 | {
|
1131 1033 | type Rejection =
|
1132 1034 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1133 - | type Future = StringPayloadInputFuture;
|
1035 + | type Future = QueryPrecedenceInputFuture;
|
1134 1036 |
|
1135 1037 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1136 1038 | let fut = async move {
|
1137 1039 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
1138 1040 | request.headers(),
|
1139 - | &crate::mimes::CONTENT_TYPE_TEXT_PLAIN,
|
1041 + | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
1140 1042 | ) {
|
1141 1043 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1142 1044 | }
|
1143 - | crate::protocol_serde::shape_string_payload::de_string_payload_http_request(request)
|
1045 + | crate::protocol_serde::shape_query_precedence::de_query_precedence_http_request(request)
|
1144 1046 | .await
|
1145 1047 | };
|
1146 1048 | use ::futures_util::future::TryFutureExt;
|
1147 1049 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1148 1050 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1149 1051 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
1150 1052 | });
|
1151 - | StringPayloadInputFuture {
|
1053 + | QueryPrecedenceInputFuture {
|
1152 1054 | inner: Box::pin(fut),
|
1153 1055 | }
|
1154 1056 | }
|
1155 1057 | }
|
1156 1058 | impl
|
1157 1059 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1158 1060 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1159 - | > for crate::output::StringPayloadOutput
|
1061 + | > for crate::output::QueryPrecedenceOutput
|
1160 1062 | {
|
1161 1063 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1162 - | match crate::protocol_serde::shape_string_payload::ser_string_payload_http_response(self) {
|
1064 + | match crate::protocol_serde::shape_query_precedence::ser_query_precedence_http_response(
|
1065 + | self,
|
1066 + | ) {
|
1163 1067 | Ok(response) => response,
|
1164 1068 | Err(e) => {
|
1165 1069 | ::tracing::error!(error = %e, "failed to serialize response");
|
1166 1070 | ::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))
|
1167 1071 | }
|
1168 1072 | }
|
1169 1073 | }
|
1170 1074 | }
|
1171 1075 | impl
|
1172 1076 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1173 1077 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1174 - | > for crate::error::StringPayloadError
|
1078 + | > for crate::error::QueryPrecedenceError
|
1175 1079 | {
|
1176 1080 | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1177 - | match crate::protocol_serde::shape_string_payload::ser_string_payload_http_error(&self) {
|
1081 + | match crate::protocol_serde::shape_query_precedence::ser_query_precedence_http_error(&self)
|
1082 + | {
|
1178 1083 | Ok(mut response) => {
|
1179 1084 | response.extensions_mut().insert(
|
1180 1085 | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
1181 1086 | self.name(),
|
1182 1087 | ),
|
1183 1088 | );
|
1184 1089 | response
|
1185 1090 | }
|
1186 1091 | Err(e) => {
|
1187 1092 | ::tracing::error!(error = %e, "failed to serialize response");
|