1use super::*;
4
5use crate::conv::{try_from_aws, try_into_aws};
6
7use s3s::S3;
8use s3s::S3Result;
9use s3s::{S3Request, S3Response};
10
11use tracing::debug;
12
13#[async_trait::async_trait]
14impl S3 for Proxy {
15 #[tracing::instrument(skip(self, req))]
16 async fn abort_multipart_upload(
17 &self,
18 req: S3Request<s3s::dto::AbortMultipartUploadInput>,
19 ) -> S3Result<S3Response<s3s::dto::AbortMultipartUploadOutput>> {
20 let input = req.input;
21 debug!(?input);
22 let mut b = self.0.abort_multipart_upload();
23 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
24 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
25 b = b.set_if_match_initiated_time(try_into_aws(input.if_match_initiated_time)?);
26 b = b.set_key(Some(try_into_aws(input.key)?));
27 b = b.set_request_payer(try_into_aws(input.request_payer)?);
28 b = b.set_upload_id(Some(try_into_aws(input.upload_id)?));
29 let result = b.send().await;
30 match result {
31 Ok(output) => {
32 let headers = super::meta::build_headers(&output)?;
33 let output = try_from_aws(output)?;
34 debug!(?output);
35 Ok(S3Response::with_headers(output, headers))
36 }
37 Err(e) => Err(wrap_sdk_error!(e)),
38 }
39 }
40
41 #[tracing::instrument(skip(self, req))]
42 async fn complete_multipart_upload(
43 &self,
44 req: S3Request<s3s::dto::CompleteMultipartUploadInput>,
45 ) -> S3Result<S3Response<s3s::dto::CompleteMultipartUploadOutput>> {
46 let input = req.input;
47 debug!(?input);
48 let mut b = self.0.complete_multipart_upload();
49 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
50 b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?);
51 b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?);
52 b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?);
53 b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?);
54 b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?);
55 b = b.set_checksum_type(try_into_aws(input.checksum_type)?);
56 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
57 b = b.set_if_match(try_into_aws(input.if_match)?);
58 b = b.set_if_none_match(try_into_aws(input.if_none_match)?);
59 b = b.set_key(Some(try_into_aws(input.key)?));
60 b = b.set_mpu_object_size(try_into_aws(input.mpu_object_size)?);
61 b = b.set_multipart_upload(try_into_aws(input.multipart_upload)?);
62 b = b.set_request_payer(try_into_aws(input.request_payer)?);
63 b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?);
64 b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?);
65 b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?);
66 b = b.set_upload_id(Some(try_into_aws(input.upload_id)?));
67 let result = b.send().await;
68 match result {
69 Ok(output) => {
70 let headers = super::meta::build_headers(&output)?;
71 let output = try_from_aws(output)?;
72 debug!(?output);
73 Ok(S3Response::with_headers(output, headers))
74 }
75 Err(e) => Err(wrap_sdk_error!(e)),
76 }
77 }
78
79 #[tracing::instrument(skip(self, req))]
80 async fn copy_object(&self, req: S3Request<s3s::dto::CopyObjectInput>) -> S3Result<S3Response<s3s::dto::CopyObjectOutput>> {
81 let input = req.input;
82 debug!(?input);
83 let mut b = self.0.copy_object();
84 b = b.set_acl(try_into_aws(input.acl)?);
85 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
86 b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?);
87 b = b.set_cache_control(try_into_aws(input.cache_control)?);
88 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
89 b = b.set_content_disposition(try_into_aws(input.content_disposition)?);
90 b = b.set_content_encoding(try_into_aws(input.content_encoding)?);
91 b = b.set_content_language(try_into_aws(input.content_language)?);
92 b = b.set_content_type(try_into_aws(input.content_type)?);
93 b = b.set_copy_source(Some(try_into_aws(input.copy_source)?));
94 b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?);
95 b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?);
96 b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?);
97 b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?);
98 b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?);
99 b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?);
100 b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?);
101 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
102 b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?);
103 b = b.set_expires(try_into_aws(input.expires)?);
104 b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?);
105 b = b.set_grant_read(try_into_aws(input.grant_read)?);
106 b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?);
107 b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?);
108 b = b.set_key(Some(try_into_aws(input.key)?));
109 b = b.set_metadata(try_into_aws(input.metadata)?);
110 b = b.set_metadata_directive(try_into_aws(input.metadata_directive)?);
111 b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?);
112 b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?);
113 b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?);
114 b = b.set_request_payer(try_into_aws(input.request_payer)?);
115 b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?);
116 b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?);
117 b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?);
118 b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?);
119 b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?);
120 b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?);
121 b = b.set_storage_class(try_into_aws(input.storage_class)?);
122 b = b.set_tagging(try_into_aws(input.tagging)?);
123 b = b.set_tagging_directive(try_into_aws(input.tagging_directive)?);
124 b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?);
125 let result = b.send().await;
126 match result {
127 Ok(output) => {
128 let headers = super::meta::build_headers(&output)?;
129 let output = try_from_aws(output)?;
130 debug!(?output);
131 Ok(S3Response::with_headers(output, headers))
132 }
133 Err(e) => Err(wrap_sdk_error!(e)),
134 }
135 }
136
137 #[tracing::instrument(skip(self, req))]
138 async fn create_bucket(
139 &self,
140 req: S3Request<s3s::dto::CreateBucketInput>,
141 ) -> S3Result<S3Response<s3s::dto::CreateBucketOutput>> {
142 let input = req.input;
143 debug!(?input);
144 let mut b = self.0.create_bucket();
145 b = b.set_acl(try_into_aws(input.acl)?);
146 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
147 b = b.set_create_bucket_configuration(try_into_aws(input.create_bucket_configuration)?);
148 b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?);
149 b = b.set_grant_read(try_into_aws(input.grant_read)?);
150 b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?);
151 b = b.set_grant_write(try_into_aws(input.grant_write)?);
152 b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?);
153 b = b.set_object_lock_enabled_for_bucket(try_into_aws(input.object_lock_enabled_for_bucket)?);
154 b = b.set_object_ownership(try_into_aws(input.object_ownership)?);
155 let result = b.send().await;
156 match result {
157 Ok(output) => {
158 let headers = super::meta::build_headers(&output)?;
159 let output = try_from_aws(output)?;
160 debug!(?output);
161 Ok(S3Response::with_headers(output, headers))
162 }
163 Err(e) => Err(wrap_sdk_error!(e)),
164 }
165 }
166
167 #[tracing::instrument(skip(self, req))]
168 async fn create_bucket_metadata_table_configuration(
169 &self,
170 req: S3Request<s3s::dto::CreateBucketMetadataTableConfigurationInput>,
171 ) -> S3Result<S3Response<s3s::dto::CreateBucketMetadataTableConfigurationOutput>> {
172 let input = req.input;
173 debug!(?input);
174 let mut b = self.0.create_bucket_metadata_table_configuration();
175 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
176 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
177 b = b.set_content_md5(try_into_aws(input.content_md5)?);
178 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
179 b = b.set_metadata_table_configuration(Some(try_into_aws(input.metadata_table_configuration)?));
180 let result = b.send().await;
181 match result {
182 Ok(output) => {
183 let headers = super::meta::build_headers(&output)?;
184 let output = try_from_aws(output)?;
185 debug!(?output);
186 Ok(S3Response::with_headers(output, headers))
187 }
188 Err(e) => Err(wrap_sdk_error!(e)),
189 }
190 }
191
192 #[tracing::instrument(skip(self, req))]
193 async fn create_multipart_upload(
194 &self,
195 req: S3Request<s3s::dto::CreateMultipartUploadInput>,
196 ) -> S3Result<S3Response<s3s::dto::CreateMultipartUploadOutput>> {
197 let input = req.input;
198 debug!(?input);
199 let mut b = self.0.create_multipart_upload();
200 b = b.set_acl(try_into_aws(input.acl)?);
201 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
202 b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?);
203 b = b.set_cache_control(try_into_aws(input.cache_control)?);
204 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
205 b = b.set_checksum_type(try_into_aws(input.checksum_type)?);
206 b = b.set_content_disposition(try_into_aws(input.content_disposition)?);
207 b = b.set_content_encoding(try_into_aws(input.content_encoding)?);
208 b = b.set_content_language(try_into_aws(input.content_language)?);
209 b = b.set_content_type(try_into_aws(input.content_type)?);
210 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
211 b = b.set_expires(try_into_aws(input.expires)?);
212 b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?);
213 b = b.set_grant_read(try_into_aws(input.grant_read)?);
214 b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?);
215 b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?);
216 b = b.set_key(Some(try_into_aws(input.key)?));
217 b = b.set_metadata(try_into_aws(input.metadata)?);
218 b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?);
219 b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?);
220 b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?);
221 b = b.set_request_payer(try_into_aws(input.request_payer)?);
222 b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?);
223 b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?);
224 b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?);
225 b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?);
226 b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?);
227 b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?);
228 b = b.set_storage_class(try_into_aws(input.storage_class)?);
229 b = b.set_tagging(try_into_aws(input.tagging)?);
230 b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?);
231 let result = b.send().await;
232 match result {
233 Ok(output) => {
234 let headers = super::meta::build_headers(&output)?;
235 let output = try_from_aws(output)?;
236 debug!(?output);
237 Ok(S3Response::with_headers(output, headers))
238 }
239 Err(e) => Err(wrap_sdk_error!(e)),
240 }
241 }
242
243 #[tracing::instrument(skip(self, req))]
244 async fn delete_bucket(
245 &self,
246 req: S3Request<s3s::dto::DeleteBucketInput>,
247 ) -> S3Result<S3Response<s3s::dto::DeleteBucketOutput>> {
248 let input = req.input;
249 debug!(?input);
250 let mut b = self.0.delete_bucket();
251 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
252 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
253 let result = b.send().await;
254 match result {
255 Ok(output) => {
256 let headers = super::meta::build_headers(&output)?;
257 let output = try_from_aws(output)?;
258 debug!(?output);
259 Ok(S3Response::with_headers(output, headers))
260 }
261 Err(e) => Err(wrap_sdk_error!(e)),
262 }
263 }
264
265 #[tracing::instrument(skip(self, req))]
266 async fn delete_bucket_analytics_configuration(
267 &self,
268 req: S3Request<s3s::dto::DeleteBucketAnalyticsConfigurationInput>,
269 ) -> S3Result<S3Response<s3s::dto::DeleteBucketAnalyticsConfigurationOutput>> {
270 let input = req.input;
271 debug!(?input);
272 let mut b = self.0.delete_bucket_analytics_configuration();
273 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
274 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
275 b = b.set_id(Some(try_into_aws(input.id)?));
276 let result = b.send().await;
277 match result {
278 Ok(output) => {
279 let headers = super::meta::build_headers(&output)?;
280 let output = try_from_aws(output)?;
281 debug!(?output);
282 Ok(S3Response::with_headers(output, headers))
283 }
284 Err(e) => Err(wrap_sdk_error!(e)),
285 }
286 }
287
288 #[tracing::instrument(skip(self, req))]
289 async fn delete_bucket_cors(
290 &self,
291 req: S3Request<s3s::dto::DeleteBucketCorsInput>,
292 ) -> S3Result<S3Response<s3s::dto::DeleteBucketCorsOutput>> {
293 let input = req.input;
294 debug!(?input);
295 let mut b = self.0.delete_bucket_cors();
296 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
297 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
298 let result = b.send().await;
299 match result {
300 Ok(output) => {
301 let headers = super::meta::build_headers(&output)?;
302 let output = try_from_aws(output)?;
303 debug!(?output);
304 Ok(S3Response::with_headers(output, headers))
305 }
306 Err(e) => Err(wrap_sdk_error!(e)),
307 }
308 }
309
310 #[tracing::instrument(skip(self, req))]
311 async fn delete_bucket_encryption(
312 &self,
313 req: S3Request<s3s::dto::DeleteBucketEncryptionInput>,
314 ) -> S3Result<S3Response<s3s::dto::DeleteBucketEncryptionOutput>> {
315 let input = req.input;
316 debug!(?input);
317 let mut b = self.0.delete_bucket_encryption();
318 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
319 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
320 let result = b.send().await;
321 match result {
322 Ok(output) => {
323 let headers = super::meta::build_headers(&output)?;
324 let output = try_from_aws(output)?;
325 debug!(?output);
326 Ok(S3Response::with_headers(output, headers))
327 }
328 Err(e) => Err(wrap_sdk_error!(e)),
329 }
330 }
331
332 #[tracing::instrument(skip(self, req))]
333 async fn delete_bucket_intelligent_tiering_configuration(
334 &self,
335 req: S3Request<s3s::dto::DeleteBucketIntelligentTieringConfigurationInput>,
336 ) -> S3Result<S3Response<s3s::dto::DeleteBucketIntelligentTieringConfigurationOutput>> {
337 let input = req.input;
338 debug!(?input);
339 let mut b = self.0.delete_bucket_intelligent_tiering_configuration();
340 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
341 b = b.set_id(Some(try_into_aws(input.id)?));
342 let result = b.send().await;
343 match result {
344 Ok(output) => {
345 let headers = super::meta::build_headers(&output)?;
346 let output = try_from_aws(output)?;
347 debug!(?output);
348 Ok(S3Response::with_headers(output, headers))
349 }
350 Err(e) => Err(wrap_sdk_error!(e)),
351 }
352 }
353
354 #[tracing::instrument(skip(self, req))]
355 async fn delete_bucket_inventory_configuration(
356 &self,
357 req: S3Request<s3s::dto::DeleteBucketInventoryConfigurationInput>,
358 ) -> S3Result<S3Response<s3s::dto::DeleteBucketInventoryConfigurationOutput>> {
359 let input = req.input;
360 debug!(?input);
361 let mut b = self.0.delete_bucket_inventory_configuration();
362 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
363 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
364 b = b.set_id(Some(try_into_aws(input.id)?));
365 let result = b.send().await;
366 match result {
367 Ok(output) => {
368 let headers = super::meta::build_headers(&output)?;
369 let output = try_from_aws(output)?;
370 debug!(?output);
371 Ok(S3Response::with_headers(output, headers))
372 }
373 Err(e) => Err(wrap_sdk_error!(e)),
374 }
375 }
376
377 #[tracing::instrument(skip(self, req))]
378 async fn delete_bucket_lifecycle(
379 &self,
380 req: S3Request<s3s::dto::DeleteBucketLifecycleInput>,
381 ) -> S3Result<S3Response<s3s::dto::DeleteBucketLifecycleOutput>> {
382 let input = req.input;
383 debug!(?input);
384 let mut b = self.0.delete_bucket_lifecycle();
385 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
386 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
387 let result = b.send().await;
388 match result {
389 Ok(output) => {
390 let headers = super::meta::build_headers(&output)?;
391 let output = try_from_aws(output)?;
392 debug!(?output);
393 Ok(S3Response::with_headers(output, headers))
394 }
395 Err(e) => Err(wrap_sdk_error!(e)),
396 }
397 }
398
399 #[tracing::instrument(skip(self, req))]
400 async fn delete_bucket_metadata_table_configuration(
401 &self,
402 req: S3Request<s3s::dto::DeleteBucketMetadataTableConfigurationInput>,
403 ) -> S3Result<S3Response<s3s::dto::DeleteBucketMetadataTableConfigurationOutput>> {
404 let input = req.input;
405 debug!(?input);
406 let mut b = self.0.delete_bucket_metadata_table_configuration();
407 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
408 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
409 let result = b.send().await;
410 match result {
411 Ok(output) => {
412 let headers = super::meta::build_headers(&output)?;
413 let output = try_from_aws(output)?;
414 debug!(?output);
415 Ok(S3Response::with_headers(output, headers))
416 }
417 Err(e) => Err(wrap_sdk_error!(e)),
418 }
419 }
420
421 #[tracing::instrument(skip(self, req))]
422 async fn delete_bucket_metrics_configuration(
423 &self,
424 req: S3Request<s3s::dto::DeleteBucketMetricsConfigurationInput>,
425 ) -> S3Result<S3Response<s3s::dto::DeleteBucketMetricsConfigurationOutput>> {
426 let input = req.input;
427 debug!(?input);
428 let mut b = self.0.delete_bucket_metrics_configuration();
429 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
430 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
431 b = b.set_id(Some(try_into_aws(input.id)?));
432 let result = b.send().await;
433 match result {
434 Ok(output) => {
435 let headers = super::meta::build_headers(&output)?;
436 let output = try_from_aws(output)?;
437 debug!(?output);
438 Ok(S3Response::with_headers(output, headers))
439 }
440 Err(e) => Err(wrap_sdk_error!(e)),
441 }
442 }
443
444 #[tracing::instrument(skip(self, req))]
445 async fn delete_bucket_ownership_controls(
446 &self,
447 req: S3Request<s3s::dto::DeleteBucketOwnershipControlsInput>,
448 ) -> S3Result<S3Response<s3s::dto::DeleteBucketOwnershipControlsOutput>> {
449 let input = req.input;
450 debug!(?input);
451 let mut b = self.0.delete_bucket_ownership_controls();
452 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
453 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
454 let result = b.send().await;
455 match result {
456 Ok(output) => {
457 let headers = super::meta::build_headers(&output)?;
458 let output = try_from_aws(output)?;
459 debug!(?output);
460 Ok(S3Response::with_headers(output, headers))
461 }
462 Err(e) => Err(wrap_sdk_error!(e)),
463 }
464 }
465
466 #[tracing::instrument(skip(self, req))]
467 async fn delete_bucket_policy(
468 &self,
469 req: S3Request<s3s::dto::DeleteBucketPolicyInput>,
470 ) -> S3Result<S3Response<s3s::dto::DeleteBucketPolicyOutput>> {
471 let input = req.input;
472 debug!(?input);
473 let mut b = self.0.delete_bucket_policy();
474 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
475 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
476 let result = b.send().await;
477 match result {
478 Ok(output) => {
479 let headers = super::meta::build_headers(&output)?;
480 let output = try_from_aws(output)?;
481 debug!(?output);
482 Ok(S3Response::with_headers(output, headers))
483 }
484 Err(e) => Err(wrap_sdk_error!(e)),
485 }
486 }
487
488 #[tracing::instrument(skip(self, req))]
489 async fn delete_bucket_replication(
490 &self,
491 req: S3Request<s3s::dto::DeleteBucketReplicationInput>,
492 ) -> S3Result<S3Response<s3s::dto::DeleteBucketReplicationOutput>> {
493 let input = req.input;
494 debug!(?input);
495 let mut b = self.0.delete_bucket_replication();
496 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
497 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
498 let result = b.send().await;
499 match result {
500 Ok(output) => {
501 let headers = super::meta::build_headers(&output)?;
502 let output = try_from_aws(output)?;
503 debug!(?output);
504 Ok(S3Response::with_headers(output, headers))
505 }
506 Err(e) => Err(wrap_sdk_error!(e)),
507 }
508 }
509
510 #[tracing::instrument(skip(self, req))]
511 async fn delete_bucket_tagging(
512 &self,
513 req: S3Request<s3s::dto::DeleteBucketTaggingInput>,
514 ) -> S3Result<S3Response<s3s::dto::DeleteBucketTaggingOutput>> {
515 let input = req.input;
516 debug!(?input);
517 let mut b = self.0.delete_bucket_tagging();
518 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
519 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
520 let result = b.send().await;
521 match result {
522 Ok(output) => {
523 let headers = super::meta::build_headers(&output)?;
524 let output = try_from_aws(output)?;
525 debug!(?output);
526 Ok(S3Response::with_headers(output, headers))
527 }
528 Err(e) => Err(wrap_sdk_error!(e)),
529 }
530 }
531
532 #[tracing::instrument(skip(self, req))]
533 async fn delete_bucket_website(
534 &self,
535 req: S3Request<s3s::dto::DeleteBucketWebsiteInput>,
536 ) -> S3Result<S3Response<s3s::dto::DeleteBucketWebsiteOutput>> {
537 let input = req.input;
538 debug!(?input);
539 let mut b = self.0.delete_bucket_website();
540 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
541 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
542 let result = b.send().await;
543 match result {
544 Ok(output) => {
545 let headers = super::meta::build_headers(&output)?;
546 let output = try_from_aws(output)?;
547 debug!(?output);
548 Ok(S3Response::with_headers(output, headers))
549 }
550 Err(e) => Err(wrap_sdk_error!(e)),
551 }
552 }
553
554 #[tracing::instrument(skip(self, req))]
555 async fn delete_object(
556 &self,
557 req: S3Request<s3s::dto::DeleteObjectInput>,
558 ) -> S3Result<S3Response<s3s::dto::DeleteObjectOutput>> {
559 let input = req.input;
560 debug!(?input);
561 let mut b = self.0.delete_object();
562 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
563 b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?);
564 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
565 b = b.set_if_match(try_into_aws(input.if_match)?);
566 b = b.set_if_match_last_modified_time(try_into_aws(input.if_match_last_modified_time)?);
567 b = b.set_if_match_size(try_into_aws(input.if_match_size)?);
568 b = b.set_key(Some(try_into_aws(input.key)?));
569 b = b.set_mfa(try_into_aws(input.mfa)?);
570 b = b.set_request_payer(try_into_aws(input.request_payer)?);
571 b = b.set_version_id(try_into_aws(input.version_id)?);
572 let result = b.send().await;
573 match result {
574 Ok(output) => {
575 let headers = super::meta::build_headers(&output)?;
576 let output = try_from_aws(output)?;
577 debug!(?output);
578 Ok(S3Response::with_headers(output, headers))
579 }
580 Err(e) => Err(wrap_sdk_error!(e)),
581 }
582 }
583
584 #[tracing::instrument(skip(self, req))]
585 async fn delete_object_tagging(
586 &self,
587 req: S3Request<s3s::dto::DeleteObjectTaggingInput>,
588 ) -> S3Result<S3Response<s3s::dto::DeleteObjectTaggingOutput>> {
589 let input = req.input;
590 debug!(?input);
591 let mut b = self.0.delete_object_tagging();
592 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
593 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
594 b = b.set_key(Some(try_into_aws(input.key)?));
595 b = b.set_version_id(try_into_aws(input.version_id)?);
596 let result = b.send().await;
597 match result {
598 Ok(output) => {
599 let headers = super::meta::build_headers(&output)?;
600 let output = try_from_aws(output)?;
601 debug!(?output);
602 Ok(S3Response::with_headers(output, headers))
603 }
604 Err(e) => Err(wrap_sdk_error!(e)),
605 }
606 }
607
608 #[tracing::instrument(skip(self, req))]
609 async fn delete_objects(
610 &self,
611 req: S3Request<s3s::dto::DeleteObjectsInput>,
612 ) -> S3Result<S3Response<s3s::dto::DeleteObjectsOutput>> {
613 let input = req.input;
614 debug!(?input);
615 let mut b = self.0.delete_objects();
616 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
617 b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?);
618 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
619 b = b.set_delete(Some(try_into_aws(input.delete)?));
620 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
621 b = b.set_mfa(try_into_aws(input.mfa)?);
622 b = b.set_request_payer(try_into_aws(input.request_payer)?);
623 let result = b.send().await;
624 match result {
625 Ok(output) => {
626 let headers = super::meta::build_headers(&output)?;
627 let output = try_from_aws(output)?;
628 debug!(?output);
629 Ok(S3Response::with_headers(output, headers))
630 }
631 Err(e) => Err(wrap_sdk_error!(e)),
632 }
633 }
634
635 #[tracing::instrument(skip(self, req))]
636 async fn delete_public_access_block(
637 &self,
638 req: S3Request<s3s::dto::DeletePublicAccessBlockInput>,
639 ) -> S3Result<S3Response<s3s::dto::DeletePublicAccessBlockOutput>> {
640 let input = req.input;
641 debug!(?input);
642 let mut b = self.0.delete_public_access_block();
643 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
644 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
645 let result = b.send().await;
646 match result {
647 Ok(output) => {
648 let headers = super::meta::build_headers(&output)?;
649 let output = try_from_aws(output)?;
650 debug!(?output);
651 Ok(S3Response::with_headers(output, headers))
652 }
653 Err(e) => Err(wrap_sdk_error!(e)),
654 }
655 }
656
657 #[tracing::instrument(skip(self, req))]
658 async fn get_bucket_accelerate_configuration(
659 &self,
660 req: S3Request<s3s::dto::GetBucketAccelerateConfigurationInput>,
661 ) -> S3Result<S3Response<s3s::dto::GetBucketAccelerateConfigurationOutput>> {
662 let input = req.input;
663 debug!(?input);
664 let mut b = self.0.get_bucket_accelerate_configuration();
665 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
666 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
667 b = b.set_request_payer(try_into_aws(input.request_payer)?);
668 let result = b.send().await;
669 match result {
670 Ok(output) => {
671 let headers = super::meta::build_headers(&output)?;
672 let output = try_from_aws(output)?;
673 debug!(?output);
674 Ok(S3Response::with_headers(output, headers))
675 }
676 Err(e) => Err(wrap_sdk_error!(e)),
677 }
678 }
679
680 #[tracing::instrument(skip(self, req))]
681 async fn get_bucket_acl(
682 &self,
683 req: S3Request<s3s::dto::GetBucketAclInput>,
684 ) -> S3Result<S3Response<s3s::dto::GetBucketAclOutput>> {
685 let input = req.input;
686 debug!(?input);
687 let mut b = self.0.get_bucket_acl();
688 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
689 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
690 let result = b.send().await;
691 match result {
692 Ok(output) => {
693 let headers = super::meta::build_headers(&output)?;
694 let output = try_from_aws(output)?;
695 debug!(?output);
696 Ok(S3Response::with_headers(output, headers))
697 }
698 Err(e) => Err(wrap_sdk_error!(e)),
699 }
700 }
701
702 #[tracing::instrument(skip(self, req))]
703 async fn get_bucket_analytics_configuration(
704 &self,
705 req: S3Request<s3s::dto::GetBucketAnalyticsConfigurationInput>,
706 ) -> S3Result<S3Response<s3s::dto::GetBucketAnalyticsConfigurationOutput>> {
707 let input = req.input;
708 debug!(?input);
709 let mut b = self.0.get_bucket_analytics_configuration();
710 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
711 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
712 b = b.set_id(Some(try_into_aws(input.id)?));
713 let result = b.send().await;
714 match result {
715 Ok(output) => {
716 let headers = super::meta::build_headers(&output)?;
717 let output = try_from_aws(output)?;
718 debug!(?output);
719 Ok(S3Response::with_headers(output, headers))
720 }
721 Err(e) => Err(wrap_sdk_error!(e)),
722 }
723 }
724
725 #[tracing::instrument(skip(self, req))]
726 async fn get_bucket_cors(
727 &self,
728 req: S3Request<s3s::dto::GetBucketCorsInput>,
729 ) -> S3Result<S3Response<s3s::dto::GetBucketCorsOutput>> {
730 let input = req.input;
731 debug!(?input);
732 let mut b = self.0.get_bucket_cors();
733 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
734 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
735 let result = b.send().await;
736 match result {
737 Ok(output) => {
738 let headers = super::meta::build_headers(&output)?;
739 let output = try_from_aws(output)?;
740 debug!(?output);
741 Ok(S3Response::with_headers(output, headers))
742 }
743 Err(e) => Err(wrap_sdk_error!(e)),
744 }
745 }
746
747 #[tracing::instrument(skip(self, req))]
748 async fn get_bucket_encryption(
749 &self,
750 req: S3Request<s3s::dto::GetBucketEncryptionInput>,
751 ) -> S3Result<S3Response<s3s::dto::GetBucketEncryptionOutput>> {
752 let input = req.input;
753 debug!(?input);
754 let mut b = self.0.get_bucket_encryption();
755 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
756 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
757 let result = b.send().await;
758 match result {
759 Ok(output) => {
760 let headers = super::meta::build_headers(&output)?;
761 let output = try_from_aws(output)?;
762 debug!(?output);
763 Ok(S3Response::with_headers(output, headers))
764 }
765 Err(e) => Err(wrap_sdk_error!(e)),
766 }
767 }
768
769 #[tracing::instrument(skip(self, req))]
770 async fn get_bucket_intelligent_tiering_configuration(
771 &self,
772 req: S3Request<s3s::dto::GetBucketIntelligentTieringConfigurationInput>,
773 ) -> S3Result<S3Response<s3s::dto::GetBucketIntelligentTieringConfigurationOutput>> {
774 let input = req.input;
775 debug!(?input);
776 let mut b = self.0.get_bucket_intelligent_tiering_configuration();
777 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
778 b = b.set_id(Some(try_into_aws(input.id)?));
779 let result = b.send().await;
780 match result {
781 Ok(output) => {
782 let headers = super::meta::build_headers(&output)?;
783 let output = try_from_aws(output)?;
784 debug!(?output);
785 Ok(S3Response::with_headers(output, headers))
786 }
787 Err(e) => Err(wrap_sdk_error!(e)),
788 }
789 }
790
791 #[tracing::instrument(skip(self, req))]
792 async fn get_bucket_inventory_configuration(
793 &self,
794 req: S3Request<s3s::dto::GetBucketInventoryConfigurationInput>,
795 ) -> S3Result<S3Response<s3s::dto::GetBucketInventoryConfigurationOutput>> {
796 let input = req.input;
797 debug!(?input);
798 let mut b = self.0.get_bucket_inventory_configuration();
799 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
800 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
801 b = b.set_id(Some(try_into_aws(input.id)?));
802 let result = b.send().await;
803 match result {
804 Ok(output) => {
805 let headers = super::meta::build_headers(&output)?;
806 let output = try_from_aws(output)?;
807 debug!(?output);
808 Ok(S3Response::with_headers(output, headers))
809 }
810 Err(e) => Err(wrap_sdk_error!(e)),
811 }
812 }
813
814 #[tracing::instrument(skip(self, req))]
815 async fn get_bucket_lifecycle_configuration(
816 &self,
817 req: S3Request<s3s::dto::GetBucketLifecycleConfigurationInput>,
818 ) -> S3Result<S3Response<s3s::dto::GetBucketLifecycleConfigurationOutput>> {
819 let input = req.input;
820 debug!(?input);
821 let mut b = self.0.get_bucket_lifecycle_configuration();
822 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
823 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
824 let result = b.send().await;
825 match result {
826 Ok(output) => {
827 let headers = super::meta::build_headers(&output)?;
828 let output = try_from_aws(output)?;
829 debug!(?output);
830 Ok(S3Response::with_headers(output, headers))
831 }
832 Err(e) => Err(wrap_sdk_error!(e)),
833 }
834 }
835
836 #[tracing::instrument(skip(self, req))]
837 async fn get_bucket_location(
838 &self,
839 req: S3Request<s3s::dto::GetBucketLocationInput>,
840 ) -> S3Result<S3Response<s3s::dto::GetBucketLocationOutput>> {
841 let input = req.input;
842 debug!(?input);
843 let mut b = self.0.get_bucket_location();
844 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
845 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
846 let result = b.send().await;
847 match result {
848 Ok(output) => {
849 let headers = super::meta::build_headers(&output)?;
850 let output = try_from_aws(output)?;
851 debug!(?output);
852 Ok(S3Response::with_headers(output, headers))
853 }
854 Err(e) => Err(wrap_sdk_error!(e)),
855 }
856 }
857
858 #[tracing::instrument(skip(self, req))]
859 async fn get_bucket_logging(
860 &self,
861 req: S3Request<s3s::dto::GetBucketLoggingInput>,
862 ) -> S3Result<S3Response<s3s::dto::GetBucketLoggingOutput>> {
863 let input = req.input;
864 debug!(?input);
865 let mut b = self.0.get_bucket_logging();
866 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
867 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
868 let result = b.send().await;
869 match result {
870 Ok(output) => {
871 let headers = super::meta::build_headers(&output)?;
872 let output = try_from_aws(output)?;
873 debug!(?output);
874 Ok(S3Response::with_headers(output, headers))
875 }
876 Err(e) => Err(wrap_sdk_error!(e)),
877 }
878 }
879
880 #[tracing::instrument(skip(self, req))]
881 async fn get_bucket_metadata_table_configuration(
882 &self,
883 req: S3Request<s3s::dto::GetBucketMetadataTableConfigurationInput>,
884 ) -> S3Result<S3Response<s3s::dto::GetBucketMetadataTableConfigurationOutput>> {
885 let input = req.input;
886 debug!(?input);
887 let mut b = self.0.get_bucket_metadata_table_configuration();
888 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
889 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
890 let result = b.send().await;
891 match result {
892 Ok(output) => {
893 let headers = super::meta::build_headers(&output)?;
894 let output = try_from_aws(output)?;
895 debug!(?output);
896 Ok(S3Response::with_headers(output, headers))
897 }
898 Err(e) => Err(wrap_sdk_error!(e)),
899 }
900 }
901
902 #[tracing::instrument(skip(self, req))]
903 async fn get_bucket_metrics_configuration(
904 &self,
905 req: S3Request<s3s::dto::GetBucketMetricsConfigurationInput>,
906 ) -> S3Result<S3Response<s3s::dto::GetBucketMetricsConfigurationOutput>> {
907 let input = req.input;
908 debug!(?input);
909 let mut b = self.0.get_bucket_metrics_configuration();
910 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
911 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
912 b = b.set_id(Some(try_into_aws(input.id)?));
913 let result = b.send().await;
914 match result {
915 Ok(output) => {
916 let headers = super::meta::build_headers(&output)?;
917 let output = try_from_aws(output)?;
918 debug!(?output);
919 Ok(S3Response::with_headers(output, headers))
920 }
921 Err(e) => Err(wrap_sdk_error!(e)),
922 }
923 }
924
925 #[tracing::instrument(skip(self, req))]
926 async fn get_bucket_notification_configuration(
927 &self,
928 req: S3Request<s3s::dto::GetBucketNotificationConfigurationInput>,
929 ) -> S3Result<S3Response<s3s::dto::GetBucketNotificationConfigurationOutput>> {
930 let input = req.input;
931 debug!(?input);
932 let mut b = self.0.get_bucket_notification_configuration();
933 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
934 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
935 let result = b.send().await;
936 match result {
937 Ok(output) => {
938 let headers = super::meta::build_headers(&output)?;
939 let output = try_from_aws(output)?;
940 debug!(?output);
941 Ok(S3Response::with_headers(output, headers))
942 }
943 Err(e) => Err(wrap_sdk_error!(e)),
944 }
945 }
946
947 #[tracing::instrument(skip(self, req))]
948 async fn get_bucket_ownership_controls(
949 &self,
950 req: S3Request<s3s::dto::GetBucketOwnershipControlsInput>,
951 ) -> S3Result<S3Response<s3s::dto::GetBucketOwnershipControlsOutput>> {
952 let input = req.input;
953 debug!(?input);
954 let mut b = self.0.get_bucket_ownership_controls();
955 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
956 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
957 let result = b.send().await;
958 match result {
959 Ok(output) => {
960 let headers = super::meta::build_headers(&output)?;
961 let output = try_from_aws(output)?;
962 debug!(?output);
963 Ok(S3Response::with_headers(output, headers))
964 }
965 Err(e) => Err(wrap_sdk_error!(e)),
966 }
967 }
968
969 #[tracing::instrument(skip(self, req))]
970 async fn get_bucket_policy(
971 &self,
972 req: S3Request<s3s::dto::GetBucketPolicyInput>,
973 ) -> S3Result<S3Response<s3s::dto::GetBucketPolicyOutput>> {
974 let input = req.input;
975 debug!(?input);
976 let mut b = self.0.get_bucket_policy();
977 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
978 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
979 let result = b.send().await;
980 match result {
981 Ok(output) => {
982 let headers = super::meta::build_headers(&output)?;
983 let output = try_from_aws(output)?;
984 debug!(?output);
985 Ok(S3Response::with_headers(output, headers))
986 }
987 Err(e) => Err(wrap_sdk_error!(e)),
988 }
989 }
990
991 #[tracing::instrument(skip(self, req))]
992 async fn get_bucket_policy_status(
993 &self,
994 req: S3Request<s3s::dto::GetBucketPolicyStatusInput>,
995 ) -> S3Result<S3Response<s3s::dto::GetBucketPolicyStatusOutput>> {
996 let input = req.input;
997 debug!(?input);
998 let mut b = self.0.get_bucket_policy_status();
999 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1000 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1001 let result = b.send().await;
1002 match result {
1003 Ok(output) => {
1004 let headers = super::meta::build_headers(&output)?;
1005 let output = try_from_aws(output)?;
1006 debug!(?output);
1007 Ok(S3Response::with_headers(output, headers))
1008 }
1009 Err(e) => Err(wrap_sdk_error!(e)),
1010 }
1011 }
1012
1013 #[tracing::instrument(skip(self, req))]
1014 async fn get_bucket_replication(
1015 &self,
1016 req: S3Request<s3s::dto::GetBucketReplicationInput>,
1017 ) -> S3Result<S3Response<s3s::dto::GetBucketReplicationOutput>> {
1018 let input = req.input;
1019 debug!(?input);
1020 let mut b = self.0.get_bucket_replication();
1021 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1022 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1023 let result = b.send().await;
1024 match result {
1025 Ok(output) => {
1026 let headers = super::meta::build_headers(&output)?;
1027 let output = try_from_aws(output)?;
1028 debug!(?output);
1029 Ok(S3Response::with_headers(output, headers))
1030 }
1031 Err(e) => Err(wrap_sdk_error!(e)),
1032 }
1033 }
1034
1035 #[tracing::instrument(skip(self, req))]
1036 async fn get_bucket_request_payment(
1037 &self,
1038 req: S3Request<s3s::dto::GetBucketRequestPaymentInput>,
1039 ) -> S3Result<S3Response<s3s::dto::GetBucketRequestPaymentOutput>> {
1040 let input = req.input;
1041 debug!(?input);
1042 let mut b = self.0.get_bucket_request_payment();
1043 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1044 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1045 let result = b.send().await;
1046 match result {
1047 Ok(output) => {
1048 let headers = super::meta::build_headers(&output)?;
1049 let output = try_from_aws(output)?;
1050 debug!(?output);
1051 Ok(S3Response::with_headers(output, headers))
1052 }
1053 Err(e) => Err(wrap_sdk_error!(e)),
1054 }
1055 }
1056
1057 #[tracing::instrument(skip(self, req))]
1058 async fn get_bucket_tagging(
1059 &self,
1060 req: S3Request<s3s::dto::GetBucketTaggingInput>,
1061 ) -> S3Result<S3Response<s3s::dto::GetBucketTaggingOutput>> {
1062 let input = req.input;
1063 debug!(?input);
1064 let mut b = self.0.get_bucket_tagging();
1065 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1066 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1067 let result = b.send().await;
1068 match result {
1069 Ok(output) => {
1070 let headers = super::meta::build_headers(&output)?;
1071 let output = try_from_aws(output)?;
1072 debug!(?output);
1073 Ok(S3Response::with_headers(output, headers))
1074 }
1075 Err(e) => Err(wrap_sdk_error!(e)),
1076 }
1077 }
1078
1079 #[tracing::instrument(skip(self, req))]
1080 async fn get_bucket_versioning(
1081 &self,
1082 req: S3Request<s3s::dto::GetBucketVersioningInput>,
1083 ) -> S3Result<S3Response<s3s::dto::GetBucketVersioningOutput>> {
1084 let input = req.input;
1085 debug!(?input);
1086 let mut b = self.0.get_bucket_versioning();
1087 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1088 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1089 let result = b.send().await;
1090 match result {
1091 Ok(output) => {
1092 let headers = super::meta::build_headers(&output)?;
1093 let output = try_from_aws(output)?;
1094 debug!(?output);
1095 Ok(S3Response::with_headers(output, headers))
1096 }
1097 Err(e) => Err(wrap_sdk_error!(e)),
1098 }
1099 }
1100
1101 #[tracing::instrument(skip(self, req))]
1102 async fn get_bucket_website(
1103 &self,
1104 req: S3Request<s3s::dto::GetBucketWebsiteInput>,
1105 ) -> S3Result<S3Response<s3s::dto::GetBucketWebsiteOutput>> {
1106 let input = req.input;
1107 debug!(?input);
1108 let mut b = self.0.get_bucket_website();
1109 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1110 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1111 let result = b.send().await;
1112 match result {
1113 Ok(output) => {
1114 let headers = super::meta::build_headers(&output)?;
1115 let output = try_from_aws(output)?;
1116 debug!(?output);
1117 Ok(S3Response::with_headers(output, headers))
1118 }
1119 Err(e) => Err(wrap_sdk_error!(e)),
1120 }
1121 }
1122
1123 #[tracing::instrument(skip(self, req))]
1124 async fn get_object(&self, req: S3Request<s3s::dto::GetObjectInput>) -> S3Result<S3Response<s3s::dto::GetObjectOutput>> {
1125 let input = req.input;
1126 debug!(?input);
1127 let mut b = self.0.get_object();
1128 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1129 b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?);
1130 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1131 b = b.set_if_match(try_into_aws(input.if_match)?);
1132 b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?);
1133 b = b.set_if_none_match(try_into_aws(input.if_none_match)?);
1134 b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?);
1135 b = b.set_key(Some(try_into_aws(input.key)?));
1136 b = b.set_part_number(try_into_aws(input.part_number)?);
1137 b = b.set_range(try_into_aws(input.range)?);
1138 b = b.set_request_payer(try_into_aws(input.request_payer)?);
1139 b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?);
1140 b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?);
1141 b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?);
1142 b = b.set_response_content_language(try_into_aws(input.response_content_language)?);
1143 b = b.set_response_content_type(try_into_aws(input.response_content_type)?);
1144 b = b.set_response_expires(try_into_aws(input.response_expires)?);
1145 b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?);
1146 b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?);
1147 b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?);
1148 b = b.set_version_id(try_into_aws(input.version_id)?);
1149 let result = b.send().await;
1150 match result {
1151 Ok(output) => {
1152 let headers = super::meta::build_headers(&output)?;
1153 let output = try_from_aws(output)?;
1154 debug!(?output);
1155 Ok(S3Response::with_headers(output, headers))
1156 }
1157 Err(e) => Err(wrap_sdk_error!(e)),
1158 }
1159 }
1160
1161 #[tracing::instrument(skip(self, req))]
1162 async fn get_object_acl(
1163 &self,
1164 req: S3Request<s3s::dto::GetObjectAclInput>,
1165 ) -> S3Result<S3Response<s3s::dto::GetObjectAclOutput>> {
1166 let input = req.input;
1167 debug!(?input);
1168 let mut b = self.0.get_object_acl();
1169 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1170 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1171 b = b.set_key(Some(try_into_aws(input.key)?));
1172 b = b.set_request_payer(try_into_aws(input.request_payer)?);
1173 b = b.set_version_id(try_into_aws(input.version_id)?);
1174 let result = b.send().await;
1175 match result {
1176 Ok(output) => {
1177 let headers = super::meta::build_headers(&output)?;
1178 let output = try_from_aws(output)?;
1179 debug!(?output);
1180 Ok(S3Response::with_headers(output, headers))
1181 }
1182 Err(e) => Err(wrap_sdk_error!(e)),
1183 }
1184 }
1185
1186 #[tracing::instrument(skip(self, req))]
1187 async fn get_object_attributes(
1188 &self,
1189 req: S3Request<s3s::dto::GetObjectAttributesInput>,
1190 ) -> S3Result<S3Response<s3s::dto::GetObjectAttributesOutput>> {
1191 let input = req.input;
1192 debug!(?input);
1193 let mut b = self.0.get_object_attributes();
1194 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1195 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1196 b = b.set_key(Some(try_into_aws(input.key)?));
1197 b = b.set_max_parts(try_into_aws(input.max_parts)?);
1198 b = b.set_object_attributes(Some(try_into_aws(input.object_attributes)?));
1199 b = b.set_part_number_marker(try_into_aws(input.part_number_marker)?);
1200 b = b.set_request_payer(try_into_aws(input.request_payer)?);
1201 b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?);
1202 b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?);
1203 b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?);
1204 b = b.set_version_id(try_into_aws(input.version_id)?);
1205 let result = b.send().await;
1206 match result {
1207 Ok(output) => {
1208 let headers = super::meta::build_headers(&output)?;
1209 let output = try_from_aws(output)?;
1210 debug!(?output);
1211 Ok(S3Response::with_headers(output, headers))
1212 }
1213 Err(e) => Err(wrap_sdk_error!(e)),
1214 }
1215 }
1216
1217 #[tracing::instrument(skip(self, req))]
1218 async fn get_object_legal_hold(
1219 &self,
1220 req: S3Request<s3s::dto::GetObjectLegalHoldInput>,
1221 ) -> S3Result<S3Response<s3s::dto::GetObjectLegalHoldOutput>> {
1222 let input = req.input;
1223 debug!(?input);
1224 let mut b = self.0.get_object_legal_hold();
1225 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1226 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1227 b = b.set_key(Some(try_into_aws(input.key)?));
1228 b = b.set_request_payer(try_into_aws(input.request_payer)?);
1229 b = b.set_version_id(try_into_aws(input.version_id)?);
1230 let result = b.send().await;
1231 match result {
1232 Ok(output) => {
1233 let headers = super::meta::build_headers(&output)?;
1234 let output = try_from_aws(output)?;
1235 debug!(?output);
1236 Ok(S3Response::with_headers(output, headers))
1237 }
1238 Err(e) => Err(wrap_sdk_error!(e)),
1239 }
1240 }
1241
1242 #[tracing::instrument(skip(self, req))]
1243 async fn get_object_lock_configuration(
1244 &self,
1245 req: S3Request<s3s::dto::GetObjectLockConfigurationInput>,
1246 ) -> S3Result<S3Response<s3s::dto::GetObjectLockConfigurationOutput>> {
1247 let input = req.input;
1248 debug!(?input);
1249 let mut b = self.0.get_object_lock_configuration();
1250 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1251 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1252 let result = b.send().await;
1253 match result {
1254 Ok(output) => {
1255 let headers = super::meta::build_headers(&output)?;
1256 let output = try_from_aws(output)?;
1257 debug!(?output);
1258 Ok(S3Response::with_headers(output, headers))
1259 }
1260 Err(e) => Err(wrap_sdk_error!(e)),
1261 }
1262 }
1263
1264 #[tracing::instrument(skip(self, req))]
1265 async fn get_object_retention(
1266 &self,
1267 req: S3Request<s3s::dto::GetObjectRetentionInput>,
1268 ) -> S3Result<S3Response<s3s::dto::GetObjectRetentionOutput>> {
1269 let input = req.input;
1270 debug!(?input);
1271 let mut b = self.0.get_object_retention();
1272 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1273 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1274 b = b.set_key(Some(try_into_aws(input.key)?));
1275 b = b.set_request_payer(try_into_aws(input.request_payer)?);
1276 b = b.set_version_id(try_into_aws(input.version_id)?);
1277 let result = b.send().await;
1278 match result {
1279 Ok(output) => {
1280 let headers = super::meta::build_headers(&output)?;
1281 let output = try_from_aws(output)?;
1282 debug!(?output);
1283 Ok(S3Response::with_headers(output, headers))
1284 }
1285 Err(e) => Err(wrap_sdk_error!(e)),
1286 }
1287 }
1288
1289 #[tracing::instrument(skip(self, req))]
1290 async fn get_object_tagging(
1291 &self,
1292 req: S3Request<s3s::dto::GetObjectTaggingInput>,
1293 ) -> S3Result<S3Response<s3s::dto::GetObjectTaggingOutput>> {
1294 let input = req.input;
1295 debug!(?input);
1296 let mut b = self.0.get_object_tagging();
1297 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1298 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1299 b = b.set_key(Some(try_into_aws(input.key)?));
1300 b = b.set_request_payer(try_into_aws(input.request_payer)?);
1301 b = b.set_version_id(try_into_aws(input.version_id)?);
1302 let result = b.send().await;
1303 match result {
1304 Ok(output) => {
1305 let headers = super::meta::build_headers(&output)?;
1306 let output = try_from_aws(output)?;
1307 debug!(?output);
1308 Ok(S3Response::with_headers(output, headers))
1309 }
1310 Err(e) => Err(wrap_sdk_error!(e)),
1311 }
1312 }
1313
1314 #[tracing::instrument(skip(self, req))]
1315 async fn get_object_torrent(
1316 &self,
1317 req: S3Request<s3s::dto::GetObjectTorrentInput>,
1318 ) -> S3Result<S3Response<s3s::dto::GetObjectTorrentOutput>> {
1319 let input = req.input;
1320 debug!(?input);
1321 let mut b = self.0.get_object_torrent();
1322 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1323 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1324 b = b.set_key(Some(try_into_aws(input.key)?));
1325 b = b.set_request_payer(try_into_aws(input.request_payer)?);
1326 let result = b.send().await;
1327 match result {
1328 Ok(output) => {
1329 let headers = super::meta::build_headers(&output)?;
1330 let output = try_from_aws(output)?;
1331 debug!(?output);
1332 Ok(S3Response::with_headers(output, headers))
1333 }
1334 Err(e) => Err(wrap_sdk_error!(e)),
1335 }
1336 }
1337
1338 #[tracing::instrument(skip(self, req))]
1339 async fn get_public_access_block(
1340 &self,
1341 req: S3Request<s3s::dto::GetPublicAccessBlockInput>,
1342 ) -> S3Result<S3Response<s3s::dto::GetPublicAccessBlockOutput>> {
1343 let input = req.input;
1344 debug!(?input);
1345 let mut b = self.0.get_public_access_block();
1346 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1347 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1348 let result = b.send().await;
1349 match result {
1350 Ok(output) => {
1351 let headers = super::meta::build_headers(&output)?;
1352 let output = try_from_aws(output)?;
1353 debug!(?output);
1354 Ok(S3Response::with_headers(output, headers))
1355 }
1356 Err(e) => Err(wrap_sdk_error!(e)),
1357 }
1358 }
1359
1360 #[tracing::instrument(skip(self, req))]
1361 async fn head_bucket(&self, req: S3Request<s3s::dto::HeadBucketInput>) -> S3Result<S3Response<s3s::dto::HeadBucketOutput>> {
1362 let input = req.input;
1363 debug!(?input);
1364 let mut b = self.0.head_bucket();
1365 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1366 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1367 let result = b.send().await;
1368 match result {
1369 Ok(output) => {
1370 let headers = super::meta::build_headers(&output)?;
1371 let output = try_from_aws(output)?;
1372 debug!(?output);
1373 Ok(S3Response::with_headers(output, headers))
1374 }
1375 Err(e) => Err(wrap_sdk_error!(e)),
1376 }
1377 }
1378
1379 #[tracing::instrument(skip(self, req))]
1380 async fn head_object(&self, req: S3Request<s3s::dto::HeadObjectInput>) -> S3Result<S3Response<s3s::dto::HeadObjectOutput>> {
1381 let input = req.input;
1382 debug!(?input);
1383 let mut b = self.0.head_object();
1384 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1385 b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?);
1386 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1387 b = b.set_if_match(try_into_aws(input.if_match)?);
1388 b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?);
1389 b = b.set_if_none_match(try_into_aws(input.if_none_match)?);
1390 b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?);
1391 b = b.set_key(Some(try_into_aws(input.key)?));
1392 b = b.set_part_number(try_into_aws(input.part_number)?);
1393 b = b.set_range(try_into_aws(input.range)?);
1394 b = b.set_request_payer(try_into_aws(input.request_payer)?);
1395 b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?);
1396 b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?);
1397 b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?);
1398 b = b.set_response_content_language(try_into_aws(input.response_content_language)?);
1399 b = b.set_response_content_type(try_into_aws(input.response_content_type)?);
1400 b = b.set_response_expires(try_into_aws(input.response_expires)?);
1401 b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?);
1402 b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?);
1403 b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?);
1404 b = b.set_version_id(try_into_aws(input.version_id)?);
1405 let result = b.send().await;
1406 match result {
1407 Ok(output) => {
1408 let headers = super::meta::build_headers(&output)?;
1409 let output = try_from_aws(output)?;
1410 debug!(?output);
1411 Ok(S3Response::with_headers(output, headers))
1412 }
1413 Err(e) => Err(wrap_sdk_error!(e)),
1414 }
1415 }
1416
1417 #[tracing::instrument(skip(self, req))]
1418 async fn list_bucket_analytics_configurations(
1419 &self,
1420 req: S3Request<s3s::dto::ListBucketAnalyticsConfigurationsInput>,
1421 ) -> S3Result<S3Response<s3s::dto::ListBucketAnalyticsConfigurationsOutput>> {
1422 let input = req.input;
1423 debug!(?input);
1424 let mut b = self.0.list_bucket_analytics_configurations();
1425 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1426 b = b.set_continuation_token(try_into_aws(input.continuation_token)?);
1427 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1428 let result = b.send().await;
1429 match result {
1430 Ok(output) => {
1431 let headers = super::meta::build_headers(&output)?;
1432 let output = try_from_aws(output)?;
1433 debug!(?output);
1434 Ok(S3Response::with_headers(output, headers))
1435 }
1436 Err(e) => Err(wrap_sdk_error!(e)),
1437 }
1438 }
1439
1440 #[tracing::instrument(skip(self, req))]
1441 async fn list_bucket_intelligent_tiering_configurations(
1442 &self,
1443 req: S3Request<s3s::dto::ListBucketIntelligentTieringConfigurationsInput>,
1444 ) -> S3Result<S3Response<s3s::dto::ListBucketIntelligentTieringConfigurationsOutput>> {
1445 let input = req.input;
1446 debug!(?input);
1447 let mut b = self.0.list_bucket_intelligent_tiering_configurations();
1448 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1449 b = b.set_continuation_token(try_into_aws(input.continuation_token)?);
1450 let result = b.send().await;
1451 match result {
1452 Ok(output) => {
1453 let headers = super::meta::build_headers(&output)?;
1454 let output = try_from_aws(output)?;
1455 debug!(?output);
1456 Ok(S3Response::with_headers(output, headers))
1457 }
1458 Err(e) => Err(wrap_sdk_error!(e)),
1459 }
1460 }
1461
1462 #[tracing::instrument(skip(self, req))]
1463 async fn list_bucket_inventory_configurations(
1464 &self,
1465 req: S3Request<s3s::dto::ListBucketInventoryConfigurationsInput>,
1466 ) -> S3Result<S3Response<s3s::dto::ListBucketInventoryConfigurationsOutput>> {
1467 let input = req.input;
1468 debug!(?input);
1469 let mut b = self.0.list_bucket_inventory_configurations();
1470 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1471 b = b.set_continuation_token(try_into_aws(input.continuation_token)?);
1472 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1473 let result = b.send().await;
1474 match result {
1475 Ok(output) => {
1476 let headers = super::meta::build_headers(&output)?;
1477 let output = try_from_aws(output)?;
1478 debug!(?output);
1479 Ok(S3Response::with_headers(output, headers))
1480 }
1481 Err(e) => Err(wrap_sdk_error!(e)),
1482 }
1483 }
1484
1485 #[tracing::instrument(skip(self, req))]
1486 async fn list_bucket_metrics_configurations(
1487 &self,
1488 req: S3Request<s3s::dto::ListBucketMetricsConfigurationsInput>,
1489 ) -> S3Result<S3Response<s3s::dto::ListBucketMetricsConfigurationsOutput>> {
1490 let input = req.input;
1491 debug!(?input);
1492 let mut b = self.0.list_bucket_metrics_configurations();
1493 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1494 b = b.set_continuation_token(try_into_aws(input.continuation_token)?);
1495 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1496 let result = b.send().await;
1497 match result {
1498 Ok(output) => {
1499 let headers = super::meta::build_headers(&output)?;
1500 let output = try_from_aws(output)?;
1501 debug!(?output);
1502 Ok(S3Response::with_headers(output, headers))
1503 }
1504 Err(e) => Err(wrap_sdk_error!(e)),
1505 }
1506 }
1507
1508 #[tracing::instrument(skip(self, req))]
1509 async fn list_buckets(
1510 &self,
1511 req: S3Request<s3s::dto::ListBucketsInput>,
1512 ) -> S3Result<S3Response<s3s::dto::ListBucketsOutput>> {
1513 let input = req.input;
1514 debug!(?input);
1515 let mut b = self.0.list_buckets();
1516 b = b.set_bucket_region(try_into_aws(input.bucket_region)?);
1517 b = b.set_continuation_token(try_into_aws(input.continuation_token)?);
1518 b = b.set_max_buckets(try_into_aws(input.max_buckets)?);
1519 b = b.set_prefix(try_into_aws(input.prefix)?);
1520 let result = b.send().await;
1521 match result {
1522 Ok(output) => {
1523 let headers = super::meta::build_headers(&output)?;
1524 let output = try_from_aws(output)?;
1525 debug!(?output);
1526 Ok(S3Response::with_headers(output, headers))
1527 }
1528 Err(e) => Err(wrap_sdk_error!(e)),
1529 }
1530 }
1531
1532 #[tracing::instrument(skip(self, req))]
1533 async fn list_multipart_uploads(
1534 &self,
1535 req: S3Request<s3s::dto::ListMultipartUploadsInput>,
1536 ) -> S3Result<S3Response<s3s::dto::ListMultipartUploadsOutput>> {
1537 let input = req.input;
1538 debug!(?input);
1539 let mut b = self.0.list_multipart_uploads();
1540 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1541 b = b.set_delimiter(try_into_aws(input.delimiter)?);
1542 b = b.set_encoding_type(try_into_aws(input.encoding_type)?);
1543 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1544 b = b.set_key_marker(try_into_aws(input.key_marker)?);
1545 b = b.set_max_uploads(try_into_aws(input.max_uploads)?);
1546 b = b.set_prefix(try_into_aws(input.prefix)?);
1547 b = b.set_request_payer(try_into_aws(input.request_payer)?);
1548 b = b.set_upload_id_marker(try_into_aws(input.upload_id_marker)?);
1549 let result = b.send().await;
1550 match result {
1551 Ok(output) => {
1552 let headers = super::meta::build_headers(&output)?;
1553 let output = try_from_aws(output)?;
1554 debug!(?output);
1555 Ok(S3Response::with_headers(output, headers))
1556 }
1557 Err(e) => Err(wrap_sdk_error!(e)),
1558 }
1559 }
1560
1561 #[tracing::instrument(skip(self, req))]
1562 async fn list_object_versions(
1563 &self,
1564 req: S3Request<s3s::dto::ListObjectVersionsInput>,
1565 ) -> S3Result<S3Response<s3s::dto::ListObjectVersionsOutput>> {
1566 let input = req.input;
1567 debug!(?input);
1568 let mut b = self.0.list_object_versions();
1569 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1570 b = b.set_delimiter(try_into_aws(input.delimiter)?);
1571 b = b.set_encoding_type(try_into_aws(input.encoding_type)?);
1572 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1573 b = b.set_key_marker(try_into_aws(input.key_marker)?);
1574 b = b.set_max_keys(try_into_aws(input.max_keys)?);
1575 b = b.set_optional_object_attributes(Some(try_into_aws(input.optional_object_attributes)?));
1576 b = b.set_prefix(try_into_aws(input.prefix)?);
1577 b = b.set_request_payer(try_into_aws(input.request_payer)?);
1578 b = b.set_version_id_marker(try_into_aws(input.version_id_marker)?);
1579 let result = b.send().await;
1580 match result {
1581 Ok(output) => {
1582 let headers = super::meta::build_headers(&output)?;
1583 let output = try_from_aws(output)?;
1584 debug!(?output);
1585 Ok(S3Response::with_headers(output, headers))
1586 }
1587 Err(e) => Err(wrap_sdk_error!(e)),
1588 }
1589 }
1590
1591 #[tracing::instrument(skip(self, req))]
1592 async fn list_objects(
1593 &self,
1594 req: S3Request<s3s::dto::ListObjectsInput>,
1595 ) -> S3Result<S3Response<s3s::dto::ListObjectsOutput>> {
1596 let input = req.input;
1597 debug!(?input);
1598 let mut b = self.0.list_objects();
1599 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1600 b = b.set_delimiter(try_into_aws(input.delimiter)?);
1601 b = b.set_encoding_type(try_into_aws(input.encoding_type)?);
1602 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1603 b = b.set_marker(try_into_aws(input.marker)?);
1604 b = b.set_max_keys(try_into_aws(input.max_keys)?);
1605 b = b.set_optional_object_attributes(Some(try_into_aws(input.optional_object_attributes)?));
1606 b = b.set_prefix(try_into_aws(input.prefix)?);
1607 b = b.set_request_payer(try_into_aws(input.request_payer)?);
1608 let result = b.send().await;
1609 match result {
1610 Ok(output) => {
1611 let headers = super::meta::build_headers(&output)?;
1612 let output = try_from_aws(output)?;
1613 debug!(?output);
1614 Ok(S3Response::with_headers(output, headers))
1615 }
1616 Err(e) => Err(wrap_sdk_error!(e)),
1617 }
1618 }
1619
1620 #[tracing::instrument(skip(self, req))]
1621 async fn list_objects_v2(
1622 &self,
1623 req: S3Request<s3s::dto::ListObjectsV2Input>,
1624 ) -> S3Result<S3Response<s3s::dto::ListObjectsV2Output>> {
1625 let input = req.input;
1626 debug!(?input);
1627 let mut b = self.0.list_objects_v2();
1628 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1629 b = b.set_continuation_token(try_into_aws(input.continuation_token)?);
1630 b = b.set_delimiter(try_into_aws(input.delimiter)?);
1631 b = b.set_encoding_type(try_into_aws(input.encoding_type)?);
1632 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1633 b = b.set_fetch_owner(try_into_aws(input.fetch_owner)?);
1634 b = b.set_max_keys(try_into_aws(input.max_keys)?);
1635 b = b.set_optional_object_attributes(Some(try_into_aws(input.optional_object_attributes)?));
1636 b = b.set_prefix(try_into_aws(input.prefix)?);
1637 b = b.set_request_payer(try_into_aws(input.request_payer)?);
1638 b = b.set_start_after(try_into_aws(input.start_after)?);
1639 let result = b.send().await;
1640 match result {
1641 Ok(output) => {
1642 let headers = super::meta::build_headers(&output)?;
1643 let output = try_from_aws(output)?;
1644 debug!(?output);
1645 Ok(S3Response::with_headers(output, headers))
1646 }
1647 Err(e) => Err(wrap_sdk_error!(e)),
1648 }
1649 }
1650
1651 #[tracing::instrument(skip(self, req))]
1652 async fn list_parts(&self, req: S3Request<s3s::dto::ListPartsInput>) -> S3Result<S3Response<s3s::dto::ListPartsOutput>> {
1653 let input = req.input;
1654 debug!(?input);
1655 let mut b = self.0.list_parts();
1656 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1657 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1658 b = b.set_key(Some(try_into_aws(input.key)?));
1659 b = b.set_max_parts(try_into_aws(input.max_parts)?);
1660 b = b.set_part_number_marker(try_into_aws(input.part_number_marker)?);
1661 b = b.set_request_payer(try_into_aws(input.request_payer)?);
1662 b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?);
1663 b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?);
1664 b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?);
1665 b = b.set_upload_id(Some(try_into_aws(input.upload_id)?));
1666 let result = b.send().await;
1667 match result {
1668 Ok(output) => {
1669 let headers = super::meta::build_headers(&output)?;
1670 let output = try_from_aws(output)?;
1671 debug!(?output);
1672 Ok(S3Response::with_headers(output, headers))
1673 }
1674 Err(e) => Err(wrap_sdk_error!(e)),
1675 }
1676 }
1677
1678 #[tracing::instrument(skip(self, req))]
1679 async fn put_bucket_accelerate_configuration(
1680 &self,
1681 req: S3Request<s3s::dto::PutBucketAccelerateConfigurationInput>,
1682 ) -> S3Result<S3Response<s3s::dto::PutBucketAccelerateConfigurationOutput>> {
1683 let input = req.input;
1684 debug!(?input);
1685 let mut b = self.0.put_bucket_accelerate_configuration();
1686 b = b.set_accelerate_configuration(Some(try_into_aws(input.accelerate_configuration)?));
1687 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1688 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
1689 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1690 let result = b.send().await;
1691 match result {
1692 Ok(output) => {
1693 let headers = super::meta::build_headers(&output)?;
1694 let output = try_from_aws(output)?;
1695 debug!(?output);
1696 Ok(S3Response::with_headers(output, headers))
1697 }
1698 Err(e) => Err(wrap_sdk_error!(e)),
1699 }
1700 }
1701
1702 #[tracing::instrument(skip(self, req))]
1703 async fn put_bucket_acl(
1704 &self,
1705 req: S3Request<s3s::dto::PutBucketAclInput>,
1706 ) -> S3Result<S3Response<s3s::dto::PutBucketAclOutput>> {
1707 let input = req.input;
1708 debug!(?input);
1709 let mut b = self.0.put_bucket_acl();
1710 b = b.set_acl(try_into_aws(input.acl)?);
1711 b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?);
1712 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1713 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
1714 b = b.set_content_md5(try_into_aws(input.content_md5)?);
1715 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1716 b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?);
1717 b = b.set_grant_read(try_into_aws(input.grant_read)?);
1718 b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?);
1719 b = b.set_grant_write(try_into_aws(input.grant_write)?);
1720 b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?);
1721 let result = b.send().await;
1722 match result {
1723 Ok(output) => {
1724 let headers = super::meta::build_headers(&output)?;
1725 let output = try_from_aws(output)?;
1726 debug!(?output);
1727 Ok(S3Response::with_headers(output, headers))
1728 }
1729 Err(e) => Err(wrap_sdk_error!(e)),
1730 }
1731 }
1732
1733 #[tracing::instrument(skip(self, req))]
1734 async fn put_bucket_analytics_configuration(
1735 &self,
1736 req: S3Request<s3s::dto::PutBucketAnalyticsConfigurationInput>,
1737 ) -> S3Result<S3Response<s3s::dto::PutBucketAnalyticsConfigurationOutput>> {
1738 let input = req.input;
1739 debug!(?input);
1740 let mut b = self.0.put_bucket_analytics_configuration();
1741 b = b.set_analytics_configuration(Some(try_into_aws(input.analytics_configuration)?));
1742 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1743 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1744 b = b.set_id(Some(try_into_aws(input.id)?));
1745 let result = b.send().await;
1746 match result {
1747 Ok(output) => {
1748 let headers = super::meta::build_headers(&output)?;
1749 let output = try_from_aws(output)?;
1750 debug!(?output);
1751 Ok(S3Response::with_headers(output, headers))
1752 }
1753 Err(e) => Err(wrap_sdk_error!(e)),
1754 }
1755 }
1756
1757 #[tracing::instrument(skip(self, req))]
1758 async fn put_bucket_cors(
1759 &self,
1760 req: S3Request<s3s::dto::PutBucketCorsInput>,
1761 ) -> S3Result<S3Response<s3s::dto::PutBucketCorsOutput>> {
1762 let input = req.input;
1763 debug!(?input);
1764 let mut b = self.0.put_bucket_cors();
1765 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1766 b = b.set_cors_configuration(Some(try_into_aws(input.cors_configuration)?));
1767 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
1768 b = b.set_content_md5(try_into_aws(input.content_md5)?);
1769 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1770 let result = b.send().await;
1771 match result {
1772 Ok(output) => {
1773 let headers = super::meta::build_headers(&output)?;
1774 let output = try_from_aws(output)?;
1775 debug!(?output);
1776 Ok(S3Response::with_headers(output, headers))
1777 }
1778 Err(e) => Err(wrap_sdk_error!(e)),
1779 }
1780 }
1781
1782 #[tracing::instrument(skip(self, req))]
1783 async fn put_bucket_encryption(
1784 &self,
1785 req: S3Request<s3s::dto::PutBucketEncryptionInput>,
1786 ) -> S3Result<S3Response<s3s::dto::PutBucketEncryptionOutput>> {
1787 let input = req.input;
1788 debug!(?input);
1789 let mut b = self.0.put_bucket_encryption();
1790 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1791 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
1792 b = b.set_content_md5(try_into_aws(input.content_md5)?);
1793 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1794 b = b.set_server_side_encryption_configuration(Some(try_into_aws(input.server_side_encryption_configuration)?));
1795 let result = b.send().await;
1796 match result {
1797 Ok(output) => {
1798 let headers = super::meta::build_headers(&output)?;
1799 let output = try_from_aws(output)?;
1800 debug!(?output);
1801 Ok(S3Response::with_headers(output, headers))
1802 }
1803 Err(e) => Err(wrap_sdk_error!(e)),
1804 }
1805 }
1806
1807 #[tracing::instrument(skip(self, req))]
1808 async fn put_bucket_intelligent_tiering_configuration(
1809 &self,
1810 req: S3Request<s3s::dto::PutBucketIntelligentTieringConfigurationInput>,
1811 ) -> S3Result<S3Response<s3s::dto::PutBucketIntelligentTieringConfigurationOutput>> {
1812 let input = req.input;
1813 debug!(?input);
1814 let mut b = self.0.put_bucket_intelligent_tiering_configuration();
1815 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1816 b = b.set_id(Some(try_into_aws(input.id)?));
1817 b = b.set_intelligent_tiering_configuration(Some(try_into_aws(input.intelligent_tiering_configuration)?));
1818 let result = b.send().await;
1819 match result {
1820 Ok(output) => {
1821 let headers = super::meta::build_headers(&output)?;
1822 let output = try_from_aws(output)?;
1823 debug!(?output);
1824 Ok(S3Response::with_headers(output, headers))
1825 }
1826 Err(e) => Err(wrap_sdk_error!(e)),
1827 }
1828 }
1829
1830 #[tracing::instrument(skip(self, req))]
1831 async fn put_bucket_inventory_configuration(
1832 &self,
1833 req: S3Request<s3s::dto::PutBucketInventoryConfigurationInput>,
1834 ) -> S3Result<S3Response<s3s::dto::PutBucketInventoryConfigurationOutput>> {
1835 let input = req.input;
1836 debug!(?input);
1837 let mut b = self.0.put_bucket_inventory_configuration();
1838 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1839 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1840 b = b.set_id(Some(try_into_aws(input.id)?));
1841 b = b.set_inventory_configuration(Some(try_into_aws(input.inventory_configuration)?));
1842 let result = b.send().await;
1843 match result {
1844 Ok(output) => {
1845 let headers = super::meta::build_headers(&output)?;
1846 let output = try_from_aws(output)?;
1847 debug!(?output);
1848 Ok(S3Response::with_headers(output, headers))
1849 }
1850 Err(e) => Err(wrap_sdk_error!(e)),
1851 }
1852 }
1853
1854 #[tracing::instrument(skip(self, req))]
1855 async fn put_bucket_lifecycle_configuration(
1856 &self,
1857 req: S3Request<s3s::dto::PutBucketLifecycleConfigurationInput>,
1858 ) -> S3Result<S3Response<s3s::dto::PutBucketLifecycleConfigurationOutput>> {
1859 let input = req.input;
1860 debug!(?input);
1861 let mut b = self.0.put_bucket_lifecycle_configuration();
1862 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1863 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
1864 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1865 b = b.set_lifecycle_configuration(try_into_aws(input.lifecycle_configuration)?);
1866 b = b.set_transition_default_minimum_object_size(try_into_aws(input.transition_default_minimum_object_size)?);
1867 let result = b.send().await;
1868 match result {
1869 Ok(output) => {
1870 let headers = super::meta::build_headers(&output)?;
1871 let output = try_from_aws(output)?;
1872 debug!(?output);
1873 Ok(S3Response::with_headers(output, headers))
1874 }
1875 Err(e) => Err(wrap_sdk_error!(e)),
1876 }
1877 }
1878
1879 #[tracing::instrument(skip(self, req))]
1880 async fn put_bucket_logging(
1881 &self,
1882 req: S3Request<s3s::dto::PutBucketLoggingInput>,
1883 ) -> S3Result<S3Response<s3s::dto::PutBucketLoggingOutput>> {
1884 let input = req.input;
1885 debug!(?input);
1886 let mut b = self.0.put_bucket_logging();
1887 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1888 b = b.set_bucket_logging_status(Some(try_into_aws(input.bucket_logging_status)?));
1889 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
1890 b = b.set_content_md5(try_into_aws(input.content_md5)?);
1891 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1892 let result = b.send().await;
1893 match result {
1894 Ok(output) => {
1895 let headers = super::meta::build_headers(&output)?;
1896 let output = try_from_aws(output)?;
1897 debug!(?output);
1898 Ok(S3Response::with_headers(output, headers))
1899 }
1900 Err(e) => Err(wrap_sdk_error!(e)),
1901 }
1902 }
1903
1904 #[tracing::instrument(skip(self, req))]
1905 async fn put_bucket_metrics_configuration(
1906 &self,
1907 req: S3Request<s3s::dto::PutBucketMetricsConfigurationInput>,
1908 ) -> S3Result<S3Response<s3s::dto::PutBucketMetricsConfigurationOutput>> {
1909 let input = req.input;
1910 debug!(?input);
1911 let mut b = self.0.put_bucket_metrics_configuration();
1912 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1913 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1914 b = b.set_id(Some(try_into_aws(input.id)?));
1915 b = b.set_metrics_configuration(Some(try_into_aws(input.metrics_configuration)?));
1916 let result = b.send().await;
1917 match result {
1918 Ok(output) => {
1919 let headers = super::meta::build_headers(&output)?;
1920 let output = try_from_aws(output)?;
1921 debug!(?output);
1922 Ok(S3Response::with_headers(output, headers))
1923 }
1924 Err(e) => Err(wrap_sdk_error!(e)),
1925 }
1926 }
1927
1928 #[tracing::instrument(skip(self, req))]
1929 async fn put_bucket_notification_configuration(
1930 &self,
1931 req: S3Request<s3s::dto::PutBucketNotificationConfigurationInput>,
1932 ) -> S3Result<S3Response<s3s::dto::PutBucketNotificationConfigurationOutput>> {
1933 let input = req.input;
1934 debug!(?input);
1935 let mut b = self.0.put_bucket_notification_configuration();
1936 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1937 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1938 b = b.set_notification_configuration(Some(try_into_aws(input.notification_configuration)?));
1939 b = b.set_skip_destination_validation(try_into_aws(input.skip_destination_validation)?);
1940 let result = b.send().await;
1941 match result {
1942 Ok(output) => {
1943 let headers = super::meta::build_headers(&output)?;
1944 let output = try_from_aws(output)?;
1945 debug!(?output);
1946 Ok(S3Response::with_headers(output, headers))
1947 }
1948 Err(e) => Err(wrap_sdk_error!(e)),
1949 }
1950 }
1951
1952 #[tracing::instrument(skip(self, req))]
1953 async fn put_bucket_ownership_controls(
1954 &self,
1955 req: S3Request<s3s::dto::PutBucketOwnershipControlsInput>,
1956 ) -> S3Result<S3Response<s3s::dto::PutBucketOwnershipControlsOutput>> {
1957 let input = req.input;
1958 debug!(?input);
1959 let mut b = self.0.put_bucket_ownership_controls();
1960 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1961 b = b.set_content_md5(try_into_aws(input.content_md5)?);
1962 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1963 b = b.set_ownership_controls(Some(try_into_aws(input.ownership_controls)?));
1964 let result = b.send().await;
1965 match result {
1966 Ok(output) => {
1967 let headers = super::meta::build_headers(&output)?;
1968 let output = try_from_aws(output)?;
1969 debug!(?output);
1970 Ok(S3Response::with_headers(output, headers))
1971 }
1972 Err(e) => Err(wrap_sdk_error!(e)),
1973 }
1974 }
1975
1976 #[tracing::instrument(skip(self, req))]
1977 async fn put_bucket_policy(
1978 &self,
1979 req: S3Request<s3s::dto::PutBucketPolicyInput>,
1980 ) -> S3Result<S3Response<s3s::dto::PutBucketPolicyOutput>> {
1981 let input = req.input;
1982 debug!(?input);
1983 let mut b = self.0.put_bucket_policy();
1984 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
1985 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
1986 b = b.set_confirm_remove_self_bucket_access(try_into_aws(input.confirm_remove_self_bucket_access)?);
1987 b = b.set_content_md5(try_into_aws(input.content_md5)?);
1988 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
1989 b = b.set_policy(Some(try_into_aws(input.policy)?));
1990 let result = b.send().await;
1991 match result {
1992 Ok(output) => {
1993 let headers = super::meta::build_headers(&output)?;
1994 let output = try_from_aws(output)?;
1995 debug!(?output);
1996 Ok(S3Response::with_headers(output, headers))
1997 }
1998 Err(e) => Err(wrap_sdk_error!(e)),
1999 }
2000 }
2001
2002 #[tracing::instrument(skip(self, req))]
2003 async fn put_bucket_replication(
2004 &self,
2005 req: S3Request<s3s::dto::PutBucketReplicationInput>,
2006 ) -> S3Result<S3Response<s3s::dto::PutBucketReplicationOutput>> {
2007 let input = req.input;
2008 debug!(?input);
2009 let mut b = self.0.put_bucket_replication();
2010 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2011 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
2012 b = b.set_content_md5(try_into_aws(input.content_md5)?);
2013 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2014 b = b.set_replication_configuration(Some(try_into_aws(input.replication_configuration)?));
2015 b = b.set_token(try_into_aws(input.token)?);
2016 let result = b.send().await;
2017 match result {
2018 Ok(output) => {
2019 let headers = super::meta::build_headers(&output)?;
2020 let output = try_from_aws(output)?;
2021 debug!(?output);
2022 Ok(S3Response::with_headers(output, headers))
2023 }
2024 Err(e) => Err(wrap_sdk_error!(e)),
2025 }
2026 }
2027
2028 #[tracing::instrument(skip(self, req))]
2029 async fn put_bucket_request_payment(
2030 &self,
2031 req: S3Request<s3s::dto::PutBucketRequestPaymentInput>,
2032 ) -> S3Result<S3Response<s3s::dto::PutBucketRequestPaymentOutput>> {
2033 let input = req.input;
2034 debug!(?input);
2035 let mut b = self.0.put_bucket_request_payment();
2036 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2037 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
2038 b = b.set_content_md5(try_into_aws(input.content_md5)?);
2039 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2040 b = b.set_request_payment_configuration(Some(try_into_aws(input.request_payment_configuration)?));
2041 let result = b.send().await;
2042 match result {
2043 Ok(output) => {
2044 let headers = super::meta::build_headers(&output)?;
2045 let output = try_from_aws(output)?;
2046 debug!(?output);
2047 Ok(S3Response::with_headers(output, headers))
2048 }
2049 Err(e) => Err(wrap_sdk_error!(e)),
2050 }
2051 }
2052
2053 #[tracing::instrument(skip(self, req))]
2054 async fn put_bucket_tagging(
2055 &self,
2056 req: S3Request<s3s::dto::PutBucketTaggingInput>,
2057 ) -> S3Result<S3Response<s3s::dto::PutBucketTaggingOutput>> {
2058 let input = req.input;
2059 debug!(?input);
2060 let mut b = self.0.put_bucket_tagging();
2061 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2062 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
2063 b = b.set_content_md5(try_into_aws(input.content_md5)?);
2064 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2065 b = b.set_tagging(Some(try_into_aws(input.tagging)?));
2066 let result = b.send().await;
2067 match result {
2068 Ok(output) => {
2069 let headers = super::meta::build_headers(&output)?;
2070 let output = try_from_aws(output)?;
2071 debug!(?output);
2072 Ok(S3Response::with_headers(output, headers))
2073 }
2074 Err(e) => Err(wrap_sdk_error!(e)),
2075 }
2076 }
2077
2078 #[tracing::instrument(skip(self, req))]
2079 async fn put_bucket_versioning(
2080 &self,
2081 req: S3Request<s3s::dto::PutBucketVersioningInput>,
2082 ) -> S3Result<S3Response<s3s::dto::PutBucketVersioningOutput>> {
2083 let input = req.input;
2084 debug!(?input);
2085 let mut b = self.0.put_bucket_versioning();
2086 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2087 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
2088 b = b.set_content_md5(try_into_aws(input.content_md5)?);
2089 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2090 b = b.set_mfa(try_into_aws(input.mfa)?);
2091 b = b.set_versioning_configuration(Some(try_into_aws(input.versioning_configuration)?));
2092 let result = b.send().await;
2093 match result {
2094 Ok(output) => {
2095 let headers = super::meta::build_headers(&output)?;
2096 let output = try_from_aws(output)?;
2097 debug!(?output);
2098 Ok(S3Response::with_headers(output, headers))
2099 }
2100 Err(e) => Err(wrap_sdk_error!(e)),
2101 }
2102 }
2103
2104 #[tracing::instrument(skip(self, req))]
2105 async fn put_bucket_website(
2106 &self,
2107 req: S3Request<s3s::dto::PutBucketWebsiteInput>,
2108 ) -> S3Result<S3Response<s3s::dto::PutBucketWebsiteOutput>> {
2109 let input = req.input;
2110 debug!(?input);
2111 let mut b = self.0.put_bucket_website();
2112 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2113 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
2114 b = b.set_content_md5(try_into_aws(input.content_md5)?);
2115 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2116 b = b.set_website_configuration(Some(try_into_aws(input.website_configuration)?));
2117 let result = b.send().await;
2118 match result {
2119 Ok(output) => {
2120 let headers = super::meta::build_headers(&output)?;
2121 let output = try_from_aws(output)?;
2122 debug!(?output);
2123 Ok(S3Response::with_headers(output, headers))
2124 }
2125 Err(e) => Err(wrap_sdk_error!(e)),
2126 }
2127 }
2128
2129 #[tracing::instrument(skip(self, req))]
2130 async fn put_object(&self, req: S3Request<s3s::dto::PutObjectInput>) -> S3Result<S3Response<s3s::dto::PutObjectOutput>> {
2131 let input = req.input;
2132 debug!(?input);
2133 let mut b = self.0.put_object();
2134 b = b.set_acl(try_into_aws(input.acl)?);
2135 b = b.set_body(try_into_aws(input.body)?);
2136 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2137 b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?);
2138 b = b.set_cache_control(try_into_aws(input.cache_control)?);
2139 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
2140 b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?);
2141 b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?);
2142 b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?);
2143 b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?);
2144 b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?);
2145 b = b.set_content_disposition(try_into_aws(input.content_disposition)?);
2146 b = b.set_content_encoding(try_into_aws(input.content_encoding)?);
2147 b = b.set_content_language(try_into_aws(input.content_language)?);
2148 b = b.set_content_length(try_into_aws(input.content_length)?);
2149 b = b.set_content_md5(try_into_aws(input.content_md5)?);
2150 b = b.set_content_type(try_into_aws(input.content_type)?);
2151 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2152 b = b.set_expires(try_into_aws(input.expires)?);
2153 b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?);
2154 b = b.set_grant_read(try_into_aws(input.grant_read)?);
2155 b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?);
2156 b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?);
2157 b = b.set_if_match(try_into_aws(input.if_match)?);
2158 b = b.set_if_none_match(try_into_aws(input.if_none_match)?);
2159 b = b.set_key(Some(try_into_aws(input.key)?));
2160 b = b.set_metadata(try_into_aws(input.metadata)?);
2161 b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?);
2162 b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?);
2163 b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?);
2164 b = b.set_request_payer(try_into_aws(input.request_payer)?);
2165 b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?);
2166 b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?);
2167 b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?);
2168 b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?);
2169 b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?);
2170 b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?);
2171 b = b.set_storage_class(try_into_aws(input.storage_class)?);
2172 b = b.set_tagging(try_into_aws(input.tagging)?);
2173 b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?);
2174 b = b.set_write_offset_bytes(try_into_aws(input.write_offset_bytes)?);
2175 let result = b.send().await;
2176 match result {
2177 Ok(output) => {
2178 let headers = super::meta::build_headers(&output)?;
2179 let output = try_from_aws(output)?;
2180 debug!(?output);
2181 Ok(S3Response::with_headers(output, headers))
2182 }
2183 Err(e) => Err(wrap_sdk_error!(e)),
2184 }
2185 }
2186
2187 #[tracing::instrument(skip(self, req))]
2188 async fn put_object_acl(
2189 &self,
2190 req: S3Request<s3s::dto::PutObjectAclInput>,
2191 ) -> S3Result<S3Response<s3s::dto::PutObjectAclOutput>> {
2192 let input = req.input;
2193 debug!(?input);
2194 let mut b = self.0.put_object_acl();
2195 b = b.set_acl(try_into_aws(input.acl)?);
2196 b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?);
2197 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2198 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
2199 b = b.set_content_md5(try_into_aws(input.content_md5)?);
2200 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2201 b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?);
2202 b = b.set_grant_read(try_into_aws(input.grant_read)?);
2203 b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?);
2204 b = b.set_grant_write(try_into_aws(input.grant_write)?);
2205 b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?);
2206 b = b.set_key(Some(try_into_aws(input.key)?));
2207 b = b.set_request_payer(try_into_aws(input.request_payer)?);
2208 b = b.set_version_id(try_into_aws(input.version_id)?);
2209 let result = b.send().await;
2210 match result {
2211 Ok(output) => {
2212 let headers = super::meta::build_headers(&output)?;
2213 let output = try_from_aws(output)?;
2214 debug!(?output);
2215 Ok(S3Response::with_headers(output, headers))
2216 }
2217 Err(e) => Err(wrap_sdk_error!(e)),
2218 }
2219 }
2220
2221 #[tracing::instrument(skip(self, req))]
2222 async fn put_object_legal_hold(
2223 &self,
2224 req: S3Request<s3s::dto::PutObjectLegalHoldInput>,
2225 ) -> S3Result<S3Response<s3s::dto::PutObjectLegalHoldOutput>> {
2226 let input = req.input;
2227 debug!(?input);
2228 let mut b = self.0.put_object_legal_hold();
2229 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2230 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
2231 b = b.set_content_md5(try_into_aws(input.content_md5)?);
2232 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2233 b = b.set_key(Some(try_into_aws(input.key)?));
2234 b = b.set_legal_hold(try_into_aws(input.legal_hold)?);
2235 b = b.set_request_payer(try_into_aws(input.request_payer)?);
2236 b = b.set_version_id(try_into_aws(input.version_id)?);
2237 let result = b.send().await;
2238 match result {
2239 Ok(output) => {
2240 let headers = super::meta::build_headers(&output)?;
2241 let output = try_from_aws(output)?;
2242 debug!(?output);
2243 Ok(S3Response::with_headers(output, headers))
2244 }
2245 Err(e) => Err(wrap_sdk_error!(e)),
2246 }
2247 }
2248
2249 #[tracing::instrument(skip(self, req))]
2250 async fn put_object_lock_configuration(
2251 &self,
2252 req: S3Request<s3s::dto::PutObjectLockConfigurationInput>,
2253 ) -> S3Result<S3Response<s3s::dto::PutObjectLockConfigurationOutput>> {
2254 let input = req.input;
2255 debug!(?input);
2256 let mut b = self.0.put_object_lock_configuration();
2257 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2258 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
2259 b = b.set_content_md5(try_into_aws(input.content_md5)?);
2260 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2261 b = b.set_object_lock_configuration(try_into_aws(input.object_lock_configuration)?);
2262 b = b.set_request_payer(try_into_aws(input.request_payer)?);
2263 b = b.set_token(try_into_aws(input.token)?);
2264 let result = b.send().await;
2265 match result {
2266 Ok(output) => {
2267 let headers = super::meta::build_headers(&output)?;
2268 let output = try_from_aws(output)?;
2269 debug!(?output);
2270 Ok(S3Response::with_headers(output, headers))
2271 }
2272 Err(e) => Err(wrap_sdk_error!(e)),
2273 }
2274 }
2275
2276 #[tracing::instrument(skip(self, req))]
2277 async fn put_object_retention(
2278 &self,
2279 req: S3Request<s3s::dto::PutObjectRetentionInput>,
2280 ) -> S3Result<S3Response<s3s::dto::PutObjectRetentionOutput>> {
2281 let input = req.input;
2282 debug!(?input);
2283 let mut b = self.0.put_object_retention();
2284 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2285 b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?);
2286 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
2287 b = b.set_content_md5(try_into_aws(input.content_md5)?);
2288 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2289 b = b.set_key(Some(try_into_aws(input.key)?));
2290 b = b.set_request_payer(try_into_aws(input.request_payer)?);
2291 b = b.set_retention(try_into_aws(input.retention)?);
2292 b = b.set_version_id(try_into_aws(input.version_id)?);
2293 let result = b.send().await;
2294 match result {
2295 Ok(output) => {
2296 let headers = super::meta::build_headers(&output)?;
2297 let output = try_from_aws(output)?;
2298 debug!(?output);
2299 Ok(S3Response::with_headers(output, headers))
2300 }
2301 Err(e) => Err(wrap_sdk_error!(e)),
2302 }
2303 }
2304
2305 #[tracing::instrument(skip(self, req))]
2306 async fn put_object_tagging(
2307 &self,
2308 req: S3Request<s3s::dto::PutObjectTaggingInput>,
2309 ) -> S3Result<S3Response<s3s::dto::PutObjectTaggingOutput>> {
2310 let input = req.input;
2311 debug!(?input);
2312 let mut b = self.0.put_object_tagging();
2313 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2314 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
2315 b = b.set_content_md5(try_into_aws(input.content_md5)?);
2316 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2317 b = b.set_key(Some(try_into_aws(input.key)?));
2318 b = b.set_request_payer(try_into_aws(input.request_payer)?);
2319 b = b.set_tagging(Some(try_into_aws(input.tagging)?));
2320 b = b.set_version_id(try_into_aws(input.version_id)?);
2321 let result = b.send().await;
2322 match result {
2323 Ok(output) => {
2324 let headers = super::meta::build_headers(&output)?;
2325 let output = try_from_aws(output)?;
2326 debug!(?output);
2327 Ok(S3Response::with_headers(output, headers))
2328 }
2329 Err(e) => Err(wrap_sdk_error!(e)),
2330 }
2331 }
2332
2333 #[tracing::instrument(skip(self, req))]
2334 async fn put_public_access_block(
2335 &self,
2336 req: S3Request<s3s::dto::PutPublicAccessBlockInput>,
2337 ) -> S3Result<S3Response<s3s::dto::PutPublicAccessBlockOutput>> {
2338 let input = req.input;
2339 debug!(?input);
2340 let mut b = self.0.put_public_access_block();
2341 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2342 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
2343 b = b.set_content_md5(try_into_aws(input.content_md5)?);
2344 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2345 b = b.set_public_access_block_configuration(Some(try_into_aws(input.public_access_block_configuration)?));
2346 let result = b.send().await;
2347 match result {
2348 Ok(output) => {
2349 let headers = super::meta::build_headers(&output)?;
2350 let output = try_from_aws(output)?;
2351 debug!(?output);
2352 Ok(S3Response::with_headers(output, headers))
2353 }
2354 Err(e) => Err(wrap_sdk_error!(e)),
2355 }
2356 }
2357
2358 #[tracing::instrument(skip(self, req))]
2359 async fn restore_object(
2360 &self,
2361 req: S3Request<s3s::dto::RestoreObjectInput>,
2362 ) -> S3Result<S3Response<s3s::dto::RestoreObjectOutput>> {
2363 let input = req.input;
2364 debug!(?input);
2365 let mut b = self.0.restore_object();
2366 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2367 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
2368 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2369 b = b.set_key(Some(try_into_aws(input.key)?));
2370 b = b.set_request_payer(try_into_aws(input.request_payer)?);
2371 b = b.set_restore_request(try_into_aws(input.restore_request)?);
2372 b = b.set_version_id(try_into_aws(input.version_id)?);
2373 let result = b.send().await;
2374 match result {
2375 Ok(output) => {
2376 let headers = super::meta::build_headers(&output)?;
2377 let output = try_from_aws(output)?;
2378 debug!(?output);
2379 Ok(S3Response::with_headers(output, headers))
2380 }
2381 Err(e) => Err(wrap_sdk_error!(e)),
2382 }
2383 }
2384
2385 #[tracing::instrument(skip(self, req))]
2386 async fn select_object_content(
2387 &self,
2388 req: S3Request<s3s::dto::SelectObjectContentInput>,
2389 ) -> S3Result<S3Response<s3s::dto::SelectObjectContentOutput>> {
2390 let input = req.input;
2391 debug!(?input);
2392 let mut b = self.0.select_object_content();
2393 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2394 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2395 b = b.set_key(Some(try_into_aws(input.key)?));
2396 b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?);
2397 b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?);
2398 b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?);
2399 b = b.set_expression(Some(try_into_aws(input.request.expression)?));
2400 b = b.set_expression_type(Some(try_into_aws(input.request.expression_type)?));
2401 b = b.set_input_serialization(Some(try_into_aws(input.request.input_serialization)?));
2402 b = b.set_output_serialization(Some(try_into_aws(input.request.output_serialization)?));
2403 b = b.set_request_progress(try_into_aws(input.request.request_progress)?);
2404 b = b.set_scan_range(try_into_aws(input.request.scan_range)?);
2405 let result = b.send().await;
2406 match result {
2407 Ok(output) => {
2408 let headers = super::meta::build_headers(&output)?;
2409 let output = try_from_aws(output)?;
2410 debug!(?output);
2411 Ok(S3Response::with_headers(output, headers))
2412 }
2413 Err(e) => Err(wrap_sdk_error!(e)),
2414 }
2415 }
2416
2417 #[tracing::instrument(skip(self, req))]
2418 async fn upload_part(&self, req: S3Request<s3s::dto::UploadPartInput>) -> S3Result<S3Response<s3s::dto::UploadPartOutput>> {
2419 let input = req.input;
2420 debug!(?input);
2421 let mut b = self.0.upload_part();
2422 b = b.set_body(try_into_aws(input.body)?);
2423 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2424 b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?);
2425 b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?);
2426 b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?);
2427 b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?);
2428 b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?);
2429 b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?);
2430 b = b.set_content_length(try_into_aws(input.content_length)?);
2431 b = b.set_content_md5(try_into_aws(input.content_md5)?);
2432 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2433 b = b.set_key(Some(try_into_aws(input.key)?));
2434 b = b.set_part_number(Some(try_into_aws(input.part_number)?));
2435 b = b.set_request_payer(try_into_aws(input.request_payer)?);
2436 b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?);
2437 b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?);
2438 b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?);
2439 b = b.set_upload_id(Some(try_into_aws(input.upload_id)?));
2440 let result = b.send().await;
2441 match result {
2442 Ok(output) => {
2443 let headers = super::meta::build_headers(&output)?;
2444 let output = try_from_aws(output)?;
2445 debug!(?output);
2446 Ok(S3Response::with_headers(output, headers))
2447 }
2448 Err(e) => Err(wrap_sdk_error!(e)),
2449 }
2450 }
2451
2452 #[tracing::instrument(skip(self, req))]
2453 async fn upload_part_copy(
2454 &self,
2455 req: S3Request<s3s::dto::UploadPartCopyInput>,
2456 ) -> S3Result<S3Response<s3s::dto::UploadPartCopyOutput>> {
2457 let input = req.input;
2458 debug!(?input);
2459 let mut b = self.0.upload_part_copy();
2460 b = b.set_bucket(Some(try_into_aws(input.bucket)?));
2461 b = b.set_copy_source(Some(try_into_aws(input.copy_source)?));
2462 b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?);
2463 b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?);
2464 b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?);
2465 b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?);
2466 b = b.set_copy_source_range(try_into_aws(input.copy_source_range)?);
2467 b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?);
2468 b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?);
2469 b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?);
2470 b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?);
2471 b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?);
2472 b = b.set_key(Some(try_into_aws(input.key)?));
2473 b = b.set_part_number(Some(try_into_aws(input.part_number)?));
2474 b = b.set_request_payer(try_into_aws(input.request_payer)?);
2475 b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?);
2476 b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?);
2477 b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?);
2478 b = b.set_upload_id(Some(try_into_aws(input.upload_id)?));
2479 let result = b.send().await;
2480 match result {
2481 Ok(output) => {
2482 let headers = super::meta::build_headers(&output)?;
2483 let output = try_from_aws(output)?;
2484 debug!(?output);
2485 Ok(S3Response::with_headers(output, headers))
2486 }
2487 Err(e) => Err(wrap_sdk_error!(e)),
2488 }
2489 }
2490
2491 #[tracing::instrument(skip(self, req))]
2492 async fn write_get_object_response(
2493 &self,
2494 req: S3Request<s3s::dto::WriteGetObjectResponseInput>,
2495 ) -> S3Result<S3Response<s3s::dto::WriteGetObjectResponseOutput>> {
2496 let input = req.input;
2497 debug!(?input);
2498 let mut b = self.0.write_get_object_response();
2499 b = b.set_accept_ranges(try_into_aws(input.accept_ranges)?);
2500 b = b.set_body(try_into_aws(input.body)?);
2501 b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?);
2502 b = b.set_cache_control(try_into_aws(input.cache_control)?);
2503 b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?);
2504 b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?);
2505 b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?);
2506 b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?);
2507 b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?);
2508 b = b.set_content_disposition(try_into_aws(input.content_disposition)?);
2509 b = b.set_content_encoding(try_into_aws(input.content_encoding)?);
2510 b = b.set_content_language(try_into_aws(input.content_language)?);
2511 b = b.set_content_length(try_into_aws(input.content_length)?);
2512 b = b.set_content_range(try_into_aws(input.content_range)?);
2513 b = b.set_content_type(try_into_aws(input.content_type)?);
2514 b = b.set_delete_marker(try_into_aws(input.delete_marker)?);
2515 b = b.set_e_tag(try_into_aws(input.e_tag)?);
2516 b = b.set_error_code(try_into_aws(input.error_code)?);
2517 b = b.set_error_message(try_into_aws(input.error_message)?);
2518 b = b.set_expiration(try_into_aws(input.expiration)?);
2519 b = b.set_expires(try_into_aws(input.expires)?);
2520 b = b.set_last_modified(try_into_aws(input.last_modified)?);
2521 b = b.set_metadata(try_into_aws(input.metadata)?);
2522 b = b.set_missing_meta(try_into_aws(input.missing_meta)?);
2523 b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?);
2524 b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?);
2525 b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?);
2526 b = b.set_parts_count(try_into_aws(input.parts_count)?);
2527 b = b.set_replication_status(try_into_aws(input.replication_status)?);
2528 b = b.set_request_charged(try_into_aws(input.request_charged)?);
2529 b = b.set_request_route(Some(try_into_aws(input.request_route)?));
2530 b = b.set_request_token(Some(try_into_aws(input.request_token)?));
2531 b = b.set_restore(try_into_aws(input.restore)?);
2532 b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?);
2533 b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?);
2534 b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?);
2535 b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?);
2536 b = b.set_status_code(try_into_aws(input.status_code)?);
2537 b = b.set_storage_class(try_into_aws(input.storage_class)?);
2538 b = b.set_tag_count(try_into_aws(input.tag_count)?);
2539 b = b.set_version_id(try_into_aws(input.version_id)?);
2540 let result = b.send().await;
2541 match result {
2542 Ok(output) => {
2543 let headers = super::meta::build_headers(&output)?;
2544 let output = try_from_aws(output)?;
2545 debug!(?output);
2546 Ok(S3Response::with_headers(output, headers))
2547 }
2548 Err(e) => Err(wrap_sdk_error!(e)),
2549 }
2550 }
2551}