1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 2 | #[allow(clippy::unnecessary_wraps)]
|
3 3 | pub async fn de_capture_pokemon_http_request<B>(
|
4 4 | #[allow(unused_variables)] request: ::http::Request<B>,
|
5 5 | ) -> std::result::Result<
|
6 6 | crate::input::CapturePokemonInput,
|
7 7 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
|
8 8 | >
|
9 9 | where
|
10 10 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
11 11 | B: Into<::aws_smithy_types::byte_stream::ByteStream>,
|
12 12 | B::Data: Send,
|
13 13 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
14 14 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
15 15 | {
|
16 16 | Ok({
|
17 17 | #[allow(unused_mut)]
|
18 18 | let mut input = crate::input::capture_pokemon_input_internal::Builder::default();
|
19 19 | #[allow(unused_variables)]
|
20 20 | let ::aws_smithy_runtime_api::http::RequestParts {
|
21 21 | uri, headers, body, ..
|
22 22 | } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
|
23 23 | if let Some(value) = {
|
24 - | let mut receiver =
|
25 - | crate::protocol_serde::shape_capture_pokemon_input::de_events_payload(
|
24 + | let receiver = crate::protocol_serde::shape_capture_pokemon_input::de_events_payload(
|
26 25 | &mut body.into().into_inner(),
|
27 26 | )?;
|
28 - | if let Some(_initial_event) = receiver
|
29 - | .try_recv_initial(::aws_smithy_http::event_stream::InitialMessageType::Request)
|
30 - | .await
|
31 - | .map_err(
|
32 - | |ev_error| ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::ConstraintViolation(
|
33 - | #[allow(clippy::useless_conversion)]
|
34 - | format!("{ev_error}").into()
|
35 - | )
|
36 - | )? {
|
37 27 |
|
38 - | }
|
39 28 | Some(receiver)
|
40 29 | } {
|
41 30 | input = input.set_events(value)
|
42 31 | }
|
43 32 | let input_string = uri.path();
|
44 33 | let (input_string, (_, m1)) =
|
45 34 | ::nom::sequence::tuple::<_, _, ::nom::error::Error<&str>, _>((
|
46 35 | ::nom::sequence::preceded(
|
47 36 | ::nom::bytes::complete::tag("/"),
|
48 37 | ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>(
|
49 38 | "capture-pokemon-event",
|
50 39 | ),
|
51 40 | ),
|
52 41 | ::nom::sequence::preceded(
|
53 42 | ::nom::bytes::complete::tag("/"),
|
54 43 | ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
|
55 44 | ::nom::bytes::complete::take_until("/"),
|
56 45 | ::nom::combinator::rest,
|
57 46 | )),
|
58 47 | ),
|
59 48 | ))(input_string)?;
|
60 49 | debug_assert_eq!("", input_string);
|
61 50 | input =
|
62 51 | input.set_region(crate::protocol_serde::shape_capture_pokemon_input::de_region(m1)?);
|
63 52 | input.build()?
|
64 53 | })
|
65 54 | }
|
66 55 |
|
67 56 | #[allow(clippy::unnecessary_wraps)]
|
68 57 | pub fn ser_capture_pokemon_http_response(
|