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