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>>
|
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>>
|
7 7 | }
|
8 8 | }
|
9 9 |
|
10 - | impl std::future::Future for HttpQueryParamsOnlyOperationInputFuture {
|
10 + | impl std::future::Future for StringPayloadInputFuture {
|
11 11 | type Output = Result<
|
12 - | crate::input::HttpQueryParamsOnlyOperationInput,
|
12 + | crate::input::StringPayloadInput,
|
13 13 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
14 14 | >;
|
15 15 |
|
16 16 | fn poll(
|
17 17 | self: std::pin::Pin<&mut Self>,
|
18 18 | cx: &mut std::task::Context<'_>,
|
19 19 | ) -> std::task::Poll<Self::Output> {
|
20 20 | let this = self.project();
|
21 21 | this.inner.as_mut().poll(cx)
|
22 22 | }
|
23 23 | }
|
24 24 |
|
25 25 | impl<B>
|
26 26 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
27 27 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
28 28 | B,
|
29 - | > for crate::input::HttpQueryParamsOnlyOperationInput
|
29 + | > for crate::input::StringPayloadInput
|
30 30 | where
|
31 31 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
32 32 | B: 'static,
|
33 33 |
|
34 34 | B::Data: Send,
|
35 35 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
36 36 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
37 37 | {
|
38 38 | type Rejection =
|
39 39 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
40 - | type Future = HttpQueryParamsOnlyOperationInputFuture;
|
40 + | type Future = StringPayloadInputFuture;
|
41 41 |
|
42 42 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
43 43 | let fut = async move {
|
44 44 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
45 45 | request.headers(),
|
46 - | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
46 + | &crate::mimes::CONTENT_TYPE_TEXT_PLAIN,
|
47 47 | ) {
|
48 48 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
49 49 | }
|
50 - | crate::protocol_serde::shape_http_query_params_only_operation::de_http_query_params_only_operation_http_request(request)
|
50 + | crate::protocol_serde::shape_string_payload::de_string_payload_http_request(request)
|
51 51 | .await
|
52 52 | };
|
53 53 | use ::futures_util::future::TryFutureExt;
|
54 54 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
55 55 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
56 56 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
57 57 | });
|
58 - | HttpQueryParamsOnlyOperationInputFuture {
|
58 + | StringPayloadInputFuture {
|
59 59 | inner: Box::pin(fut),
|
60 60 | }
|
61 61 | }
|
62 62 | }
|
63 63 | impl
|
64 64 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
65 65 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
66 - | > for crate::output::HttpQueryParamsOnlyOperationOutput
|
66 + | > for crate::output::StringPayloadOutput
|
67 67 | {
|
68 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) {
|
69 + | match crate::protocol_serde::shape_string_payload::ser_string_payload_http_response(self) {
|
70 70 | Ok(response) => response,
|
71 71 | Err(e) => {
|
72 72 | ::tracing::error!(error = %e, "failed to serialize response");
|
73 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 74 | }
|
75 75 | }
|
76 76 | }
|
77 77 | }
|
78 78 | impl
|
79 79 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
80 80 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
81 - | > for crate::error::HttpQueryParamsOnlyOperationError
|
81 + | > for crate::error::StringPayloadError
|
82 82 | {
|
83 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) {
|
84 + | match crate::protocol_serde::shape_string_payload::ser_string_payload_http_error(&self) {
|
85 85 | Ok(mut response) => {
|
86 - | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
86 + | response.extensions_mut().insert(
|
87 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
88 + | self.name(),
|
89 + | ),
|
90 + | );
|
87 91 | response
|
88 - | },
|
92 + | }
|
89 93 | Err(e) => {
|
90 94 | ::tracing::error!(error = %e, "failed to serialize response");
|
91 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))
|
92 96 | }
|
93 97 | }
|
94 98 | }
|
95 99 | }
|
96 100 |
|
97 101 | ::pin_project_lite::pin_project! {
|
98 102 | /// 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>>
|
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>>
|
102 106 | }
|
103 107 | }
|
104 108 |
|
105 - | impl std::future::Future for QueryPrecedenceInputFuture {
|
109 + | impl std::future::Future for PrimitiveIntHeaderInputFuture {
|
106 110 | type Output = Result<
|
107 - | crate::input::QueryPrecedenceInput,
|
111 + | crate::input::PrimitiveIntHeaderInput,
|
108 112 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
109 113 | >;
|
110 114 |
|
111 115 | fn poll(
|
112 116 | self: std::pin::Pin<&mut Self>,
|
113 117 | cx: &mut std::task::Context<'_>,
|
114 118 | ) -> std::task::Poll<Self::Output> {
|
115 119 | let this = self.project();
|
116 120 | this.inner.as_mut().poll(cx)
|
117 121 | }
|
118 122 | }
|
119 123 |
|
120 124 | impl<B>
|
121 125 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
122 126 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
123 127 | B,
|
124 - | > for crate::input::QueryPrecedenceInput
|
128 + | > for crate::input::PrimitiveIntHeaderInput
|
125 129 | where
|
126 130 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
127 131 | B: 'static,
|
128 132 |
|
129 133 | B::Data: Send,
|
130 134 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
131 135 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
132 136 | {
|
133 137 | type Rejection =
|
134 138 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
135 - | type Future = QueryPrecedenceInputFuture;
|
139 + | type Future = PrimitiveIntHeaderInputFuture;
|
136 140 |
|
137 141 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
138 142 | let fut = async move {
|
139 143 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
140 144 | request.headers(),
|
141 145 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
142 146 | ) {
|
143 147 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
144 148 | }
|
145 - | crate::protocol_serde::shape_query_precedence::de_query_precedence_http_request(request)
|
149 + | crate::protocol_serde::shape_primitive_int_header::de_primitive_int_header_http_request(
|
150 + | request,
|
151 + | )
|
146 152 | .await
|
147 153 | };
|
148 154 | use ::futures_util::future::TryFutureExt;
|
149 155 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
150 156 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
151 157 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
152 158 | });
|
153 - | QueryPrecedenceInputFuture {
|
159 + | PrimitiveIntHeaderInputFuture {
|
154 160 | inner: Box::pin(fut),
|
155 161 | }
|
156 162 | }
|
157 163 | }
|
158 164 | impl
|
159 165 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
160 166 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
161 - | > for crate::output::QueryPrecedenceOutput
|
167 + | > for crate::output::PrimitiveIntHeaderOutput
|
162 168 | {
|
163 169 | 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 - | ) {
|
170 + | match crate::protocol_serde::shape_primitive_int_header::ser_primitive_int_header_http_response(self) {
|
167 171 | Ok(response) => response,
|
168 172 | Err(e) => {
|
169 173 | ::tracing::error!(error = %e, "failed to serialize response");
|
170 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))
|
171 175 | }
|
172 176 | }
|
173 177 | }
|
174 178 | }
|
175 179 | impl
|
176 180 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
177 181 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
178 - | > for crate::error::QueryPrecedenceError
|
182 + | > for crate::error::PrimitiveIntHeaderError
|
179 183 | {
|
180 184 | 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 - | {
|
185 + | match crate::protocol_serde::shape_primitive_int_header::ser_primitive_int_header_http_error(
|
186 + | &self,
|
187 + | ) {
|
183 188 | Ok(mut response) => {
|
184 189 | response.extensions_mut().insert(
|
185 190 | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
186 191 | self.name(),
|
187 192 | ),
|
188 193 | );
|
189 194 | response
|
190 195 | }
|
191 196 | Err(e) => {
|
192 197 | ::tracing::error!(error = %e, "failed to serialize response");
|
193 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))
|
194 199 | }
|
195 200 | }
|
196 201 | }
|
197 202 | }
|
198 203 |
|
199 204 | ::pin_project_lite::pin_project! {
|
200 205 | /// 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>>
|
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>>
|
204 209 | }
|
205 210 | }
|
206 211 |
|
207 - | impl std::future::Future for EmptyStructWithContentOnWireOpInputFuture {
|
212 + | impl std::future::Future for EnumQueryInputFuture {
|
208 213 | type Output = Result<
|
209 - | crate::input::EmptyStructWithContentOnWireOpInput,
|
214 + | crate::input::EnumQueryInput,
|
210 215 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
211 216 | >;
|
212 217 |
|
213 218 | fn poll(
|
214 219 | self: std::pin::Pin<&mut Self>,
|
215 220 | cx: &mut std::task::Context<'_>,
|
216 221 | ) -> std::task::Poll<Self::Output> {
|
217 222 | let this = self.project();
|
218 223 | this.inner.as_mut().poll(cx)
|
219 224 | }
|
220 225 | }
|
221 226 |
|
222 227 | impl<B>
|
223 228 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
224 229 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
225 230 | B,
|
226 - | > for crate::input::EmptyStructWithContentOnWireOpInput
|
231 + | > for crate::input::EnumQueryInput
|
227 232 | where
|
228 233 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
229 234 | B: 'static,
|
230 235 |
|
231 236 | B::Data: Send,
|
232 237 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
233 238 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
234 239 | {
|
235 240 | type Rejection =
|
236 241 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
237 - | type Future = EmptyStructWithContentOnWireOpInputFuture;
|
242 + | type Future = EnumQueryInputFuture;
|
238 243 |
|
239 244 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
240 245 | let fut = async move {
|
241 246 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
242 247 | request.headers(),
|
243 248 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
244 249 | ) {
|
245 250 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
246 251 | }
|
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
|
252 + | crate::protocol_serde::shape_enum_query::de_enum_query_http_request(request).await
|
249 253 | };
|
250 254 | use ::futures_util::future::TryFutureExt;
|
251 255 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
252 256 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
253 257 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
254 258 | });
|
255 - | EmptyStructWithContentOnWireOpInputFuture {
|
259 + | EnumQueryInputFuture {
|
256 260 | inner: Box::pin(fut),
|
257 261 | }
|
258 262 | }
|
259 263 | }
|
260 264 | impl
|
261 265 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
262 266 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
263 - | > for crate::output::EmptyStructWithContentOnWireOpOutput
|
267 + | > for crate::output::EnumQueryOutput
|
264 268 | {
|
265 269 | 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) {
|
270 + | match crate::protocol_serde::shape_enum_query::ser_enum_query_http_response(self) {
|
267 271 | Ok(response) => response,
|
268 272 | Err(e) => {
|
269 273 | ::tracing::error!(error = %e, "failed to serialize response");
|
270 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))
|
271 275 | }
|
272 276 | }
|
273 277 | }
|
274 278 | }
|
275 279 | impl
|
276 280 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
277 281 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
278 - | > for crate::error::EmptyStructWithContentOnWireOpError
|
282 + | > for crate::error::EnumQueryError
|
279 283 | {
|
280 284 | 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) {
|
285 + | match crate::protocol_serde::shape_enum_query::ser_enum_query_http_error(&self) {
|
282 286 | Ok(mut response) => {
|
283 - | 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 + | );
|
284 292 | response
|
285 - | },
|
293 + | }
|
286 294 | Err(e) => {
|
287 295 | ::tracing::error!(error = %e, "failed to serialize response");
|
288 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))
|
289 297 | }
|
290 298 | }
|
291 299 | }
|
292 300 | }
|
293 301 |
|
294 302 | ::pin_project_lite::pin_project! {
|
295 303 | /// 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>>
|
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>>
|
299 307 | }
|
300 308 | }
|
301 309 |
|
302 - | impl std::future::Future for CaseInsensitiveErrorOperationInputFuture {
|
310 + | impl std::future::Future for StatusResponseInputFuture {
|
303 311 | type Output = Result<
|
304 - | crate::input::CaseInsensitiveErrorOperationInput,
|
312 + | crate::input::StatusResponseInput,
|
305 313 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
306 314 | >;
|
307 315 |
|
308 316 | fn poll(
|
309 317 | self: std::pin::Pin<&mut Self>,
|
310 318 | cx: &mut std::task::Context<'_>,
|
311 319 | ) -> std::task::Poll<Self::Output> {
|
312 320 | let this = self.project();
|
313 321 | this.inner.as_mut().poll(cx)
|
314 322 | }
|
315 323 | }
|
316 324 |
|
317 325 | impl<B>
|
318 326 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
319 327 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
320 328 | B,
|
321 - | > for crate::input::CaseInsensitiveErrorOperationInput
|
329 + | > for crate::input::StatusResponseInput
|
322 330 | where
|
323 331 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
324 332 | B: 'static,
|
325 333 |
|
326 334 | B::Data: Send,
|
327 335 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
328 336 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
329 337 | {
|
330 338 | type Rejection =
|
331 339 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
332 - | type Future = CaseInsensitiveErrorOperationInputFuture;
|
340 + | type Future = StatusResponseInputFuture;
|
333 341 |
|
334 342 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
335 343 | let fut = async move {
|
336 344 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
337 345 | request.headers(),
|
338 346 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
339 347 | ) {
|
340 348 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
341 349 | }
|
342 - | crate::protocol_serde::shape_case_insensitive_error_operation::de_case_insensitive_error_operation_http_request(request)
|
350 + | crate::protocol_serde::shape_status_response::de_status_response_http_request(request)
|
343 351 | .await
|
344 352 | };
|
345 353 | use ::futures_util::future::TryFutureExt;
|
346 354 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
347 355 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
348 356 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
349 357 | });
|
350 - | CaseInsensitiveErrorOperationInputFuture {
|
358 + | StatusResponseInputFuture {
|
351 359 | inner: Box::pin(fut),
|
352 360 | }
|
353 361 | }
|
354 362 | }
|
355 363 | impl
|
356 364 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
357 365 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
358 - | > for crate::output::CaseInsensitiveErrorOperationOutput
|
366 + | > for crate::output::StatusResponseOutput
|
359 367 | {
|
360 368 | 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) {
|
369 + | match crate::protocol_serde::shape_status_response::ser_status_response_http_response(self)
|
370 + | {
|
362 371 | Ok(response) => response,
|
363 372 | Err(e) => {
|
364 373 | ::tracing::error!(error = %e, "failed to serialize response");
|
365 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))
|
366 375 | }
|
367 376 | }
|
368 377 | }
|
369 378 | }
|
370 379 | impl
|
371 380 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
372 381 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
373 - | > for crate::error::CaseInsensitiveErrorOperationError
|
382 + | > for crate::error::StatusResponseError
|
374 383 | {
|
375 384 | 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) {
|
385 + | match crate::protocol_serde::shape_status_response::ser_status_response_http_error(&self) {
|
377 386 | Ok(mut response) => {
|
378 - | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
387 + | response.extensions_mut().insert(
|
388 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
389 + | self.name(),
|
390 + | ),
|
391 + | );
|
379 392 | response
|
380 - | },
|
393 + | }
|
381 394 | Err(e) => {
|
382 395 | ::tracing::error!(error = %e, "failed to serialize response");
|
383 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))
|
384 397 | }
|
385 398 | }
|
386 399 | }
|
387 400 | }
|
388 401 |
|
389 402 | ::pin_project_lite::pin_project! {
|
390 403 | /// 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>>
|
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>>
|
394 407 | }
|
395 408 | }
|
396 409 |
|
397 - | impl std::future::Future for NullInNonSparseInputFuture {
|
410 + | impl std::future::Future for MapWithEnumKeyOpInputFuture {
|
398 411 | type Output = Result<
|
399 - | crate::input::NullInNonSparseInput,
|
412 + | crate::input::MapWithEnumKeyOpInput,
|
400 413 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
401 414 | >;
|
402 415 |
|
403 416 | fn poll(
|
404 417 | self: std::pin::Pin<&mut Self>,
|
405 418 | cx: &mut std::task::Context<'_>,
|
406 419 | ) -> std::task::Poll<Self::Output> {
|
407 420 | let this = self.project();
|
408 421 | this.inner.as_mut().poll(cx)
|
409 422 | }
|
410 423 | }
|
411 424 |
|
412 425 | impl<B>
|
413 426 | ::aws_smithy_legacy_http_server::request::FromRequest<
|
414 427 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
415 428 | B,
|
416 - | > for crate::input::NullInNonSparseInput
|
429 + | > for crate::input::MapWithEnumKeyOpInput
|
417 430 | where
|
418 431 | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
419 432 | B: 'static,
|
420 433 |
|
421 434 | B::Data: Send,
|
422 435 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
423 436 | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
424 437 | {
|
425 438 | type Rejection =
|
426 439 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
427 - | type Future = NullInNonSparseInputFuture;
|
440 + | type Future = MapWithEnumKeyOpInputFuture;
|
428 441 |
|
429 442 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
430 443 | let fut = async move {
|
431 444 | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
432 445 | request.headers(),
|
433 446 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
434 447 | ) {
|
435 448 | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
436 449 | }
|
437 - | crate::protocol_serde::shape_null_in_non_sparse::de_null_in_non_sparse_http_request(
|
450 + | crate::protocol_serde::shape_map_with_enum_key_op::de_map_with_enum_key_op_http_request(
|
438 451 | request,
|
439 452 | )
|
440 453 | .await
|
441 454 | };
|
442 455 | use ::futures_util::future::TryFutureExt;
|
443 456 | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
444 457 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
445 458 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
446 459 | });
|
447 - | NullInNonSparseInputFuture {
|
460 + | MapWithEnumKeyOpInputFuture {
|
448 461 | inner: Box::pin(fut),
|
449 462 | }
|
450 463 | }
|
451 464 | }
|
452 465 | impl
|
453 466 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
454 467 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
455 - | > for crate::output::NullInNonSparseOutput
|
468 + | > for crate::output::MapWithEnumKeyOpOutput
|
456 469 | {
|
457 470 | 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 - | ) {
|
471 + | match crate::protocol_serde::shape_map_with_enum_key_op::ser_map_with_enum_key_op_http_response(self) {
|
461 472 | Ok(response) => response,
|
462 473 | Err(e) => {
|
463 474 | ::tracing::error!(error = %e, "failed to serialize response");
|
464 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))
|
465 476 | }
|
466 477 | }
|
467 478 | }
|
468 479 | }
|
469 480 | impl
|
470 481 | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
471 482 | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
472 - | > for crate::error::NullInNonSparseError
|
483 + | > for crate::error::MapWithEnumKeyOpError
|
473 484 | {
|
474 485 | 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(
|
486 + | match crate::protocol_serde::shape_map_with_enum_key_op::ser_map_with_enum_key_op_http_error(
|
476 487 | &self,
|
477 488 | ) {
|
478 489 | Ok(mut response) => {
|
479 490 | response.extensions_mut().insert(
|
480 491 | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
481 492 | self.name(),
|
482 493 | ),
|
483 494 | );
|
484 495 | response
|
485 496 | }
|
486 497 | Err(e) => {
|
487 498 | ::tracing::error!(error = %e, "failed to serialize response");
|
488 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))
|
489 500 | }
|
490 501 | }
|
491 502 | }
|
492 503 | }
|
493 504 |
|
494 - | ::pin_project_lite::pin_project! {
|
495 - | /// 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>>
|
499 - | }
|
500 - | }
|
501 - |
|
502 - | impl std::future::Future for EscapedStringValuesInputFuture {
|
503 - | type Output = Result<
|
504 - | crate::input::EscapedStringValuesInput,
|
505 - | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
506 - | >;
|
507 - |
|
508 - | fn poll(
|
509 - | self: std::pin::Pin<&mut Self>,
|
510 - | cx: &mut std::task::Context<'_>,
|
511 - | ) -> std::task::Poll<Self::Output> {
|
512 - | let this = self.project();
|
513 - | this.inner.as_mut().poll(cx)
|
514 - | }
|
515 - | }
|
516 - |
|
517 - | impl<B>
|
518 - | ::aws_smithy_legacy_http_server::request::FromRequest<
|
519 - | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
520 - | B,
|
521 - | > for crate::input::EscapedStringValuesInput
|
522 - | where
|
523 - | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
524 - | B: 'static,
|
525 - |
|
526 - | B::Data: Send,
|
527 - | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
528 - | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
529 - | {
|
530 - | type Rejection =
|
531 - | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
532 - | type Future = EscapedStringValuesInputFuture;
|
533 - |
|
534 - | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
535 - | let fut = async move {
|
536 - | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
537 - | request.headers(),
|
538 - | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
539 - | ) {
|
540 - | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
541 - | }
|
542 - | crate::protocol_serde::shape_escaped_string_values::de_escaped_string_values_http_request(request)
|
543 - | .await
|
544 - | };
|
545 - | use ::futures_util::future::TryFutureExt;
|
546 - | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
547 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
548 - | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
549 - | });
|
550 - | EscapedStringValuesInputFuture {
|
551 - | inner: Box::pin(fut),
|
552 - | }
|
553 - | }
|
554 - | }
|
555 - | impl
|
556 - | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
557 - | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
558 - | > for crate::output::EscapedStringValuesOutput
|
559 - | {
|
560 - | 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) {
|
562 - | Ok(response) => response,
|
563 - | Err(e) => {
|
564 - | ::tracing::error!(error = %e, "failed to serialize response");
|
565 - | ::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 - | }
|
567 - | }
|
568 - | }
|
569 - | }
|
570 - | impl
|
571 - | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
572 - | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
573 - | > for crate::error::EscapedStringValuesError
|
574 - | {
|
575 - | 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) {
|
577 - | Ok(mut response) => {
|
578 - | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
579 - | response
|
580 - | },
|
581 - | Err(e) => {
|
582 - | ::tracing::error!(error = %e, "failed to serialize response");
|
583 - | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
584 - | }
|
585 - | }
|
586 - | }
|
587 - | }
|
588 - |
|
589 505 | ::pin_project_lite::pin_project! {
|
590 506 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
591 507 | /// [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput) using modelled bindings.
|
592 508 | pub struct PrimitiveIntOpInputFuture {
|
593 509 | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PrimitiveIntOpInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
594 510 | }
|
595 511 | }
|
596 512 |
|
597 513 | impl std::future::Future for PrimitiveIntOpInputFuture {
|
598 514 | type Output = Result<
|
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 - | )
|
655 + | crate::protocol_serde::shape_escaped_string_values::de_escaped_string_values_http_request(request)
|
742 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)
|
750 + | crate::protocol_serde::shape_null_in_non_sparse::de_null_in_non_sparse_http_request(
|
751 + | request,
|
752 + | )
|
843 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) {
|
874 + | match crate::protocol_serde::shape_case_insensitive_error_operation::ser_case_insensitive_error_operation_http_response(self) {
|
961 875 | Ok(response) => response,
|
962 876 | Err(e) => {
|
963 877 | ::tracing::error!(error = %e, "failed to serialize response");
|
964 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))
|
965 879 | }
|
966 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 - | )
|
950 + | crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::de_empty_struct_with_content_on_wire_op_http_request(request)
|
1043 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");
|