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 - | /// [`StartSnapshotInput`](crate::input::StartSnapshotInput) using modelled bindings.
|
5 - | pub struct StartSnapshotInputFuture {
|
6 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StartSnapshotInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
4 + | /// [`CompleteSnapshotInput`](crate::input::CompleteSnapshotInput) using modelled bindings.
|
5 + | pub struct CompleteSnapshotInputFuture {
|
6 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CompleteSnapshotInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7 7 | }
|
8 8 | }
|
9 9 |
|
10 - | impl std::future::Future for StartSnapshotInputFuture {
|
10 + | impl std::future::Future for CompleteSnapshotInputFuture {
|
11 11 | type Output = Result<
|
12 - | crate::input::StartSnapshotInput,
|
12 + | crate::input::CompleteSnapshotInput,
|
13 13 | ::aws_smithy_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_http_server::request::FromRequest<
|
27 27 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
28 28 | B,
|
29 - | > for crate::input::StartSnapshotInput
|
29 + | > for crate::input::CompleteSnapshotInput
|
30 30 | where
|
31 31 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
32 32 | B: 'static,
|
33 33 |
|
34 34 | B::Data: Send,
|
35 35 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
36 36 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
37 37 | {
|
38 38 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
39 - | type Future = StartSnapshotInputFuture;
|
39 + | type Future = CompleteSnapshotInputFuture;
|
40 40 |
|
41 41 | fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
|
42 42 | let fut = async move {
|
43 43 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
44 44 | request.headers(),
|
45 45 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
46 46 | ) {
|
47 47 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
48 48 | }
|
49 - | crate::protocol_serde::shape_start_snapshot::de_start_snapshot_http_request(request)
|
49 + | crate::protocol_serde::shape_complete_snapshot::de_complete_snapshot_http_request(
|
50 + | request,
|
51 + | )
|
50 52 | .await
|
51 53 | };
|
52 54 | use ::futures_util::future::TryFutureExt;
|
53 55 | let fut = fut.map_err(
|
54 56 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
55 57 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
56 58 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
57 59 | e,
|
58 60 | )
|
59 61 | },
|
60 62 | );
|
61 - | StartSnapshotInputFuture {
|
63 + | CompleteSnapshotInputFuture {
|
62 64 | inner: Box::pin(fut),
|
63 65 | }
|
64 66 | }
|
65 67 | }
|
66 68 | impl
|
67 69 | ::aws_smithy_http_server::response::IntoResponse<
|
68 70 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
69 - | > for crate::output::StartSnapshotOutput
|
71 + | > for crate::output::CompleteSnapshotOutput
|
70 72 | {
|
71 73 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
72 - | match crate::protocol_serde::shape_start_snapshot::ser_start_snapshot_http_response(self) {
|
74 + | match crate::protocol_serde::shape_complete_snapshot::ser_complete_snapshot_http_response(
|
75 + | self,
|
76 + | ) {
|
73 77 | Ok(response) => response,
|
74 78 | Err(e) => {
|
75 79 | ::tracing::error!(error = %e, "failed to serialize response");
|
76 80 | ::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))
|
77 81 | }
|
78 82 | }
|
79 83 | }
|
80 84 | }
|
81 85 | impl
|
82 86 | ::aws_smithy_http_server::response::IntoResponse<
|
83 87 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
84 - | > for crate::error::StartSnapshotError
|
88 + | > for crate::error::CompleteSnapshotError
|
85 89 | {
|
86 90 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
87 - | match crate::protocol_serde::shape_start_snapshot::ser_start_snapshot_http_error(&self) {
|
91 + | match crate::protocol_serde::shape_complete_snapshot::ser_complete_snapshot_http_error(
|
92 + | &self,
|
93 + | ) {
|
88 94 | Ok(mut response) => {
|
89 95 | response.extensions_mut().insert(
|
90 96 | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
91 97 | );
|
92 98 | response
|
93 99 | }
|
94 100 | Err(e) => {
|
95 101 | ::tracing::error!(error = %e, "failed to serialize response");
|
96 102 | ::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))
|
97 103 | }
|
98 104 | }
|
99 105 | }
|
100 106 | }
|
101 107 |
|
102 108 | ::pin_project_lite::pin_project! {
|
103 109 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
104 - | /// [`PutSnapshotBlockInput`](crate::input::PutSnapshotBlockInput) using modelled bindings.
|
105 - | pub struct PutSnapshotBlockInputFuture {
|
106 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PutSnapshotBlockInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
110 + | /// [`GetSnapshotBlockInput`](crate::input::GetSnapshotBlockInput) using modelled bindings.
|
111 + | pub struct GetSnapshotBlockInputFuture {
|
112 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetSnapshotBlockInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
107 113 | }
|
108 114 | }
|
109 115 |
|
110 - | impl std::future::Future for PutSnapshotBlockInputFuture {
|
116 + | impl std::future::Future for GetSnapshotBlockInputFuture {
|
111 117 | type Output = Result<
|
112 - | crate::input::PutSnapshotBlockInput,
|
118 + | crate::input::GetSnapshotBlockInput,
|
113 119 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
114 120 | >;
|
115 121 |
|
116 122 | fn poll(
|
117 123 | self: std::pin::Pin<&mut Self>,
|
118 124 | cx: &mut std::task::Context<'_>,
|
119 125 | ) -> std::task::Poll<Self::Output> {
|
120 126 | let this = self.project();
|
121 127 | this.inner.as_mut().poll(cx)
|
122 128 | }
|
123 129 | }
|
124 130 |
|
125 131 | impl<B>
|
126 132 | ::aws_smithy_http_server::request::FromRequest<
|
127 133 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
128 134 | B,
|
129 - | > for crate::input::PutSnapshotBlockInput
|
135 + | > for crate::input::GetSnapshotBlockInput
|
130 136 | where
|
131 137 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
132 138 | B: 'static,
|
133 139 |
|
134 - | B: ::http_body_1x::Body<Data = ::bytes::Bytes>
|
135 - | + ::std::marker::Send
|
136 - | + ::std::marker::Sync
|
137 - | + 'static,
|
138 - | B::Error: Into<::aws_smithy_types::body::Error> + 'static,
|
139 - |
|
140 140 | B::Data: Send,
|
141 141 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
142 142 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
143 143 | {
|
144 144 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
145 - | type Future = PutSnapshotBlockInputFuture;
|
145 + | type Future = GetSnapshotBlockInputFuture;
|
146 146 |
|
147 147 | fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
|
148 148 | let fut = async move {
|
149 149 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
150 150 | request.headers(),
|
151 - | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
151 + | &crate::mimes::CONTENT_TYPE_APPLICATION_OCTET_STREAM,
|
152 152 | ) {
|
153 153 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
154 154 | }
|
155 - | crate::protocol_serde::shape_put_snapshot_block::de_put_snapshot_block_http_request(
|
155 + | crate::protocol_serde::shape_get_snapshot_block::de_get_snapshot_block_http_request(
|
156 156 | request,
|
157 157 | )
|
158 158 | .await
|
159 159 | };
|
160 160 | use ::futures_util::future::TryFutureExt;
|
161 161 | let fut = fut.map_err(
|
162 162 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
163 163 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
164 164 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
165 165 | e,
|
166 166 | )
|
167 167 | },
|
168 168 | );
|
169 - | PutSnapshotBlockInputFuture {
|
169 + | GetSnapshotBlockInputFuture {
|
170 170 | inner: Box::pin(fut),
|
171 171 | }
|
172 172 | }
|
173 173 | }
|
174 174 | impl
|
175 175 | ::aws_smithy_http_server::response::IntoResponse<
|
176 176 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
177 - | > for crate::output::PutSnapshotBlockOutput
|
177 + | > for crate::output::GetSnapshotBlockOutput
|
178 178 | {
|
179 179 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
180 - | match crate::protocol_serde::shape_put_snapshot_block::ser_put_snapshot_block_http_response(
|
180 + | match crate::protocol_serde::shape_get_snapshot_block::ser_get_snapshot_block_http_response(
|
181 181 | self,
|
182 182 | ) {
|
183 183 | Ok(response) => response,
|
184 184 | Err(e) => {
|
185 185 | ::tracing::error!(error = %e, "failed to serialize response");
|
186 186 | ::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))
|
187 187 | }
|
188 188 | }
|
189 189 | }
|
190 190 | }
|
191 191 | impl
|
192 192 | ::aws_smithy_http_server::response::IntoResponse<
|
193 193 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
194 - | > for crate::error::PutSnapshotBlockError
|
194 + | > for crate::error::GetSnapshotBlockError
|
195 195 | {
|
196 196 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
197 - | match crate::protocol_serde::shape_put_snapshot_block::ser_put_snapshot_block_http_error(
|
197 + | match crate::protocol_serde::shape_get_snapshot_block::ser_get_snapshot_block_http_error(
|
198 198 | &self,
|
199 199 | ) {
|
200 200 | Ok(mut response) => {
|
201 201 | response.extensions_mut().insert(
|
202 202 | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
203 203 | );
|
204 204 | response
|
205 205 | }
|
206 206 | Err(e) => {
|
207 207 | ::tracing::error!(error = %e, "failed to serialize response");
|
208 208 | ::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))
|
209 209 | }
|
210 210 | }
|
211 211 | }
|
212 212 | }
|
213 213 |
|
214 214 | ::pin_project_lite::pin_project! {
|
215 215 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
216 - | /// [`ListSnapshotBlocksInput`](crate::input::ListSnapshotBlocksInput) using modelled bindings.
|
217 - | pub struct ListSnapshotBlocksInputFuture {
|
218 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ListSnapshotBlocksInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
216 + | /// [`ListChangedBlocksInput`](crate::input::ListChangedBlocksInput) using modelled bindings.
|
217 + | pub struct ListChangedBlocksInputFuture {
|
218 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ListChangedBlocksInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
219 219 | }
|
220 220 | }
|
221 221 |
|
222 - | impl std::future::Future for ListSnapshotBlocksInputFuture {
|
222 + | impl std::future::Future for ListChangedBlocksInputFuture {
|
223 223 | type Output = Result<
|
224 - | crate::input::ListSnapshotBlocksInput,
|
224 + | crate::input::ListChangedBlocksInput,
|
225 225 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
226 226 | >;
|
227 227 |
|
228 228 | fn poll(
|
229 229 | self: std::pin::Pin<&mut Self>,
|
230 230 | cx: &mut std::task::Context<'_>,
|
231 231 | ) -> std::task::Poll<Self::Output> {
|
232 232 | let this = self.project();
|
233 233 | this.inner.as_mut().poll(cx)
|
234 234 | }
|
235 235 | }
|
236 236 |
|
237 237 | impl<B>
|
238 238 | ::aws_smithy_http_server::request::FromRequest<
|
239 239 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
240 240 | B,
|
241 - | > for crate::input::ListSnapshotBlocksInput
|
241 + | > for crate::input::ListChangedBlocksInput
|
242 242 | where
|
243 243 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
244 244 | B: 'static,
|
245 245 |
|
246 246 | B::Data: Send,
|
247 247 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
248 248 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
249 249 | {
|
250 250 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
251 - | type Future = ListSnapshotBlocksInputFuture;
|
251 + | type Future = ListChangedBlocksInputFuture;
|
252 252 |
|
253 253 | fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
|
254 254 | let fut = async move {
|
255 255 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
256 256 | request.headers(),
|
257 257 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
258 258 | ) {
|
259 259 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
260 260 | }
|
261 - | crate::protocol_serde::shape_list_snapshot_blocks::de_list_snapshot_blocks_http_request(
|
261 + | crate::protocol_serde::shape_list_changed_blocks::de_list_changed_blocks_http_request(
|
262 262 | request,
|
263 263 | )
|
264 264 | .await
|
265 265 | };
|
266 266 | use ::futures_util::future::TryFutureExt;
|
267 267 | let fut = fut.map_err(
|
268 268 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
269 269 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
270 270 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
271 271 | e,
|
272 272 | )
|
273 273 | },
|
274 274 | );
|
275 - | ListSnapshotBlocksInputFuture {
|
275 + | ListChangedBlocksInputFuture {
|
276 276 | inner: Box::pin(fut),
|
277 277 | }
|
278 278 | }
|
279 279 | }
|
280 280 | impl
|
281 281 | ::aws_smithy_http_server::response::IntoResponse<
|
282 282 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
283 - | > for crate::output::ListSnapshotBlocksOutput
|
283 + | > for crate::output::ListChangedBlocksOutput
|
284 284 | {
|
285 285 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
286 - | match crate::protocol_serde::shape_list_snapshot_blocks::ser_list_snapshot_blocks_http_response(self) {
|
286 + | match crate::protocol_serde::shape_list_changed_blocks::ser_list_changed_blocks_http_response(self) {
|
287 287 | Ok(response) => response,
|
288 288 | Err(e) => {
|
289 289 | ::tracing::error!(error = %e, "failed to serialize response");
|
290 290 | ::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))
|
291 291 | }
|
292 292 | }
|
293 293 | }
|
294 294 | }
|
295 295 | impl
|
296 296 | ::aws_smithy_http_server::response::IntoResponse<
|
297 297 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
298 - | > for crate::error::ListSnapshotBlocksError
|
298 + | > for crate::error::ListChangedBlocksError
|
299 299 | {
|
300 300 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
301 - | match crate::protocol_serde::shape_list_snapshot_blocks::ser_list_snapshot_blocks_http_error(
|
301 + | match crate::protocol_serde::shape_list_changed_blocks::ser_list_changed_blocks_http_error(
|
302 302 | &self,
|
303 303 | ) {
|
304 304 | Ok(mut response) => {
|
305 305 | response.extensions_mut().insert(
|
306 306 | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
307 307 | );
|
308 308 | response
|
309 309 | }
|
310 310 | Err(e) => {
|
311 311 | ::tracing::error!(error = %e, "failed to serialize response");
|
312 312 | ::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))
|
313 313 | }
|
314 314 | }
|
315 315 | }
|
316 316 | }
|
317 317 |
|
318 318 | ::pin_project_lite::pin_project! {
|
319 319 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
320 - | /// [`ListChangedBlocksInput`](crate::input::ListChangedBlocksInput) using modelled bindings.
|
321 - | pub struct ListChangedBlocksInputFuture {
|
322 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ListChangedBlocksInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
320 + | /// [`ListSnapshotBlocksInput`](crate::input::ListSnapshotBlocksInput) using modelled bindings.
|
321 + | pub struct ListSnapshotBlocksInputFuture {
|
322 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ListSnapshotBlocksInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
323 323 | }
|
324 324 | }
|
325 325 |
|
326 - | impl std::future::Future for ListChangedBlocksInputFuture {
|
326 + | impl std::future::Future for ListSnapshotBlocksInputFuture {
|
327 327 | type Output = Result<
|
328 - | crate::input::ListChangedBlocksInput,
|
328 + | crate::input::ListSnapshotBlocksInput,
|
329 329 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
330 330 | >;
|
331 331 |
|
332 332 | fn poll(
|
333 333 | self: std::pin::Pin<&mut Self>,
|
334 334 | cx: &mut std::task::Context<'_>,
|
335 335 | ) -> std::task::Poll<Self::Output> {
|
336 336 | let this = self.project();
|
337 337 | this.inner.as_mut().poll(cx)
|
338 338 | }
|
339 339 | }
|
340 340 |
|
341 341 | impl<B>
|
342 342 | ::aws_smithy_http_server::request::FromRequest<
|
343 343 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
344 344 | B,
|
345 - | > for crate::input::ListChangedBlocksInput
|
345 + | > for crate::input::ListSnapshotBlocksInput
|
346 346 | where
|
347 347 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
348 348 | B: 'static,
|
349 349 |
|
350 350 | B::Data: Send,
|
351 351 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
352 352 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
353 353 | {
|
354 354 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
355 - | type Future = ListChangedBlocksInputFuture;
|
355 + | type Future = ListSnapshotBlocksInputFuture;
|
356 356 |
|
357 357 | fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
|
358 358 | let fut = async move {
|
359 359 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
360 360 | request.headers(),
|
361 361 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
362 362 | ) {
|
363 363 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
364 364 | }
|
365 - | crate::protocol_serde::shape_list_changed_blocks::de_list_changed_blocks_http_request(
|
365 + | crate::protocol_serde::shape_list_snapshot_blocks::de_list_snapshot_blocks_http_request(
|
366 366 | request,
|
367 367 | )
|
368 368 | .await
|
369 369 | };
|
370 370 | use ::futures_util::future::TryFutureExt;
|
371 371 | let fut = fut.map_err(
|
372 372 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
373 373 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
374 374 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
375 375 | e,
|
376 376 | )
|
377 377 | },
|
378 378 | );
|
379 - | ListChangedBlocksInputFuture {
|
379 + | ListSnapshotBlocksInputFuture {
|
380 380 | inner: Box::pin(fut),
|
381 381 | }
|
382 382 | }
|
383 383 | }
|
384 384 | impl
|
385 385 | ::aws_smithy_http_server::response::IntoResponse<
|
386 386 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
387 - | > for crate::output::ListChangedBlocksOutput
|
387 + | > for crate::output::ListSnapshotBlocksOutput
|
388 388 | {
|
389 389 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
390 - | match crate::protocol_serde::shape_list_changed_blocks::ser_list_changed_blocks_http_response(self) {
|
390 + | match crate::protocol_serde::shape_list_snapshot_blocks::ser_list_snapshot_blocks_http_response(self) {
|
391 391 | Ok(response) => response,
|
392 392 | Err(e) => {
|
393 393 | ::tracing::error!(error = %e, "failed to serialize response");
|
394 394 | ::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))
|
395 395 | }
|
396 396 | }
|
397 397 | }
|
398 398 | }
|
399 399 | impl
|
400 400 | ::aws_smithy_http_server::response::IntoResponse<
|
401 401 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
402 - | > for crate::error::ListChangedBlocksError
|
402 + | > for crate::error::ListSnapshotBlocksError
|
403 403 | {
|
404 404 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
405 - | match crate::protocol_serde::shape_list_changed_blocks::ser_list_changed_blocks_http_error(
|
405 + | match crate::protocol_serde::shape_list_snapshot_blocks::ser_list_snapshot_blocks_http_error(
|
406 406 | &self,
|
407 407 | ) {
|
408 408 | Ok(mut response) => {
|
409 409 | response.extensions_mut().insert(
|
410 410 | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
411 411 | );
|
412 412 | response
|
413 413 | }
|
414 414 | Err(e) => {
|
415 415 | ::tracing::error!(error = %e, "failed to serialize response");
|
416 416 | ::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))
|
417 417 | }
|
418 418 | }
|
419 419 | }
|
420 420 | }
|
421 421 |
|
422 422 | ::pin_project_lite::pin_project! {
|
423 423 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
424 - | /// [`GetSnapshotBlockInput`](crate::input::GetSnapshotBlockInput) using modelled bindings.
|
425 - | pub struct GetSnapshotBlockInputFuture {
|
426 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetSnapshotBlockInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
424 + | /// [`PutSnapshotBlockInput`](crate::input::PutSnapshotBlockInput) using modelled bindings.
|
425 + | pub struct PutSnapshotBlockInputFuture {
|
426 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PutSnapshotBlockInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
427 427 | }
|
428 428 | }
|
429 429 |
|
430 - | impl std::future::Future for GetSnapshotBlockInputFuture {
|
430 + | impl std::future::Future for PutSnapshotBlockInputFuture {
|
431 431 | type Output = Result<
|
432 - | crate::input::GetSnapshotBlockInput,
|
432 + | crate::input::PutSnapshotBlockInput,
|
433 433 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
434 434 | >;
|
435 435 |
|
436 436 | fn poll(
|
437 437 | self: std::pin::Pin<&mut Self>,
|
438 438 | cx: &mut std::task::Context<'_>,
|
439 439 | ) -> std::task::Poll<Self::Output> {
|
440 440 | let this = self.project();
|
441 441 | this.inner.as_mut().poll(cx)
|
442 442 | }
|
443 443 | }
|
444 444 |
|
445 445 | impl<B>
|
446 446 | ::aws_smithy_http_server::request::FromRequest<
|
447 447 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
448 448 | B,
|
449 - | > for crate::input::GetSnapshotBlockInput
|
449 + | > for crate::input::PutSnapshotBlockInput
|
450 450 | where
|
451 451 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
452 452 | B: 'static,
|
453 453 |
|
454 + | B: ::http_body_1x::Body<Data = ::bytes::Bytes>
|
455 + | + ::std::marker::Send
|
456 + | + ::std::marker::Sync
|
457 + | + 'static,
|
458 + | B::Error: Into<::aws_smithy_types::body::Error> + 'static,
|
459 + |
|
454 460 | B::Data: Send,
|
455 461 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
456 462 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
457 463 | {
|
458 464 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
459 - | type Future = GetSnapshotBlockInputFuture;
|
465 + | type Future = PutSnapshotBlockInputFuture;
|
460 466 |
|
461 467 | fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
|
462 468 | let fut = async move {
|
463 469 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
464 470 | request.headers(),
|
465 - | &crate::mimes::CONTENT_TYPE_APPLICATION_OCTET_STREAM,
|
471 + | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
466 472 | ) {
|
467 473 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
468 474 | }
|
469 - | crate::protocol_serde::shape_get_snapshot_block::de_get_snapshot_block_http_request(
|
475 + | crate::protocol_serde::shape_put_snapshot_block::de_put_snapshot_block_http_request(
|
470 476 | request,
|
471 477 | )
|
472 478 | .await
|
473 479 | };
|
474 480 | use ::futures_util::future::TryFutureExt;
|
475 481 | let fut = fut.map_err(
|
476 482 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
477 483 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
478 484 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
479 485 | e,
|
480 486 | )
|
481 487 | },
|
482 488 | );
|
483 - | GetSnapshotBlockInputFuture {
|
489 + | PutSnapshotBlockInputFuture {
|
484 490 | inner: Box::pin(fut),
|
485 491 | }
|
486 492 | }
|
487 493 | }
|
488 494 | impl
|
489 495 | ::aws_smithy_http_server::response::IntoResponse<
|
490 496 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
491 - | > for crate::output::GetSnapshotBlockOutput
|
497 + | > for crate::output::PutSnapshotBlockOutput
|
492 498 | {
|
493 499 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
494 - | match crate::protocol_serde::shape_get_snapshot_block::ser_get_snapshot_block_http_response(
|
500 + | match crate::protocol_serde::shape_put_snapshot_block::ser_put_snapshot_block_http_response(
|
495 501 | self,
|
496 502 | ) {
|
497 503 | Ok(response) => response,
|
498 504 | Err(e) => {
|
499 505 | ::tracing::error!(error = %e, "failed to serialize response");
|
500 506 | ::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))
|
501 507 | }
|
502 508 | }
|
503 509 | }
|
504 510 | }
|
505 511 | impl
|
506 512 | ::aws_smithy_http_server::response::IntoResponse<
|
507 513 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
508 - | > for crate::error::GetSnapshotBlockError
|
514 + | > for crate::error::PutSnapshotBlockError
|
509 515 | {
|
510 516 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
511 - | match crate::protocol_serde::shape_get_snapshot_block::ser_get_snapshot_block_http_error(
|
517 + | match crate::protocol_serde::shape_put_snapshot_block::ser_put_snapshot_block_http_error(
|
512 518 | &self,
|
513 519 | ) {
|
514 520 | Ok(mut response) => {
|
515 521 | response.extensions_mut().insert(
|
516 522 | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
517 523 | );
|
518 524 | response
|
519 525 | }
|
520 526 | Err(e) => {
|
521 527 | ::tracing::error!(error = %e, "failed to serialize response");
|
522 528 | ::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))
|
523 529 | }
|
524 530 | }
|
525 531 | }
|
526 532 | }
|
527 533 |
|
528 534 | ::pin_project_lite::pin_project! {
|
529 535 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
530 - | /// [`CompleteSnapshotInput`](crate::input::CompleteSnapshotInput) using modelled bindings.
|
531 - | pub struct CompleteSnapshotInputFuture {
|
532 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CompleteSnapshotInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
536 + | /// [`StartSnapshotInput`](crate::input::StartSnapshotInput) using modelled bindings.
|
537 + | pub struct StartSnapshotInputFuture {
|
538 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StartSnapshotInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
533 539 | }
|
534 540 | }
|
535 541 |
|
536 - | impl std::future::Future for CompleteSnapshotInputFuture {
|
542 + | impl std::future::Future for StartSnapshotInputFuture {
|
537 543 | type Output = Result<
|
538 - | crate::input::CompleteSnapshotInput,
|
544 + | crate::input::StartSnapshotInput,
|
539 545 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
540 546 | >;
|
541 547 |
|
542 548 | fn poll(
|
543 549 | self: std::pin::Pin<&mut Self>,
|
544 550 | cx: &mut std::task::Context<'_>,
|
545 551 | ) -> std::task::Poll<Self::Output> {
|
546 552 | let this = self.project();
|
547 553 | this.inner.as_mut().poll(cx)
|
548 554 | }
|
549 555 | }
|
550 556 |
|
551 557 | impl<B>
|
552 558 | ::aws_smithy_http_server::request::FromRequest<
|
553 559 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
554 560 | B,
|
555 - | > for crate::input::CompleteSnapshotInput
|
561 + | > for crate::input::StartSnapshotInput
|
556 562 | where
|
557 563 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
558 564 | B: 'static,
|
559 565 |
|
560 566 | B::Data: Send,
|
561 567 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
562 568 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
563 569 | {
|
564 570 | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
565 - | type Future = CompleteSnapshotInputFuture;
|
571 + | type Future = StartSnapshotInputFuture;
|
566 572 |
|
567 573 | fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
|
568 574 | let fut = async move {
|
569 575 | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
570 576 | request.headers(),
|
571 577 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
572 578 | ) {
|
573 579 | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
574 580 | }
|
575 - | crate::protocol_serde::shape_complete_snapshot::de_complete_snapshot_http_request(
|
576 - | request,
|
577 - | )
|
581 + | crate::protocol_serde::shape_start_snapshot::de_start_snapshot_http_request(request)
|
578 582 | .await
|
579 583 | };
|
580 584 | use ::futures_util::future::TryFutureExt;
|
581 585 | let fut = fut.map_err(
|
582 586 | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
583 587 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
584 588 | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
585 589 | e,
|
586 590 | )
|
587 591 | },
|
588 592 | );
|
589 - | CompleteSnapshotInputFuture {
|
593 + | StartSnapshotInputFuture {
|
590 594 | inner: Box::pin(fut),
|
591 595 | }
|
592 596 | }
|
593 597 | }
|
594 598 | impl
|
595 599 | ::aws_smithy_http_server::response::IntoResponse<
|
596 600 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
597 - | > for crate::output::CompleteSnapshotOutput
|
601 + | > for crate::output::StartSnapshotOutput
|
598 602 | {
|
599 603 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
600 - | match crate::protocol_serde::shape_complete_snapshot::ser_complete_snapshot_http_response(
|
601 - | self,
|
602 - | ) {
|
604 + | match crate::protocol_serde::shape_start_snapshot::ser_start_snapshot_http_response(self) {
|
603 605 | Ok(response) => response,
|
604 606 | Err(e) => {
|
605 607 | ::tracing::error!(error = %e, "failed to serialize response");
|
606 608 | ::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))
|
607 609 | }
|
608 610 | }
|
609 611 | }
|
610 612 | }
|
611 613 | impl
|
612 614 | ::aws_smithy_http_server::response::IntoResponse<
|
613 615 | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
614 - | > for crate::error::CompleteSnapshotError
|
616 + | > for crate::error::StartSnapshotError
|
615 617 | {
|
616 618 | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
617 - | match crate::protocol_serde::shape_complete_snapshot::ser_complete_snapshot_http_error(
|
618 - | &self,
|
619 - | ) {
|
619 + | match crate::protocol_serde::shape_start_snapshot::ser_start_snapshot_http_error(&self) {
|
620 620 | Ok(mut response) => {
|
621 621 | response.extensions_mut().insert(
|
622 622 | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
623 623 | );
|
624 624 | response
|
625 625 | }
|
626 626 | Err(e) => {
|
627 627 | ::tracing::error!(error = %e, "failed to serialize response");
|
628 628 | ::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))
|
629 629 | }
|