22 22 | this.inner.as_mut().poll(cx)
|
23 23 | }
|
24 24 | }
|
25 25 |
|
26 26 | impl<B>
|
27 27 | ::aws_smithy_http_server::request::FromRequest<
|
28 28 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
29 29 | B,
|
30 30 | > for crate::input::QueryPrecedenceInput
|
31 31 | where
|
32 32 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
33 33 | B: 'static,
|
34 34 |
|
35 35 | B::Data: Send,
|
36 36 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
37 37 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
38 38 | {
|
39 39 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
40 40 | type Future = QueryPrecedenceInputFuture;
|
41 41 |
|
42 42 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
43 43 | let fut = async move {
|
44 44 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
45 45 | request.headers(),
|
46 46 | &CONTENT_TYPE_QUERYPRECEDENCE,
|
47 47 | ) {
|
48 48 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
49 49 | }
|
50 50 | crate::protocol_serde::shape_query_precedence::de_query_precedence_http_request(request)
|
51 51 | .await
|
52 - | .map_err(Into::into)
|
53 52 | };
|
54 53 | use ::futures_util::future::TryFutureExt;
|
55 54 | let fut = fut.map_err(
|
56 55 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
57 56 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
58 57 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
59 58 | e,
|
60 59 | )
|
61 60 | },
|
62 61 | );
|
63 62 | QueryPrecedenceInputFuture {
|
64 63 | inner: Box::pin(fut),
|
65 64 | }
|
66 65 | }
|
67 66 | }
|
68 67 | impl
|
69 68 | ::aws_smithy_http_server::response::IntoResponse<
|
70 69 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
71 70 | > for crate::output::QueryPrecedenceOutput
|
72 71 | {
|
73 72 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
74 73 | match crate::protocol_serde::shape_query_precedence::ser_query_precedence_http_response(
|
75 74 | self,
|
76 75 | ) {
|
77 76 | Ok(response) => response,
|
78 77 | Err(e) => {
|
79 78 | ::tracing::error!(error = %e, "failed to serialize response");
|
80 79 | ::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))
|
81 80 | }
|
82 81 | }
|
127 126 | this.inner.as_mut().poll(cx)
|
128 127 | }
|
129 128 | }
|
130 129 |
|
131 130 | impl<B>
|
132 131 | ::aws_smithy_http_server::request::FromRequest<
|
133 132 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
134 133 | B,
|
135 134 | > for crate::input::EmptyStructWithContentOnWireOpInput
|
136 135 | where
|
137 136 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
138 137 | B: 'static,
|
139 138 |
|
140 139 | B::Data: Send,
|
141 140 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
142 141 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
143 142 | {
|
144 143 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
145 144 | type Future = EmptyStructWithContentOnWireOpInputFuture;
|
146 145 |
|
147 146 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
148 147 | let fut = async move {
|
149 148 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
150 149 | request.headers(),
|
151 150 | &CONTENT_TYPE_EMPTYSTRUCTWITHCONTENTONWIREOP,
|
152 151 | ) {
|
153 152 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
154 153 | }
|
155 154 | crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::de_empty_struct_with_content_on_wire_op_http_request(request)
|
156 155 | .await
|
157 - | .map_err(Into::into)
|
158 156 | };
|
159 157 | use ::futures_util::future::TryFutureExt;
|
160 158 | let fut = fut.map_err(
|
161 159 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
162 160 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
163 161 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
164 162 | e,
|
165 163 | )
|
166 164 | },
|
167 165 | );
|
168 166 | EmptyStructWithContentOnWireOpInputFuture {
|
169 167 | inner: Box::pin(fut),
|
170 168 | }
|
171 169 | }
|
172 170 | }
|
173 171 | impl
|
174 172 | ::aws_smithy_http_server::response::IntoResponse<
|
175 173 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
176 174 | > for crate::output::EmptyStructWithContentOnWireOpOutput
|
177 175 | {
|
178 176 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
179 177 | match crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::ser_empty_struct_with_content_on_wire_op_http_response(self) {
|
180 178 | Ok(response) => response,
|
181 179 | Err(e) => {
|
182 180 | ::tracing::error!(error = %e, "failed to serialize response");
|
183 181 | ::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))
|
184 182 | }
|
185 183 | }
|
186 184 | }
|
187 185 | }
|
227 225 | this.inner.as_mut().poll(cx)
|
228 226 | }
|
229 227 | }
|
230 228 |
|
231 229 | impl<B>
|
232 230 | ::aws_smithy_http_server::request::FromRequest<
|
233 231 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
234 232 | B,
|
235 233 | > for crate::input::CaseInsensitiveErrorOperationInput
|
236 234 | where
|
237 235 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
238 236 | B: 'static,
|
239 237 |
|
240 238 | B::Data: Send,
|
241 239 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
242 240 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
243 241 | {
|
244 242 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
245 243 | type Future = CaseInsensitiveErrorOperationInputFuture;
|
246 244 |
|
247 245 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
248 246 | let fut = async move {
|
249 247 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
250 248 | request.headers(),
|
251 249 | &CONTENT_TYPE_CASEINSENSITIVEERROROPERATION,
|
252 250 | ) {
|
253 251 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
254 252 | }
|
255 253 | crate::protocol_serde::shape_case_insensitive_error_operation::de_case_insensitive_error_operation_http_request(request)
|
256 254 | .await
|
257 - | .map_err(Into::into)
|
258 255 | };
|
259 256 | use ::futures_util::future::TryFutureExt;
|
260 257 | let fut = fut.map_err(
|
261 258 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
262 259 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
263 260 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
264 261 | e,
|
265 262 | )
|
266 263 | },
|
267 264 | );
|
268 265 | CaseInsensitiveErrorOperationInputFuture {
|
269 266 | inner: Box::pin(fut),
|
270 267 | }
|
271 268 | }
|
272 269 | }
|
273 270 | impl
|
274 271 | ::aws_smithy_http_server::response::IntoResponse<
|
275 272 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
276 273 | > for crate::output::CaseInsensitiveErrorOperationOutput
|
277 274 | {
|
278 275 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
279 276 | match crate::protocol_serde::shape_case_insensitive_error_operation::ser_case_insensitive_error_operation_http_response(self) {
|
280 277 | Ok(response) => response,
|
281 278 | Err(e) => {
|
282 279 | ::tracing::error!(error = %e, "failed to serialize response");
|
283 280 | ::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))
|
284 281 | }
|
285 282 | }
|
286 283 | }
|
287 284 | }
|
329 326 | }
|
330 327 |
|
331 328 | impl<B>
|
332 329 | ::aws_smithy_http_server::request::FromRequest<
|
333 330 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
334 331 | B,
|
335 332 | > for crate::input::NullInNonSparseInput
|
336 333 | where
|
337 334 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
338 335 | B: 'static,
|
339 336 |
|
340 337 | B::Data: Send,
|
341 338 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
342 339 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
343 340 | {
|
344 341 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
345 342 | type Future = NullInNonSparseInputFuture;
|
346 343 |
|
347 344 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
348 345 | let fut = async move {
|
349 346 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
350 347 | request.headers(),
|
351 348 | &CONTENT_TYPE_NULLINNONSPARSE,
|
352 349 | ) {
|
353 350 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
354 351 | }
|
355 352 | crate::protocol_serde::shape_null_in_non_sparse::de_null_in_non_sparse_http_request(
|
356 353 | request,
|
357 354 | )
|
358 355 | .await
|
359 - | .map_err(Into::into)
|
360 356 | };
|
361 357 | use ::futures_util::future::TryFutureExt;
|
362 358 | let fut = fut.map_err(
|
363 359 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
364 360 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
365 361 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
366 362 | e,
|
367 363 | )
|
368 364 | },
|
369 365 | );
|
370 366 | NullInNonSparseInputFuture {
|
371 367 | inner: Box::pin(fut),
|
372 368 | }
|
373 369 | }
|
374 370 | }
|
375 371 | impl
|
376 372 | ::aws_smithy_http_server::response::IntoResponse<
|
377 373 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
378 374 | > for crate::output::NullInNonSparseOutput
|
379 375 | {
|
380 376 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
381 377 | match crate::protocol_serde::shape_null_in_non_sparse::ser_null_in_non_sparse_http_response(
|
382 378 | self,
|
383 379 | ) {
|
384 380 | Ok(response) => response,
|
385 381 | Err(e) => {
|
386 382 | ::tracing::error!(error = %e, "failed to serialize response");
|
387 383 | ::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))
|
388 384 | }
|
389 385 | }
|
435 431 | this.inner.as_mut().poll(cx)
|
436 432 | }
|
437 433 | }
|
438 434 |
|
439 435 | impl<B>
|
440 436 | ::aws_smithy_http_server::request::FromRequest<
|
441 437 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
442 438 | B,
|
443 439 | > for crate::input::EscapedStringValuesInput
|
444 440 | where
|
445 441 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
446 442 | B: 'static,
|
447 443 |
|
448 444 | B::Data: Send,
|
449 445 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
450 446 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
451 447 | {
|
452 448 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
453 449 | type Future = EscapedStringValuesInputFuture;
|
454 450 |
|
455 451 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
456 452 | let fut = async move {
|
457 453 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
458 454 | request.headers(),
|
459 455 | &CONTENT_TYPE_ESCAPEDSTRINGVALUES,
|
460 456 | ) {
|
461 457 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
462 458 | }
|
463 459 | crate::protocol_serde::shape_escaped_string_values::de_escaped_string_values_http_request(request)
|
464 460 | .await
|
465 - | .map_err(Into::into)
|
466 461 | };
|
467 462 | use ::futures_util::future::TryFutureExt;
|
468 463 | let fut = fut.map_err(
|
469 464 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
470 465 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
471 466 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
472 467 | e,
|
473 468 | )
|
474 469 | },
|
475 470 | );
|
476 471 | EscapedStringValuesInputFuture {
|
477 472 | inner: Box::pin(fut),
|
478 473 | }
|
479 474 | }
|
480 475 | }
|
481 476 | impl
|
482 477 | ::aws_smithy_http_server::response::IntoResponse<
|
483 478 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
484 479 | > for crate::output::EscapedStringValuesOutput
|
485 480 | {
|
486 481 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
487 482 | match crate::protocol_serde::shape_escaped_string_values::ser_escaped_string_values_http_response(self) {
|
488 483 | Ok(response) => response,
|
489 484 | Err(e) => {
|
490 485 | ::tracing::error!(error = %e, "failed to serialize response");
|
491 486 | ::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))
|
492 487 | }
|
493 488 | }
|
494 489 | }
|
495 490 | }
|
535 530 | this.inner.as_mut().poll(cx)
|
536 531 | }
|
537 532 | }
|
538 533 |
|
539 534 | impl<B>
|
540 535 | ::aws_smithy_http_server::request::FromRequest<
|
541 536 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
542 537 | B,
|
543 538 | > for crate::input::PrimitiveIntOpInput
|
544 539 | where
|
545 540 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
546 541 | B: 'static,
|
547 542 |
|
548 543 | B::Data: Send,
|
549 544 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
550 545 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
551 546 | {
|
552 547 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
553 548 | type Future = PrimitiveIntOpInputFuture;
|
554 549 |
|
555 550 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
556 551 | let fut = async move {
|
557 552 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
558 553 | request.headers(),
|
559 554 | &CONTENT_TYPE_PRIMITIVEINTOP,
|
560 555 | ) {
|
561 556 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
562 557 | }
|
563 558 | crate::protocol_serde::shape_primitive_int_op::de_primitive_int_op_http_request(request)
|
564 559 | .await
|
565 - | .map_err(Into::into)
|
566 560 | };
|
567 561 | use ::futures_util::future::TryFutureExt;
|
568 562 | let fut = fut.map_err(
|
569 563 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
570 564 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
571 565 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
572 566 | e,
|
573 567 | )
|
574 568 | },
|
575 569 | );
|
576 570 | PrimitiveIntOpInputFuture {
|
577 571 | inner: Box::pin(fut),
|
578 572 | }
|
579 573 | }
|
580 574 | }
|
581 575 | impl
|
582 576 | ::aws_smithy_http_server::response::IntoResponse<
|
583 577 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
584 578 | > for crate::output::PrimitiveIntOpOutput
|
585 579 | {
|
586 580 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
587 581 | match crate::protocol_serde::shape_primitive_int_op::ser_primitive_int_op_http_response(
|
588 582 | self,
|
589 583 | ) {
|
590 584 | Ok(response) => response,
|
591 585 | Err(e) => {
|
592 586 | ::tracing::error!(error = %e, "failed to serialize response");
|
593 587 | ::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))
|
594 588 | }
|
595 589 | }
|
642 636 | }
|
643 637 |
|
644 638 | impl<B>
|
645 639 | ::aws_smithy_http_server::request::FromRequest<
|
646 640 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
647 641 | B,
|
648 642 | > for crate::input::MapWithEnumKeyOpInput
|
649 643 | where
|
650 644 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
651 645 | B: 'static,
|
652 646 |
|
653 647 | B::Data: Send,
|
654 648 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
655 649 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
656 650 | {
|
657 651 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
658 652 | type Future = MapWithEnumKeyOpInputFuture;
|
659 653 |
|
660 654 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
661 655 | let fut = async move {
|
662 656 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
663 657 | request.headers(),
|
664 658 | &CONTENT_TYPE_MAPWITHENUMKEYOP,
|
665 659 | ) {
|
666 660 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
667 661 | }
|
668 662 | crate::protocol_serde::shape_map_with_enum_key_op::de_map_with_enum_key_op_http_request(
|
669 663 | request,
|
670 664 | )
|
671 665 | .await
|
672 - | .map_err(Into::into)
|
673 666 | };
|
674 667 | use ::futures_util::future::TryFutureExt;
|
675 668 | let fut = fut.map_err(
|
676 669 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
677 670 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
678 671 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
679 672 | e,
|
680 673 | )
|
681 674 | },
|
682 675 | );
|
683 676 | MapWithEnumKeyOpInputFuture {
|
684 677 | inner: Box::pin(fut),
|
685 678 | }
|
686 679 | }
|
687 680 | }
|
688 681 | impl
|
689 682 | ::aws_smithy_http_server::response::IntoResponse<
|
690 683 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
691 684 | > for crate::output::MapWithEnumKeyOpOutput
|
692 685 | {
|
693 686 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
694 687 | match crate::protocol_serde::shape_map_with_enum_key_op::ser_map_with_enum_key_op_http_response(self) {
|
695 688 | Ok(response) => response,
|
696 689 | Err(e) => {
|
697 690 | ::tracing::error!(error = %e, "failed to serialize response");
|
698 691 | ::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))
|
699 692 | }
|
700 693 | }
|
701 694 | }
|
702 695 | }
|
746 739 | this.inner.as_mut().poll(cx)
|
747 740 | }
|
748 741 | }
|
749 742 |
|
750 743 | impl<B>
|
751 744 | ::aws_smithy_http_server::request::FromRequest<
|
752 745 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
753 746 | B,
|
754 747 | > for crate::input::StatusResponseInput
|
755 748 | where
|
756 749 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
757 750 | B: 'static,
|
758 751 |
|
759 752 | B::Data: Send,
|
760 753 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
761 754 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
762 755 | {
|
763 756 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
764 757 | type Future = StatusResponseInputFuture;
|
765 758 |
|
766 759 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
767 760 | let fut = async move {
|
768 761 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
769 762 | request.headers(),
|
770 763 | &CONTENT_TYPE_STATUSRESPONSE,
|
771 764 | ) {
|
772 765 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
773 766 | }
|
774 767 | crate::protocol_serde::shape_status_response::de_status_response_http_request(request)
|
775 768 | .await
|
776 - | .map_err(Into::into)
|
777 769 | };
|
778 770 | use ::futures_util::future::TryFutureExt;
|
779 771 | let fut = fut.map_err(
|
780 772 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
781 773 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
782 774 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
783 775 | e,
|
784 776 | )
|
785 777 | },
|
786 778 | );
|
787 779 | StatusResponseInputFuture {
|
788 780 | inner: Box::pin(fut),
|
789 781 | }
|
790 782 | }
|
791 783 | }
|
792 784 | impl
|
793 785 | ::aws_smithy_http_server::response::IntoResponse<
|
794 786 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
795 787 | > for crate::output::StatusResponseOutput
|
796 788 | {
|
797 789 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
798 790 | match crate::protocol_serde::shape_status_response::ser_status_response_http_response(self)
|
799 791 | {
|
800 792 | Ok(response) => response,
|
801 793 | Err(e) => {
|
802 794 | ::tracing::error!(error = %e, "failed to serialize response");
|
803 795 | ::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))
|
804 796 | }
|
805 797 | }
|
806 798 | }
|
847 839 | ) -> std::task::Poll<Self::Output> {
|
848 840 | let this = self.project();
|
849 841 | this.inner.as_mut().poll(cx)
|
850 842 | }
|
851 843 | }
|
852 844 |
|
853 845 | impl<B>
|
854 846 | ::aws_smithy_http_server::request::FromRequest<
|
855 847 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
856 848 | B,
|
857 849 | > for crate::input::EnumQueryInput
|
858 850 | where
|
859 851 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
860 852 | B: 'static,
|
861 853 |
|
862 854 | B::Data: Send,
|
863 855 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
864 856 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
865 857 | {
|
866 858 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
867 859 | type Future = EnumQueryInputFuture;
|
868 860 |
|
869 861 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
870 862 | let fut = async move {
|
871 863 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
872 864 | request.headers(),
|
873 865 | &CONTENT_TYPE_ENUMQUERY,
|
874 866 | ) {
|
875 867 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
876 868 | }
|
877 - | crate::protocol_serde::shape_enum_query::de_enum_query_http_request(request)
|
878 - | .await
|
879 - | .map_err(Into::into)
|
869 + | crate::protocol_serde::shape_enum_query::de_enum_query_http_request(request).await
|
880 870 | };
|
881 871 | use ::futures_util::future::TryFutureExt;
|
882 872 | let fut = fut.map_err(
|
883 873 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
884 874 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
885 875 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
886 876 | e,
|
887 877 | )
|
888 878 | },
|
889 879 | );
|
890 880 | EnumQueryInputFuture {
|
891 881 | inner: Box::pin(fut),
|
892 882 | }
|
893 883 | }
|
894 884 | }
|
895 885 | impl
|
896 886 | ::aws_smithy_http_server::response::IntoResponse<
|
897 887 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
898 888 | > for crate::output::EnumQueryOutput
|
899 889 | {
|
900 890 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
901 891 | match crate::protocol_serde::shape_enum_query::ser_enum_query_http_response(self) {
|
902 892 | Ok(response) => response,
|
903 893 | Err(e) => {
|
904 894 | ::tracing::error!(error = %e, "failed to serialize response");
|
905 895 | ::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))
|
906 896 | }
|
907 897 | }
|
908 898 | }
|
909 899 | }
|
953 943 | }
|
954 944 |
|
955 945 | impl<B>
|
956 946 | ::aws_smithy_http_server::request::FromRequest<
|
957 947 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
958 948 | B,
|
959 949 | > for crate::input::PrimitiveIntHeaderInput
|
960 950 | where
|
961 951 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
962 952 | B: 'static,
|
963 953 |
|
964 954 | B::Data: Send,
|
965 955 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
966 956 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
967 957 | {
|
968 958 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
969 959 | type Future = PrimitiveIntHeaderInputFuture;
|
970 960 |
|
971 961 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
972 962 | let fut = async move {
|
973 963 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
974 964 | request.headers(),
|
975 965 | &CONTENT_TYPE_PRIMITIVEINTHEADER,
|
976 966 | ) {
|
977 967 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
978 968 | }
|
979 969 | crate::protocol_serde::shape_primitive_int_header::de_primitive_int_header_http_request(
|
980 970 | request,
|
981 971 | )
|
982 972 | .await
|
983 - | .map_err(Into::into)
|
984 973 | };
|
985 974 | use ::futures_util::future::TryFutureExt;
|
986 975 | let fut = fut.map_err(
|
987 976 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
988 977 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
989 978 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
990 979 | e,
|
991 980 | )
|
992 981 | },
|
993 982 | );
|
994 983 | PrimitiveIntHeaderInputFuture {
|
995 984 | inner: Box::pin(fut),
|
996 985 | }
|
997 986 | }
|
998 987 | }
|
999 988 | impl
|
1000 989 | ::aws_smithy_http_server::response::IntoResponse<
|
1001 990 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1002 991 | > for crate::output::PrimitiveIntHeaderOutput
|
1003 992 | {
|
1004 993 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1005 994 | match crate::protocol_serde::shape_primitive_int_header::ser_primitive_int_header_http_response(self) {
|
1006 995 | Ok(response) => response,
|
1007 996 | Err(e) => {
|
1008 997 | ::tracing::error!(error = %e, "failed to serialize response");
|
1009 998 | ::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))
|
1010 999 | }
|
1011 1000 | }
|
1012 1001 | }
|
1013 1002 | }
|
1062 1051 | this.inner.as_mut().poll(cx)
|
1063 1052 | }
|
1064 1053 | }
|
1065 1054 |
|
1066 1055 | impl<B>
|
1067 1056 | ::aws_smithy_http_server::request::FromRequest<
|
1068 1057 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1069 1058 | B,
|
1070 1059 | > for crate::input::StringPayloadInput
|
1071 1060 | where
|
1072 1061 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
1073 1062 | B: 'static,
|
1074 1063 |
|
1075 1064 | B::Data: Send,
|
1076 1065 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1077 1066 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
1078 1067 | {
|
1079 1068 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1080 1069 | type Future = StringPayloadInputFuture;
|
1081 1070 |
|
1082 1071 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1083 1072 | let fut = async move {
|
1084 1073 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
1085 1074 | request.headers(),
|
1086 1075 | &CONTENT_TYPE_STRINGPAYLOAD,
|
1087 1076 | ) {
|
1088 1077 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1089 1078 | }
|
1090 1079 | crate::protocol_serde::shape_string_payload::de_string_payload_http_request(request)
|
1091 1080 | .await
|
1092 - | .map_err(Into::into)
|
1093 1081 | };
|
1094 1082 | use ::futures_util::future::TryFutureExt;
|
1095 1083 | let fut = fut.map_err(
|
1096 1084 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1097 1085 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1098 1086 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
1099 1087 | e,
|
1100 1088 | )
|
1101 1089 | },
|
1102 1090 | );
|
1103 1091 | StringPayloadInputFuture {
|
1104 1092 | inner: Box::pin(fut),
|
1105 1093 | }
|
1106 1094 | }
|
1107 1095 | }
|
1108 1096 | impl
|
1109 1097 | ::aws_smithy_http_server::response::IntoResponse<
|
1110 1098 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1111 1099 | > for crate::output::StringPayloadOutput
|
1112 1100 | {
|
1113 1101 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1114 1102 | match crate::protocol_serde::shape_string_payload::ser_string_payload_http_response(self) {
|
1115 1103 | Ok(response) => response,
|
1116 1104 | Err(e) => {
|
1117 1105 | ::tracing::error!(error = %e, "failed to serialize response");
|
1118 1106 | ::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))
|
1119 1107 | }
|
1120 1108 | }
|
1121 1109 | }
|
1122 1110 | }
|