aws_sdk_s3/
protocol_serde.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub(crate) fn type_erase_result<O, E>(
    result: ::std::result::Result<O, E>,
) -> ::std::result::Result<
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
>
where
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
{
    result
        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
        .map_err(::std::convert::Into::into)
}

pub fn parse_http_error_metadata(
    response_status: u16,
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    response_body: &[u8],
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_xml::decode::XmlDecodeError> {
    // S3 HEAD responses have no response body to for an error code. Therefore,
    // check the HTTP response status and populate an error code for 404s.
    if response_body.is_empty() {
        let mut builder = ::aws_smithy_types::error::ErrorMetadata::builder();
        if response_status == 404 {
            builder = builder.code("NotFound");
        }
        Ok(builder)
    } else {
        crate::rest_xml_unwrapped_errors::parse_error_metadata(response_body)
    }
}

pub(crate) mod shape_abort_multipart_upload;

pub(crate) mod shape_complete_multipart_upload;

pub fn rest_xml_unset_struct_payload() -> ::std::vec::Vec<u8> {
    Vec::new()
}

pub(crate) mod shape_complete_multipart_upload_input;

pub(crate) mod shape_copy_object;

pub(crate) mod shape_create_bucket;

pub(crate) mod shape_create_bucket_input;

pub(crate) mod shape_create_multipart_upload;

pub(crate) mod shape_create_session;

pub(crate) mod shape_delete_bucket;

pub(crate) mod shape_delete_bucket_analytics_configuration;

pub(crate) mod shape_delete_bucket_cors;

pub(crate) mod shape_delete_bucket_encryption;

pub(crate) mod shape_delete_bucket_intelligent_tiering_configuration;

pub(crate) mod shape_delete_bucket_inventory_configuration;

pub(crate) mod shape_delete_bucket_lifecycle;

pub(crate) mod shape_delete_bucket_metrics_configuration;

pub(crate) mod shape_delete_bucket_ownership_controls;

pub(crate) mod shape_delete_bucket_policy;

pub(crate) mod shape_delete_bucket_replication;

pub(crate) mod shape_delete_bucket_tagging;

pub(crate) mod shape_delete_bucket_website;

pub(crate) mod shape_delete_object;

pub(crate) mod shape_delete_object_tagging;

pub(crate) mod shape_delete_objects;

pub(crate) mod shape_delete_objects_input;

pub(crate) mod shape_delete_public_access_block;

pub(crate) mod shape_get_bucket_accelerate_configuration;

pub(crate) mod shape_get_bucket_acl;

pub(crate) mod shape_get_bucket_analytics_configuration;

pub(crate) mod shape_get_bucket_cors;

pub(crate) mod shape_get_bucket_encryption;

pub(crate) mod shape_get_bucket_intelligent_tiering_configuration;

pub(crate) mod shape_get_bucket_inventory_configuration;

pub(crate) mod shape_get_bucket_lifecycle_configuration;

pub(crate) mod shape_get_bucket_location;

pub(crate) mod shape_get_bucket_logging;

pub(crate) mod shape_get_bucket_metrics_configuration;

pub(crate) mod shape_get_bucket_notification_configuration;

pub(crate) mod shape_get_bucket_ownership_controls;

pub(crate) mod shape_get_bucket_policy;

pub(crate) mod shape_get_bucket_policy_status;

pub(crate) mod shape_get_bucket_replication;

pub(crate) mod shape_get_bucket_request_payment;

pub(crate) mod shape_get_bucket_tagging;

pub(crate) mod shape_get_bucket_versioning;

pub(crate) mod shape_get_bucket_website;

pub(crate) mod shape_get_object;

pub(crate) mod shape_get_object_acl;

pub(crate) mod shape_get_object_attributes;

pub(crate) mod shape_get_object_legal_hold;

pub(crate) mod shape_get_object_lock_configuration;

pub(crate) mod shape_get_object_retention;

pub(crate) mod shape_get_object_tagging;

pub(crate) mod shape_get_object_torrent;

pub(crate) mod shape_get_public_access_block;

pub(crate) mod shape_head_bucket;

pub(crate) mod shape_head_object;

pub(crate) mod shape_list_bucket_analytics_configurations;

pub(crate) mod shape_list_bucket_intelligent_tiering_configurations;

pub(crate) mod shape_list_bucket_inventory_configurations;

pub(crate) mod shape_list_bucket_metrics_configurations;

pub(crate) mod shape_list_buckets;

pub(crate) mod shape_list_directory_buckets;

pub(crate) mod shape_list_multipart_uploads;

pub(crate) mod shape_list_object_versions;

pub(crate) mod shape_list_objects;

pub(crate) mod shape_list_objects_v2;

pub(crate) mod shape_list_parts;

pub(crate) mod shape_put_bucket_accelerate_configuration;

pub(crate) mod shape_put_bucket_accelerate_configuration_input;

pub(crate) mod shape_put_bucket_acl;

pub(crate) mod shape_put_bucket_acl_input;

pub(crate) mod shape_put_bucket_analytics_configuration;

pub(crate) mod shape_put_bucket_analytics_configuration_input;

pub(crate) mod shape_put_bucket_cors;

pub(crate) mod shape_put_bucket_cors_input;

pub(crate) mod shape_put_bucket_encryption;

pub(crate) mod shape_put_bucket_encryption_input;

pub(crate) mod shape_put_bucket_intelligent_tiering_configuration;

pub(crate) mod shape_put_bucket_intelligent_tiering_configuration_input;

pub(crate) mod shape_put_bucket_inventory_configuration;

pub(crate) mod shape_put_bucket_inventory_configuration_input;

pub(crate) mod shape_put_bucket_lifecycle_configuration;

pub(crate) mod shape_put_bucket_lifecycle_configuration_input;

pub(crate) mod shape_put_bucket_logging;

pub(crate) mod shape_put_bucket_logging_input;

pub(crate) mod shape_put_bucket_metrics_configuration;

pub(crate) mod shape_put_bucket_metrics_configuration_input;

pub(crate) mod shape_put_bucket_notification_configuration;

pub(crate) mod shape_put_bucket_notification_configuration_input;

pub(crate) mod shape_put_bucket_ownership_controls;

pub(crate) mod shape_put_bucket_ownership_controls_input;

pub(crate) mod shape_put_bucket_policy;

pub(crate) mod shape_put_bucket_policy_input;

pub(crate) mod shape_put_bucket_replication;

pub(crate) mod shape_put_bucket_replication_input;

pub(crate) mod shape_put_bucket_request_payment;

pub(crate) mod shape_put_bucket_request_payment_input;

pub(crate) mod shape_put_bucket_tagging;

pub(crate) mod shape_put_bucket_tagging_input;

pub(crate) mod shape_put_bucket_versioning;

pub(crate) mod shape_put_bucket_versioning_input;

pub(crate) mod shape_put_bucket_website;

pub(crate) mod shape_put_bucket_website_input;

pub(crate) mod shape_put_object;

pub(crate) mod shape_put_object_acl;

pub(crate) mod shape_put_object_acl_input;

pub(crate) mod shape_put_object_input;

pub(crate) mod shape_put_object_legal_hold;

pub(crate) mod shape_put_object_legal_hold_input;

pub(crate) mod shape_put_object_lock_configuration;

pub(crate) mod shape_put_object_lock_configuration_input;

pub(crate) mod shape_put_object_retention;

pub(crate) mod shape_put_object_retention_input;

pub(crate) mod shape_put_object_tagging;

pub(crate) mod shape_put_object_tagging_input;

pub(crate) mod shape_put_public_access_block;

pub(crate) mod shape_put_public_access_block_input;

pub(crate) mod shape_restore_object;

pub(crate) mod shape_restore_object_input;

pub(crate) mod shape_select_object_content;

pub(crate) mod shape_upload_part;

pub(crate) mod shape_upload_part_copy;

pub(crate) mod shape_upload_part_input;

pub(crate) mod shape_write_get_object_response;

pub(crate) mod shape_write_get_object_response_input;

pub(crate) mod shape_abort_multipart_upload_output;

pub(crate) mod shape_bucket_already_exists;

pub(crate) mod shape_bucket_already_owned_by_you;

pub(crate) mod shape_complete_multipart_upload_output;

pub(crate) mod shape_copy_object_output;

pub(crate) mod shape_create_bucket_output;

pub(crate) mod shape_create_multipart_upload_output;

pub(crate) mod shape_delete_object_output;

pub(crate) mod shape_delete_object_tagging_output;

pub(crate) mod shape_delete_objects_output;

pub(crate) mod shape_get_bucket_accelerate_configuration_output;

pub(crate) mod shape_get_bucket_analytics_configuration_output;

pub(crate) mod shape_get_bucket_encryption_output;

pub(crate) mod shape_get_bucket_intelligent_tiering_configuration_output;

pub(crate) mod shape_get_bucket_inventory_configuration_output;

pub(crate) mod shape_get_bucket_metrics_configuration_output;

pub(crate) mod shape_get_bucket_ownership_controls_output;

pub(crate) mod shape_get_bucket_policy_output;

pub(crate) mod shape_get_bucket_policy_status_output;

pub(crate) mod shape_get_bucket_replication_output;

pub(crate) mod shape_get_object_acl_output;

pub(crate) mod shape_get_object_attributes_output;

pub(crate) mod shape_get_object_legal_hold_output;

pub(crate) mod shape_get_object_lock_configuration_output;

pub(crate) mod shape_get_object_output;

pub(crate) mod shape_get_object_retention_output;

pub(crate) mod shape_get_object_tagging_output;

pub(crate) mod shape_get_object_torrent_output;

pub(crate) mod shape_get_public_access_block_output;

pub(crate) mod shape_head_bucket_output;

pub(crate) mod shape_head_object_output;

pub(crate) mod shape_invalid_object_state;

pub(crate) mod shape_list_multipart_uploads_output;

pub(crate) mod shape_list_object_versions_output;

pub(crate) mod shape_list_objects_output;

pub(crate) mod shape_list_objects_v2_output;

pub(crate) mod shape_list_parts_output;

pub(crate) mod shape_no_such_bucket;

pub(crate) mod shape_no_such_key;

pub(crate) mod shape_no_such_upload;

pub(crate) mod shape_not_found;

pub(crate) mod shape_object_already_in_active_tier_error;

pub(crate) mod shape_object_not_in_active_tier_error;

pub(crate) mod shape_put_object_acl_output;

pub(crate) mod shape_put_object_legal_hold_output;

pub(crate) mod shape_put_object_lock_configuration_output;

pub(crate) mod shape_put_object_output;

pub(crate) mod shape_put_object_retention_output;

pub(crate) mod shape_put_object_tagging_output;

pub(crate) mod shape_restore_object_output;

pub(crate) mod shape_select_object_content_input;

pub(crate) mod shape_select_object_content_output;

pub(crate) mod shape_upload_part_copy_output;

pub(crate) mod shape_upload_part_output;

pub fn parse_event_stream_error_metadata(
    payload: &::bytes::Bytes,
) -> Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_xml::decode::XmlDecodeError> {
    crate::rest_xml_unwrapped_errors::parse_error_metadata(payload.as_ref())
}

pub(crate) mod shape_accelerate_configuration;

pub(crate) mod shape_access_control_policy;

pub(crate) mod shape_analytics_configuration;

pub(crate) mod shape_bucket_lifecycle_configuration;

pub(crate) mod shape_bucket_logging_status;

pub(crate) mod shape_buckets;

pub(crate) mod shape_checksum;

pub(crate) mod shape_common_prefix;

pub(crate) mod shape_completed_multipart_upload;

pub(crate) mod shape_cors_configuration;

pub(crate) mod shape_cors_rule;

pub(crate) mod shape_create_bucket_configuration;

pub(crate) mod shape_delete;

pub(crate) mod shape_delete_marker_entry;

pub(crate) mod shape_deleted_object;

pub(crate) mod shape_error;

pub(crate) mod shape_error_document;

pub(crate) mod shape_event_bridge_configuration;

pub(crate) mod shape_get_object_attributes_parts;

pub(crate) mod shape_grants;

pub(crate) mod shape_index_document;

pub(crate) mod shape_initiator;

pub(crate) mod shape_input_serialization;

pub(crate) mod shape_intelligent_tiering_configuration;

pub(crate) mod shape_inventory_configuration;

pub(crate) mod shape_lambda_function_configuration;

pub(crate) mod shape_lifecycle_rule;

pub(crate) mod shape_logging_enabled;

pub(crate) mod shape_metrics_configuration;

pub(crate) mod shape_multipart_upload;

pub(crate) mod shape_notification_configuration;

pub(crate) mod shape_object;

pub(crate) mod shape_object_lock_configuration;

pub(crate) mod shape_object_lock_legal_hold;

pub(crate) mod shape_object_lock_retention;

pub(crate) mod shape_object_version;

pub(crate) mod shape_output_serialization;

pub(crate) mod shape_owner;

pub(crate) mod shape_ownership_controls;

pub(crate) mod shape_part;

pub(crate) mod shape_public_access_block_configuration;

pub(crate) mod shape_queue_configuration;

pub(crate) mod shape_redirect_all_requests_to;

pub(crate) mod shape_replication_configuration;

pub(crate) mod shape_request_payment_configuration;

pub(crate) mod shape_request_progress;

pub(crate) mod shape_restore_request;

pub(crate) mod shape_routing_rules;

pub(crate) mod shape_scan_range;

pub(crate) mod shape_server_side_encryption_configuration;

pub(crate) mod shape_session_credentials;

pub(crate) mod shape_tag_set;

pub(crate) mod shape_tagging;

pub(crate) mod shape_topic_configuration;

pub(crate) mod shape_versioning_configuration;

pub(crate) mod shape_website_configuration;

pub(crate) mod shape_abort_incomplete_multipart_upload;

pub(crate) mod shape_analytics_filter;

pub(crate) mod shape_bucket;

pub(crate) mod shape_bucket_info;

pub(crate) mod shape_completed_part;

pub(crate) mod shape_copy_object_result;

pub(crate) mod shape_copy_part_result;

pub(crate) mod shape_csv_input;

pub(crate) mod shape_csv_output;

pub(crate) mod shape_glacier_job_parameters;

pub(crate) mod shape_grant;

pub(crate) mod shape_intelligent_tiering_filter;

pub(crate) mod shape_inventory_destination;

pub(crate) mod shape_inventory_filter;

pub(crate) mod shape_inventory_optional_fields;

pub(crate) mod shape_inventory_schedule;

pub(crate) mod shape_json_input;

pub(crate) mod shape_json_output;

pub(crate) mod shape_lifecycle_expiration;

pub(crate) mod shape_lifecycle_rule_filter;

pub(crate) mod shape_location_info;

pub(crate) mod shape_metrics_filter;

pub(crate) mod shape_noncurrent_version_expiration;

pub(crate) mod shape_noncurrent_version_transition;

pub(crate) mod shape_notification_configuration_filter;

pub(crate) mod shape_object_identifier;

pub(crate) mod shape_object_lock_rule;

pub(crate) mod shape_object_part;

pub(crate) mod shape_output_location;

pub(crate) mod shape_ownership_controls_rule;

pub(crate) mod shape_policy_status;

pub(crate) mod shape_progress_event;

pub(crate) mod shape_replication_rule;

pub(crate) mod shape_restore_status;

pub(crate) mod shape_routing_rule;

pub(crate) mod shape_select_parameters;

pub(crate) mod shape_server_side_encryption_rule;

pub(crate) mod shape_stats_event;

pub(crate) mod shape_storage_class_analysis;

pub(crate) mod shape_tag;

pub(crate) mod shape_target_grants;

pub(crate) mod shape_target_object_key_format;

pub(crate) mod shape_tiering;

pub(crate) mod shape_transition;

pub(crate) mod shape_analytics_and_operator;

pub(crate) mod shape_condition;

pub(crate) mod shape_default_retention;

pub(crate) mod shape_delete_marker_replication;

pub(crate) mod shape_destination;

pub(crate) mod shape_existing_object_replication;

pub(crate) mod shape_grantee;

pub(crate) mod shape_intelligent_tiering_and_operator;

pub(crate) mod shape_inventory_s3_bucket_destination;

pub(crate) mod shape_lifecycle_rule_and_operator;

pub(crate) mod shape_metrics_and_operator;

pub(crate) mod shape_partitioned_prefix;

pub(crate) mod shape_progress;

pub(crate) mod shape_redirect;

pub(crate) mod shape_replication_rule_filter;

pub(crate) mod shape_s3_key_filter;

pub(crate) mod shape_s3_location;

pub(crate) mod shape_server_side_encryption_by_default;

pub(crate) mod shape_simple_prefix;

pub(crate) mod shape_source_selection_criteria;

pub(crate) mod shape_stats;

pub(crate) mod shape_storage_class_analysis_data_export;

pub(crate) mod shape_target_grant;

pub(crate) mod shape_access_control_translation;

pub(crate) mod shape_analytics_export_destination;

pub(crate) mod shape_encryption;

pub(crate) mod shape_encryption_configuration;

pub(crate) mod shape_filter_rule;

pub(crate) mod shape_inventory_encryption;

pub(crate) mod shape_metadata_entry;

pub(crate) mod shape_metrics;

pub(crate) mod shape_replica_modifications;

pub(crate) mod shape_replication_rule_and_operator;

pub(crate) mod shape_replication_time;

pub(crate) mod shape_sse_kms_encrypted_objects;

pub(crate) mod shape_analytics_s3_bucket_destination;

pub(crate) mod shape_replication_time_value;

pub(crate) mod shape_ssekms;

pub(crate) mod shape_sses3;