1 // =================================================================
2 //
3 //                           * WARNING *
4 //
5 //                    This file is generated!
6 //
7 //  Changes made to this file will be overwritten. If changes are
8 //  required to the generated code, the service_crategen project
9 //  must be updated to generate the changes.
10 //
11 // =================================================================
12 
13 use std::error::Error;
14 use std::fmt;
15 
16 use async_trait::async_trait;
17 use rusoto_core::credential::ProvideAwsCredentials;
18 use rusoto_core::region;
19 use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20 use rusoto_core::{Client, RusotoError};
21 
22 use rusoto_core::param::{Params, ServiceParams};
23 use rusoto_core::proto::xml::error::*;
24 use rusoto_core::proto::xml::util::{
25     characters, deserialize_elements, end_element, find_start_element, peek_at_name, skip_tree,
26     start_element,
27 };
28 use rusoto_core::proto::xml::util::{Next, Peek, XmlParseError, XmlResponse};
29 use rusoto_core::signature::SignedRequest;
30 #[cfg(feature = "deserialize_structs")]
31 use serde::Deserialize;
32 #[cfg(feature = "serialize_structs")]
33 use serde::Serialize;
34 use std::io::Write;
35 use std::str::FromStr;
36 use xml;
37 use xml::reader::ParserConfig;
38 use xml::EventReader;
39 use xml::EventWriter;
40 
41 /// <p>Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config"> Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
42 #[derive(Default, Debug, Clone, PartialEq)]
43 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
44 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
45 pub struct AbortIncompleteMultipartUpload {
46     /// <p>Specifies the number of days after which Amazon S3 aborts an incomplete multipart upload.</p>
47     pub days_after_initiation: Option<i64>,
48 }
49 
50 #[allow(dead_code)]
51 struct AbortIncompleteMultipartUploadDeserializer;
52 impl AbortIncompleteMultipartUploadDeserializer {
53     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AbortIncompleteMultipartUpload, XmlParseError>54     fn deserialize<T: Peek + Next>(
55         tag_name: &str,
56         stack: &mut T,
57     ) -> Result<AbortIncompleteMultipartUpload, XmlParseError> {
58         deserialize_elements::<_, AbortIncompleteMultipartUpload, _>(
59             tag_name,
60             stack,
61             |name, stack, obj| {
62                 match name {
63                     "DaysAfterInitiation" => {
64                         obj.days_after_initiation =
65                             Some(DaysAfterInitiationDeserializer::deserialize(
66                                 "DaysAfterInitiation",
67                                 stack,
68                             )?);
69                     }
70                     _ => skip_tree(stack),
71                 }
72                 Ok(())
73             },
74         )
75     }
76 }
77 
78 pub struct AbortIncompleteMultipartUploadSerializer;
79 impl AbortIncompleteMultipartUploadSerializer {
80     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AbortIncompleteMultipartUpload, ) -> Result<(), xml::writer::Error> where W: Write,81     pub fn serialize<W>(
82         mut writer: &mut EventWriter<W>,
83         name: &str,
84         obj: &AbortIncompleteMultipartUpload,
85     ) -> Result<(), xml::writer::Error>
86     where
87         W: Write,
88     {
89         writer.write(xml::writer::XmlEvent::start_element(name))?;
90         if let Some(ref value) = obj.days_after_initiation {
91             writer.write(xml::writer::XmlEvent::start_element("DaysAfterInitiation"))?;
92             writer.write(xml::writer::XmlEvent::characters(&format!(
93                 "{value}",
94                 value = value
95             )));
96             writer.write(xml::writer::XmlEvent::end_element())?;
97         }
98         writer.write(xml::writer::XmlEvent::end_element())
99     }
100 }
101 
102 #[derive(Default, Debug, Clone, PartialEq)]
103 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
104 pub struct AbortMultipartUploadOutput {
105     pub request_charged: Option<String>,
106 }
107 
108 #[allow(dead_code)]
109 struct AbortMultipartUploadOutputDeserializer;
110 impl AbortMultipartUploadOutputDeserializer {
111     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AbortMultipartUploadOutput, XmlParseError>112     fn deserialize<T: Peek + Next>(
113         tag_name: &str,
114         stack: &mut T,
115     ) -> Result<AbortMultipartUploadOutput, XmlParseError> {
116         start_element(tag_name, stack)?;
117 
118         let obj = AbortMultipartUploadOutput::default();
119 
120         end_element(tag_name, stack)?;
121 
122         Ok(obj)
123     }
124 }
125 #[derive(Default, Debug, Clone, PartialEq)]
126 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
127 pub struct AbortMultipartUploadRequest {
128     /// <p>The bucket name to which the upload was taking place. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
129     pub bucket: String,
130     /// <p>Key of the object for which the multipart upload was initiated.</p>
131     pub key: String,
132     pub request_payer: Option<String>,
133     /// <p>Upload ID that identifies the multipart upload.</p>
134     pub upload_id: String,
135 }
136 
137 /// <p>Configures the transfer acceleration state for an Amazon S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html">Amazon S3 Transfer Acceleration</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
138 #[derive(Default, Debug, Clone, PartialEq)]
139 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
140 pub struct AccelerateConfiguration {
141     /// <p>Specifies the transfer acceleration status of the bucket.</p>
142     pub status: Option<String>,
143 }
144 
145 pub struct AccelerateConfigurationSerializer;
146 impl AccelerateConfigurationSerializer {
147     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AccelerateConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,148     pub fn serialize<W>(
149         mut writer: &mut EventWriter<W>,
150         name: &str,
151         obj: &AccelerateConfiguration,
152     ) -> Result<(), xml::writer::Error>
153     where
154         W: Write,
155     {
156         writer.write(xml::writer::XmlEvent::start_element(name))?;
157         if let Some(ref value) = obj.status {
158             writer.write(xml::writer::XmlEvent::start_element("Status"))?;
159             writer.write(xml::writer::XmlEvent::characters(&format!(
160                 "{value}",
161                 value = value
162             )));
163             writer.write(xml::writer::XmlEvent::end_element())?;
164         }
165         writer.write(xml::writer::XmlEvent::end_element())
166     }
167 }
168 
169 /// <p>Contains the elements that set the ACL permissions for an object per grantee.</p>
170 #[derive(Default, Debug, Clone, PartialEq)]
171 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
172 pub struct AccessControlPolicy {
173     /// <p>A list of grants.</p>
174     pub grants: Option<Vec<Grant>>,
175     /// <p>Container for the bucket owner's display name and ID.</p>
176     pub owner: Option<Owner>,
177 }
178 
179 pub struct AccessControlPolicySerializer;
180 impl AccessControlPolicySerializer {
181     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AccessControlPolicy, ) -> Result<(), xml::writer::Error> where W: Write,182     pub fn serialize<W>(
183         mut writer: &mut EventWriter<W>,
184         name: &str,
185         obj: &AccessControlPolicy,
186     ) -> Result<(), xml::writer::Error>
187     where
188         W: Write,
189     {
190         writer.write(xml::writer::XmlEvent::start_element(name))?;
191         if let Some(ref value) = obj.grants {
192             &GrantsSerializer::serialize(&mut writer, "AccessControlList", value)?;
193         }
194         if let Some(ref value) = obj.owner {
195             &OwnerSerializer::serialize(&mut writer, "Owner", value)?;
196         }
197         writer.write(xml::writer::XmlEvent::end_element())
198     }
199 }
200 
201 /// <p>A container for information about access control for replicas.</p>
202 #[derive(Default, Debug, Clone, PartialEq)]
203 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
204 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
205 pub struct AccessControlTranslation {
206     /// <p>Specifies the replica ownership. For default and valid values, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html">PUT bucket replication</a> in the <i>Amazon Simple Storage Service API Reference</i>.</p>
207     pub owner: String,
208 }
209 
210 #[allow(dead_code)]
211 struct AccessControlTranslationDeserializer;
212 impl AccessControlTranslationDeserializer {
213     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AccessControlTranslation, XmlParseError>214     fn deserialize<T: Peek + Next>(
215         tag_name: &str,
216         stack: &mut T,
217     ) -> Result<AccessControlTranslation, XmlParseError> {
218         deserialize_elements::<_, AccessControlTranslation, _>(
219             tag_name,
220             stack,
221             |name, stack, obj| {
222                 match name {
223                     "Owner" => {
224                         obj.owner = OwnerOverrideDeserializer::deserialize("Owner", stack)?;
225                     }
226                     _ => skip_tree(stack),
227                 }
228                 Ok(())
229             },
230         )
231     }
232 }
233 
234 pub struct AccessControlTranslationSerializer;
235 impl AccessControlTranslationSerializer {
236     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AccessControlTranslation, ) -> Result<(), xml::writer::Error> where W: Write,237     pub fn serialize<W>(
238         mut writer: &mut EventWriter<W>,
239         name: &str,
240         obj: &AccessControlTranslation,
241     ) -> Result<(), xml::writer::Error>
242     where
243         W: Write,
244     {
245         writer.write(xml::writer::XmlEvent::start_element(name))?;
246         writer.write(xml::writer::XmlEvent::start_element("Owner"))?;
247         writer.write(xml::writer::XmlEvent::characters(&format!(
248             "{value}",
249             value = obj.owner
250         )))?;
251         writer.write(xml::writer::XmlEvent::end_element())?;
252         writer.write(xml::writer::XmlEvent::end_element())
253     }
254 }
255 
256 #[allow(dead_code)]
257 struct AccountIdDeserializer;
258 impl AccountIdDeserializer {
259     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>260     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
261         start_element(tag_name, stack)?;
262         let obj = characters(stack)?;
263         end_element(tag_name, stack)?;
264 
265         Ok(obj)
266     }
267 }
268 
269 pub struct AccountIdSerializer;
270 impl AccountIdSerializer {
271     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,272     pub fn serialize<W>(
273         mut writer: &mut EventWriter<W>,
274         name: &str,
275         obj: &String,
276     ) -> Result<(), xml::writer::Error>
277     where
278         W: Write,
279     {
280         writer.write(xml::writer::XmlEvent::start_element(name))?;
281         writer.write(xml::writer::XmlEvent::characters(&format!(
282             "{value}",
283             value = obj.to_string()
284         )))?;
285         writer.write(xml::writer::XmlEvent::end_element())
286     }
287 }
288 
289 pub struct AllowQuotedRecordDelimiterSerializer;
290 impl AllowQuotedRecordDelimiterSerializer {
291     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,292     pub fn serialize<W>(
293         mut writer: &mut EventWriter<W>,
294         name: &str,
295         obj: &bool,
296     ) -> Result<(), xml::writer::Error>
297     where
298         W: Write,
299     {
300         writer.write(xml::writer::XmlEvent::start_element(name))?;
301         writer.write(xml::writer::XmlEvent::characters(&format!(
302             "{value}",
303             value = obj.to_string()
304         )))?;
305         writer.write(xml::writer::XmlEvent::end_element())
306     }
307 }
308 
309 #[allow(dead_code)]
310 struct AllowedHeaderDeserializer;
311 impl AllowedHeaderDeserializer {
312     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>313     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
314         start_element(tag_name, stack)?;
315         let obj = characters(stack)?;
316         end_element(tag_name, stack)?;
317 
318         Ok(obj)
319     }
320 }
321 
322 pub struct AllowedHeaderSerializer;
323 impl AllowedHeaderSerializer {
324     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,325     pub fn serialize<W>(
326         mut writer: &mut EventWriter<W>,
327         name: &str,
328         obj: &String,
329     ) -> Result<(), xml::writer::Error>
330     where
331         W: Write,
332     {
333         writer.write(xml::writer::XmlEvent::start_element(name))?;
334         writer.write(xml::writer::XmlEvent::characters(&format!(
335             "{value}",
336             value = obj.to_string()
337         )))?;
338         writer.write(xml::writer::XmlEvent::end_element())
339     }
340 }
341 
342 #[allow(dead_code)]
343 struct AllowedHeadersDeserializer;
344 impl AllowedHeadersDeserializer {
345     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<String>, XmlParseError>346     fn deserialize<T: Peek + Next>(
347         tag_name: &str,
348         stack: &mut T,
349     ) -> Result<Vec<String>, XmlParseError> {
350         let mut obj = vec![];
351 
352         loop {
353             let consume_next_tag = match stack.peek() {
354                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
355                     name.local_name == tag_name
356                 }
357                 _ => false,
358             };
359 
360             if consume_next_tag {
361                 obj.push(AllowedHeaderDeserializer::deserialize(tag_name, stack)?);
362             } else {
363                 break;
364             }
365         }
366 
367         Ok(obj)
368     }
369 }
370 
371 pub struct AllowedHeadersSerializer;
372 impl AllowedHeadersSerializer {
373     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<String>, ) -> Result<(), xml::writer::Error> where W: Write,374     pub fn serialize<W>(
375         mut writer: &mut EventWriter<W>,
376         name: &str,
377         obj: &Vec<String>,
378     ) -> Result<(), xml::writer::Error>
379     where
380         W: Write,
381     {
382         for element in obj {
383             AllowedHeaderSerializer::serialize(writer, name, element)?;
384         }
385         Ok(())
386     }
387 }
388 
389 #[allow(dead_code)]
390 struct AllowedMethodDeserializer;
391 impl AllowedMethodDeserializer {
392     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>393     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
394         start_element(tag_name, stack)?;
395         let obj = characters(stack)?;
396         end_element(tag_name, stack)?;
397 
398         Ok(obj)
399     }
400 }
401 
402 pub struct AllowedMethodSerializer;
403 impl AllowedMethodSerializer {
404     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,405     pub fn serialize<W>(
406         mut writer: &mut EventWriter<W>,
407         name: &str,
408         obj: &String,
409     ) -> Result<(), xml::writer::Error>
410     where
411         W: Write,
412     {
413         writer.write(xml::writer::XmlEvent::start_element(name))?;
414         writer.write(xml::writer::XmlEvent::characters(&format!(
415             "{value}",
416             value = obj.to_string()
417         )))?;
418         writer.write(xml::writer::XmlEvent::end_element())
419     }
420 }
421 
422 #[allow(dead_code)]
423 struct AllowedMethodsDeserializer;
424 impl AllowedMethodsDeserializer {
425     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<String>, XmlParseError>426     fn deserialize<T: Peek + Next>(
427         tag_name: &str,
428         stack: &mut T,
429     ) -> Result<Vec<String>, XmlParseError> {
430         let mut obj = vec![];
431 
432         loop {
433             let consume_next_tag = match stack.peek() {
434                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
435                     name.local_name == tag_name
436                 }
437                 _ => false,
438             };
439 
440             if consume_next_tag {
441                 obj.push(AllowedMethodDeserializer::deserialize(tag_name, stack)?);
442             } else {
443                 break;
444             }
445         }
446 
447         Ok(obj)
448     }
449 }
450 
451 pub struct AllowedMethodsSerializer;
452 impl AllowedMethodsSerializer {
453     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<String>, ) -> Result<(), xml::writer::Error> where W: Write,454     pub fn serialize<W>(
455         mut writer: &mut EventWriter<W>,
456         name: &str,
457         obj: &Vec<String>,
458     ) -> Result<(), xml::writer::Error>
459     where
460         W: Write,
461     {
462         for element in obj {
463             AllowedMethodSerializer::serialize(writer, name, element)?;
464         }
465         Ok(())
466     }
467 }
468 
469 #[allow(dead_code)]
470 struct AllowedOriginDeserializer;
471 impl AllowedOriginDeserializer {
472     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>473     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
474         start_element(tag_name, stack)?;
475         let obj = characters(stack)?;
476         end_element(tag_name, stack)?;
477 
478         Ok(obj)
479     }
480 }
481 
482 pub struct AllowedOriginSerializer;
483 impl AllowedOriginSerializer {
484     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,485     pub fn serialize<W>(
486         mut writer: &mut EventWriter<W>,
487         name: &str,
488         obj: &String,
489     ) -> Result<(), xml::writer::Error>
490     where
491         W: Write,
492     {
493         writer.write(xml::writer::XmlEvent::start_element(name))?;
494         writer.write(xml::writer::XmlEvent::characters(&format!(
495             "{value}",
496             value = obj.to_string()
497         )))?;
498         writer.write(xml::writer::XmlEvent::end_element())
499     }
500 }
501 
502 #[allow(dead_code)]
503 struct AllowedOriginsDeserializer;
504 impl AllowedOriginsDeserializer {
505     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<String>, XmlParseError>506     fn deserialize<T: Peek + Next>(
507         tag_name: &str,
508         stack: &mut T,
509     ) -> Result<Vec<String>, XmlParseError> {
510         let mut obj = vec![];
511 
512         loop {
513             let consume_next_tag = match stack.peek() {
514                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
515                     name.local_name == tag_name
516                 }
517                 _ => false,
518             };
519 
520             if consume_next_tag {
521                 obj.push(AllowedOriginDeserializer::deserialize(tag_name, stack)?);
522             } else {
523                 break;
524             }
525         }
526 
527         Ok(obj)
528     }
529 }
530 
531 pub struct AllowedOriginsSerializer;
532 impl AllowedOriginsSerializer {
533     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<String>, ) -> Result<(), xml::writer::Error> where W: Write,534     pub fn serialize<W>(
535         mut writer: &mut EventWriter<W>,
536         name: &str,
537         obj: &Vec<String>,
538     ) -> Result<(), xml::writer::Error>
539     where
540         W: Write,
541     {
542         for element in obj {
543             AllowedOriginSerializer::serialize(writer, name, element)?;
544         }
545         Ok(())
546     }
547 }
548 
549 /// <p>A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. The operator must have at least two predicates in any combination, and an object must match all of the predicates for the filter to apply.</p>
550 #[derive(Default, Debug, Clone, PartialEq)]
551 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
552 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
553 pub struct AnalyticsAndOperator {
554     /// <p>The prefix to use when evaluating an AND predicate: The prefix that an object must have to be included in the metrics results.</p>
555     pub prefix: Option<String>,
556     /// <p>The list of tags to use when evaluating an AND predicate.</p>
557     pub tags: Option<Vec<Tag>>,
558 }
559 
560 #[allow(dead_code)]
561 struct AnalyticsAndOperatorDeserializer;
562 impl AnalyticsAndOperatorDeserializer {
563     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AnalyticsAndOperator, XmlParseError>564     fn deserialize<T: Peek + Next>(
565         tag_name: &str,
566         stack: &mut T,
567     ) -> Result<AnalyticsAndOperator, XmlParseError> {
568         deserialize_elements::<_, AnalyticsAndOperator, _>(tag_name, stack, |name, stack, obj| {
569             match name {
570                 "Prefix" => {
571                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
572                 }
573                 "Tag" => {
574                     obj.tags
575                         .get_or_insert(vec![])
576                         .extend(TagSetDeserializer::deserialize("Tag", stack)?);
577                 }
578                 _ => skip_tree(stack),
579             }
580             Ok(())
581         })
582     }
583 }
584 
585 pub struct AnalyticsAndOperatorSerializer;
586 impl AnalyticsAndOperatorSerializer {
587     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AnalyticsAndOperator, ) -> Result<(), xml::writer::Error> where W: Write,588     pub fn serialize<W>(
589         mut writer: &mut EventWriter<W>,
590         name: &str,
591         obj: &AnalyticsAndOperator,
592     ) -> Result<(), xml::writer::Error>
593     where
594         W: Write,
595     {
596         writer.write(xml::writer::XmlEvent::start_element(name))?;
597         if let Some(ref value) = obj.prefix {
598             writer.write(xml::writer::XmlEvent::start_element("Prefix"))?;
599             writer.write(xml::writer::XmlEvent::characters(&format!(
600                 "{value}",
601                 value = value
602             )));
603             writer.write(xml::writer::XmlEvent::end_element())?;
604         }
605         if let Some(ref value) = obj.tags {
606             &TagSetSerializer::serialize(&mut writer, "Tag", value)?;
607         }
608         writer.write(xml::writer::XmlEvent::end_element())
609     }
610 }
611 
612 /// <p> Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.</p>
613 #[derive(Default, Debug, Clone, PartialEq)]
614 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
615 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
616 pub struct AnalyticsConfiguration {
617     /// <p>The filter used to describe a set of objects for analyses. A filter must have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, all objects will be considered in any analysis.</p>
618     pub filter: Option<AnalyticsFilter>,
619     /// <p>The ID that identifies the analytics configuration.</p>
620     pub id: String,
621     /// <p> Contains data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes. </p>
622     pub storage_class_analysis: StorageClassAnalysis,
623 }
624 
625 #[allow(dead_code)]
626 struct AnalyticsConfigurationDeserializer;
627 impl AnalyticsConfigurationDeserializer {
628     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AnalyticsConfiguration, XmlParseError>629     fn deserialize<T: Peek + Next>(
630         tag_name: &str,
631         stack: &mut T,
632     ) -> Result<AnalyticsConfiguration, XmlParseError> {
633         deserialize_elements::<_, AnalyticsConfiguration, _>(tag_name, stack, |name, stack, obj| {
634             match name {
635                 "Filter" => {
636                     obj.filter = Some(AnalyticsFilterDeserializer::deserialize("Filter", stack)?);
637                 }
638                 "Id" => {
639                     obj.id = AnalyticsIdDeserializer::deserialize("Id", stack)?;
640                 }
641                 "StorageClassAnalysis" => {
642                     obj.storage_class_analysis = StorageClassAnalysisDeserializer::deserialize(
643                         "StorageClassAnalysis",
644                         stack,
645                     )?;
646                 }
647                 _ => skip_tree(stack),
648             }
649             Ok(())
650         })
651     }
652 }
653 
654 pub struct AnalyticsConfigurationSerializer;
655 impl AnalyticsConfigurationSerializer {
656     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AnalyticsConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,657     pub fn serialize<W>(
658         mut writer: &mut EventWriter<W>,
659         name: &str,
660         obj: &AnalyticsConfiguration,
661     ) -> Result<(), xml::writer::Error>
662     where
663         W: Write,
664     {
665         writer.write(xml::writer::XmlEvent::start_element(name))?;
666         if let Some(ref value) = obj.filter {
667             &AnalyticsFilterSerializer::serialize(&mut writer, "Filter", value)?;
668         }
669         writer.write(xml::writer::XmlEvent::start_element("Id"))?;
670         writer.write(xml::writer::XmlEvent::characters(&format!(
671             "{value}",
672             value = obj.id
673         )))?;
674         writer.write(xml::writer::XmlEvent::end_element())?;
675         StorageClassAnalysisSerializer::serialize(
676             &mut writer,
677             "StorageClassAnalysis",
678             &obj.storage_class_analysis,
679         )?;
680         writer.write(xml::writer::XmlEvent::end_element())
681     }
682 }
683 
684 #[allow(dead_code)]
685 struct AnalyticsConfigurationListDeserializer;
686 impl AnalyticsConfigurationListDeserializer {
687     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<AnalyticsConfiguration>, XmlParseError>688     fn deserialize<T: Peek + Next>(
689         tag_name: &str,
690         stack: &mut T,
691     ) -> Result<Vec<AnalyticsConfiguration>, XmlParseError> {
692         let mut obj = vec![];
693 
694         loop {
695             let consume_next_tag = match stack.peek() {
696                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
697                     name.local_name == tag_name
698                 }
699                 _ => false,
700             };
701 
702             if consume_next_tag {
703                 obj.push(AnalyticsConfigurationDeserializer::deserialize(
704                     tag_name, stack,
705                 )?);
706             } else {
707                 break;
708             }
709         }
710 
711         Ok(obj)
712     }
713 }
714 /// <p>Where to publish the analytics results.</p>
715 #[derive(Default, Debug, Clone, PartialEq)]
716 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
717 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
718 pub struct AnalyticsExportDestination {
719     /// <p>A destination signifying output to an S3 bucket.</p>
720     pub s3_bucket_destination: AnalyticsS3BucketDestination,
721 }
722 
723 #[allow(dead_code)]
724 struct AnalyticsExportDestinationDeserializer;
725 impl AnalyticsExportDestinationDeserializer {
726     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AnalyticsExportDestination, XmlParseError>727     fn deserialize<T: Peek + Next>(
728         tag_name: &str,
729         stack: &mut T,
730     ) -> Result<AnalyticsExportDestination, XmlParseError> {
731         deserialize_elements::<_, AnalyticsExportDestination, _>(
732             tag_name,
733             stack,
734             |name, stack, obj| {
735                 match name {
736                     "S3BucketDestination" => {
737                         obj.s3_bucket_destination =
738                             AnalyticsS3BucketDestinationDeserializer::deserialize(
739                                 "S3BucketDestination",
740                                 stack,
741                             )?;
742                     }
743                     _ => skip_tree(stack),
744                 }
745                 Ok(())
746             },
747         )
748     }
749 }
750 
751 pub struct AnalyticsExportDestinationSerializer;
752 impl AnalyticsExportDestinationSerializer {
753     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AnalyticsExportDestination, ) -> Result<(), xml::writer::Error> where W: Write,754     pub fn serialize<W>(
755         mut writer: &mut EventWriter<W>,
756         name: &str,
757         obj: &AnalyticsExportDestination,
758     ) -> Result<(), xml::writer::Error>
759     where
760         W: Write,
761     {
762         writer.write(xml::writer::XmlEvent::start_element(name))?;
763         AnalyticsS3BucketDestinationSerializer::serialize(
764             &mut writer,
765             "S3BucketDestination",
766             &obj.s3_bucket_destination,
767         )?;
768         writer.write(xml::writer::XmlEvent::end_element())
769     }
770 }
771 
772 /// <p>The filter used to describe a set of objects for analyses. A filter must have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, all objects will be considered in any analysis.</p>
773 #[derive(Default, Debug, Clone, PartialEq)]
774 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
775 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
776 pub struct AnalyticsFilter {
777     /// <p>A conjunction (logical AND) of predicates, which is used in evaluating an analytics filter. The operator must have at least two predicates.</p>
778     pub and: Option<AnalyticsAndOperator>,
779     /// <p>The prefix to use when evaluating an analytics filter.</p>
780     pub prefix: Option<String>,
781     /// <p>The tag to use when evaluating an analytics filter.</p>
782     pub tag: Option<Tag>,
783 }
784 
785 #[allow(dead_code)]
786 struct AnalyticsFilterDeserializer;
787 impl AnalyticsFilterDeserializer {
788     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AnalyticsFilter, XmlParseError>789     fn deserialize<T: Peek + Next>(
790         tag_name: &str,
791         stack: &mut T,
792     ) -> Result<AnalyticsFilter, XmlParseError> {
793         deserialize_elements::<_, AnalyticsFilter, _>(tag_name, stack, |name, stack, obj| {
794             match name {
795                 "And" => {
796                     obj.and = Some(AnalyticsAndOperatorDeserializer::deserialize("And", stack)?);
797                 }
798                 "Prefix" => {
799                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
800                 }
801                 "Tag" => {
802                     obj.tag = Some(TagDeserializer::deserialize("Tag", stack)?);
803                 }
804                 _ => skip_tree(stack),
805             }
806             Ok(())
807         })
808     }
809 }
810 
811 pub struct AnalyticsFilterSerializer;
812 impl AnalyticsFilterSerializer {
813     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AnalyticsFilter, ) -> Result<(), xml::writer::Error> where W: Write,814     pub fn serialize<W>(
815         mut writer: &mut EventWriter<W>,
816         name: &str,
817         obj: &AnalyticsFilter,
818     ) -> Result<(), xml::writer::Error>
819     where
820         W: Write,
821     {
822         writer.write(xml::writer::XmlEvent::start_element(name))?;
823         if let Some(ref value) = obj.and {
824             &AnalyticsAndOperatorSerializer::serialize(&mut writer, "And", value)?;
825         }
826         if let Some(ref value) = obj.prefix {
827             writer.write(xml::writer::XmlEvent::start_element("Prefix"))?;
828             writer.write(xml::writer::XmlEvent::characters(&format!(
829                 "{value}",
830                 value = value
831             )));
832             writer.write(xml::writer::XmlEvent::end_element())?;
833         }
834         if let Some(ref value) = obj.tag {
835             &TagSerializer::serialize(&mut writer, "Tag", value)?;
836         }
837         writer.write(xml::writer::XmlEvent::end_element())
838     }
839 }
840 
841 #[allow(dead_code)]
842 struct AnalyticsIdDeserializer;
843 impl AnalyticsIdDeserializer {
844     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>845     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
846         start_element(tag_name, stack)?;
847         let obj = characters(stack)?;
848         end_element(tag_name, stack)?;
849 
850         Ok(obj)
851     }
852 }
853 
854 pub struct AnalyticsIdSerializer;
855 impl AnalyticsIdSerializer {
856     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,857     pub fn serialize<W>(
858         mut writer: &mut EventWriter<W>,
859         name: &str,
860         obj: &String,
861     ) -> Result<(), xml::writer::Error>
862     where
863         W: Write,
864     {
865         writer.write(xml::writer::XmlEvent::start_element(name))?;
866         writer.write(xml::writer::XmlEvent::characters(&format!(
867             "{value}",
868             value = obj.to_string()
869         )))?;
870         writer.write(xml::writer::XmlEvent::end_element())
871     }
872 }
873 
874 /// <p>Contains information about where to publish the analytics results.</p>
875 #[derive(Default, Debug, Clone, PartialEq)]
876 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
877 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
878 pub struct AnalyticsS3BucketDestination {
879     /// <p>The Amazon Resource Name (ARN) of the bucket to which data is exported.</p>
880     pub bucket: String,
881     /// <p>The account ID that owns the destination bucket. If no account ID is provided, the owner will not be validated prior to exporting data.</p>
882     pub bucket_account_id: Option<String>,
883     /// <p>Specifies the file format used when exporting data to Amazon S3.</p>
884     pub format: String,
885     /// <p>The prefix to use when exporting data. The prefix is prepended to all results.</p>
886     pub prefix: Option<String>,
887 }
888 
889 #[allow(dead_code)]
890 struct AnalyticsS3BucketDestinationDeserializer;
891 impl AnalyticsS3BucketDestinationDeserializer {
892     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AnalyticsS3BucketDestination, XmlParseError>893     fn deserialize<T: Peek + Next>(
894         tag_name: &str,
895         stack: &mut T,
896     ) -> Result<AnalyticsS3BucketDestination, XmlParseError> {
897         deserialize_elements::<_, AnalyticsS3BucketDestination, _>(
898             tag_name,
899             stack,
900             |name, stack, obj| {
901                 match name {
902                     "Bucket" => {
903                         obj.bucket = BucketNameDeserializer::deserialize("Bucket", stack)?;
904                     }
905                     "BucketAccountId" => {
906                         obj.bucket_account_id = Some(AccountIdDeserializer::deserialize(
907                             "BucketAccountId",
908                             stack,
909                         )?);
910                     }
911                     "Format" => {
912                         obj.format =
913                             AnalyticsS3ExportFileFormatDeserializer::deserialize("Format", stack)?;
914                     }
915                     "Prefix" => {
916                         obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
917                     }
918                     _ => skip_tree(stack),
919                 }
920                 Ok(())
921             },
922         )
923     }
924 }
925 
926 pub struct AnalyticsS3BucketDestinationSerializer;
927 impl AnalyticsS3BucketDestinationSerializer {
928     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AnalyticsS3BucketDestination, ) -> Result<(), xml::writer::Error> where W: Write,929     pub fn serialize<W>(
930         mut writer: &mut EventWriter<W>,
931         name: &str,
932         obj: &AnalyticsS3BucketDestination,
933     ) -> Result<(), xml::writer::Error>
934     where
935         W: Write,
936     {
937         writer.write(xml::writer::XmlEvent::start_element(name))?;
938         writer.write(xml::writer::XmlEvent::start_element("Bucket"))?;
939         writer.write(xml::writer::XmlEvent::characters(&format!(
940             "{value}",
941             value = obj.bucket
942         )))?;
943         writer.write(xml::writer::XmlEvent::end_element())?;
944         if let Some(ref value) = obj.bucket_account_id {
945             writer.write(xml::writer::XmlEvent::start_element("BucketAccountId"))?;
946             writer.write(xml::writer::XmlEvent::characters(&format!(
947                 "{value}",
948                 value = value
949             )));
950             writer.write(xml::writer::XmlEvent::end_element())?;
951         }
952         writer.write(xml::writer::XmlEvent::start_element("Format"))?;
953         writer.write(xml::writer::XmlEvent::characters(&format!(
954             "{value}",
955             value = obj.format
956         )))?;
957         writer.write(xml::writer::XmlEvent::end_element())?;
958         if let Some(ref value) = obj.prefix {
959             writer.write(xml::writer::XmlEvent::start_element("Prefix"))?;
960             writer.write(xml::writer::XmlEvent::characters(&format!(
961                 "{value}",
962                 value = value
963             )));
964             writer.write(xml::writer::XmlEvent::end_element())?;
965         }
966         writer.write(xml::writer::XmlEvent::end_element())
967     }
968 }
969 
970 #[allow(dead_code)]
971 struct AnalyticsS3ExportFileFormatDeserializer;
972 impl AnalyticsS3ExportFileFormatDeserializer {
973     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>974     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
975         start_element(tag_name, stack)?;
976         let obj = characters(stack)?;
977         end_element(tag_name, stack)?;
978 
979         Ok(obj)
980     }
981 }
982 
983 pub struct AnalyticsS3ExportFileFormatSerializer;
984 impl AnalyticsS3ExportFileFormatSerializer {
985     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,986     pub fn serialize<W>(
987         mut writer: &mut EventWriter<W>,
988         name: &str,
989         obj: &String,
990     ) -> Result<(), xml::writer::Error>
991     where
992         W: Write,
993     {
994         writer.write(xml::writer::XmlEvent::start_element(name))?;
995         writer.write(xml::writer::XmlEvent::characters(&format!(
996             "{value}",
997             value = obj.to_string()
998         )))?;
999         writer.write(xml::writer::XmlEvent::end_element())
1000     }
1001 }
1002 
1003 pub type StreamingBody = ::rusoto_core::ByteStream;
1004 #[allow(dead_code)]
1005 struct BodyDeserializer;
1006 impl BodyDeserializer {
1007     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<bytes::Bytes, XmlParseError>1008     fn deserialize<T: Peek + Next>(
1009         tag_name: &str,
1010         stack: &mut T,
1011     ) -> Result<bytes::Bytes, XmlParseError> {
1012         start_element(tag_name, stack)?;
1013         let obj = characters(stack)?.into();
1014         end_element(tag_name, stack)?;
1015 
1016         Ok(obj)
1017     }
1018 }
1019 
1020 pub struct BodySerializer;
1021 impl BodySerializer {
1022     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bytes::Bytes, ) -> Result<(), xml::writer::Error> where W: Write,1023     pub fn serialize<W>(
1024         mut writer: &mut EventWriter<W>,
1025         name: &str,
1026         obj: &bytes::Bytes,
1027     ) -> Result<(), xml::writer::Error>
1028     where
1029         W: Write,
1030     {
1031         writer.write(xml::writer::XmlEvent::start_element(name))?;
1032         writer.write(xml::writer::XmlEvent::characters(&format!(
1033             "{value}",
1034             value = String::from_utf8(obj.to_vec()).expect("Not a UTF-8 string")
1035         )))?;
1036         writer.write(xml::writer::XmlEvent::end_element())
1037     }
1038 }
1039 
1040 /// <p> In terms of implementation, a Bucket is a resource. An Amazon S3 bucket name is globally unique, and the namespace is shared by all AWS accounts. </p>
1041 #[derive(Default, Debug, Clone, PartialEq)]
1042 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1043 pub struct Bucket {
1044     /// <p>Date the bucket was created.</p>
1045     pub creation_date: Option<String>,
1046     /// <p>The name of the bucket.</p>
1047     pub name: Option<String>,
1048 }
1049 
1050 #[allow(dead_code)]
1051 struct BucketDeserializer;
1052 impl BucketDeserializer {
1053     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Bucket, XmlParseError>1054     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Bucket, XmlParseError> {
1055         deserialize_elements::<_, Bucket, _>(tag_name, stack, |name, stack, obj| {
1056             match name {
1057                 "CreationDate" => {
1058                     obj.creation_date = Some(CreationDateDeserializer::deserialize(
1059                         "CreationDate",
1060                         stack,
1061                     )?);
1062                 }
1063                 "Name" => {
1064                     obj.name = Some(BucketNameDeserializer::deserialize("Name", stack)?);
1065                 }
1066                 _ => skip_tree(stack),
1067             }
1068             Ok(())
1069         })
1070     }
1071 }
1072 #[allow(dead_code)]
1073 struct BucketAccelerateStatusDeserializer;
1074 impl BucketAccelerateStatusDeserializer {
1075     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1076     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1077         start_element(tag_name, stack)?;
1078         let obj = characters(stack)?;
1079         end_element(tag_name, stack)?;
1080 
1081         Ok(obj)
1082     }
1083 }
1084 
1085 pub struct BucketAccelerateStatusSerializer;
1086 impl BucketAccelerateStatusSerializer {
1087     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1088     pub fn serialize<W>(
1089         mut writer: &mut EventWriter<W>,
1090         name: &str,
1091         obj: &String,
1092     ) -> Result<(), xml::writer::Error>
1093     where
1094         W: Write,
1095     {
1096         writer.write(xml::writer::XmlEvent::start_element(name))?;
1097         writer.write(xml::writer::XmlEvent::characters(&format!(
1098             "{value}",
1099             value = obj.to_string()
1100         )))?;
1101         writer.write(xml::writer::XmlEvent::end_element())
1102     }
1103 }
1104 
1105 /// <p>Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html">Object Lifecycle Management</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
1106 #[derive(Default, Debug, Clone, PartialEq)]
1107 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1108 pub struct BucketLifecycleConfiguration {
1109     /// <p>A lifecycle rule for individual objects in an Amazon S3 bucket.</p>
1110     pub rules: Vec<LifecycleRule>,
1111 }
1112 
1113 pub struct BucketLifecycleConfigurationSerializer;
1114 impl BucketLifecycleConfigurationSerializer {
1115     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &BucketLifecycleConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,1116     pub fn serialize<W>(
1117         mut writer: &mut EventWriter<W>,
1118         name: &str,
1119         obj: &BucketLifecycleConfiguration,
1120     ) -> Result<(), xml::writer::Error>
1121     where
1122         W: Write,
1123     {
1124         writer.write(xml::writer::XmlEvent::start_element(name))?;
1125         LifecycleRulesSerializer::serialize(&mut writer, "Rule", &obj.rules)?;
1126         writer.write(xml::writer::XmlEvent::end_element())
1127     }
1128 }
1129 
1130 #[allow(dead_code)]
1131 struct BucketLocationConstraintDeserializer;
1132 impl BucketLocationConstraintDeserializer {
1133     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1134     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1135         start_element(tag_name, stack)?;
1136         let obj = characters(stack)?;
1137         end_element(tag_name, stack)?;
1138 
1139         Ok(obj)
1140     }
1141 }
1142 
1143 pub struct BucketLocationConstraintSerializer;
1144 impl BucketLocationConstraintSerializer {
1145     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1146     pub fn serialize<W>(
1147         mut writer: &mut EventWriter<W>,
1148         name: &str,
1149         obj: &String,
1150     ) -> Result<(), xml::writer::Error>
1151     where
1152         W: Write,
1153     {
1154         writer.write(xml::writer::XmlEvent::start_element(name))?;
1155         writer.write(xml::writer::XmlEvent::characters(&format!(
1156             "{value}",
1157             value = obj.to_string()
1158         )))?;
1159         writer.write(xml::writer::XmlEvent::end_element())
1160     }
1161 }
1162 
1163 /// <p>Container for logging status information.</p>
1164 #[derive(Default, Debug, Clone, PartialEq)]
1165 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1166 pub struct BucketLoggingStatus {
1167     pub logging_enabled: Option<LoggingEnabled>,
1168 }
1169 
1170 pub struct BucketLoggingStatusSerializer;
1171 impl BucketLoggingStatusSerializer {
1172     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &BucketLoggingStatus, ) -> Result<(), xml::writer::Error> where W: Write,1173     pub fn serialize<W>(
1174         mut writer: &mut EventWriter<W>,
1175         name: &str,
1176         obj: &BucketLoggingStatus,
1177     ) -> Result<(), xml::writer::Error>
1178     where
1179         W: Write,
1180     {
1181         writer.write(xml::writer::XmlEvent::start_element(name))?;
1182         if let Some(ref value) = obj.logging_enabled {
1183             &LoggingEnabledSerializer::serialize(&mut writer, "LoggingEnabled", value)?;
1184         }
1185         writer.write(xml::writer::XmlEvent::end_element())
1186     }
1187 }
1188 
1189 #[allow(dead_code)]
1190 struct BucketLogsPermissionDeserializer;
1191 impl BucketLogsPermissionDeserializer {
1192     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1193     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1194         start_element(tag_name, stack)?;
1195         let obj = characters(stack)?;
1196         end_element(tag_name, stack)?;
1197 
1198         Ok(obj)
1199     }
1200 }
1201 
1202 pub struct BucketLogsPermissionSerializer;
1203 impl BucketLogsPermissionSerializer {
1204     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1205     pub fn serialize<W>(
1206         mut writer: &mut EventWriter<W>,
1207         name: &str,
1208         obj: &String,
1209     ) -> Result<(), xml::writer::Error>
1210     where
1211         W: Write,
1212     {
1213         writer.write(xml::writer::XmlEvent::start_element(name))?;
1214         writer.write(xml::writer::XmlEvent::characters(&format!(
1215             "{value}",
1216             value = obj.to_string()
1217         )))?;
1218         writer.write(xml::writer::XmlEvent::end_element())
1219     }
1220 }
1221 
1222 #[allow(dead_code)]
1223 struct BucketNameDeserializer;
1224 impl BucketNameDeserializer {
1225     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1226     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1227         start_element(tag_name, stack)?;
1228         let obj = characters(stack)?;
1229         end_element(tag_name, stack)?;
1230 
1231         Ok(obj)
1232     }
1233 }
1234 
1235 pub struct BucketNameSerializer;
1236 impl BucketNameSerializer {
1237     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1238     pub fn serialize<W>(
1239         mut writer: &mut EventWriter<W>,
1240         name: &str,
1241         obj: &String,
1242     ) -> Result<(), xml::writer::Error>
1243     where
1244         W: Write,
1245     {
1246         writer.write(xml::writer::XmlEvent::start_element(name))?;
1247         writer.write(xml::writer::XmlEvent::characters(&format!(
1248             "{value}",
1249             value = obj.to_string()
1250         )))?;
1251         writer.write(xml::writer::XmlEvent::end_element())
1252     }
1253 }
1254 
1255 #[allow(dead_code)]
1256 struct BucketVersioningStatusDeserializer;
1257 impl BucketVersioningStatusDeserializer {
1258     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1259     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1260         start_element(tag_name, stack)?;
1261         let obj = characters(stack)?;
1262         end_element(tag_name, stack)?;
1263 
1264         Ok(obj)
1265     }
1266 }
1267 
1268 pub struct BucketVersioningStatusSerializer;
1269 impl BucketVersioningStatusSerializer {
1270     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1271     pub fn serialize<W>(
1272         mut writer: &mut EventWriter<W>,
1273         name: &str,
1274         obj: &String,
1275     ) -> Result<(), xml::writer::Error>
1276     where
1277         W: Write,
1278     {
1279         writer.write(xml::writer::XmlEvent::start_element(name))?;
1280         writer.write(xml::writer::XmlEvent::characters(&format!(
1281             "{value}",
1282             value = obj.to_string()
1283         )))?;
1284         writer.write(xml::writer::XmlEvent::end_element())
1285     }
1286 }
1287 
1288 #[allow(dead_code)]
1289 struct BucketsDeserializer;
1290 impl BucketsDeserializer {
1291     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Bucket>, XmlParseError>1292     fn deserialize<T: Peek + Next>(
1293         tag_name: &str,
1294         stack: &mut T,
1295     ) -> Result<Vec<Bucket>, XmlParseError> {
1296         deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
1297             if name == "Bucket" {
1298                 obj.push(BucketDeserializer::deserialize("Bucket", stack)?);
1299             } else {
1300                 skip_tree(stack);
1301             }
1302             Ok(())
1303         })
1304     }
1305 }
1306 #[allow(dead_code)]
1307 struct BytesProcessedDeserializer;
1308 impl BytesProcessedDeserializer {
1309     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>1310     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
1311         start_element(tag_name, stack)?;
1312         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
1313         end_element(tag_name, stack)?;
1314 
1315         Ok(obj)
1316     }
1317 }
1318 #[allow(dead_code)]
1319 struct BytesReturnedDeserializer;
1320 impl BytesReturnedDeserializer {
1321     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>1322     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
1323         start_element(tag_name, stack)?;
1324         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
1325         end_element(tag_name, stack)?;
1326 
1327         Ok(obj)
1328     }
1329 }
1330 #[allow(dead_code)]
1331 struct BytesScannedDeserializer;
1332 impl BytesScannedDeserializer {
1333     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>1334     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
1335         start_element(tag_name, stack)?;
1336         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
1337         end_element(tag_name, stack)?;
1338 
1339         Ok(obj)
1340     }
1341 }
1342 /// <p>Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html">Enabling Cross-Origin Resource Sharing</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
1343 #[derive(Default, Debug, Clone, PartialEq)]
1344 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1345 pub struct CORSConfiguration {
1346     /// <p>A set of origins and methods (cross-origin access that you want to allow). You can add up to 100 rules to the configuration.</p>
1347     pub cors_rules: Vec<CORSRule>,
1348 }
1349 
1350 pub struct CORSConfigurationSerializer;
1351 impl CORSConfigurationSerializer {
1352     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CORSConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,1353     pub fn serialize<W>(
1354         mut writer: &mut EventWriter<W>,
1355         name: &str,
1356         obj: &CORSConfiguration,
1357     ) -> Result<(), xml::writer::Error>
1358     where
1359         W: Write,
1360     {
1361         writer.write(xml::writer::XmlEvent::start_element(name))?;
1362         CORSRulesSerializer::serialize(&mut writer, "CORSRule", &obj.cors_rules)?;
1363         writer.write(xml::writer::XmlEvent::end_element())
1364     }
1365 }
1366 
1367 /// <p>Specifies a cross-origin access rule for an Amazon S3 bucket.</p>
1368 #[derive(Default, Debug, Clone, PartialEq)]
1369 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1370 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1371 pub struct CORSRule {
1372     /// <p>Headers that are specified in the <code>Access-Control-Request-Headers</code> header. These headers are allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, Amazon S3 returns any requested headers that are allowed.</p>
1373     pub allowed_headers: Option<Vec<String>>,
1374     /// <p>An HTTP method that you allow the origin to execute. Valid values are <code>GET</code>, <code>PUT</code>, <code>HEAD</code>, <code>POST</code>, and <code>DELETE</code>.</p>
1375     pub allowed_methods: Vec<String>,
1376     /// <p>One or more origins you want customers to be able to access the bucket from.</p>
1377     pub allowed_origins: Vec<String>,
1378     /// <p>One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript <code>XMLHttpRequest</code> object).</p>
1379     pub expose_headers: Option<Vec<String>>,
1380     /// <p>The time in seconds that your browser is to cache the preflight response for the specified resource.</p>
1381     pub max_age_seconds: Option<i64>,
1382 }
1383 
1384 #[allow(dead_code)]
1385 struct CORSRuleDeserializer;
1386 impl CORSRuleDeserializer {
1387     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CORSRule, XmlParseError>1388     fn deserialize<T: Peek + Next>(
1389         tag_name: &str,
1390         stack: &mut T,
1391     ) -> Result<CORSRule, XmlParseError> {
1392         deserialize_elements::<_, CORSRule, _>(tag_name, stack, |name, stack, obj| {
1393             match name {
1394                 "AllowedHeader" => {
1395                     obj.allowed_headers.get_or_insert(vec![]).extend(
1396                         AllowedHeadersDeserializer::deserialize("AllowedHeader", stack)?,
1397                     );
1398                 }
1399                 "AllowedMethod" => {
1400                     obj.allowed_methods
1401                         .extend(AllowedMethodsDeserializer::deserialize(
1402                             "AllowedMethod",
1403                             stack,
1404                         )?);
1405                 }
1406                 "AllowedOrigin" => {
1407                     obj.allowed_origins
1408                         .extend(AllowedOriginsDeserializer::deserialize(
1409                             "AllowedOrigin",
1410                             stack,
1411                         )?);
1412                 }
1413                 "ExposeHeader" => {
1414                     obj.expose_headers.get_or_insert(vec![]).extend(
1415                         ExposeHeadersDeserializer::deserialize("ExposeHeader", stack)?,
1416                     );
1417                 }
1418                 "MaxAgeSeconds" => {
1419                     obj.max_age_seconds = Some(MaxAgeSecondsDeserializer::deserialize(
1420                         "MaxAgeSeconds",
1421                         stack,
1422                     )?);
1423                 }
1424                 _ => skip_tree(stack),
1425             }
1426             Ok(())
1427         })
1428     }
1429 }
1430 
1431 pub struct CORSRuleSerializer;
1432 impl CORSRuleSerializer {
1433     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CORSRule, ) -> Result<(), xml::writer::Error> where W: Write,1434     pub fn serialize<W>(
1435         mut writer: &mut EventWriter<W>,
1436         name: &str,
1437         obj: &CORSRule,
1438     ) -> Result<(), xml::writer::Error>
1439     where
1440         W: Write,
1441     {
1442         writer.write(xml::writer::XmlEvent::start_element(name))?;
1443         if let Some(ref value) = obj.allowed_headers {
1444             &AllowedHeadersSerializer::serialize(&mut writer, "AllowedHeader", value)?;
1445         }
1446         AllowedMethodsSerializer::serialize(&mut writer, "AllowedMethod", &obj.allowed_methods)?;
1447         AllowedOriginsSerializer::serialize(&mut writer, "AllowedOrigin", &obj.allowed_origins)?;
1448         if let Some(ref value) = obj.expose_headers {
1449             &ExposeHeadersSerializer::serialize(&mut writer, "ExposeHeader", value)?;
1450         }
1451         if let Some(ref value) = obj.max_age_seconds {
1452             writer.write(xml::writer::XmlEvent::start_element("MaxAgeSeconds"))?;
1453             writer.write(xml::writer::XmlEvent::characters(&format!(
1454                 "{value}",
1455                 value = value
1456             )));
1457             writer.write(xml::writer::XmlEvent::end_element())?;
1458         }
1459         writer.write(xml::writer::XmlEvent::end_element())
1460     }
1461 }
1462 
1463 #[allow(dead_code)]
1464 struct CORSRulesDeserializer;
1465 impl CORSRulesDeserializer {
1466     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<CORSRule>, XmlParseError>1467     fn deserialize<T: Peek + Next>(
1468         tag_name: &str,
1469         stack: &mut T,
1470     ) -> Result<Vec<CORSRule>, XmlParseError> {
1471         let mut obj = vec![];
1472 
1473         loop {
1474             let consume_next_tag = match stack.peek() {
1475                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
1476                     name.local_name == tag_name
1477                 }
1478                 _ => false,
1479             };
1480 
1481             if consume_next_tag {
1482                 obj.push(CORSRuleDeserializer::deserialize(tag_name, stack)?);
1483             } else {
1484                 break;
1485             }
1486         }
1487 
1488         Ok(obj)
1489     }
1490 }
1491 
1492 pub struct CORSRulesSerializer;
1493 impl CORSRulesSerializer {
1494     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<CORSRule>, ) -> Result<(), xml::writer::Error> where W: Write,1495     pub fn serialize<W>(
1496         mut writer: &mut EventWriter<W>,
1497         name: &str,
1498         obj: &Vec<CORSRule>,
1499     ) -> Result<(), xml::writer::Error>
1500     where
1501         W: Write,
1502     {
1503         for element in obj {
1504             CORSRuleSerializer::serialize(writer, name, element)?;
1505         }
1506         Ok(())
1507     }
1508 }
1509 
1510 /// <p>Describes how an uncompressed comma-separated values (CSV)-formatted input object is formatted.</p>
1511 #[derive(Default, Debug, Clone, PartialEq)]
1512 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1513 pub struct CSVInput {
1514     /// <p>Specifies that CSV field values may contain quoted record delimiters and such records should be allowed. Default value is FALSE. Setting this value to TRUE may lower performance.</p>
1515     pub allow_quoted_record_delimiter: Option<bool>,
1516     /// <p>A single character used to indicate that a row should be ignored when the character is present at the start of that row. You can specify any character to indicate a comment line.</p>
1517     pub comments: Option<String>,
1518     /// <p>A single character used to separate individual fields in a record. You can specify an arbitrary delimiter.</p>
1519     pub field_delimiter: Option<String>,
1520     /// <p><p>Describes the first line of input. Valid values are:</p> <ul> <li> <p> <code>NONE</code>: First line is not a header.</p> </li> <li> <p> <code>IGNORE</code>: First line is a header, but you can&#39;t use the header values to indicate the column in an expression. You can use column position (such as _1, <em>2, …) to indicate the column (<code>SELECT s.</em>1 FROM OBJECT s</code>).</p> </li> <li> <p> <code>Use</code>: First line is a header, and you can use the header value to identify a column in an expression (<code>SELECT &quot;name&quot; FROM OBJECT</code>). </p> </li> </ul></p>
1521     pub file_header_info: Option<String>,
1522     /// <p>A single character used for escaping when the field delimiter is part of the value. For example, if the value is <code>a, b</code>, Amazon S3 wraps this field value in quotation marks, as follows: <code>" a , b "</code>.</p> <p>Type: String</p> <p>Default: <code>"</code> </p> <p>Ancestors: <code>CSV</code> </p>
1523     pub quote_character: Option<String>,
1524     /// <p>A single character used for escaping the quotation mark character inside an already escaped value. For example, the value """ a , b """ is parsed as " a , b ".</p>
1525     pub quote_escape_character: Option<String>,
1526     /// <p>A single character used to separate individual records in the input. Instead of the default value, you can specify an arbitrary delimiter.</p>
1527     pub record_delimiter: Option<String>,
1528 }
1529 
1530 pub struct CSVInputSerializer;
1531 impl CSVInputSerializer {
1532     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CSVInput, ) -> Result<(), xml::writer::Error> where W: Write,1533     pub fn serialize<W>(
1534         mut writer: &mut EventWriter<W>,
1535         name: &str,
1536         obj: &CSVInput,
1537     ) -> Result<(), xml::writer::Error>
1538     where
1539         W: Write,
1540     {
1541         writer.write(xml::writer::XmlEvent::start_element(name))?;
1542         if let Some(ref value) = obj.allow_quoted_record_delimiter {
1543             writer.write(xml::writer::XmlEvent::start_element(
1544                 "AllowQuotedRecordDelimiter",
1545             ))?;
1546             writer.write(xml::writer::XmlEvent::characters(&format!(
1547                 "{value}",
1548                 value = value
1549             )));
1550             writer.write(xml::writer::XmlEvent::end_element())?;
1551         }
1552         if let Some(ref value) = obj.comments {
1553             writer.write(xml::writer::XmlEvent::start_element("Comments"))?;
1554             writer.write(xml::writer::XmlEvent::characters(&format!(
1555                 "{value}",
1556                 value = value
1557             )));
1558             writer.write(xml::writer::XmlEvent::end_element())?;
1559         }
1560         if let Some(ref value) = obj.field_delimiter {
1561             writer.write(xml::writer::XmlEvent::start_element("FieldDelimiter"))?;
1562             writer.write(xml::writer::XmlEvent::characters(&format!(
1563                 "{value}",
1564                 value = value
1565             )));
1566             writer.write(xml::writer::XmlEvent::end_element())?;
1567         }
1568         if let Some(ref value) = obj.file_header_info {
1569             writer.write(xml::writer::XmlEvent::start_element("FileHeaderInfo"))?;
1570             writer.write(xml::writer::XmlEvent::characters(&format!(
1571                 "{value}",
1572                 value = value
1573             )));
1574             writer.write(xml::writer::XmlEvent::end_element())?;
1575         }
1576         if let Some(ref value) = obj.quote_character {
1577             writer.write(xml::writer::XmlEvent::start_element("QuoteCharacter"))?;
1578             writer.write(xml::writer::XmlEvent::characters(&format!(
1579                 "{value}",
1580                 value = value
1581             )));
1582             writer.write(xml::writer::XmlEvent::end_element())?;
1583         }
1584         if let Some(ref value) = obj.quote_escape_character {
1585             writer.write(xml::writer::XmlEvent::start_element("QuoteEscapeCharacter"))?;
1586             writer.write(xml::writer::XmlEvent::characters(&format!(
1587                 "{value}",
1588                 value = value
1589             )));
1590             writer.write(xml::writer::XmlEvent::end_element())?;
1591         }
1592         if let Some(ref value) = obj.record_delimiter {
1593             writer.write(xml::writer::XmlEvent::start_element("RecordDelimiter"))?;
1594             writer.write(xml::writer::XmlEvent::characters(&format!(
1595                 "{value}",
1596                 value = value
1597             )));
1598             writer.write(xml::writer::XmlEvent::end_element())?;
1599         }
1600         writer.write(xml::writer::XmlEvent::end_element())
1601     }
1602 }
1603 
1604 /// <p>Describes how uncompressed comma-separated values (CSV)-formatted results are formatted.</p>
1605 #[derive(Default, Debug, Clone, PartialEq)]
1606 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1607 pub struct CSVOutput {
1608     /// <p>The value used to separate individual fields in a record. You can specify an arbitrary delimiter.</p>
1609     pub field_delimiter: Option<String>,
1610     /// <p>A single character used for escaping when the field delimiter is part of the value. For example, if the value is <code>a, b</code>, Amazon S3 wraps this field value in quotation marks, as follows: <code>" a , b "</code>.</p>
1611     pub quote_character: Option<String>,
1612     /// <p>The single character used for escaping the quote character inside an already escaped value.</p>
1613     pub quote_escape_character: Option<String>,
1614     /// <p><p>Indicates whether to use quotation marks around output fields. </p> <ul> <li> <p> <code>ALWAYS</code>: Always use quotation marks for output fields.</p> </li> <li> <p> <code>ASNEEDED</code>: Use quotation marks for output fields when needed.</p> </li> </ul></p>
1615     pub quote_fields: Option<String>,
1616     /// <p>A single character used to separate individual records in the output. Instead of the default value, you can specify an arbitrary delimiter.</p>
1617     pub record_delimiter: Option<String>,
1618 }
1619 
1620 pub struct CSVOutputSerializer;
1621 impl CSVOutputSerializer {
1622     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CSVOutput, ) -> Result<(), xml::writer::Error> where W: Write,1623     pub fn serialize<W>(
1624         mut writer: &mut EventWriter<W>,
1625         name: &str,
1626         obj: &CSVOutput,
1627     ) -> Result<(), xml::writer::Error>
1628     where
1629         W: Write,
1630     {
1631         writer.write(xml::writer::XmlEvent::start_element(name))?;
1632         if let Some(ref value) = obj.field_delimiter {
1633             writer.write(xml::writer::XmlEvent::start_element("FieldDelimiter"))?;
1634             writer.write(xml::writer::XmlEvent::characters(&format!(
1635                 "{value}",
1636                 value = value
1637             )));
1638             writer.write(xml::writer::XmlEvent::end_element())?;
1639         }
1640         if let Some(ref value) = obj.quote_character {
1641             writer.write(xml::writer::XmlEvent::start_element("QuoteCharacter"))?;
1642             writer.write(xml::writer::XmlEvent::characters(&format!(
1643                 "{value}",
1644                 value = value
1645             )));
1646             writer.write(xml::writer::XmlEvent::end_element())?;
1647         }
1648         if let Some(ref value) = obj.quote_escape_character {
1649             writer.write(xml::writer::XmlEvent::start_element("QuoteEscapeCharacter"))?;
1650             writer.write(xml::writer::XmlEvent::characters(&format!(
1651                 "{value}",
1652                 value = value
1653             )));
1654             writer.write(xml::writer::XmlEvent::end_element())?;
1655         }
1656         if let Some(ref value) = obj.quote_fields {
1657             writer.write(xml::writer::XmlEvent::start_element("QuoteFields"))?;
1658             writer.write(xml::writer::XmlEvent::characters(&format!(
1659                 "{value}",
1660                 value = value
1661             )));
1662             writer.write(xml::writer::XmlEvent::end_element())?;
1663         }
1664         if let Some(ref value) = obj.record_delimiter {
1665             writer.write(xml::writer::XmlEvent::start_element("RecordDelimiter"))?;
1666             writer.write(xml::writer::XmlEvent::characters(&format!(
1667                 "{value}",
1668                 value = value
1669             )));
1670             writer.write(xml::writer::XmlEvent::end_element())?;
1671         }
1672         writer.write(xml::writer::XmlEvent::end_element())
1673     }
1674 }
1675 
1676 #[allow(dead_code)]
1677 struct CloudFunctionDeserializer;
1678 impl CloudFunctionDeserializer {
1679     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1680     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1681         start_element(tag_name, stack)?;
1682         let obj = characters(stack)?;
1683         end_element(tag_name, stack)?;
1684 
1685         Ok(obj)
1686     }
1687 }
1688 
1689 pub struct CloudFunctionSerializer;
1690 impl CloudFunctionSerializer {
1691     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1692     pub fn serialize<W>(
1693         mut writer: &mut EventWriter<W>,
1694         name: &str,
1695         obj: &String,
1696     ) -> Result<(), xml::writer::Error>
1697     where
1698         W: Write,
1699     {
1700         writer.write(xml::writer::XmlEvent::start_element(name))?;
1701         writer.write(xml::writer::XmlEvent::characters(&format!(
1702             "{value}",
1703             value = obj.to_string()
1704         )))?;
1705         writer.write(xml::writer::XmlEvent::end_element())
1706     }
1707 }
1708 
1709 /// <p>Container for specifying the AWS Lambda notification configuration.</p>
1710 #[derive(Default, Debug, Clone, PartialEq)]
1711 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1712 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1713 pub struct CloudFunctionConfiguration {
1714     /// <p>Lambda cloud function ARN that Amazon S3 can invoke when it detects events of the specified type.</p>
1715     pub cloud_function: Option<String>,
1716     /// <p>Bucket events for which to send notifications.</p>
1717     pub events: Option<Vec<String>>,
1718     pub id: Option<String>,
1719     /// <p>The role supporting the invocation of the Lambda function</p>
1720     pub invocation_role: Option<String>,
1721 }
1722 
1723 #[allow(dead_code)]
1724 struct CloudFunctionConfigurationDeserializer;
1725 impl CloudFunctionConfigurationDeserializer {
1726     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CloudFunctionConfiguration, XmlParseError>1727     fn deserialize<T: Peek + Next>(
1728         tag_name: &str,
1729         stack: &mut T,
1730     ) -> Result<CloudFunctionConfiguration, XmlParseError> {
1731         deserialize_elements::<_, CloudFunctionConfiguration, _>(
1732             tag_name,
1733             stack,
1734             |name, stack, obj| {
1735                 match name {
1736                     "CloudFunction" => {
1737                         obj.cloud_function = Some(CloudFunctionDeserializer::deserialize(
1738                             "CloudFunction",
1739                             stack,
1740                         )?);
1741                     }
1742                     "Event" => {
1743                         obj.events
1744                             .get_or_insert(vec![])
1745                             .extend(EventListDeserializer::deserialize("Event", stack)?);
1746                     }
1747                     "Id" => {
1748                         obj.id = Some(NotificationIdDeserializer::deserialize("Id", stack)?);
1749                     }
1750                     "InvocationRole" => {
1751                         obj.invocation_role =
1752                             Some(CloudFunctionInvocationRoleDeserializer::deserialize(
1753                                 "InvocationRole",
1754                                 stack,
1755                             )?);
1756                     }
1757                     _ => skip_tree(stack),
1758                 }
1759                 Ok(())
1760             },
1761         )
1762     }
1763 }
1764 
1765 pub struct CloudFunctionConfigurationSerializer;
1766 impl CloudFunctionConfigurationSerializer {
1767     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CloudFunctionConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,1768     pub fn serialize<W>(
1769         mut writer: &mut EventWriter<W>,
1770         name: &str,
1771         obj: &CloudFunctionConfiguration,
1772     ) -> Result<(), xml::writer::Error>
1773     where
1774         W: Write,
1775     {
1776         writer.write(xml::writer::XmlEvent::start_element(name))?;
1777         if let Some(ref value) = obj.cloud_function {
1778             writer.write(xml::writer::XmlEvent::start_element("CloudFunction"))?;
1779             writer.write(xml::writer::XmlEvent::characters(&format!(
1780                 "{value}",
1781                 value = value
1782             )));
1783             writer.write(xml::writer::XmlEvent::end_element())?;
1784         }
1785         if let Some(ref value) = obj.events {
1786             &EventListSerializer::serialize(&mut writer, "Event", value)?;
1787         }
1788         if let Some(ref value) = obj.id {
1789             writer.write(xml::writer::XmlEvent::start_element("Id"))?;
1790             writer.write(xml::writer::XmlEvent::characters(&format!(
1791                 "{value}",
1792                 value = value
1793             )));
1794             writer.write(xml::writer::XmlEvent::end_element())?;
1795         }
1796         if let Some(ref value) = obj.invocation_role {
1797             writer.write(xml::writer::XmlEvent::start_element("InvocationRole"))?;
1798             writer.write(xml::writer::XmlEvent::characters(&format!(
1799                 "{value}",
1800                 value = value
1801             )));
1802             writer.write(xml::writer::XmlEvent::end_element())?;
1803         }
1804         writer.write(xml::writer::XmlEvent::end_element())
1805     }
1806 }
1807 
1808 #[allow(dead_code)]
1809 struct CloudFunctionInvocationRoleDeserializer;
1810 impl CloudFunctionInvocationRoleDeserializer {
1811     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1812     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1813         start_element(tag_name, stack)?;
1814         let obj = characters(stack)?;
1815         end_element(tag_name, stack)?;
1816 
1817         Ok(obj)
1818     }
1819 }
1820 
1821 pub struct CloudFunctionInvocationRoleSerializer;
1822 impl CloudFunctionInvocationRoleSerializer {
1823     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1824     pub fn serialize<W>(
1825         mut writer: &mut EventWriter<W>,
1826         name: &str,
1827         obj: &String,
1828     ) -> Result<(), xml::writer::Error>
1829     where
1830         W: Write,
1831     {
1832         writer.write(xml::writer::XmlEvent::start_element(name))?;
1833         writer.write(xml::writer::XmlEvent::characters(&format!(
1834             "{value}",
1835             value = obj.to_string()
1836         )))?;
1837         writer.write(xml::writer::XmlEvent::end_element())
1838     }
1839 }
1840 
1841 #[allow(dead_code)]
1842 struct CodeDeserializer;
1843 impl CodeDeserializer {
1844     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1845     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1846         start_element(tag_name, stack)?;
1847         let obj = characters(stack)?;
1848         end_element(tag_name, stack)?;
1849 
1850         Ok(obj)
1851     }
1852 }
1853 
1854 pub struct CommentsSerializer;
1855 impl CommentsSerializer {
1856     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1857     pub fn serialize<W>(
1858         mut writer: &mut EventWriter<W>,
1859         name: &str,
1860         obj: &String,
1861     ) -> Result<(), xml::writer::Error>
1862     where
1863         W: Write,
1864     {
1865         writer.write(xml::writer::XmlEvent::start_element(name))?;
1866         writer.write(xml::writer::XmlEvent::characters(&format!(
1867             "{value}",
1868             value = obj.to_string()
1869         )))?;
1870         writer.write(xml::writer::XmlEvent::end_element())
1871     }
1872 }
1873 
1874 /// <p>Container for all (if there are any) keys between Prefix and the next occurrence of the string specified by a delimiter. CommonPrefixes lists keys that act like subdirectories in the directory specified by Prefix. For example, if the prefix is notes/ and the delimiter is a slash (/) as in notes/summer/july, the common prefix is notes/summer/. </p>
1875 #[derive(Default, Debug, Clone, PartialEq)]
1876 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1877 pub struct CommonPrefix {
1878     /// <p>Container for the specified common prefix.</p>
1879     pub prefix: Option<String>,
1880 }
1881 
1882 #[allow(dead_code)]
1883 struct CommonPrefixDeserializer;
1884 impl CommonPrefixDeserializer {
1885     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CommonPrefix, XmlParseError>1886     fn deserialize<T: Peek + Next>(
1887         tag_name: &str,
1888         stack: &mut T,
1889     ) -> Result<CommonPrefix, XmlParseError> {
1890         deserialize_elements::<_, CommonPrefix, _>(tag_name, stack, |name, stack, obj| {
1891             match name {
1892                 "Prefix" => {
1893                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
1894                 }
1895                 _ => skip_tree(stack),
1896             }
1897             Ok(())
1898         })
1899     }
1900 }
1901 #[allow(dead_code)]
1902 struct CommonPrefixListDeserializer;
1903 impl CommonPrefixListDeserializer {
1904     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<CommonPrefix>, XmlParseError>1905     fn deserialize<T: Peek + Next>(
1906         tag_name: &str,
1907         stack: &mut T,
1908     ) -> Result<Vec<CommonPrefix>, XmlParseError> {
1909         let mut obj = vec![];
1910 
1911         loop {
1912             let consume_next_tag = match stack.peek() {
1913                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
1914                     name.local_name == tag_name
1915                 }
1916                 _ => false,
1917             };
1918 
1919             if consume_next_tag {
1920                 obj.push(CommonPrefixDeserializer::deserialize(tag_name, stack)?);
1921             } else {
1922                 break;
1923             }
1924         }
1925 
1926         Ok(obj)
1927     }
1928 }
1929 #[derive(Default, Debug, Clone, PartialEq)]
1930 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1931 pub struct CompleteMultipartUploadOutput {
1932     /// <p>The name of the bucket that contains the newly created object.</p>
1933     pub bucket: Option<String>,
1934     /// <p>Entity tag that identifies the newly created object's data. Objects with different object data will have different entity tags. The entity tag is an opaque string. The entity tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 digest of the object data, it will contain one or more nonhexadecimal characters and/or will consist of less than 32 or more than 32 hexadecimal digits.</p>
1935     pub e_tag: Option<String>,
1936     /// <p>If the object expiration is configured, this will contain the expiration date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.</p>
1937     pub expiration: Option<String>,
1938     /// <p>The object key of the newly created object.</p>
1939     pub key: Option<String>,
1940     /// <p>The URI that identifies the newly created object.</p>
1941     pub location: Option<String>,
1942     pub request_charged: Option<String>,
1943     /// <p>If present, specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) that was used for the object.</p>
1944     pub ssekms_key_id: Option<String>,
1945     /// <p>If you specified server-side encryption either with an Amazon S3-managed encryption key or an AWS KMS customer master key (CMK) in your initiate multipart upload request, the response includes this header. It confirms the encryption algorithm that Amazon S3 used to encrypt the object.</p>
1946     pub server_side_encryption: Option<String>,
1947     /// <p>Version ID of the newly created object, in case the bucket has versioning turned on.</p>
1948     pub version_id: Option<String>,
1949 }
1950 
1951 #[allow(dead_code)]
1952 struct CompleteMultipartUploadOutputDeserializer;
1953 impl CompleteMultipartUploadOutputDeserializer {
1954     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CompleteMultipartUploadOutput, XmlParseError>1955     fn deserialize<T: Peek + Next>(
1956         tag_name: &str,
1957         stack: &mut T,
1958     ) -> Result<CompleteMultipartUploadOutput, XmlParseError> {
1959         deserialize_elements::<_, CompleteMultipartUploadOutput, _>(
1960             tag_name,
1961             stack,
1962             |name, stack, obj| {
1963                 match name {
1964                     "Bucket" => {
1965                         obj.bucket = Some(BucketNameDeserializer::deserialize("Bucket", stack)?);
1966                     }
1967                     "ETag" => {
1968                         obj.e_tag = Some(ETagDeserializer::deserialize("ETag", stack)?);
1969                     }
1970                     "Key" => {
1971                         obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
1972                     }
1973                     "Location" => {
1974                         obj.location = Some(LocationDeserializer::deserialize("Location", stack)?);
1975                     }
1976                     _ => skip_tree(stack),
1977                 }
1978                 Ok(())
1979             },
1980         )
1981     }
1982 }
1983 #[derive(Default, Debug, Clone, PartialEq)]
1984 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1985 pub struct CompleteMultipartUploadRequest {
1986     /// <p>Name of the bucket to which the multipart upload was initiated.</p>
1987     pub bucket: String,
1988     /// <p>Object key for which the multipart upload was initiated.</p>
1989     pub key: String,
1990     /// <p>The container for the multipart upload request information.</p>
1991     pub multipart_upload: Option<CompletedMultipartUpload>,
1992     pub request_payer: Option<String>,
1993     /// <p>ID for the initiated multipart upload.</p>
1994     pub upload_id: String,
1995 }
1996 
1997 /// <p>The container for the completed multipart upload details.</p>
1998 #[derive(Default, Debug, Clone, PartialEq)]
1999 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2000 pub struct CompletedMultipartUpload {
2001     /// <p>Array of CompletedPart data types.</p>
2002     pub parts: Option<Vec<CompletedPart>>,
2003 }
2004 
2005 pub struct CompletedMultipartUploadSerializer;
2006 impl CompletedMultipartUploadSerializer {
2007     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CompletedMultipartUpload, ) -> Result<(), xml::writer::Error> where W: Write,2008     pub fn serialize<W>(
2009         mut writer: &mut EventWriter<W>,
2010         name: &str,
2011         obj: &CompletedMultipartUpload,
2012     ) -> Result<(), xml::writer::Error>
2013     where
2014         W: Write,
2015     {
2016         writer.write(xml::writer::XmlEvent::start_element(name))?;
2017         if let Some(ref value) = obj.parts {
2018             &CompletedPartListSerializer::serialize(&mut writer, "Part", value)?;
2019         }
2020         writer.write(xml::writer::XmlEvent::end_element())
2021     }
2022 }
2023 
2024 /// <p>Details of the parts that were uploaded.</p>
2025 #[derive(Default, Debug, Clone, PartialEq)]
2026 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2027 pub struct CompletedPart {
2028     /// <p>Entity tag returned when the part was uploaded.</p>
2029     pub e_tag: Option<String>,
2030     /// <p>Part number that identifies the part. This is a positive integer between 1 and 10,000.</p>
2031     pub part_number: Option<i64>,
2032 }
2033 
2034 pub struct CompletedPartSerializer;
2035 impl CompletedPartSerializer {
2036     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CompletedPart, ) -> Result<(), xml::writer::Error> where W: Write,2037     pub fn serialize<W>(
2038         mut writer: &mut EventWriter<W>,
2039         name: &str,
2040         obj: &CompletedPart,
2041     ) -> Result<(), xml::writer::Error>
2042     where
2043         W: Write,
2044     {
2045         writer.write(xml::writer::XmlEvent::start_element(name))?;
2046         if let Some(ref value) = obj.e_tag {
2047             writer.write(xml::writer::XmlEvent::start_element("ETag"))?;
2048             writer.write(xml::writer::XmlEvent::characters(&format!(
2049                 "{value}",
2050                 value = value
2051             )));
2052             writer.write(xml::writer::XmlEvent::end_element())?;
2053         }
2054         if let Some(ref value) = obj.part_number {
2055             writer.write(xml::writer::XmlEvent::start_element("PartNumber"))?;
2056             writer.write(xml::writer::XmlEvent::characters(&format!(
2057                 "{value}",
2058                 value = value
2059             )));
2060             writer.write(xml::writer::XmlEvent::end_element())?;
2061         }
2062         writer.write(xml::writer::XmlEvent::end_element())
2063     }
2064 }
2065 
2066 pub struct CompletedPartListSerializer;
2067 impl CompletedPartListSerializer {
2068     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<CompletedPart>, ) -> Result<(), xml::writer::Error> where W: Write,2069     pub fn serialize<W>(
2070         mut writer: &mut EventWriter<W>,
2071         name: &str,
2072         obj: &Vec<CompletedPart>,
2073     ) -> Result<(), xml::writer::Error>
2074     where
2075         W: Write,
2076     {
2077         for element in obj {
2078             CompletedPartSerializer::serialize(writer, name, element)?;
2079         }
2080         Ok(())
2081     }
2082 }
2083 
2084 pub struct CompressionTypeSerializer;
2085 impl CompressionTypeSerializer {
2086     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,2087     pub fn serialize<W>(
2088         mut writer: &mut EventWriter<W>,
2089         name: &str,
2090         obj: &String,
2091     ) -> Result<(), xml::writer::Error>
2092     where
2093         W: Write,
2094     {
2095         writer.write(xml::writer::XmlEvent::start_element(name))?;
2096         writer.write(xml::writer::XmlEvent::characters(&format!(
2097             "{value}",
2098             value = obj.to_string()
2099         )))?;
2100         writer.write(xml::writer::XmlEvent::end_element())
2101     }
2102 }
2103 
2104 /// <p>A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If request is for pages in the <code>/docs</code> folder, redirect to the <code>/documents</code> folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.</p>
2105 #[derive(Default, Debug, Clone, PartialEq)]
2106 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2107 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2108 pub struct Condition {
2109     /// <p>The HTTP error code when the redirect is applied. In the event of an error, if the error code equals this value, then the specified redirect is applied. Required when parent element <code>Condition</code> is specified and sibling <code>KeyPrefixEquals</code> is not specified. If both are specified, then both must be true for the redirect to be applied.</p>
2110     pub http_error_code_returned_equals: Option<String>,
2111     /// <p>The object key name prefix when the redirect is applied. For example, to redirect requests for <code>ExamplePage.html</code>, the key prefix will be <code>ExamplePage.html</code>. To redirect request for all pages with the prefix <code>docs/</code>, the key prefix will be <code>/docs</code>, which identifies all objects in the <code>docs/</code> folder. Required when the parent element <code>Condition</code> is specified and sibling <code>HttpErrorCodeReturnedEquals</code> is not specified. If both conditions are specified, both must be true for the redirect to be applied.</p>
2112     pub key_prefix_equals: Option<String>,
2113 }
2114 
2115 #[allow(dead_code)]
2116 struct ConditionDeserializer;
2117 impl ConditionDeserializer {
2118     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Condition, XmlParseError>2119     fn deserialize<T: Peek + Next>(
2120         tag_name: &str,
2121         stack: &mut T,
2122     ) -> Result<Condition, XmlParseError> {
2123         deserialize_elements::<_, Condition, _>(tag_name, stack, |name, stack, obj| {
2124             match name {
2125                 "HttpErrorCodeReturnedEquals" => {
2126                     obj.http_error_code_returned_equals =
2127                         Some(HttpErrorCodeReturnedEqualsDeserializer::deserialize(
2128                             "HttpErrorCodeReturnedEquals",
2129                             stack,
2130                         )?);
2131                 }
2132                 "KeyPrefixEquals" => {
2133                     obj.key_prefix_equals = Some(KeyPrefixEqualsDeserializer::deserialize(
2134                         "KeyPrefixEquals",
2135                         stack,
2136                     )?);
2137                 }
2138                 _ => skip_tree(stack),
2139             }
2140             Ok(())
2141         })
2142     }
2143 }
2144 
2145 pub struct ConditionSerializer;
2146 impl ConditionSerializer {
2147     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Condition, ) -> Result<(), xml::writer::Error> where W: Write,2148     pub fn serialize<W>(
2149         mut writer: &mut EventWriter<W>,
2150         name: &str,
2151         obj: &Condition,
2152     ) -> Result<(), xml::writer::Error>
2153     where
2154         W: Write,
2155     {
2156         writer.write(xml::writer::XmlEvent::start_element(name))?;
2157         if let Some(ref value) = obj.http_error_code_returned_equals {
2158             writer.write(xml::writer::XmlEvent::start_element(
2159                 "HttpErrorCodeReturnedEquals",
2160             ))?;
2161             writer.write(xml::writer::XmlEvent::characters(&format!(
2162                 "{value}",
2163                 value = value
2164             )));
2165             writer.write(xml::writer::XmlEvent::end_element())?;
2166         }
2167         if let Some(ref value) = obj.key_prefix_equals {
2168             writer.write(xml::writer::XmlEvent::start_element("KeyPrefixEquals"))?;
2169             writer.write(xml::writer::XmlEvent::characters(&format!(
2170                 "{value}",
2171                 value = value
2172             )));
2173             writer.write(xml::writer::XmlEvent::end_element())?;
2174         }
2175         writer.write(xml::writer::XmlEvent::end_element())
2176     }
2177 }
2178 
2179 /// <p><p/></p>
2180 #[derive(Default, Debug, Clone, PartialEq)]
2181 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2182 pub struct ContinuationEvent {}
2183 
2184 #[allow(dead_code)]
2185 struct ContinuationEventDeserializer;
2186 impl ContinuationEventDeserializer {
2187     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ContinuationEvent, XmlParseError>2188     fn deserialize<T: Peek + Next>(
2189         tag_name: &str,
2190         stack: &mut T,
2191     ) -> Result<ContinuationEvent, XmlParseError> {
2192         start_element(tag_name, stack)?;
2193 
2194         let obj = ContinuationEvent::default();
2195 
2196         end_element(tag_name, stack)?;
2197 
2198         Ok(obj)
2199     }
2200 }
2201 #[derive(Default, Debug, Clone, PartialEq)]
2202 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2203 pub struct CopyObjectOutput {
2204     /// <p>Container for all response elements.</p>
2205     pub copy_object_result: Option<CopyObjectResult>,
2206     /// <p>Version of the copied object in the destination bucket.</p>
2207     pub copy_source_version_id: Option<String>,
2208     /// <p>If the object expiration is configured, the response includes this header.</p>
2209     pub expiration: Option<String>,
2210     pub request_charged: Option<String>,
2211     /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.</p>
2212     pub sse_customer_algorithm: Option<String>,
2213     /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.</p>
2214     pub sse_customer_key_md5: Option<String>,
2215     /// <p>If present, specifies the AWS KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
2216     pub ssekms_encryption_context: Option<String>,
2217     /// <p>If present, specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) that was used for the object.</p>
2218     pub ssekms_key_id: Option<String>,
2219     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
2220     pub server_side_encryption: Option<String>,
2221     /// <p>Version ID of the newly created copy.</p>
2222     pub version_id: Option<String>,
2223 }
2224 
2225 #[allow(dead_code)]
2226 struct CopyObjectOutputDeserializer;
2227 impl CopyObjectOutputDeserializer {
2228     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CopyObjectOutput, XmlParseError>2229     fn deserialize<T: Peek + Next>(
2230         tag_name: &str,
2231         stack: &mut T,
2232     ) -> Result<CopyObjectOutput, XmlParseError> {
2233         Ok(CopyObjectOutput {
2234             copy_object_result: Some(CopyObjectResultDeserializer::deserialize(
2235                 "CopyObjectResult",
2236                 stack,
2237             )?),
2238             ..CopyObjectOutput::default()
2239         })
2240     }
2241 }
2242 #[derive(Default, Debug, Clone, PartialEq)]
2243 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2244 pub struct CopyObjectRequest {
2245     /// <p>The canned ACL to apply to the object.</p>
2246     pub acl: Option<String>,
2247     /// <p>The name of the destination bucket.</p>
2248     pub bucket: String,
2249     /// <p>Specifies caching behavior along the request/reply chain.</p>
2250     pub cache_control: Option<String>,
2251     /// <p>Specifies presentational information for the object.</p>
2252     pub content_disposition: Option<String>,
2253     /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p>
2254     pub content_encoding: Option<String>,
2255     /// <p>The language the content is in.</p>
2256     pub content_language: Option<String>,
2257     /// <p>A standard MIME type describing the format of the object data.</p>
2258     pub content_type: Option<String>,
2259     /// <p>The name of the source bucket and key name of the source object, separated by a slash (/). Must be URL-encoded.</p>
2260     pub copy_source: String,
2261     /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
2262     pub copy_source_if_match: Option<String>,
2263     /// <p>Copies the object if it has been modified since the specified time.</p>
2264     pub copy_source_if_modified_since: Option<String>,
2265     /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
2266     pub copy_source_if_none_match: Option<String>,
2267     /// <p>Copies the object if it hasn't been modified since the specified time.</p>
2268     pub copy_source_if_unmodified_since: Option<String>,
2269     /// <p>Specifies the algorithm to use when decrypting the source object (for example, AES256).</p>
2270     pub copy_source_sse_customer_algorithm: Option<String>,
2271     /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.</p>
2272     pub copy_source_sse_customer_key: Option<String>,
2273     /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
2274     pub copy_source_sse_customer_key_md5: Option<String>,
2275     /// <p>The date and time at which the object is no longer cacheable.</p>
2276     pub expires: Option<String>,
2277     /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p>
2278     pub grant_full_control: Option<String>,
2279     /// <p>Allows grantee to read the object data and its metadata.</p>
2280     pub grant_read: Option<String>,
2281     /// <p>Allows grantee to read the object ACL.</p>
2282     pub grant_read_acp: Option<String>,
2283     /// <p>Allows grantee to write the ACL for the applicable object.</p>
2284     pub grant_write_acp: Option<String>,
2285     /// <p>The key of the destination object.</p>
2286     pub key: String,
2287     /// <p>A map of metadata to store with the object in S3.</p>
2288     pub metadata: Option<::std::collections::HashMap<String, String>>,
2289     /// <p>Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request.</p>
2290     pub metadata_directive: Option<String>,
2291     /// <p>Specifies whether you want to apply a Legal Hold to the copied object.</p>
2292     pub object_lock_legal_hold_status: Option<String>,
2293     /// <p>The Object Lock mode that you want to apply to the copied object.</p>
2294     pub object_lock_mode: Option<String>,
2295     /// <p>The date and time when you want the copied object's Object Lock to expire.</p>
2296     pub object_lock_retain_until_date: Option<String>,
2297     pub request_payer: Option<String>,
2298     /// <p>Specifies the algorithm to use to when encrypting the object (for example, AES256).</p>
2299     pub sse_customer_algorithm: Option<String>,
2300     /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side​-encryption​-customer-algorithm</code> header.</p>
2301     pub sse_customer_key: Option<String>,
2302     /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
2303     pub sse_customer_key_md5: Option<String>,
2304     /// <p>Specifies the AWS KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
2305     pub ssekms_encryption_context: Option<String>,
2306     /// <p>Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. For information about configuring using any of the officially supported AWS SDKs and AWS CLI, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version">Specifying the Signature Version in Request Authentication</a> in the <i>Amazon S3 Developer Guide</i>.</p>
2307     pub ssekms_key_id: Option<String>,
2308     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
2309     pub server_side_encryption: Option<String>,
2310     /// <p>The type of storage to use for the object. Defaults to 'STANDARD'.</p>
2311     pub storage_class: Option<String>,
2312     /// <p>The tag-set for the object destination object this value must be used in conjunction with the <code>TaggingDirective</code>. The tag-set must be encoded as URL Query parameters.</p>
2313     pub tagging: Option<String>,
2314     /// <p>Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request.</p>
2315     pub tagging_directive: Option<String>,
2316     /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.</p>
2317     pub website_redirect_location: Option<String>,
2318 }
2319 
2320 /// <p>Container for all response elements.</p>
2321 #[derive(Default, Debug, Clone, PartialEq)]
2322 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2323 pub struct CopyObjectResult {
2324     /// <p>Returns the ETag of the new object. The ETag reflects only changes to the contents of an object, not its metadata. The source and destination ETag is identical for a successfully copied object.</p>
2325     pub e_tag: Option<String>,
2326     /// <p>Returns the date that the object was last modified.</p>
2327     pub last_modified: Option<String>,
2328 }
2329 
2330 #[allow(dead_code)]
2331 struct CopyObjectResultDeserializer;
2332 impl CopyObjectResultDeserializer {
2333     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CopyObjectResult, XmlParseError>2334     fn deserialize<T: Peek + Next>(
2335         tag_name: &str,
2336         stack: &mut T,
2337     ) -> Result<CopyObjectResult, XmlParseError> {
2338         deserialize_elements::<_, CopyObjectResult, _>(tag_name, stack, |name, stack, obj| {
2339             match name {
2340                 "ETag" => {
2341                     obj.e_tag = Some(ETagDeserializer::deserialize("ETag", stack)?);
2342                 }
2343                 "LastModified" => {
2344                     obj.last_modified = Some(LastModifiedDeserializer::deserialize(
2345                         "LastModified",
2346                         stack,
2347                     )?);
2348                 }
2349                 _ => skip_tree(stack),
2350             }
2351             Ok(())
2352         })
2353     }
2354 }
2355 /// <p>Container for all response elements.</p>
2356 #[derive(Default, Debug, Clone, PartialEq)]
2357 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2358 pub struct CopyPartResult {
2359     /// <p>Entity tag of the object.</p>
2360     pub e_tag: Option<String>,
2361     /// <p>Date and time at which the object was uploaded.</p>
2362     pub last_modified: Option<String>,
2363 }
2364 
2365 #[allow(dead_code)]
2366 struct CopyPartResultDeserializer;
2367 impl CopyPartResultDeserializer {
2368     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CopyPartResult, XmlParseError>2369     fn deserialize<T: Peek + Next>(
2370         tag_name: &str,
2371         stack: &mut T,
2372     ) -> Result<CopyPartResult, XmlParseError> {
2373         deserialize_elements::<_, CopyPartResult, _>(tag_name, stack, |name, stack, obj| {
2374             match name {
2375                 "ETag" => {
2376                     obj.e_tag = Some(ETagDeserializer::deserialize("ETag", stack)?);
2377                 }
2378                 "LastModified" => {
2379                     obj.last_modified = Some(LastModifiedDeserializer::deserialize(
2380                         "LastModified",
2381                         stack,
2382                     )?);
2383                 }
2384                 _ => skip_tree(stack),
2385             }
2386             Ok(())
2387         })
2388     }
2389 }
2390 /// <p>The configuration information for the bucket.</p>
2391 #[derive(Default, Debug, Clone, PartialEq)]
2392 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2393 pub struct CreateBucketConfiguration {
2394     /// <p>Specifies the Region where the bucket will be created. If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region (us-east-1).</p>
2395     pub location_constraint: Option<String>,
2396 }
2397 
2398 pub struct CreateBucketConfigurationSerializer;
2399 impl CreateBucketConfigurationSerializer {
2400     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CreateBucketConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,2401     pub fn serialize<W>(
2402         mut writer: &mut EventWriter<W>,
2403         name: &str,
2404         obj: &CreateBucketConfiguration,
2405     ) -> Result<(), xml::writer::Error>
2406     where
2407         W: Write,
2408     {
2409         writer.write(xml::writer::XmlEvent::start_element(name))?;
2410         if let Some(ref value) = obj.location_constraint {
2411             writer.write(xml::writer::XmlEvent::start_element("LocationConstraint"))?;
2412             writer.write(xml::writer::XmlEvent::characters(&format!(
2413                 "{value}",
2414                 value = value
2415             )));
2416             writer.write(xml::writer::XmlEvent::end_element())?;
2417         }
2418         writer.write(xml::writer::XmlEvent::end_element())
2419     }
2420 }
2421 
2422 #[derive(Default, Debug, Clone, PartialEq)]
2423 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2424 pub struct CreateBucketOutput {
2425     /// <p>Specifies the Region where the bucket will be created. If you are creating a bucket on the US East (N. Virginia) Region (us-east-1), you do not need to specify the location.</p>
2426     pub location: Option<String>,
2427 }
2428 
2429 #[allow(dead_code)]
2430 struct CreateBucketOutputDeserializer;
2431 impl CreateBucketOutputDeserializer {
2432     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CreateBucketOutput, XmlParseError>2433     fn deserialize<T: Peek + Next>(
2434         tag_name: &str,
2435         stack: &mut T,
2436     ) -> Result<CreateBucketOutput, XmlParseError> {
2437         start_element(tag_name, stack)?;
2438 
2439         let obj = CreateBucketOutput::default();
2440 
2441         end_element(tag_name, stack)?;
2442 
2443         Ok(obj)
2444     }
2445 }
2446 #[derive(Default, Debug, Clone, PartialEq)]
2447 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2448 pub struct CreateBucketRequest {
2449     /// <p>The canned ACL to apply to the bucket.</p>
2450     pub acl: Option<String>,
2451     /// <p>The name of the bucket to create.</p>
2452     pub bucket: String,
2453     /// <p>The configuration information for the bucket.</p>
2454     pub create_bucket_configuration: Option<CreateBucketConfiguration>,
2455     /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p>
2456     pub grant_full_control: Option<String>,
2457     /// <p>Allows grantee to list the objects in the bucket.</p>
2458     pub grant_read: Option<String>,
2459     /// <p>Allows grantee to read the bucket ACL.</p>
2460     pub grant_read_acp: Option<String>,
2461     /// <p>Allows grantee to create, overwrite, and delete any object in the bucket.</p>
2462     pub grant_write: Option<String>,
2463     /// <p>Allows grantee to write the ACL for the applicable bucket.</p>
2464     pub grant_write_acp: Option<String>,
2465     /// <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p>
2466     pub object_lock_enabled_for_bucket: Option<bool>,
2467 }
2468 
2469 #[derive(Default, Debug, Clone, PartialEq)]
2470 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2471 pub struct CreateMultipartUploadOutput {
2472     /// <p>If the bucket has a lifecycle rule configured with an action to abort incomplete multipart uploads and the prefix in the lifecycle rule matches the object name in the request, the response includes this header. The header indicates when the initiated multipart upload becomes eligible for an abort operation. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config"> Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy</a>.</p> <p>The response also includes the <code>x-amz-abort-rule-id</code> header that provides the ID of the lifecycle configuration rule that defines this action.</p>
2473     pub abort_date: Option<String>,
2474     /// <p>This header is returned along with the <code>x-amz-abort-date</code> header. It identifies the applicable lifecycle configuration rule that defines the action to abort incomplete multipart uploads.</p>
2475     pub abort_rule_id: Option<String>,
2476     /// <p>Name of the bucket to which the multipart upload was initiated. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
2477     pub bucket: Option<String>,
2478     /// <p>Object key for which the multipart upload was initiated.</p>
2479     pub key: Option<String>,
2480     pub request_charged: Option<String>,
2481     /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.</p>
2482     pub sse_customer_algorithm: Option<String>,
2483     /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.</p>
2484     pub sse_customer_key_md5: Option<String>,
2485     /// <p>If present, specifies the AWS KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
2486     pub ssekms_encryption_context: Option<String>,
2487     /// <p>If present, specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) that was used for the object.</p>
2488     pub ssekms_key_id: Option<String>,
2489     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
2490     pub server_side_encryption: Option<String>,
2491     /// <p>ID for the initiated multipart upload.</p>
2492     pub upload_id: Option<String>,
2493 }
2494 
2495 #[allow(dead_code)]
2496 struct CreateMultipartUploadOutputDeserializer;
2497 impl CreateMultipartUploadOutputDeserializer {
2498     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CreateMultipartUploadOutput, XmlParseError>2499     fn deserialize<T: Peek + Next>(
2500         tag_name: &str,
2501         stack: &mut T,
2502     ) -> Result<CreateMultipartUploadOutput, XmlParseError> {
2503         deserialize_elements::<_, CreateMultipartUploadOutput, _>(
2504             tag_name,
2505             stack,
2506             |name, stack, obj| {
2507                 match name {
2508                     "Bucket" => {
2509                         obj.bucket = Some(BucketNameDeserializer::deserialize("Bucket", stack)?);
2510                     }
2511                     "Key" => {
2512                         obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
2513                     }
2514                     "UploadId" => {
2515                         obj.upload_id = Some(MultipartUploadIdDeserializer::deserialize(
2516                             "UploadId", stack,
2517                         )?);
2518                     }
2519                     _ => skip_tree(stack),
2520                 }
2521                 Ok(())
2522             },
2523         )
2524     }
2525 }
2526 #[derive(Default, Debug, Clone, PartialEq)]
2527 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2528 pub struct CreateMultipartUploadRequest {
2529     /// <p>The canned ACL to apply to the object.</p>
2530     pub acl: Option<String>,
2531     /// <p>The name of the bucket to which to initiate the upload</p>
2532     pub bucket: String,
2533     /// <p>Specifies caching behavior along the request/reply chain.</p>
2534     pub cache_control: Option<String>,
2535     /// <p>Specifies presentational information for the object.</p>
2536     pub content_disposition: Option<String>,
2537     /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p>
2538     pub content_encoding: Option<String>,
2539     /// <p>The language the content is in.</p>
2540     pub content_language: Option<String>,
2541     /// <p>A standard MIME type describing the format of the object data.</p>
2542     pub content_type: Option<String>,
2543     /// <p>The date and time at which the object is no longer cacheable.</p>
2544     pub expires: Option<String>,
2545     /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p>
2546     pub grant_full_control: Option<String>,
2547     /// <p>Allows grantee to read the object data and its metadata.</p>
2548     pub grant_read: Option<String>,
2549     /// <p>Allows grantee to read the object ACL.</p>
2550     pub grant_read_acp: Option<String>,
2551     /// <p>Allows grantee to write the ACL for the applicable object.</p>
2552     pub grant_write_acp: Option<String>,
2553     /// <p>Object key for which the multipart upload is to be initiated.</p>
2554     pub key: String,
2555     /// <p>A map of metadata to store with the object in S3.</p>
2556     pub metadata: Option<::std::collections::HashMap<String, String>>,
2557     /// <p>Specifies whether you want to apply a Legal Hold to the uploaded object.</p>
2558     pub object_lock_legal_hold_status: Option<String>,
2559     /// <p>Specifies the Object Lock mode that you want to apply to the uploaded object.</p>
2560     pub object_lock_mode: Option<String>,
2561     /// <p>Specifies the date and time when you want the Object Lock to expire.</p>
2562     pub object_lock_retain_until_date: Option<String>,
2563     pub request_payer: Option<String>,
2564     /// <p>Specifies the algorithm to use to when encrypting the object (for example, AES256).</p>
2565     pub sse_customer_algorithm: Option<String>,
2566     /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side​-encryption​-customer-algorithm</code> header.</p>
2567     pub sse_customer_key: Option<String>,
2568     /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
2569     pub sse_customer_key_md5: Option<String>,
2570     /// <p>Specifies the AWS KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
2571     pub ssekms_encryption_context: Option<String>,
2572     /// <p>Specifies the ID of the symmetric customer managed AWS KMS CMK to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. For information about configuring using any of the officially supported AWS SDKs and AWS CLI, see <a href="https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version">Specifying the Signature Version in Request Authentication</a> in the <i>Amazon S3 Developer Guide</i>.</p>
2573     pub ssekms_key_id: Option<String>,
2574     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
2575     pub server_side_encryption: Option<String>,
2576     /// <p>The type of storage to use for the object. Defaults to 'STANDARD'.</p>
2577     pub storage_class: Option<String>,
2578     /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters.</p>
2579     pub tagging: Option<String>,
2580     /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.</p>
2581     pub website_redirect_location: Option<String>,
2582 }
2583 
2584 #[allow(dead_code)]
2585 struct CreationDateDeserializer;
2586 impl CreationDateDeserializer {
2587     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>2588     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2589         start_element(tag_name, stack)?;
2590         let obj = characters(stack)?;
2591         end_element(tag_name, stack)?;
2592 
2593         Ok(obj)
2594     }
2595 }
2596 #[allow(dead_code)]
2597 struct DateDeserializer;
2598 impl DateDeserializer {
2599     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>2600     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2601         start_element(tag_name, stack)?;
2602         let obj = characters(stack)?;
2603         end_element(tag_name, stack)?;
2604 
2605         Ok(obj)
2606     }
2607 }
2608 
2609 pub struct DateSerializer;
2610 impl DateSerializer {
2611     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,2612     pub fn serialize<W>(
2613         mut writer: &mut EventWriter<W>,
2614         name: &str,
2615         obj: &String,
2616     ) -> Result<(), xml::writer::Error>
2617     where
2618         W: Write,
2619     {
2620         writer.write(xml::writer::XmlEvent::start_element(name))?;
2621         writer.write(xml::writer::XmlEvent::characters(&format!(
2622             "{value}",
2623             value = obj.to_string()
2624         )))?;
2625         writer.write(xml::writer::XmlEvent::end_element())
2626     }
2627 }
2628 
2629 #[allow(dead_code)]
2630 struct DaysDeserializer;
2631 impl DaysDeserializer {
2632     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>2633     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
2634         start_element(tag_name, stack)?;
2635         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
2636         end_element(tag_name, stack)?;
2637 
2638         Ok(obj)
2639     }
2640 }
2641 
2642 pub struct DaysSerializer;
2643 impl DaysSerializer {
2644     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,2645     pub fn serialize<W>(
2646         mut writer: &mut EventWriter<W>,
2647         name: &str,
2648         obj: &i64,
2649     ) -> Result<(), xml::writer::Error>
2650     where
2651         W: Write,
2652     {
2653         writer.write(xml::writer::XmlEvent::start_element(name))?;
2654         writer.write(xml::writer::XmlEvent::characters(&format!(
2655             "{value}",
2656             value = obj.to_string()
2657         )))?;
2658         writer.write(xml::writer::XmlEvent::end_element())
2659     }
2660 }
2661 
2662 #[allow(dead_code)]
2663 struct DaysAfterInitiationDeserializer;
2664 impl DaysAfterInitiationDeserializer {
2665     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>2666     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
2667         start_element(tag_name, stack)?;
2668         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
2669         end_element(tag_name, stack)?;
2670 
2671         Ok(obj)
2672     }
2673 }
2674 
2675 pub struct DaysAfterInitiationSerializer;
2676 impl DaysAfterInitiationSerializer {
2677     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,2678     pub fn serialize<W>(
2679         mut writer: &mut EventWriter<W>,
2680         name: &str,
2681         obj: &i64,
2682     ) -> Result<(), xml::writer::Error>
2683     where
2684         W: Write,
2685     {
2686         writer.write(xml::writer::XmlEvent::start_element(name))?;
2687         writer.write(xml::writer::XmlEvent::characters(&format!(
2688             "{value}",
2689             value = obj.to_string()
2690         )))?;
2691         writer.write(xml::writer::XmlEvent::end_element())
2692     }
2693 }
2694 
2695 /// <p>The container element for specifying the default Object Lock retention settings for new objects placed in the specified bucket.</p>
2696 #[derive(Default, Debug, Clone, PartialEq)]
2697 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2698 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2699 pub struct DefaultRetention {
2700     /// <p>The number of days that you want to specify for the default retention period.</p>
2701     pub days: Option<i64>,
2702     /// <p>The default Object Lock retention mode you want to apply to new objects placed in the specified bucket.</p>
2703     pub mode: Option<String>,
2704     /// <p>The number of years that you want to specify for the default retention period.</p>
2705     pub years: Option<i64>,
2706 }
2707 
2708 #[allow(dead_code)]
2709 struct DefaultRetentionDeserializer;
2710 impl DefaultRetentionDeserializer {
2711     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<DefaultRetention, XmlParseError>2712     fn deserialize<T: Peek + Next>(
2713         tag_name: &str,
2714         stack: &mut T,
2715     ) -> Result<DefaultRetention, XmlParseError> {
2716         deserialize_elements::<_, DefaultRetention, _>(tag_name, stack, |name, stack, obj| {
2717             match name {
2718                 "Days" => {
2719                     obj.days = Some(DaysDeserializer::deserialize("Days", stack)?);
2720                 }
2721                 "Mode" => {
2722                     obj.mode = Some(ObjectLockRetentionModeDeserializer::deserialize(
2723                         "Mode", stack,
2724                     )?);
2725                 }
2726                 "Years" => {
2727                     obj.years = Some(YearsDeserializer::deserialize("Years", stack)?);
2728                 }
2729                 _ => skip_tree(stack),
2730             }
2731             Ok(())
2732         })
2733     }
2734 }
2735 
2736 pub struct DefaultRetentionSerializer;
2737 impl DefaultRetentionSerializer {
2738     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &DefaultRetention, ) -> Result<(), xml::writer::Error> where W: Write,2739     pub fn serialize<W>(
2740         mut writer: &mut EventWriter<W>,
2741         name: &str,
2742         obj: &DefaultRetention,
2743     ) -> Result<(), xml::writer::Error>
2744     where
2745         W: Write,
2746     {
2747         writer.write(xml::writer::XmlEvent::start_element(name))?;
2748         if let Some(ref value) = obj.days {
2749             writer.write(xml::writer::XmlEvent::start_element("Days"))?;
2750             writer.write(xml::writer::XmlEvent::characters(&format!(
2751                 "{value}",
2752                 value = value
2753             )));
2754             writer.write(xml::writer::XmlEvent::end_element())?;
2755         }
2756         if let Some(ref value) = obj.mode {
2757             writer.write(xml::writer::XmlEvent::start_element("Mode"))?;
2758             writer.write(xml::writer::XmlEvent::characters(&format!(
2759                 "{value}",
2760                 value = value
2761             )));
2762             writer.write(xml::writer::XmlEvent::end_element())?;
2763         }
2764         if let Some(ref value) = obj.years {
2765             writer.write(xml::writer::XmlEvent::start_element("Years"))?;
2766             writer.write(xml::writer::XmlEvent::characters(&format!(
2767                 "{value}",
2768                 value = value
2769             )));
2770             writer.write(xml::writer::XmlEvent::end_element())?;
2771         }
2772         writer.write(xml::writer::XmlEvent::end_element())
2773     }
2774 }
2775 
2776 /// <p>Container for the objects to delete.</p>
2777 #[derive(Default, Debug, Clone, PartialEq)]
2778 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2779 pub struct Delete {
2780     /// <p>The objects to delete.</p>
2781     pub objects: Vec<ObjectIdentifier>,
2782     /// <p>Element to enable quiet mode for the request. When you add this element, you must set its value to true.</p>
2783     pub quiet: Option<bool>,
2784 }
2785 
2786 pub struct DeleteSerializer;
2787 impl DeleteSerializer {
2788     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Delete, ) -> Result<(), xml::writer::Error> where W: Write,2789     pub fn serialize<W>(
2790         mut writer: &mut EventWriter<W>,
2791         name: &str,
2792         obj: &Delete,
2793     ) -> Result<(), xml::writer::Error>
2794     where
2795         W: Write,
2796     {
2797         writer.write(xml::writer::XmlEvent::start_element(name))?;
2798         ObjectIdentifierListSerializer::serialize(&mut writer, "Object", &obj.objects)?;
2799         if let Some(ref value) = obj.quiet {
2800             writer.write(xml::writer::XmlEvent::start_element("Quiet"))?;
2801             writer.write(xml::writer::XmlEvent::characters(&format!(
2802                 "{value}",
2803                 value = value
2804             )));
2805             writer.write(xml::writer::XmlEvent::end_element())?;
2806         }
2807         writer.write(xml::writer::XmlEvent::end_element())
2808     }
2809 }
2810 
2811 #[derive(Default, Debug, Clone, PartialEq)]
2812 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2813 pub struct DeleteBucketAnalyticsConfigurationRequest {
2814     /// <p>The name of the bucket from which an analytics configuration is deleted.</p>
2815     pub bucket: String,
2816     /// <p>The ID that identifies the analytics configuration.</p>
2817     pub id: String,
2818 }
2819 
2820 #[derive(Default, Debug, Clone, PartialEq)]
2821 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2822 pub struct DeleteBucketCorsRequest {
2823     /// <p>Specifies the bucket whose <code>cors</code> configuration is being deleted.</p>
2824     pub bucket: String,
2825 }
2826 
2827 #[derive(Default, Debug, Clone, PartialEq)]
2828 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2829 pub struct DeleteBucketEncryptionRequest {
2830     /// <p>The name of the bucket containing the server-side encryption configuration to delete.</p>
2831     pub bucket: String,
2832 }
2833 
2834 #[derive(Default, Debug, Clone, PartialEq)]
2835 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2836 pub struct DeleteBucketInventoryConfigurationRequest {
2837     /// <p>The name of the bucket containing the inventory configuration to delete.</p>
2838     pub bucket: String,
2839     /// <p>The ID used to identify the inventory configuration.</p>
2840     pub id: String,
2841 }
2842 
2843 #[derive(Default, Debug, Clone, PartialEq)]
2844 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2845 pub struct DeleteBucketLifecycleRequest {
2846     /// <p>The bucket name of the lifecycle to delete.</p>
2847     pub bucket: String,
2848 }
2849 
2850 #[derive(Default, Debug, Clone, PartialEq)]
2851 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2852 pub struct DeleteBucketMetricsConfigurationRequest {
2853     /// <p>The name of the bucket containing the metrics configuration to delete.</p>
2854     pub bucket: String,
2855     /// <p>The ID used to identify the metrics configuration.</p>
2856     pub id: String,
2857 }
2858 
2859 #[derive(Default, Debug, Clone, PartialEq)]
2860 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2861 pub struct DeleteBucketPolicyRequest {
2862     /// <p>The bucket name.</p>
2863     pub bucket: String,
2864 }
2865 
2866 #[derive(Default, Debug, Clone, PartialEq)]
2867 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2868 pub struct DeleteBucketReplicationRequest {
2869     /// <p> The bucket name. </p>
2870     pub bucket: String,
2871 }
2872 
2873 #[derive(Default, Debug, Clone, PartialEq)]
2874 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2875 pub struct DeleteBucketRequest {
2876     /// <p>Specifies the bucket being deleted.</p>
2877     pub bucket: String,
2878 }
2879 
2880 #[derive(Default, Debug, Clone, PartialEq)]
2881 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2882 pub struct DeleteBucketTaggingRequest {
2883     /// <p>The bucket that has the tag set to be removed.</p>
2884     pub bucket: String,
2885 }
2886 
2887 #[derive(Default, Debug, Clone, PartialEq)]
2888 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2889 pub struct DeleteBucketWebsiteRequest {
2890     /// <p>The bucket name for which you want to remove the website configuration. </p>
2891     pub bucket: String,
2892 }
2893 
2894 #[allow(dead_code)]
2895 struct DeleteMarkerDeserializer;
2896 impl DeleteMarkerDeserializer {
2897     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>2898     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
2899         start_element(tag_name, stack)?;
2900         let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
2901         end_element(tag_name, stack)?;
2902 
2903         Ok(obj)
2904     }
2905 }
2906 /// <p>Information about the delete marker.</p>
2907 #[derive(Default, Debug, Clone, PartialEq)]
2908 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2909 pub struct DeleteMarkerEntry {
2910     /// <p>Specifies whether the object is (true) or is not (false) the latest version of an object.</p>
2911     pub is_latest: Option<bool>,
2912     /// <p>The object key.</p>
2913     pub key: Option<String>,
2914     /// <p>Date and time the object was last modified.</p>
2915     pub last_modified: Option<String>,
2916     /// <p>The account that created the delete marker.&gt;</p>
2917     pub owner: Option<Owner>,
2918     /// <p>Version ID of an object.</p>
2919     pub version_id: Option<String>,
2920 }
2921 
2922 #[allow(dead_code)]
2923 struct DeleteMarkerEntryDeserializer;
2924 impl DeleteMarkerEntryDeserializer {
2925     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<DeleteMarkerEntry, XmlParseError>2926     fn deserialize<T: Peek + Next>(
2927         tag_name: &str,
2928         stack: &mut T,
2929     ) -> Result<DeleteMarkerEntry, XmlParseError> {
2930         deserialize_elements::<_, DeleteMarkerEntry, _>(tag_name, stack, |name, stack, obj| {
2931             match name {
2932                 "IsLatest" => {
2933                     obj.is_latest = Some(IsLatestDeserializer::deserialize("IsLatest", stack)?);
2934                 }
2935                 "Key" => {
2936                     obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
2937                 }
2938                 "LastModified" => {
2939                     obj.last_modified = Some(LastModifiedDeserializer::deserialize(
2940                         "LastModified",
2941                         stack,
2942                     )?);
2943                 }
2944                 "Owner" => {
2945                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
2946                 }
2947                 "VersionId" => {
2948                     obj.version_id = Some(ObjectVersionIdDeserializer::deserialize(
2949                         "VersionId",
2950                         stack,
2951                     )?);
2952                 }
2953                 _ => skip_tree(stack),
2954             }
2955             Ok(())
2956         })
2957     }
2958 }
2959 /// <p><p>Specifies whether Amazon S3 replicates the delete markers. If you specify a <code>Filter</code>, you must specify this element. However, in the latest version of replication configuration (when <code>Filter</code> is specified), Amazon S3 doesn&#39;t replicate delete markers. Therefore, the <code>DeleteMarkerReplication</code> element can contain only &lt;Status&gt;Disabled&lt;/Status&gt;. For an example configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config">Basic Rule Configuration</a>. </p> <note> <p> If you don&#39;t specify the <code>Filter</code> element, Amazon S3 assumes that the replication configuration is the earlier version, V1. In the earlier version, Amazon S3 handled replication of delete markers differently. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations">Backward Compatibility</a>.</p> </note></p>
2960 #[derive(Default, Debug, Clone, PartialEq)]
2961 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2962 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2963 pub struct DeleteMarkerReplication {
2964     /// <p><p>Indicates whether to replicate delete markers.</p> <note> <p> In the current implementation, Amazon S3 doesn&#39;t replicate the delete markers. The status must be <code>Disabled</code>. </p> </note></p>
2965     pub status: Option<String>,
2966 }
2967 
2968 #[allow(dead_code)]
2969 struct DeleteMarkerReplicationDeserializer;
2970 impl DeleteMarkerReplicationDeserializer {
2971     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<DeleteMarkerReplication, XmlParseError>2972     fn deserialize<T: Peek + Next>(
2973         tag_name: &str,
2974         stack: &mut T,
2975     ) -> Result<DeleteMarkerReplication, XmlParseError> {
2976         deserialize_elements::<_, DeleteMarkerReplication, _>(
2977             tag_name,
2978             stack,
2979             |name, stack, obj| {
2980                 match name {
2981                     "Status" => {
2982                         obj.status = Some(DeleteMarkerReplicationStatusDeserializer::deserialize(
2983                             "Status", stack,
2984                         )?);
2985                     }
2986                     _ => skip_tree(stack),
2987                 }
2988                 Ok(())
2989             },
2990         )
2991     }
2992 }
2993 
2994 pub struct DeleteMarkerReplicationSerializer;
2995 impl DeleteMarkerReplicationSerializer {
2996     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &DeleteMarkerReplication, ) -> Result<(), xml::writer::Error> where W: Write,2997     pub fn serialize<W>(
2998         mut writer: &mut EventWriter<W>,
2999         name: &str,
3000         obj: &DeleteMarkerReplication,
3001     ) -> Result<(), xml::writer::Error>
3002     where
3003         W: Write,
3004     {
3005         writer.write(xml::writer::XmlEvent::start_element(name))?;
3006         if let Some(ref value) = obj.status {
3007             writer.write(xml::writer::XmlEvent::start_element("Status"))?;
3008             writer.write(xml::writer::XmlEvent::characters(&format!(
3009                 "{value}",
3010                 value = value
3011             )));
3012             writer.write(xml::writer::XmlEvent::end_element())?;
3013         }
3014         writer.write(xml::writer::XmlEvent::end_element())
3015     }
3016 }
3017 
3018 #[allow(dead_code)]
3019 struct DeleteMarkerReplicationStatusDeserializer;
3020 impl DeleteMarkerReplicationStatusDeserializer {
3021     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3022     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3023         start_element(tag_name, stack)?;
3024         let obj = characters(stack)?;
3025         end_element(tag_name, stack)?;
3026 
3027         Ok(obj)
3028     }
3029 }
3030 
3031 pub struct DeleteMarkerReplicationStatusSerializer;
3032 impl DeleteMarkerReplicationStatusSerializer {
3033     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3034     pub fn serialize<W>(
3035         mut writer: &mut EventWriter<W>,
3036         name: &str,
3037         obj: &String,
3038     ) -> Result<(), xml::writer::Error>
3039     where
3040         W: Write,
3041     {
3042         writer.write(xml::writer::XmlEvent::start_element(name))?;
3043         writer.write(xml::writer::XmlEvent::characters(&format!(
3044             "{value}",
3045             value = obj.to_string()
3046         )))?;
3047         writer.write(xml::writer::XmlEvent::end_element())
3048     }
3049 }
3050 
3051 #[allow(dead_code)]
3052 struct DeleteMarkerVersionIdDeserializer;
3053 impl DeleteMarkerVersionIdDeserializer {
3054     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3055     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3056         start_element(tag_name, stack)?;
3057         let obj = characters(stack)?;
3058         end_element(tag_name, stack)?;
3059 
3060         Ok(obj)
3061     }
3062 }
3063 #[allow(dead_code)]
3064 struct DeleteMarkersDeserializer;
3065 impl DeleteMarkersDeserializer {
3066     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<DeleteMarkerEntry>, XmlParseError>3067     fn deserialize<T: Peek + Next>(
3068         tag_name: &str,
3069         stack: &mut T,
3070     ) -> Result<Vec<DeleteMarkerEntry>, XmlParseError> {
3071         let mut obj = vec![];
3072 
3073         loop {
3074             let consume_next_tag = match stack.peek() {
3075                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
3076                     name.local_name == tag_name
3077                 }
3078                 _ => false,
3079             };
3080 
3081             if consume_next_tag {
3082                 obj.push(DeleteMarkerEntryDeserializer::deserialize(tag_name, stack)?);
3083             } else {
3084                 break;
3085             }
3086         }
3087 
3088         Ok(obj)
3089     }
3090 }
3091 #[derive(Default, Debug, Clone, PartialEq)]
3092 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3093 pub struct DeleteObjectOutput {
3094     /// <p>Specifies whether the versioned object that was permanently deleted was (true) or was not (false) a delete marker.</p>
3095     pub delete_marker: Option<bool>,
3096     pub request_charged: Option<String>,
3097     /// <p>Returns the version ID of the delete marker created as a result of the DELETE operation.</p>
3098     pub version_id: Option<String>,
3099 }
3100 
3101 #[allow(dead_code)]
3102 struct DeleteObjectOutputDeserializer;
3103 impl DeleteObjectOutputDeserializer {
3104     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<DeleteObjectOutput, XmlParseError>3105     fn deserialize<T: Peek + Next>(
3106         tag_name: &str,
3107         stack: &mut T,
3108     ) -> Result<DeleteObjectOutput, XmlParseError> {
3109         start_element(tag_name, stack)?;
3110 
3111         let obj = DeleteObjectOutput::default();
3112 
3113         end_element(tag_name, stack)?;
3114 
3115         Ok(obj)
3116     }
3117 }
3118 #[derive(Default, Debug, Clone, PartialEq)]
3119 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3120 pub struct DeleteObjectRequest {
3121     /// <p>The bucket name of the bucket containing the object. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
3122     pub bucket: String,
3123     /// <p>Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation.</p>
3124     pub bypass_governance_retention: Option<bool>,
3125     /// <p>Key name of the object to delete.</p>
3126     pub key: String,
3127     /// <p>The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device. Required to permanently delete a versioned object if versioning is configured with MFA delete enabled.</p>
3128     pub mfa: Option<String>,
3129     pub request_payer: Option<String>,
3130     /// <p>VersionId used to reference a specific version of the object.</p>
3131     pub version_id: Option<String>,
3132 }
3133 
3134 #[derive(Default, Debug, Clone, PartialEq)]
3135 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3136 pub struct DeleteObjectTaggingOutput {
3137     /// <p>The versionId of the object the tag-set was removed from.</p>
3138     pub version_id: Option<String>,
3139 }
3140 
3141 #[allow(dead_code)]
3142 struct DeleteObjectTaggingOutputDeserializer;
3143 impl DeleteObjectTaggingOutputDeserializer {
3144     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<DeleteObjectTaggingOutput, XmlParseError>3145     fn deserialize<T: Peek + Next>(
3146         tag_name: &str,
3147         stack: &mut T,
3148     ) -> Result<DeleteObjectTaggingOutput, XmlParseError> {
3149         start_element(tag_name, stack)?;
3150 
3151         let obj = DeleteObjectTaggingOutput::default();
3152 
3153         end_element(tag_name, stack)?;
3154 
3155         Ok(obj)
3156     }
3157 }
3158 #[derive(Default, Debug, Clone, PartialEq)]
3159 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3160 pub struct DeleteObjectTaggingRequest {
3161     /// <p>The bucket name containing the objects from which to remove the tags. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
3162     pub bucket: String,
3163     /// <p>Name of the tag.</p>
3164     pub key: String,
3165     /// <p>The versionId of the object that the tag-set will be removed from.</p>
3166     pub version_id: Option<String>,
3167 }
3168 
3169 #[derive(Default, Debug, Clone, PartialEq)]
3170 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3171 pub struct DeleteObjectsOutput {
3172     /// <p>Container element for a successful delete. It identifies the object that was successfully deleted.</p>
3173     pub deleted: Option<Vec<DeletedObject>>,
3174     /// <p>Container for a failed delete operation that describes the object that Amazon S3 attempted to delete and the error it encountered.</p>
3175     pub errors: Option<Vec<S3Error>>,
3176     pub request_charged: Option<String>,
3177 }
3178 
3179 #[allow(dead_code)]
3180 struct DeleteObjectsOutputDeserializer;
3181 impl DeleteObjectsOutputDeserializer {
3182     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<DeleteObjectsOutput, XmlParseError>3183     fn deserialize<T: Peek + Next>(
3184         tag_name: &str,
3185         stack: &mut T,
3186     ) -> Result<DeleteObjectsOutput, XmlParseError> {
3187         deserialize_elements::<_, DeleteObjectsOutput, _>(tag_name, stack, |name, stack, obj| {
3188             match name {
3189                 "Deleted" => {
3190                     obj.deleted
3191                         .get_or_insert(vec![])
3192                         .extend(DeletedObjectsDeserializer::deserialize("Deleted", stack)?);
3193                 }
3194                 "Error" => {
3195                     obj.errors
3196                         .get_or_insert(vec![])
3197                         .extend(ErrorsDeserializer::deserialize("Error", stack)?);
3198                 }
3199                 _ => skip_tree(stack),
3200             }
3201             Ok(())
3202         })
3203     }
3204 }
3205 #[derive(Default, Debug, Clone, PartialEq)]
3206 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3207 pub struct DeleteObjectsRequest {
3208     /// <p>The bucket name containing the objects to delete. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
3209     pub bucket: String,
3210     /// <p>Specifies whether you want to delete this object even if it has a Governance-type Object Lock in place. You must have sufficient permissions to perform this operation.</p>
3211     pub bypass_governance_retention: Option<bool>,
3212     /// <p>Container for the request.</p>
3213     pub delete: Delete,
3214     /// <p>The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device. Required to permanently delete a versioned object if versioning is configured with MFA delete enabled.</p>
3215     pub mfa: Option<String>,
3216     pub request_payer: Option<String>,
3217 }
3218 
3219 #[derive(Default, Debug, Clone, PartialEq)]
3220 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3221 pub struct DeletePublicAccessBlockRequest {
3222     /// <p>The Amazon S3 bucket whose <code>PublicAccessBlock</code> configuration you want to delete. </p>
3223     pub bucket: String,
3224 }
3225 
3226 /// <p>Information about the deleted object.</p>
3227 #[derive(Default, Debug, Clone, PartialEq)]
3228 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3229 pub struct DeletedObject {
3230     /// <p>Specifies whether the versioned object that was permanently deleted was (true) or was not (false) a delete marker. In a simple DELETE, this header indicates whether (true) or not (false) a delete marker was created.</p>
3231     pub delete_marker: Option<bool>,
3232     /// <p>The version ID of the delete marker created as a result of the DELETE operation. If you delete a specific object version, the value returned by this header is the version ID of the object version deleted.</p>
3233     pub delete_marker_version_id: Option<String>,
3234     /// <p>The name of the deleted object.</p>
3235     pub key: Option<String>,
3236     /// <p>The version ID of the deleted object.</p>
3237     pub version_id: Option<String>,
3238 }
3239 
3240 #[allow(dead_code)]
3241 struct DeletedObjectDeserializer;
3242 impl DeletedObjectDeserializer {
3243     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<DeletedObject, XmlParseError>3244     fn deserialize<T: Peek + Next>(
3245         tag_name: &str,
3246         stack: &mut T,
3247     ) -> Result<DeletedObject, XmlParseError> {
3248         deserialize_elements::<_, DeletedObject, _>(tag_name, stack, |name, stack, obj| {
3249             match name {
3250                 "DeleteMarker" => {
3251                     obj.delete_marker = Some(DeleteMarkerDeserializer::deserialize(
3252                         "DeleteMarker",
3253                         stack,
3254                     )?);
3255                 }
3256                 "DeleteMarkerVersionId" => {
3257                     obj.delete_marker_version_id =
3258                         Some(DeleteMarkerVersionIdDeserializer::deserialize(
3259                             "DeleteMarkerVersionId",
3260                             stack,
3261                         )?);
3262                 }
3263                 "Key" => {
3264                     obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
3265                 }
3266                 "VersionId" => {
3267                     obj.version_id = Some(ObjectVersionIdDeserializer::deserialize(
3268                         "VersionId",
3269                         stack,
3270                     )?);
3271                 }
3272                 _ => skip_tree(stack),
3273             }
3274             Ok(())
3275         })
3276     }
3277 }
3278 #[allow(dead_code)]
3279 struct DeletedObjectsDeserializer;
3280 impl DeletedObjectsDeserializer {
3281     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<DeletedObject>, XmlParseError>3282     fn deserialize<T: Peek + Next>(
3283         tag_name: &str,
3284         stack: &mut T,
3285     ) -> Result<Vec<DeletedObject>, XmlParseError> {
3286         let mut obj = vec![];
3287 
3288         loop {
3289             let consume_next_tag = match stack.peek() {
3290                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
3291                     name.local_name == tag_name
3292                 }
3293                 _ => false,
3294             };
3295 
3296             if consume_next_tag {
3297                 obj.push(DeletedObjectDeserializer::deserialize(tag_name, stack)?);
3298             } else {
3299                 break;
3300             }
3301         }
3302 
3303         Ok(obj)
3304     }
3305 }
3306 #[allow(dead_code)]
3307 struct DelimiterDeserializer;
3308 impl DelimiterDeserializer {
3309     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3310     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3311         start_element(tag_name, stack)?;
3312         let obj = characters(stack)?;
3313         end_element(tag_name, stack)?;
3314 
3315         Ok(obj)
3316     }
3317 }
3318 
3319 pub struct DelimiterSerializer;
3320 impl DelimiterSerializer {
3321     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3322     pub fn serialize<W>(
3323         mut writer: &mut EventWriter<W>,
3324         name: &str,
3325         obj: &String,
3326     ) -> Result<(), xml::writer::Error>
3327     where
3328         W: Write,
3329     {
3330         writer.write(xml::writer::XmlEvent::start_element(name))?;
3331         writer.write(xml::writer::XmlEvent::characters(&format!(
3332             "{value}",
3333             value = obj.to_string()
3334         )))?;
3335         writer.write(xml::writer::XmlEvent::end_element())
3336     }
3337 }
3338 
3339 pub struct DescriptionSerializer;
3340 impl DescriptionSerializer {
3341     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3342     pub fn serialize<W>(
3343         mut writer: &mut EventWriter<W>,
3344         name: &str,
3345         obj: &String,
3346     ) -> Result<(), xml::writer::Error>
3347     where
3348         W: Write,
3349     {
3350         writer.write(xml::writer::XmlEvent::start_element(name))?;
3351         writer.write(xml::writer::XmlEvent::characters(&format!(
3352             "{value}",
3353             value = obj.to_string()
3354         )))?;
3355         writer.write(xml::writer::XmlEvent::end_element())
3356     }
3357 }
3358 
3359 /// <p>Specifies information about where to publish analysis or configuration results for an Amazon S3 bucket and S3 Replication Time Control (S3 RTC).</p>
3360 #[derive(Default, Debug, Clone, PartialEq)]
3361 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3362 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3363 pub struct Destination {
3364     /// <p>Specify this only in a cross-account scenario (where source and destination bucket owners are not the same), and you want to change replica ownership to the AWS account that owns the destination bucket. If this is not specified in the replication configuration, the replicas are owned by same AWS account that owns the source object.</p>
3365     pub access_control_translation: Option<AccessControlTranslation>,
3366     /// <p>Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to change replica ownership to the AWS account that owns the destination bucket by specifying the <code>AccessControlTranslation</code> property, this is the account ID of the destination bucket owner. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-change-owner.html">Replication Additional Configuration: Changing the Replica Owner</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
3367     pub account: Option<String>,
3368     /// <p> The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the results.</p>
3369     pub bucket: String,
3370     /// <p>A container that provides information about encryption. If <code>SourceSelectionCriteria</code> is specified, you must specify this element.</p>
3371     pub encryption_configuration: Option<EncryptionConfiguration>,
3372     /// <p> A container specifying replication metrics-related settings enabling metrics and Amazon S3 events for S3 Replication Time Control (S3 RTC). Must be specified together with a <code>ReplicationTime</code> block. </p>
3373     pub metrics: Option<Metrics>,
3374     /// <p> A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated. Must be specified together with a <code>Metrics</code> block. </p>
3375     pub replication_time: Option<ReplicationTime>,
3376     /// <p> The storage class to use when replicating objects, such as standard or reduced redundancy. By default, Amazon S3 uses the storage class of the source object to create the object replica. </p> <p>For valid values, see the <code>StorageClass</code> element of the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html">PUT Bucket replication</a> action in the <i>Amazon Simple Storage Service API Reference</i>.</p>
3377     pub storage_class: Option<String>,
3378 }
3379 
3380 #[allow(dead_code)]
3381 struct DestinationDeserializer;
3382 impl DestinationDeserializer {
3383     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Destination, XmlParseError>3384     fn deserialize<T: Peek + Next>(
3385         tag_name: &str,
3386         stack: &mut T,
3387     ) -> Result<Destination, XmlParseError> {
3388         deserialize_elements::<_, Destination, _>(tag_name, stack, |name, stack, obj| {
3389             match name {
3390                 "AccessControlTranslation" => {
3391                     obj.access_control_translation =
3392                         Some(AccessControlTranslationDeserializer::deserialize(
3393                             "AccessControlTranslation",
3394                             stack,
3395                         )?);
3396                 }
3397                 "Account" => {
3398                     obj.account = Some(AccountIdDeserializer::deserialize("Account", stack)?);
3399                 }
3400                 "Bucket" => {
3401                     obj.bucket = BucketNameDeserializer::deserialize("Bucket", stack)?;
3402                 }
3403                 "EncryptionConfiguration" => {
3404                     obj.encryption_configuration =
3405                         Some(EncryptionConfigurationDeserializer::deserialize(
3406                             "EncryptionConfiguration",
3407                             stack,
3408                         )?);
3409                 }
3410                 "Metrics" => {
3411                     obj.metrics = Some(MetricsDeserializer::deserialize("Metrics", stack)?);
3412                 }
3413                 "ReplicationTime" => {
3414                     obj.replication_time = Some(ReplicationTimeDeserializer::deserialize(
3415                         "ReplicationTime",
3416                         stack,
3417                     )?);
3418                 }
3419                 "StorageClass" => {
3420                     obj.storage_class = Some(StorageClassDeserializer::deserialize(
3421                         "StorageClass",
3422                         stack,
3423                     )?);
3424                 }
3425                 _ => skip_tree(stack),
3426             }
3427             Ok(())
3428         })
3429     }
3430 }
3431 
3432 pub struct DestinationSerializer;
3433 impl DestinationSerializer {
3434     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Destination, ) -> Result<(), xml::writer::Error> where W: Write,3435     pub fn serialize<W>(
3436         mut writer: &mut EventWriter<W>,
3437         name: &str,
3438         obj: &Destination,
3439     ) -> Result<(), xml::writer::Error>
3440     where
3441         W: Write,
3442     {
3443         writer.write(xml::writer::XmlEvent::start_element(name))?;
3444         if let Some(ref value) = obj.access_control_translation {
3445             &AccessControlTranslationSerializer::serialize(
3446                 &mut writer,
3447                 "AccessControlTranslation",
3448                 value,
3449             )?;
3450         }
3451         if let Some(ref value) = obj.account {
3452             writer.write(xml::writer::XmlEvent::start_element("Account"))?;
3453             writer.write(xml::writer::XmlEvent::characters(&format!(
3454                 "{value}",
3455                 value = value
3456             )));
3457             writer.write(xml::writer::XmlEvent::end_element())?;
3458         }
3459         writer.write(xml::writer::XmlEvent::start_element("Bucket"))?;
3460         writer.write(xml::writer::XmlEvent::characters(&format!(
3461             "{value}",
3462             value = obj.bucket
3463         )))?;
3464         writer.write(xml::writer::XmlEvent::end_element())?;
3465         if let Some(ref value) = obj.encryption_configuration {
3466             &EncryptionConfigurationSerializer::serialize(
3467                 &mut writer,
3468                 "EncryptionConfiguration",
3469                 value,
3470             )?;
3471         }
3472         if let Some(ref value) = obj.metrics {
3473             &MetricsSerializer::serialize(&mut writer, "Metrics", value)?;
3474         }
3475         if let Some(ref value) = obj.replication_time {
3476             &ReplicationTimeSerializer::serialize(&mut writer, "ReplicationTime", value)?;
3477         }
3478         if let Some(ref value) = obj.storage_class {
3479             writer.write(xml::writer::XmlEvent::start_element("StorageClass"))?;
3480             writer.write(xml::writer::XmlEvent::characters(&format!(
3481                 "{value}",
3482                 value = value
3483             )));
3484             writer.write(xml::writer::XmlEvent::end_element())?;
3485         }
3486         writer.write(xml::writer::XmlEvent::end_element())
3487     }
3488 }
3489 
3490 #[allow(dead_code)]
3491 struct DisplayNameDeserializer;
3492 impl DisplayNameDeserializer {
3493     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3494     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3495         start_element(tag_name, stack)?;
3496         let obj = characters(stack)?;
3497         end_element(tag_name, stack)?;
3498 
3499         Ok(obj)
3500     }
3501 }
3502 
3503 pub struct DisplayNameSerializer;
3504 impl DisplayNameSerializer {
3505     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3506     pub fn serialize<W>(
3507         mut writer: &mut EventWriter<W>,
3508         name: &str,
3509         obj: &String,
3510     ) -> Result<(), xml::writer::Error>
3511     where
3512         W: Write,
3513     {
3514         writer.write(xml::writer::XmlEvent::start_element(name))?;
3515         writer.write(xml::writer::XmlEvent::characters(&format!(
3516             "{value}",
3517             value = obj.to_string()
3518         )))?;
3519         writer.write(xml::writer::XmlEvent::end_element())
3520     }
3521 }
3522 
3523 #[allow(dead_code)]
3524 struct ETagDeserializer;
3525 impl ETagDeserializer {
3526     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3527     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3528         start_element(tag_name, stack)?;
3529         let obj = characters(stack)?;
3530         end_element(tag_name, stack)?;
3531 
3532         Ok(obj)
3533     }
3534 }
3535 
3536 pub struct ETagSerializer;
3537 impl ETagSerializer {
3538     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3539     pub fn serialize<W>(
3540         mut writer: &mut EventWriter<W>,
3541         name: &str,
3542         obj: &String,
3543     ) -> Result<(), xml::writer::Error>
3544     where
3545         W: Write,
3546     {
3547         writer.write(xml::writer::XmlEvent::start_element(name))?;
3548         writer.write(xml::writer::XmlEvent::characters(&format!(
3549             "{value}",
3550             value = obj.to_string()
3551         )))?;
3552         writer.write(xml::writer::XmlEvent::end_element())
3553     }
3554 }
3555 
3556 #[allow(dead_code)]
3557 struct EmailAddressDeserializer;
3558 impl EmailAddressDeserializer {
3559     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3560     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3561         start_element(tag_name, stack)?;
3562         let obj = characters(stack)?;
3563         end_element(tag_name, stack)?;
3564 
3565         Ok(obj)
3566     }
3567 }
3568 
3569 pub struct EmailAddressSerializer;
3570 impl EmailAddressSerializer {
3571     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3572     pub fn serialize<W>(
3573         mut writer: &mut EventWriter<W>,
3574         name: &str,
3575         obj: &String,
3576     ) -> Result<(), xml::writer::Error>
3577     where
3578         W: Write,
3579     {
3580         writer.write(xml::writer::XmlEvent::start_element(name))?;
3581         writer.write(xml::writer::XmlEvent::characters(&format!(
3582             "{value}",
3583             value = obj.to_string()
3584         )))?;
3585         writer.write(xml::writer::XmlEvent::end_element())
3586     }
3587 }
3588 
3589 pub struct EnableRequestProgressSerializer;
3590 impl EnableRequestProgressSerializer {
3591     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,3592     pub fn serialize<W>(
3593         mut writer: &mut EventWriter<W>,
3594         name: &str,
3595         obj: &bool,
3596     ) -> Result<(), xml::writer::Error>
3597     where
3598         W: Write,
3599     {
3600         writer.write(xml::writer::XmlEvent::start_element(name))?;
3601         writer.write(xml::writer::XmlEvent::characters(&format!(
3602             "{value}",
3603             value = obj.to_string()
3604         )))?;
3605         writer.write(xml::writer::XmlEvent::end_element())
3606     }
3607 }
3608 
3609 #[allow(dead_code)]
3610 struct EncodingTypeDeserializer;
3611 impl EncodingTypeDeserializer {
3612     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3613     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3614         start_element(tag_name, stack)?;
3615         let obj = characters(stack)?;
3616         end_element(tag_name, stack)?;
3617 
3618         Ok(obj)
3619     }
3620 }
3621 
3622 pub struct EncodingTypeSerializer;
3623 impl EncodingTypeSerializer {
3624     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3625     pub fn serialize<W>(
3626         mut writer: &mut EventWriter<W>,
3627         name: &str,
3628         obj: &String,
3629     ) -> Result<(), xml::writer::Error>
3630     where
3631         W: Write,
3632     {
3633         writer.write(xml::writer::XmlEvent::start_element(name))?;
3634         writer.write(xml::writer::XmlEvent::characters(&format!(
3635             "{value}",
3636             value = obj.to_string()
3637         )))?;
3638         writer.write(xml::writer::XmlEvent::end_element())
3639     }
3640 }
3641 
3642 /// <p>Contains the type of server-side encryption used.</p>
3643 #[derive(Default, Debug, Clone, PartialEq)]
3644 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3645 pub struct Encryption {
3646     /// <p>The server-side encryption algorithm used when storing job results in Amazon S3 (for example, AES256, aws:kms).</p>
3647     pub encryption_type: String,
3648     /// <p>If the encryption type is <code>aws:kms</code>, this optional value can be used to specify the encryption context for the restore results.</p>
3649     pub kms_context: Option<String>,
3650     /// <p>If the encryption type is <code>aws:kms</code>, this optional value specifies the ID of the symmetric customer managed AWS KMS CMK to use for encryption of job results. Amazon S3 only supports symmetric CMKs. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric Keys</a> in the <i>AWS Key Management Service Developer Guide</i>.</p>
3651     pub kms_key_id: Option<String>,
3652 }
3653 
3654 pub struct EncryptionSerializer;
3655 impl EncryptionSerializer {
3656     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Encryption, ) -> Result<(), xml::writer::Error> where W: Write,3657     pub fn serialize<W>(
3658         mut writer: &mut EventWriter<W>,
3659         name: &str,
3660         obj: &Encryption,
3661     ) -> Result<(), xml::writer::Error>
3662     where
3663         W: Write,
3664     {
3665         writer.write(xml::writer::XmlEvent::start_element(name))?;
3666         writer.write(xml::writer::XmlEvent::start_element("EncryptionType"))?;
3667         writer.write(xml::writer::XmlEvent::characters(&format!(
3668             "{value}",
3669             value = obj.encryption_type
3670         )))?;
3671         writer.write(xml::writer::XmlEvent::end_element())?;
3672         if let Some(ref value) = obj.kms_context {
3673             writer.write(xml::writer::XmlEvent::start_element("KMSContext"))?;
3674             writer.write(xml::writer::XmlEvent::characters(&format!(
3675                 "{value}",
3676                 value = value
3677             )));
3678             writer.write(xml::writer::XmlEvent::end_element())?;
3679         }
3680         if let Some(ref value) = obj.kms_key_id {
3681             writer.write(xml::writer::XmlEvent::start_element("KMSKeyId"))?;
3682             writer.write(xml::writer::XmlEvent::characters(&format!(
3683                 "{value}",
3684                 value = value
3685             )));
3686             writer.write(xml::writer::XmlEvent::end_element())?;
3687         }
3688         writer.write(xml::writer::XmlEvent::end_element())
3689     }
3690 }
3691 
3692 /// <p>Specifies encryption-related information for an Amazon S3 bucket that is a destination for replicated objects.</p>
3693 #[derive(Default, Debug, Clone, PartialEq)]
3694 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3695 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3696 pub struct EncryptionConfiguration {
3697     /// <p>Specifies the ID (Key ARN or Alias ARN) of the customer managed customer master key (CMK) stored in AWS Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to encrypt replica objects. Amazon S3 only supports symmetric customer managed CMKs. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric Keys</a> in the <i>AWS Key Management Service Developer Guide</i>.</p>
3698     pub replica_kms_key_id: Option<String>,
3699 }
3700 
3701 #[allow(dead_code)]
3702 struct EncryptionConfigurationDeserializer;
3703 impl EncryptionConfigurationDeserializer {
3704     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<EncryptionConfiguration, XmlParseError>3705     fn deserialize<T: Peek + Next>(
3706         tag_name: &str,
3707         stack: &mut T,
3708     ) -> Result<EncryptionConfiguration, XmlParseError> {
3709         deserialize_elements::<_, EncryptionConfiguration, _>(
3710             tag_name,
3711             stack,
3712             |name, stack, obj| {
3713                 match name {
3714                     "ReplicaKmsKeyID" => {
3715                         obj.replica_kms_key_id = Some(ReplicaKmsKeyIDDeserializer::deserialize(
3716                             "ReplicaKmsKeyID",
3717                             stack,
3718                         )?);
3719                     }
3720                     _ => skip_tree(stack),
3721                 }
3722                 Ok(())
3723             },
3724         )
3725     }
3726 }
3727 
3728 pub struct EncryptionConfigurationSerializer;
3729 impl EncryptionConfigurationSerializer {
3730     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &EncryptionConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,3731     pub fn serialize<W>(
3732         mut writer: &mut EventWriter<W>,
3733         name: &str,
3734         obj: &EncryptionConfiguration,
3735     ) -> Result<(), xml::writer::Error>
3736     where
3737         W: Write,
3738     {
3739         writer.write(xml::writer::XmlEvent::start_element(name))?;
3740         if let Some(ref value) = obj.replica_kms_key_id {
3741             writer.write(xml::writer::XmlEvent::start_element("ReplicaKmsKeyID"))?;
3742             writer.write(xml::writer::XmlEvent::characters(&format!(
3743                 "{value}",
3744                 value = value
3745             )));
3746             writer.write(xml::writer::XmlEvent::end_element())?;
3747         }
3748         writer.write(xml::writer::XmlEvent::end_element())
3749     }
3750 }
3751 
3752 pub struct EndSerializer;
3753 impl EndSerializer {
3754     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,3755     pub fn serialize<W>(
3756         mut writer: &mut EventWriter<W>,
3757         name: &str,
3758         obj: &i64,
3759     ) -> Result<(), xml::writer::Error>
3760     where
3761         W: Write,
3762     {
3763         writer.write(xml::writer::XmlEvent::start_element(name))?;
3764         writer.write(xml::writer::XmlEvent::characters(&format!(
3765             "{value}",
3766             value = obj.to_string()
3767         )))?;
3768         writer.write(xml::writer::XmlEvent::end_element())
3769     }
3770 }
3771 
3772 /// <p>A message that indicates the request is complete and no more messages will be sent. You should not assume that the request is complete until the client receives an <code>EndEvent</code>.</p>
3773 #[derive(Default, Debug, Clone, PartialEq)]
3774 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3775 pub struct EndEvent {}
3776 
3777 #[allow(dead_code)]
3778 struct EndEventDeserializer;
3779 impl EndEventDeserializer {
3780     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<EndEvent, XmlParseError>3781     fn deserialize<T: Peek + Next>(
3782         tag_name: &str,
3783         stack: &mut T,
3784     ) -> Result<EndEvent, XmlParseError> {
3785         start_element(tag_name, stack)?;
3786 
3787         let obj = EndEvent::default();
3788 
3789         end_element(tag_name, stack)?;
3790 
3791         Ok(obj)
3792     }
3793 }
3794 /// <p>Container for all error elements.</p>
3795 #[derive(Default, Debug, Clone, PartialEq)]
3796 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3797 pub struct S3Error {
3798     /// <p><p>The error code is a string that uniquely identifies an error condition. It is meant to be read and understood by programs that detect and handle errors by type. </p> <p class="title"> <b>Amazon S3 error codes</b> </p> <ul> <li> <ul> <li> <p> <i>Code:</i> AccessDenied </p> </li> <li> <p> <i>Description:</i> Access Denied</p> </li> <li> <p> <i>HTTP Status Code:</i> 403 Forbidden</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> AccountProblem</p> </li> <li> <p> <i>Description:</i> There is a problem with your AWS account that prevents the operation from completing successfully. Contact AWS Support for further assistance.</p> </li> <li> <p> <i>HTTP Status Code:</i> 403 Forbidden</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> AllAccessDisabled</p> </li> <li> <p> <i>Description:</i> All access to this Amazon S3 resource has been disabled. Contact AWS Support for further assistance.</p> </li> <li> <p> <i>HTTP Status Code:</i> 403 Forbidden</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> AmbiguousGrantByEmailAddress</p> </li> <li> <p> <i>Description:</i> The email address you provided is associated with more than one account.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> AuthorizationHeaderMalformed</p> </li> <li> <p> <i>Description:</i> The authorization header you provided is invalid.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>HTTP Status Code:</i> N/A</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> BadDigest</p> </li> <li> <p> <i>Description:</i> The Content-MD5 you specified did not match what we received.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> BucketAlreadyExists</p> </li> <li> <p> <i>Description:</i> The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.</p> </li> <li> <p> <i>HTTP Status Code:</i> 409 Conflict</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> BucketAlreadyOwnedByYou</p> </li> <li> <p> <i>Description:</i> The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all AWS Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs).</p> </li> <li> <p> <i>Code:</i> 409 Conflict (in all Regions except the North Virginia Region) </p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> BucketNotEmpty</p> </li> <li> <p> <i>Description:</i> The bucket you tried to delete is not empty.</p> </li> <li> <p> <i>HTTP Status Code:</i> 409 Conflict</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> CredentialsNotSupported</p> </li> <li> <p> <i>Description:</i> This request does not support credentials.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> CrossLocationLoggingProhibited</p> </li> <li> <p> <i>Description:</i> Cross-location logging not allowed. Buckets in one geographic location cannot log information to a bucket in another location.</p> </li> <li> <p> <i>HTTP Status Code:</i> 403 Forbidden</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> EntityTooSmall</p> </li> <li> <p> <i>Description:</i> Your proposed upload is smaller than the minimum allowed object size.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> EntityTooLarge</p> </li> <li> <p> <i>Description:</i> Your proposed upload exceeds the maximum allowed object size.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> ExpiredToken</p> </li> <li> <p> <i>Description:</i> The provided token has expired.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> IllegalVersioningConfigurationException </p> </li> <li> <p> <i>Description:</i> Indicates that the versioning configuration specified in the request is invalid.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> IncompleteBody</p> </li> <li> <p> <i>Description:</i> You did not provide the number of bytes specified by the Content-Length HTTP header</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> IncorrectNumberOfFilesInPostRequest</p> </li> <li> <p> <i>Description:</i> POST requires exactly one file upload per request.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InlineDataTooLarge</p> </li> <li> <p> <i>Description:</i> Inline data exceeds the maximum allowed size.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InternalError</p> </li> <li> <p> <i>Description:</i> We encountered an internal error. Please try again.</p> </li> <li> <p> <i>HTTP Status Code:</i> 500 Internal Server Error</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Server</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidAccessKeyId</p> </li> <li> <p> <i>Description:</i> The AWS access key ID you provided does not exist in our records.</p> </li> <li> <p> <i>HTTP Status Code:</i> 403 Forbidden</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidAddressingHeader</p> </li> <li> <p> <i>Description:</i> You must specify the Anonymous role.</p> </li> <li> <p> <i>HTTP Status Code:</i> N/A</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidArgument</p> </li> <li> <p> <i>Description:</i> Invalid Argument</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidBucketName</p> </li> <li> <p> <i>Description:</i> The specified bucket is not valid.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidBucketState</p> </li> <li> <p> <i>Description:</i> The request is not valid with the current state of the bucket.</p> </li> <li> <p> <i>HTTP Status Code:</i> 409 Conflict</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidDigest</p> </li> <li> <p> <i>Description:</i> The Content-MD5 you specified is not valid.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidEncryptionAlgorithmError</p> </li> <li> <p> <i>Description:</i> The encryption request you specified is not valid. The valid value is AES256.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidLocationConstraint</p> </li> <li> <p> <i>Description:</i> The specified location constraint is not valid. For more information about Regions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro">How to Select a Region for Your Buckets</a>. </p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidObjectState</p> </li> <li> <p> <i>Description:</i> The operation is not valid for the current state of the object.</p> </li> <li> <p> <i>HTTP Status Code:</i> 403 Forbidden</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidPart</p> </li> <li> <p> <i>Description:</i> One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part&#39;s entity tag.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidPartOrder</p> </li> <li> <p> <i>Description:</i> The list of parts was not in ascending order. Parts list must be specified in order by part number.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidPayer</p> </li> <li> <p> <i>Description:</i> All access to this object has been disabled. Please contact AWS Support for further assistance.</p> </li> <li> <p> <i>HTTP Status Code:</i> 403 Forbidden</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidPolicyDocument</p> </li> <li> <p> <i>Description:</i> The content of the form does not meet the conditions specified in the policy document.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidRange</p> </li> <li> <p> <i>Description:</i> The requested range cannot be satisfied.</p> </li> <li> <p> <i>HTTP Status Code:</i> 416 Requested Range Not Satisfiable</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidRequest</p> </li> <li> <p> <i>Description:</i> Please use AWS4-HMAC-SHA256.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>Code:</i> N/A</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidRequest</p> </li> <li> <p> <i>Description:</i> SOAP requests must be made over an HTTPS connection.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidRequest</p> </li> <li> <p> <i>Description:</i> Amazon S3 Transfer Acceleration is not supported for buckets with non-DNS compliant names.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>Code:</i> N/A</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidRequest</p> </li> <li> <p> <i>Description:</i> Amazon S3 Transfer Acceleration is not supported for buckets with periods (.) in their names.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>Code:</i> N/A</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidRequest</p> </li> <li> <p> <i>Description:</i> Amazon S3 Transfer Accelerate endpoint only supports virtual style requests.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>Code:</i> N/A</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidRequest</p> </li> <li> <p> <i>Description:</i> Amazon S3 Transfer Accelerate is not configured on this bucket.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>Code:</i> N/A</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidRequest</p> </li> <li> <p> <i>Description:</i> Amazon S3 Transfer Accelerate is disabled on this bucket.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>Code:</i> N/A</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidRequest</p> </li> <li> <p> <i>Description:</i> Amazon S3 Transfer Acceleration is not supported on this bucket. Contact AWS Support for more information.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>Code:</i> N/A</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidRequest</p> </li> <li> <p> <i>Description:</i> Amazon S3 Transfer Acceleration cannot be enabled on this bucket. Contact AWS Support for more information.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>Code:</i> N/A</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidSecurity</p> </li> <li> <p> <i>Description:</i> The provided security credentials are not valid.</p> </li> <li> <p> <i>HTTP Status Code:</i> 403 Forbidden</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidSOAPRequest</p> </li> <li> <p> <i>Description:</i> The SOAP request body is invalid.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidStorageClass</p> </li> <li> <p> <i>Description:</i> The storage class you specified is not valid.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidTargetBucketForLogging</p> </li> <li> <p> <i>Description:</i> The target bucket for logging does not exist, is not owned by you, or does not have the appropriate grants for the log-delivery group. </p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidToken</p> </li> <li> <p> <i>Description:</i> The provided token is malformed or otherwise invalid.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> InvalidURI</p> </li> <li> <p> <i>Description:</i> Couldn&#39;t parse the specified URI.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> KeyTooLongError</p> </li> <li> <p> <i>Description:</i> Your key is too long.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> MalformedACLError</p> </li> <li> <p> <i>Description:</i> The XML you provided was not well-formed or did not validate against our published schema.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> MalformedPOSTRequest </p> </li> <li> <p> <i>Description:</i> The body of your POST request is not well-formed multipart/form-data.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> MalformedXML</p> </li> <li> <p> <i>Description:</i> This happens when the user sends malformed XML (XML that doesn&#39;t conform to the published XSD) for the configuration. The error message is, &quot;The XML you provided was not well-formed or did not validate against our published schema.&quot; </p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> MaxMessageLengthExceeded</p> </li> <li> <p> <i>Description:</i> Your request was too big.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> MaxPostPreDataLengthExceededError</p> </li> <li> <p> <i>Description:</i> Your POST request fields preceding the upload file were too large.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> MetadataTooLarge</p> </li> <li> <p> <i>Description:</i> Your metadata headers exceed the maximum allowed metadata size.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> MethodNotAllowed</p> </li> <li> <p> <i>Description:</i> The specified method is not allowed against this resource.</p> </li> <li> <p> <i>HTTP Status Code:</i> 405 Method Not Allowed</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> MissingAttachment</p> </li> <li> <p> <i>Description:</i> A SOAP attachment was expected, but none were found.</p> </li> <li> <p> <i>HTTP Status Code:</i> N/A</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> MissingContentLength</p> </li> <li> <p> <i>Description:</i> You must provide the Content-Length HTTP header.</p> </li> <li> <p> <i>HTTP Status Code:</i> 411 Length Required</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> MissingRequestBodyError</p> </li> <li> <p> <i>Description:</i> This happens when the user sends an empty XML document as a request. The error message is, &quot;Request body is empty.&quot; </p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> MissingSecurityElement</p> </li> <li> <p> <i>Description:</i> The SOAP 1.1 request is missing a security element.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> MissingSecurityHeader</p> </li> <li> <p> <i>Description:</i> Your request is missing a required header.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> NoLoggingStatusForKey</p> </li> <li> <p> <i>Description:</i> There is no such thing as a logging status subresource for a key.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> NoSuchBucket</p> </li> <li> <p> <i>Description:</i> The specified bucket does not exist.</p> </li> <li> <p> <i>HTTP Status Code:</i> 404 Not Found</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> NoSuchBucketPolicy</p> </li> <li> <p> <i>Description:</i> The specified bucket does not have a bucket policy.</p> </li> <li> <p> <i>HTTP Status Code:</i> 404 Not Found</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> NoSuchKey</p> </li> <li> <p> <i>Description:</i> The specified key does not exist.</p> </li> <li> <p> <i>HTTP Status Code:</i> 404 Not Found</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> NoSuchLifecycleConfiguration</p> </li> <li> <p> <i>Description:</i> The lifecycle configuration does not exist. </p> </li> <li> <p> <i>HTTP Status Code:</i> 404 Not Found</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> NoSuchUpload</p> </li> <li> <p> <i>Description:</i> The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.</p> </li> <li> <p> <i>HTTP Status Code:</i> 404 Not Found</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> NoSuchVersion </p> </li> <li> <p> <i>Description:</i> Indicates that the version ID specified in the request does not match an existing version.</p> </li> <li> <p> <i>HTTP Status Code:</i> 404 Not Found</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> NotImplemented</p> </li> <li> <p> <i>Description:</i> A header you provided implies functionality that is not implemented.</p> </li> <li> <p> <i>HTTP Status Code:</i> 501 Not Implemented</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Server</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> NotSignedUp</p> </li> <li> <p> <i>Description:</i> Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: https://aws.amazon.com/s3</p> </li> <li> <p> <i>HTTP Status Code:</i> 403 Forbidden</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> OperationAborted</p> </li> <li> <p> <i>Description:</i> A conflicting conditional operation is currently in progress against this resource. Try again.</p> </li> <li> <p> <i>HTTP Status Code:</i> 409 Conflict</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> PermanentRedirect</p> </li> <li> <p> <i>Description:</i> The bucket you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint.</p> </li> <li> <p> <i>HTTP Status Code:</i> 301 Moved Permanently</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> PreconditionFailed</p> </li> <li> <p> <i>Description:</i> At least one of the preconditions you specified did not hold.</p> </li> <li> <p> <i>HTTP Status Code:</i> 412 Precondition Failed</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> Redirect</p> </li> <li> <p> <i>Description:</i> Temporary redirect.</p> </li> <li> <p> <i>HTTP Status Code:</i> 307 Moved Temporarily</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> RestoreAlreadyInProgress</p> </li> <li> <p> <i>Description:</i> Object restore is already in progress.</p> </li> <li> <p> <i>HTTP Status Code:</i> 409 Conflict</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> RequestIsNotMultiPartContent</p> </li> <li> <p> <i>Description:</i> Bucket POST must be of the enclosure-type multipart/form-data.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> RequestTimeout</p> </li> <li> <p> <i>Description:</i> Your socket connection to the server was not read from or written to within the timeout period.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> RequestTimeTooSkewed</p> </li> <li> <p> <i>Description:</i> The difference between the request time and the server&#39;s time is too large.</p> </li> <li> <p> <i>HTTP Status Code:</i> 403 Forbidden</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> RequestTorrentOfBucketError</p> </li> <li> <p> <i>Description:</i> Requesting the torrent file of a bucket is not permitted.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> SignatureDoesNotMatch</p> </li> <li> <p> <i>Description:</i> The request signature we calculated does not match the signature you provided. Check your AWS secret access key and signing method. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/SOAPAuthentication.html">SOAP Authentication</a> for details.</p> </li> <li> <p> <i>HTTP Status Code:</i> 403 Forbidden</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> ServiceUnavailable</p> </li> <li> <p> <i>Description:</i> Reduce your request rate.</p> </li> <li> <p> <i>HTTP Status Code:</i> 503 Service Unavailable</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Server</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> SlowDown</p> </li> <li> <p> <i>Description:</i> Reduce your request rate.</p> </li> <li> <p> <i>HTTP Status Code:</i> 503 Slow Down</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Server</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> TemporaryRedirect</p> </li> <li> <p> <i>Description:</i> You are being redirected to the bucket while DNS updates.</p> </li> <li> <p> <i>HTTP Status Code:</i> 307 Moved Temporarily</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> TokenRefreshRequired</p> </li> <li> <p> <i>Description:</i> The provided token must be refreshed.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> TooManyBuckets</p> </li> <li> <p> <i>Description:</i> You have attempted to create more buckets than allowed.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> UnexpectedContent</p> </li> <li> <p> <i>Description:</i> This request does not support content.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> UnresolvableGrantByEmailAddress</p> </li> <li> <p> <i>Description:</i> The email address you provided does not match any account on record.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code:</i> UserKeyMustBeSpecified</p> </li> <li> <p> <i>Description:</i> The bucket POST must contain the specified field name. If it is specified, check the order of the fields.</p> </li> <li> <p> <i>HTTP Status Code:</i> 400 Bad Request</p> </li> <li> <p> <i>SOAP Fault Code Prefix:</i> Client</p> </li> </ul> </li> </ul> <p/></p>
3799     pub code: Option<String>,
3800     /// <p>The error key.</p>
3801     pub key: Option<String>,
3802     /// <p>The error message contains a generic description of the error condition in English. It is intended for a human audience. Simple programs display the message directly to the end user if they encounter an error condition they don't know how or don't care to handle. Sophisticated programs with more exhaustive error handling and proper internationalization are more likely to ignore the error message.</p>
3803     pub message: Option<String>,
3804     /// <p>The version ID of the error.</p>
3805     pub version_id: Option<String>,
3806 }
3807 
3808 #[allow(dead_code)]
3809 struct S3ErrorDeserializer;
3810 impl S3ErrorDeserializer {
3811     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<S3Error, XmlParseError>3812     fn deserialize<T: Peek + Next>(
3813         tag_name: &str,
3814         stack: &mut T,
3815     ) -> Result<S3Error, XmlParseError> {
3816         deserialize_elements::<_, S3Error, _>(tag_name, stack, |name, stack, obj| {
3817             match name {
3818                 "Code" => {
3819                     obj.code = Some(CodeDeserializer::deserialize("Code", stack)?);
3820                 }
3821                 "Key" => {
3822                     obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
3823                 }
3824                 "Message" => {
3825                     obj.message = Some(MessageDeserializer::deserialize("Message", stack)?);
3826                 }
3827                 "VersionId" => {
3828                     obj.version_id = Some(ObjectVersionIdDeserializer::deserialize(
3829                         "VersionId",
3830                         stack,
3831                     )?);
3832                 }
3833                 _ => skip_tree(stack),
3834             }
3835             Ok(())
3836         })
3837     }
3838 }
3839 /// <p>The error information.</p>
3840 #[derive(Default, Debug, Clone, PartialEq)]
3841 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3842 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3843 pub struct ErrorDocument {
3844     /// <p>The object key name to use when a 4XX class error occurs.</p>
3845     pub key: String,
3846 }
3847 
3848 #[allow(dead_code)]
3849 struct ErrorDocumentDeserializer;
3850 impl ErrorDocumentDeserializer {
3851     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ErrorDocument, XmlParseError>3852     fn deserialize<T: Peek + Next>(
3853         tag_name: &str,
3854         stack: &mut T,
3855     ) -> Result<ErrorDocument, XmlParseError> {
3856         deserialize_elements::<_, ErrorDocument, _>(tag_name, stack, |name, stack, obj| {
3857             match name {
3858                 "Key" => {
3859                     obj.key = ObjectKeyDeserializer::deserialize("Key", stack)?;
3860                 }
3861                 _ => skip_tree(stack),
3862             }
3863             Ok(())
3864         })
3865     }
3866 }
3867 
3868 pub struct ErrorDocumentSerializer;
3869 impl ErrorDocumentSerializer {
3870     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ErrorDocument, ) -> Result<(), xml::writer::Error> where W: Write,3871     pub fn serialize<W>(
3872         mut writer: &mut EventWriter<W>,
3873         name: &str,
3874         obj: &ErrorDocument,
3875     ) -> Result<(), xml::writer::Error>
3876     where
3877         W: Write,
3878     {
3879         writer.write(xml::writer::XmlEvent::start_element(name))?;
3880         writer.write(xml::writer::XmlEvent::start_element("Key"))?;
3881         writer.write(xml::writer::XmlEvent::characters(&format!(
3882             "{value}",
3883             value = obj.key
3884         )))?;
3885         writer.write(xml::writer::XmlEvent::end_element())?;
3886         writer.write(xml::writer::XmlEvent::end_element())
3887     }
3888 }
3889 
3890 #[allow(dead_code)]
3891 struct ErrorsDeserializer;
3892 impl ErrorsDeserializer {
3893     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<S3Error>, XmlParseError>3894     fn deserialize<T: Peek + Next>(
3895         tag_name: &str,
3896         stack: &mut T,
3897     ) -> Result<Vec<S3Error>, XmlParseError> {
3898         let mut obj = vec![];
3899 
3900         loop {
3901             let consume_next_tag = match stack.peek() {
3902                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
3903                     name.local_name == tag_name
3904                 }
3905                 _ => false,
3906             };
3907 
3908             if consume_next_tag {
3909                 obj.push(S3ErrorDeserializer::deserialize(tag_name, stack)?);
3910             } else {
3911                 break;
3912             }
3913         }
3914 
3915         Ok(obj)
3916     }
3917 }
3918 #[allow(dead_code)]
3919 struct EventDeserializer;
3920 impl EventDeserializer {
3921     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3922     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3923         start_element(tag_name, stack)?;
3924         let obj = characters(stack)?;
3925         end_element(tag_name, stack)?;
3926 
3927         Ok(obj)
3928     }
3929 }
3930 
3931 pub struct EventSerializer;
3932 impl EventSerializer {
3933     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3934     pub fn serialize<W>(
3935         mut writer: &mut EventWriter<W>,
3936         name: &str,
3937         obj: &String,
3938     ) -> Result<(), xml::writer::Error>
3939     where
3940         W: Write,
3941     {
3942         writer.write(xml::writer::XmlEvent::start_element(name))?;
3943         writer.write(xml::writer::XmlEvent::characters(&format!(
3944             "{value}",
3945             value = obj.to_string()
3946         )))?;
3947         writer.write(xml::writer::XmlEvent::end_element())
3948     }
3949 }
3950 
3951 #[allow(dead_code)]
3952 struct EventListDeserializer;
3953 impl EventListDeserializer {
3954     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<String>, XmlParseError>3955     fn deserialize<T: Peek + Next>(
3956         tag_name: &str,
3957         stack: &mut T,
3958     ) -> Result<Vec<String>, XmlParseError> {
3959         let mut obj = vec![];
3960 
3961         loop {
3962             let consume_next_tag = match stack.peek() {
3963                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
3964                     name.local_name == tag_name
3965                 }
3966                 _ => false,
3967             };
3968 
3969             if consume_next_tag {
3970                 obj.push(EventDeserializer::deserialize(tag_name, stack)?);
3971             } else {
3972                 break;
3973             }
3974         }
3975 
3976         Ok(obj)
3977     }
3978 }
3979 
3980 pub struct EventListSerializer;
3981 impl EventListSerializer {
3982     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<String>, ) -> Result<(), xml::writer::Error> where W: Write,3983     pub fn serialize<W>(
3984         mut writer: &mut EventWriter<W>,
3985         name: &str,
3986         obj: &Vec<String>,
3987     ) -> Result<(), xml::writer::Error>
3988     where
3989         W: Write,
3990     {
3991         for element in obj {
3992             EventSerializer::serialize(writer, name, element)?;
3993         }
3994         Ok(())
3995     }
3996 }
3997 
3998 /// <p>Optional configuration to replicate existing source bucket objects. For more information, see <a href=" https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication">Replicating Existing Objects</a> in the <i>Amazon S3 Developer Guide</i>. </p>
3999 #[derive(Default, Debug, Clone, PartialEq)]
4000 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4001 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4002 pub struct ExistingObjectReplication {
4003     /// <p><p/></p>
4004     pub status: String,
4005 }
4006 
4007 #[allow(dead_code)]
4008 struct ExistingObjectReplicationDeserializer;
4009 impl ExistingObjectReplicationDeserializer {
4010     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ExistingObjectReplication, XmlParseError>4011     fn deserialize<T: Peek + Next>(
4012         tag_name: &str,
4013         stack: &mut T,
4014     ) -> Result<ExistingObjectReplication, XmlParseError> {
4015         deserialize_elements::<_, ExistingObjectReplication, _>(
4016             tag_name,
4017             stack,
4018             |name, stack, obj| {
4019                 match name {
4020                     "Status" => {
4021                         obj.status = ExistingObjectReplicationStatusDeserializer::deserialize(
4022                             "Status", stack,
4023                         )?;
4024                     }
4025                     _ => skip_tree(stack),
4026                 }
4027                 Ok(())
4028             },
4029         )
4030     }
4031 }
4032 
4033 pub struct ExistingObjectReplicationSerializer;
4034 impl ExistingObjectReplicationSerializer {
4035     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ExistingObjectReplication, ) -> Result<(), xml::writer::Error> where W: Write,4036     pub fn serialize<W>(
4037         mut writer: &mut EventWriter<W>,
4038         name: &str,
4039         obj: &ExistingObjectReplication,
4040     ) -> Result<(), xml::writer::Error>
4041     where
4042         W: Write,
4043     {
4044         writer.write(xml::writer::XmlEvent::start_element(name))?;
4045         writer.write(xml::writer::XmlEvent::start_element("Status"))?;
4046         writer.write(xml::writer::XmlEvent::characters(&format!(
4047             "{value}",
4048             value = obj.status
4049         )))?;
4050         writer.write(xml::writer::XmlEvent::end_element())?;
4051         writer.write(xml::writer::XmlEvent::end_element())
4052     }
4053 }
4054 
4055 #[allow(dead_code)]
4056 struct ExistingObjectReplicationStatusDeserializer;
4057 impl ExistingObjectReplicationStatusDeserializer {
4058     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>4059     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4060         start_element(tag_name, stack)?;
4061         let obj = characters(stack)?;
4062         end_element(tag_name, stack)?;
4063 
4064         Ok(obj)
4065     }
4066 }
4067 
4068 pub struct ExistingObjectReplicationStatusSerializer;
4069 impl ExistingObjectReplicationStatusSerializer {
4070     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,4071     pub fn serialize<W>(
4072         mut writer: &mut EventWriter<W>,
4073         name: &str,
4074         obj: &String,
4075     ) -> Result<(), xml::writer::Error>
4076     where
4077         W: Write,
4078     {
4079         writer.write(xml::writer::XmlEvent::start_element(name))?;
4080         writer.write(xml::writer::XmlEvent::characters(&format!(
4081             "{value}",
4082             value = obj.to_string()
4083         )))?;
4084         writer.write(xml::writer::XmlEvent::end_element())
4085     }
4086 }
4087 
4088 #[allow(dead_code)]
4089 struct ExpirationStatusDeserializer;
4090 impl ExpirationStatusDeserializer {
4091     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>4092     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4093         start_element(tag_name, stack)?;
4094         let obj = characters(stack)?;
4095         end_element(tag_name, stack)?;
4096 
4097         Ok(obj)
4098     }
4099 }
4100 
4101 pub struct ExpirationStatusSerializer;
4102 impl ExpirationStatusSerializer {
4103     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,4104     pub fn serialize<W>(
4105         mut writer: &mut EventWriter<W>,
4106         name: &str,
4107         obj: &String,
4108     ) -> Result<(), xml::writer::Error>
4109     where
4110         W: Write,
4111     {
4112         writer.write(xml::writer::XmlEvent::start_element(name))?;
4113         writer.write(xml::writer::XmlEvent::characters(&format!(
4114             "{value}",
4115             value = obj.to_string()
4116         )))?;
4117         writer.write(xml::writer::XmlEvent::end_element())
4118     }
4119 }
4120 
4121 #[allow(dead_code)]
4122 struct ExpiredObjectDeleteMarkerDeserializer;
4123 impl ExpiredObjectDeleteMarkerDeserializer {
4124     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>4125     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
4126         start_element(tag_name, stack)?;
4127         let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
4128         end_element(tag_name, stack)?;
4129 
4130         Ok(obj)
4131     }
4132 }
4133 
4134 pub struct ExpiredObjectDeleteMarkerSerializer;
4135 impl ExpiredObjectDeleteMarkerSerializer {
4136     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,4137     pub fn serialize<W>(
4138         mut writer: &mut EventWriter<W>,
4139         name: &str,
4140         obj: &bool,
4141     ) -> Result<(), xml::writer::Error>
4142     where
4143         W: Write,
4144     {
4145         writer.write(xml::writer::XmlEvent::start_element(name))?;
4146         writer.write(xml::writer::XmlEvent::characters(&format!(
4147             "{value}",
4148             value = obj.to_string()
4149         )))?;
4150         writer.write(xml::writer::XmlEvent::end_element())
4151     }
4152 }
4153 
4154 #[allow(dead_code)]
4155 struct ExposeHeaderDeserializer;
4156 impl ExposeHeaderDeserializer {
4157     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>4158     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4159         start_element(tag_name, stack)?;
4160         let obj = characters(stack)?;
4161         end_element(tag_name, stack)?;
4162 
4163         Ok(obj)
4164     }
4165 }
4166 
4167 pub struct ExposeHeaderSerializer;
4168 impl ExposeHeaderSerializer {
4169     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,4170     pub fn serialize<W>(
4171         mut writer: &mut EventWriter<W>,
4172         name: &str,
4173         obj: &String,
4174     ) -> Result<(), xml::writer::Error>
4175     where
4176         W: Write,
4177     {
4178         writer.write(xml::writer::XmlEvent::start_element(name))?;
4179         writer.write(xml::writer::XmlEvent::characters(&format!(
4180             "{value}",
4181             value = obj.to_string()
4182         )))?;
4183         writer.write(xml::writer::XmlEvent::end_element())
4184     }
4185 }
4186 
4187 #[allow(dead_code)]
4188 struct ExposeHeadersDeserializer;
4189 impl ExposeHeadersDeserializer {
4190     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<String>, XmlParseError>4191     fn deserialize<T: Peek + Next>(
4192         tag_name: &str,
4193         stack: &mut T,
4194     ) -> Result<Vec<String>, XmlParseError> {
4195         let mut obj = vec![];
4196 
4197         loop {
4198             let consume_next_tag = match stack.peek() {
4199                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
4200                     name.local_name == tag_name
4201                 }
4202                 _ => false,
4203             };
4204 
4205             if consume_next_tag {
4206                 obj.push(ExposeHeaderDeserializer::deserialize(tag_name, stack)?);
4207             } else {
4208                 break;
4209             }
4210         }
4211 
4212         Ok(obj)
4213     }
4214 }
4215 
4216 pub struct ExposeHeadersSerializer;
4217 impl ExposeHeadersSerializer {
4218     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<String>, ) -> Result<(), xml::writer::Error> where W: Write,4219     pub fn serialize<W>(
4220         mut writer: &mut EventWriter<W>,
4221         name: &str,
4222         obj: &Vec<String>,
4223     ) -> Result<(), xml::writer::Error>
4224     where
4225         W: Write,
4226     {
4227         for element in obj {
4228             ExposeHeaderSerializer::serialize(writer, name, element)?;
4229         }
4230         Ok(())
4231     }
4232 }
4233 
4234 pub struct ExpressionSerializer;
4235 impl ExpressionSerializer {
4236     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,4237     pub fn serialize<W>(
4238         mut writer: &mut EventWriter<W>,
4239         name: &str,
4240         obj: &String,
4241     ) -> Result<(), xml::writer::Error>
4242     where
4243         W: Write,
4244     {
4245         writer.write(xml::writer::XmlEvent::start_element(name))?;
4246         writer.write(xml::writer::XmlEvent::characters(&format!(
4247             "{value}",
4248             value = obj.to_string()
4249         )))?;
4250         writer.write(xml::writer::XmlEvent::end_element())
4251     }
4252 }
4253 
4254 pub struct ExpressionTypeSerializer;
4255 impl ExpressionTypeSerializer {
4256     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,4257     pub fn serialize<W>(
4258         mut writer: &mut EventWriter<W>,
4259         name: &str,
4260         obj: &String,
4261     ) -> Result<(), xml::writer::Error>
4262     where
4263         W: Write,
4264     {
4265         writer.write(xml::writer::XmlEvent::start_element(name))?;
4266         writer.write(xml::writer::XmlEvent::characters(&format!(
4267             "{value}",
4268             value = obj.to_string()
4269         )))?;
4270         writer.write(xml::writer::XmlEvent::end_element())
4271     }
4272 }
4273 
4274 pub struct FetchOwnerSerializer;
4275 impl FetchOwnerSerializer {
4276     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,4277     pub fn serialize<W>(
4278         mut writer: &mut EventWriter<W>,
4279         name: &str,
4280         obj: &bool,
4281     ) -> Result<(), xml::writer::Error>
4282     where
4283         W: Write,
4284     {
4285         writer.write(xml::writer::XmlEvent::start_element(name))?;
4286         writer.write(xml::writer::XmlEvent::characters(&format!(
4287             "{value}",
4288             value = obj.to_string()
4289         )))?;
4290         writer.write(xml::writer::XmlEvent::end_element())
4291     }
4292 }
4293 
4294 pub struct FieldDelimiterSerializer;
4295 impl FieldDelimiterSerializer {
4296     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,4297     pub fn serialize<W>(
4298         mut writer: &mut EventWriter<W>,
4299         name: &str,
4300         obj: &String,
4301     ) -> Result<(), xml::writer::Error>
4302     where
4303         W: Write,
4304     {
4305         writer.write(xml::writer::XmlEvent::start_element(name))?;
4306         writer.write(xml::writer::XmlEvent::characters(&format!(
4307             "{value}",
4308             value = obj.to_string()
4309         )))?;
4310         writer.write(xml::writer::XmlEvent::end_element())
4311     }
4312 }
4313 
4314 pub struct FileHeaderInfoSerializer;
4315 impl FileHeaderInfoSerializer {
4316     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,4317     pub fn serialize<W>(
4318         mut writer: &mut EventWriter<W>,
4319         name: &str,
4320         obj: &String,
4321     ) -> Result<(), xml::writer::Error>
4322     where
4323         W: Write,
4324     {
4325         writer.write(xml::writer::XmlEvent::start_element(name))?;
4326         writer.write(xml::writer::XmlEvent::characters(&format!(
4327             "{value}",
4328             value = obj.to_string()
4329         )))?;
4330         writer.write(xml::writer::XmlEvent::end_element())
4331     }
4332 }
4333 
4334 /// <p>Specifies the Amazon S3 object key name to filter on and whether to filter on the suffix or prefix of the key name.</p>
4335 #[derive(Default, Debug, Clone, PartialEq)]
4336 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4337 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4338 pub struct FilterRule {
4339     /// <p>The object key name prefix or suffix identifying one or more objects to which the filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html">Configuring Event Notifications</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
4340     pub name: Option<String>,
4341     /// <p>The value that the filter searches for in object key names.</p>
4342     pub value: Option<String>,
4343 }
4344 
4345 #[allow(dead_code)]
4346 struct FilterRuleDeserializer;
4347 impl FilterRuleDeserializer {
4348     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<FilterRule, XmlParseError>4349     fn deserialize<T: Peek + Next>(
4350         tag_name: &str,
4351         stack: &mut T,
4352     ) -> Result<FilterRule, XmlParseError> {
4353         deserialize_elements::<_, FilterRule, _>(tag_name, stack, |name, stack, obj| {
4354             match name {
4355                 "Name" => {
4356                     obj.name = Some(FilterRuleNameDeserializer::deserialize("Name", stack)?);
4357                 }
4358                 "Value" => {
4359                     obj.value = Some(FilterRuleValueDeserializer::deserialize("Value", stack)?);
4360                 }
4361                 _ => skip_tree(stack),
4362             }
4363             Ok(())
4364         })
4365     }
4366 }
4367 
4368 pub struct FilterRuleSerializer;
4369 impl FilterRuleSerializer {
4370     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &FilterRule, ) -> Result<(), xml::writer::Error> where W: Write,4371     pub fn serialize<W>(
4372         mut writer: &mut EventWriter<W>,
4373         name: &str,
4374         obj: &FilterRule,
4375     ) -> Result<(), xml::writer::Error>
4376     where
4377         W: Write,
4378     {
4379         writer.write(xml::writer::XmlEvent::start_element(name))?;
4380         if let Some(ref value) = obj.name {
4381             writer.write(xml::writer::XmlEvent::start_element("Name"))?;
4382             writer.write(xml::writer::XmlEvent::characters(&format!(
4383                 "{value}",
4384                 value = value
4385             )));
4386             writer.write(xml::writer::XmlEvent::end_element())?;
4387         }
4388         if let Some(ref value) = obj.value {
4389             writer.write(xml::writer::XmlEvent::start_element("Value"))?;
4390             writer.write(xml::writer::XmlEvent::characters(&format!(
4391                 "{value}",
4392                 value = value
4393             )));
4394             writer.write(xml::writer::XmlEvent::end_element())?;
4395         }
4396         writer.write(xml::writer::XmlEvent::end_element())
4397     }
4398 }
4399 
4400 #[allow(dead_code)]
4401 struct FilterRuleListDeserializer;
4402 impl FilterRuleListDeserializer {
4403     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<FilterRule>, XmlParseError>4404     fn deserialize<T: Peek + Next>(
4405         tag_name: &str,
4406         stack: &mut T,
4407     ) -> Result<Vec<FilterRule>, XmlParseError> {
4408         let mut obj = vec![];
4409 
4410         loop {
4411             let consume_next_tag = match stack.peek() {
4412                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
4413                     name.local_name == tag_name
4414                 }
4415                 _ => false,
4416             };
4417 
4418             if consume_next_tag {
4419                 obj.push(FilterRuleDeserializer::deserialize(tag_name, stack)?);
4420             } else {
4421                 break;
4422             }
4423         }
4424 
4425         Ok(obj)
4426     }
4427 }
4428 
4429 pub struct FilterRuleListSerializer;
4430 impl FilterRuleListSerializer {
4431     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<FilterRule>, ) -> Result<(), xml::writer::Error> where W: Write,4432     pub fn serialize<W>(
4433         mut writer: &mut EventWriter<W>,
4434         name: &str,
4435         obj: &Vec<FilterRule>,
4436     ) -> Result<(), xml::writer::Error>
4437     where
4438         W: Write,
4439     {
4440         for element in obj {
4441             FilterRuleSerializer::serialize(writer, name, element)?;
4442         }
4443         Ok(())
4444     }
4445 }
4446 
4447 #[allow(dead_code)]
4448 struct FilterRuleNameDeserializer;
4449 impl FilterRuleNameDeserializer {
4450     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>4451     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4452         start_element(tag_name, stack)?;
4453         let obj = characters(stack)?;
4454         end_element(tag_name, stack)?;
4455 
4456         Ok(obj)
4457     }
4458 }
4459 
4460 pub struct FilterRuleNameSerializer;
4461 impl FilterRuleNameSerializer {
4462     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,4463     pub fn serialize<W>(
4464         mut writer: &mut EventWriter<W>,
4465         name: &str,
4466         obj: &String,
4467     ) -> Result<(), xml::writer::Error>
4468     where
4469         W: Write,
4470     {
4471         writer.write(xml::writer::XmlEvent::start_element(name))?;
4472         writer.write(xml::writer::XmlEvent::characters(&format!(
4473             "{value}",
4474             value = obj.to_string()
4475         )))?;
4476         writer.write(xml::writer::XmlEvent::end_element())
4477     }
4478 }
4479 
4480 #[allow(dead_code)]
4481 struct FilterRuleValueDeserializer;
4482 impl FilterRuleValueDeserializer {
4483     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>4484     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4485         start_element(tag_name, stack)?;
4486         let obj = characters(stack)?;
4487         end_element(tag_name, stack)?;
4488 
4489         Ok(obj)
4490     }
4491 }
4492 
4493 pub struct FilterRuleValueSerializer;
4494 impl FilterRuleValueSerializer {
4495     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,4496     pub fn serialize<W>(
4497         mut writer: &mut EventWriter<W>,
4498         name: &str,
4499         obj: &String,
4500     ) -> Result<(), xml::writer::Error>
4501     where
4502         W: Write,
4503     {
4504         writer.write(xml::writer::XmlEvent::start_element(name))?;
4505         writer.write(xml::writer::XmlEvent::characters(&format!(
4506             "{value}",
4507             value = obj.to_string()
4508         )))?;
4509         writer.write(xml::writer::XmlEvent::end_element())
4510     }
4511 }
4512 
4513 #[derive(Default, Debug, Clone, PartialEq)]
4514 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4515 pub struct GetBucketAccelerateConfigurationOutput {
4516     /// <p>The accelerate configuration of the bucket.</p>
4517     pub status: Option<String>,
4518 }
4519 
4520 #[allow(dead_code)]
4521 struct GetBucketAccelerateConfigurationOutputDeserializer;
4522 impl GetBucketAccelerateConfigurationOutputDeserializer {
4523     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketAccelerateConfigurationOutput, XmlParseError>4524     fn deserialize<T: Peek + Next>(
4525         tag_name: &str,
4526         stack: &mut T,
4527     ) -> Result<GetBucketAccelerateConfigurationOutput, XmlParseError> {
4528         deserialize_elements::<_, GetBucketAccelerateConfigurationOutput, _>(
4529             tag_name,
4530             stack,
4531             |name, stack, obj| {
4532                 match name {
4533                     "Status" => {
4534                         obj.status = Some(BucketAccelerateStatusDeserializer::deserialize(
4535                             "Status", stack,
4536                         )?);
4537                     }
4538                     _ => skip_tree(stack),
4539                 }
4540                 Ok(())
4541             },
4542         )
4543     }
4544 }
4545 #[derive(Default, Debug, Clone, PartialEq)]
4546 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4547 pub struct GetBucketAccelerateConfigurationRequest {
4548     /// <p>Name of the bucket for which the accelerate configuration is retrieved.</p>
4549     pub bucket: String,
4550 }
4551 
4552 #[derive(Default, Debug, Clone, PartialEq)]
4553 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4554 pub struct GetBucketAclOutput {
4555     /// <p>A list of grants.</p>
4556     pub grants: Option<Vec<Grant>>,
4557     /// <p>Container for the bucket owner's display name and ID.</p>
4558     pub owner: Option<Owner>,
4559 }
4560 
4561 #[allow(dead_code)]
4562 struct GetBucketAclOutputDeserializer;
4563 impl GetBucketAclOutputDeserializer {
4564     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketAclOutput, XmlParseError>4565     fn deserialize<T: Peek + Next>(
4566         tag_name: &str,
4567         stack: &mut T,
4568     ) -> Result<GetBucketAclOutput, XmlParseError> {
4569         deserialize_elements::<_, GetBucketAclOutput, _>(tag_name, stack, |name, stack, obj| {
4570             match name {
4571                 "AccessControlList" => {
4572                     obj.grants
4573                         .get_or_insert(vec![])
4574                         .extend(GrantsDeserializer::deserialize("AccessControlList", stack)?);
4575                 }
4576                 "Owner" => {
4577                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
4578                 }
4579                 _ => skip_tree(stack),
4580             }
4581             Ok(())
4582         })
4583     }
4584 }
4585 #[derive(Default, Debug, Clone, PartialEq)]
4586 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4587 pub struct GetBucketAclRequest {
4588     /// <p>Specifies the S3 bucket whose ACL is being requested.</p>
4589     pub bucket: String,
4590 }
4591 
4592 #[derive(Default, Debug, Clone, PartialEq)]
4593 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4594 pub struct GetBucketAnalyticsConfigurationOutput {
4595     /// <p>The configuration and any analyses for the analytics filter.</p>
4596     pub analytics_configuration: Option<AnalyticsConfiguration>,
4597 }
4598 
4599 #[allow(dead_code)]
4600 struct GetBucketAnalyticsConfigurationOutputDeserializer;
4601 impl GetBucketAnalyticsConfigurationOutputDeserializer {
4602     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketAnalyticsConfigurationOutput, XmlParseError>4603     fn deserialize<T: Peek + Next>(
4604         tag_name: &str,
4605         stack: &mut T,
4606     ) -> Result<GetBucketAnalyticsConfigurationOutput, XmlParseError> {
4607         Ok(GetBucketAnalyticsConfigurationOutput {
4608             analytics_configuration: Some(AnalyticsConfigurationDeserializer::deserialize(
4609                 "AnalyticsConfiguration",
4610                 stack,
4611             )?),
4612             ..GetBucketAnalyticsConfigurationOutput::default()
4613         })
4614     }
4615 }
4616 #[derive(Default, Debug, Clone, PartialEq)]
4617 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4618 pub struct GetBucketAnalyticsConfigurationRequest {
4619     /// <p>The name of the bucket from which an analytics configuration is retrieved.</p>
4620     pub bucket: String,
4621     /// <p>The ID that identifies the analytics configuration.</p>
4622     pub id: String,
4623 }
4624 
4625 #[derive(Default, Debug, Clone, PartialEq)]
4626 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4627 pub struct GetBucketCorsOutput {
4628     /// <p>A set of origins and methods (cross-origin access that you want to allow). You can add up to 100 rules to the configuration.</p>
4629     pub cors_rules: Option<Vec<CORSRule>>,
4630 }
4631 
4632 #[allow(dead_code)]
4633 struct GetBucketCorsOutputDeserializer;
4634 impl GetBucketCorsOutputDeserializer {
4635     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketCorsOutput, XmlParseError>4636     fn deserialize<T: Peek + Next>(
4637         tag_name: &str,
4638         stack: &mut T,
4639     ) -> Result<GetBucketCorsOutput, XmlParseError> {
4640         deserialize_elements::<_, GetBucketCorsOutput, _>(tag_name, stack, |name, stack, obj| {
4641             match name {
4642                 "CORSRule" => {
4643                     obj.cors_rules
4644                         .get_or_insert(vec![])
4645                         .extend(CORSRulesDeserializer::deserialize("CORSRule", stack)?);
4646                 }
4647                 _ => skip_tree(stack),
4648             }
4649             Ok(())
4650         })
4651     }
4652 }
4653 #[derive(Default, Debug, Clone, PartialEq)]
4654 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4655 pub struct GetBucketCorsRequest {
4656     /// <p>The bucket name for which to get the cors configuration.</p>
4657     pub bucket: String,
4658 }
4659 
4660 #[derive(Default, Debug, Clone, PartialEq)]
4661 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4662 pub struct GetBucketEncryptionOutput {
4663     pub server_side_encryption_configuration: Option<ServerSideEncryptionConfiguration>,
4664 }
4665 
4666 #[allow(dead_code)]
4667 struct GetBucketEncryptionOutputDeserializer;
4668 impl GetBucketEncryptionOutputDeserializer {
4669     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketEncryptionOutput, XmlParseError>4670     fn deserialize<T: Peek + Next>(
4671         tag_name: &str,
4672         stack: &mut T,
4673     ) -> Result<GetBucketEncryptionOutput, XmlParseError> {
4674         Ok(GetBucketEncryptionOutput {
4675             server_side_encryption_configuration: Some(
4676                 ServerSideEncryptionConfigurationDeserializer::deserialize(
4677                     "ServerSideEncryptionConfiguration",
4678                     stack,
4679                 )?,
4680             ),
4681             ..GetBucketEncryptionOutput::default()
4682         })
4683     }
4684 }
4685 #[derive(Default, Debug, Clone, PartialEq)]
4686 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4687 pub struct GetBucketEncryptionRequest {
4688     /// <p>The name of the bucket from which the server-side encryption configuration is retrieved.</p>
4689     pub bucket: String,
4690 }
4691 
4692 #[derive(Default, Debug, Clone, PartialEq)]
4693 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4694 pub struct GetBucketInventoryConfigurationOutput {
4695     /// <p>Specifies the inventory configuration.</p>
4696     pub inventory_configuration: Option<InventoryConfiguration>,
4697 }
4698 
4699 #[allow(dead_code)]
4700 struct GetBucketInventoryConfigurationOutputDeserializer;
4701 impl GetBucketInventoryConfigurationOutputDeserializer {
4702     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketInventoryConfigurationOutput, XmlParseError>4703     fn deserialize<T: Peek + Next>(
4704         tag_name: &str,
4705         stack: &mut T,
4706     ) -> Result<GetBucketInventoryConfigurationOutput, XmlParseError> {
4707         Ok(GetBucketInventoryConfigurationOutput {
4708             inventory_configuration: Some(InventoryConfigurationDeserializer::deserialize(
4709                 "InventoryConfiguration",
4710                 stack,
4711             )?),
4712             ..GetBucketInventoryConfigurationOutput::default()
4713         })
4714     }
4715 }
4716 #[derive(Default, Debug, Clone, PartialEq)]
4717 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4718 pub struct GetBucketInventoryConfigurationRequest {
4719     /// <p>The name of the bucket containing the inventory configuration to retrieve.</p>
4720     pub bucket: String,
4721     /// <p>The ID used to identify the inventory configuration.</p>
4722     pub id: String,
4723 }
4724 
4725 #[derive(Default, Debug, Clone, PartialEq)]
4726 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4727 pub struct GetBucketLifecycleConfigurationOutput {
4728     /// <p>Container for a lifecycle rule.</p>
4729     pub rules: Option<Vec<LifecycleRule>>,
4730 }
4731 
4732 #[allow(dead_code)]
4733 struct GetBucketLifecycleConfigurationOutputDeserializer;
4734 impl GetBucketLifecycleConfigurationOutputDeserializer {
4735     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketLifecycleConfigurationOutput, XmlParseError>4736     fn deserialize<T: Peek + Next>(
4737         tag_name: &str,
4738         stack: &mut T,
4739     ) -> Result<GetBucketLifecycleConfigurationOutput, XmlParseError> {
4740         deserialize_elements::<_, GetBucketLifecycleConfigurationOutput, _>(
4741             tag_name,
4742             stack,
4743             |name, stack, obj| {
4744                 match name {
4745                     "Rule" => {
4746                         obj.rules
4747                             .get_or_insert(vec![])
4748                             .extend(LifecycleRulesDeserializer::deserialize("Rule", stack)?);
4749                     }
4750                     _ => skip_tree(stack),
4751                 }
4752                 Ok(())
4753             },
4754         )
4755     }
4756 }
4757 #[derive(Default, Debug, Clone, PartialEq)]
4758 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4759 pub struct GetBucketLifecycleConfigurationRequest {
4760     /// <p>The name of the bucket for which to get the lifecycle information.</p>
4761     pub bucket: String,
4762 }
4763 
4764 #[derive(Default, Debug, Clone, PartialEq)]
4765 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4766 pub struct GetBucketLifecycleOutput {
4767     /// <p>Container for a lifecycle rule.</p>
4768     pub rules: Option<Vec<Rule>>,
4769 }
4770 
4771 #[allow(dead_code)]
4772 struct GetBucketLifecycleOutputDeserializer;
4773 impl GetBucketLifecycleOutputDeserializer {
4774     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketLifecycleOutput, XmlParseError>4775     fn deserialize<T: Peek + Next>(
4776         tag_name: &str,
4777         stack: &mut T,
4778     ) -> Result<GetBucketLifecycleOutput, XmlParseError> {
4779         deserialize_elements::<_, GetBucketLifecycleOutput, _>(
4780             tag_name,
4781             stack,
4782             |name, stack, obj| {
4783                 match name {
4784                     "Rule" => {
4785                         obj.rules
4786                             .get_or_insert(vec![])
4787                             .extend(RulesDeserializer::deserialize("Rule", stack)?);
4788                     }
4789                     _ => skip_tree(stack),
4790                 }
4791                 Ok(())
4792             },
4793         )
4794     }
4795 }
4796 #[derive(Default, Debug, Clone, PartialEq)]
4797 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4798 pub struct GetBucketLifecycleRequest {
4799     /// <p>The name of the bucket for which to get the lifecycle information.</p>
4800     pub bucket: String,
4801 }
4802 
4803 #[derive(Default, Debug, Clone, PartialEq)]
4804 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4805 pub struct GetBucketLocationOutput {
4806     /// <p>Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported location constraints by Region, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a>.</p>
4807     pub location_constraint: Option<String>,
4808 }
4809 
4810 #[allow(dead_code)]
4811 struct GetBucketLocationOutputDeserializer;
4812 impl GetBucketLocationOutputDeserializer {
4813     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketLocationOutput, XmlParseError>4814     fn deserialize<T: Peek + Next>(
4815         tag_name: &str,
4816         stack: &mut T,
4817     ) -> Result<GetBucketLocationOutput, XmlParseError> {
4818         let mut obj = GetBucketLocationOutput::default();
4819         obj.location_constraint = Some(BucketLocationConstraintDeserializer::deserialize(
4820             "LocationConstraint",
4821             stack,
4822         )?);
4823         Ok(obj)
4824     }
4825 }
4826 #[derive(Default, Debug, Clone, PartialEq)]
4827 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4828 pub struct GetBucketLocationRequest {
4829     /// <p>The name of the bucket for which to get the location.</p>
4830     pub bucket: String,
4831 }
4832 
4833 #[derive(Default, Debug, Clone, PartialEq)]
4834 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4835 pub struct GetBucketLoggingOutput {
4836     pub logging_enabled: Option<LoggingEnabled>,
4837 }
4838 
4839 #[allow(dead_code)]
4840 struct GetBucketLoggingOutputDeserializer;
4841 impl GetBucketLoggingOutputDeserializer {
4842     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketLoggingOutput, XmlParseError>4843     fn deserialize<T: Peek + Next>(
4844         tag_name: &str,
4845         stack: &mut T,
4846     ) -> Result<GetBucketLoggingOutput, XmlParseError> {
4847         deserialize_elements::<_, GetBucketLoggingOutput, _>(tag_name, stack, |name, stack, obj| {
4848             match name {
4849                 "LoggingEnabled" => {
4850                     obj.logging_enabled = Some(LoggingEnabledDeserializer::deserialize(
4851                         "LoggingEnabled",
4852                         stack,
4853                     )?);
4854                 }
4855                 _ => skip_tree(stack),
4856             }
4857             Ok(())
4858         })
4859     }
4860 }
4861 #[derive(Default, Debug, Clone, PartialEq)]
4862 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4863 pub struct GetBucketLoggingRequest {
4864     /// <p>The bucket name for which to get the logging information.</p>
4865     pub bucket: String,
4866 }
4867 
4868 #[derive(Default, Debug, Clone, PartialEq)]
4869 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4870 pub struct GetBucketMetricsConfigurationOutput {
4871     /// <p>Specifies the metrics configuration.</p>
4872     pub metrics_configuration: Option<MetricsConfiguration>,
4873 }
4874 
4875 #[allow(dead_code)]
4876 struct GetBucketMetricsConfigurationOutputDeserializer;
4877 impl GetBucketMetricsConfigurationOutputDeserializer {
4878     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketMetricsConfigurationOutput, XmlParseError>4879     fn deserialize<T: Peek + Next>(
4880         tag_name: &str,
4881         stack: &mut T,
4882     ) -> Result<GetBucketMetricsConfigurationOutput, XmlParseError> {
4883         Ok(GetBucketMetricsConfigurationOutput {
4884             metrics_configuration: Some(MetricsConfigurationDeserializer::deserialize(
4885                 "MetricsConfiguration",
4886                 stack,
4887             )?),
4888             ..GetBucketMetricsConfigurationOutput::default()
4889         })
4890     }
4891 }
4892 #[derive(Default, Debug, Clone, PartialEq)]
4893 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4894 pub struct GetBucketMetricsConfigurationRequest {
4895     /// <p>The name of the bucket containing the metrics configuration to retrieve.</p>
4896     pub bucket: String,
4897     /// <p>The ID used to identify the metrics configuration.</p>
4898     pub id: String,
4899 }
4900 
4901 #[derive(Default, Debug, Clone, PartialEq)]
4902 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4903 pub struct GetBucketNotificationConfigurationRequest {
4904     /// <p>Name of the bucket for which to get the notification configuration</p>
4905     pub bucket: String,
4906 }
4907 
4908 #[derive(Default, Debug, Clone, PartialEq)]
4909 pub struct GetBucketPolicyOutput {
4910     /// <p>The bucket policy as a JSON document.</p>
4911     pub policy: Option<String>,
4912 }
4913 
4914 #[derive(Default, Debug, Clone, PartialEq)]
4915 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4916 pub struct GetBucketPolicyRequest {
4917     /// <p>The bucket name for which to get the bucket policy.</p>
4918     pub bucket: String,
4919 }
4920 
4921 #[derive(Default, Debug, Clone, PartialEq)]
4922 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4923 pub struct GetBucketPolicyStatusOutput {
4924     /// <p>The policy status for the specified bucket.</p>
4925     pub policy_status: Option<PolicyStatus>,
4926 }
4927 
4928 #[allow(dead_code)]
4929 struct GetBucketPolicyStatusOutputDeserializer;
4930 impl GetBucketPolicyStatusOutputDeserializer {
4931     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketPolicyStatusOutput, XmlParseError>4932     fn deserialize<T: Peek + Next>(
4933         tag_name: &str,
4934         stack: &mut T,
4935     ) -> Result<GetBucketPolicyStatusOutput, XmlParseError> {
4936         Ok(GetBucketPolicyStatusOutput {
4937             policy_status: Some(PolicyStatusDeserializer::deserialize(
4938                 "PolicyStatus",
4939                 stack,
4940             )?),
4941             ..GetBucketPolicyStatusOutput::default()
4942         })
4943     }
4944 }
4945 #[derive(Default, Debug, Clone, PartialEq)]
4946 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4947 pub struct GetBucketPolicyStatusRequest {
4948     /// <p>The name of the Amazon S3 bucket whose policy status you want to retrieve.</p>
4949     pub bucket: String,
4950 }
4951 
4952 #[derive(Default, Debug, Clone, PartialEq)]
4953 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4954 pub struct GetBucketReplicationOutput {
4955     pub replication_configuration: Option<ReplicationConfiguration>,
4956 }
4957 
4958 #[allow(dead_code)]
4959 struct GetBucketReplicationOutputDeserializer;
4960 impl GetBucketReplicationOutputDeserializer {
4961     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketReplicationOutput, XmlParseError>4962     fn deserialize<T: Peek + Next>(
4963         tag_name: &str,
4964         stack: &mut T,
4965     ) -> Result<GetBucketReplicationOutput, XmlParseError> {
4966         Ok(GetBucketReplicationOutput {
4967             replication_configuration: Some(ReplicationConfigurationDeserializer::deserialize(
4968                 "ReplicationConfiguration",
4969                 stack,
4970             )?),
4971             ..GetBucketReplicationOutput::default()
4972         })
4973     }
4974 }
4975 #[derive(Default, Debug, Clone, PartialEq)]
4976 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4977 pub struct GetBucketReplicationRequest {
4978     /// <p>The bucket name for which to get the replication information.</p>
4979     pub bucket: String,
4980 }
4981 
4982 #[derive(Default, Debug, Clone, PartialEq)]
4983 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4984 pub struct GetBucketRequestPaymentOutput {
4985     /// <p>Specifies who pays for the download and request fees.</p>
4986     pub payer: Option<String>,
4987 }
4988 
4989 #[allow(dead_code)]
4990 struct GetBucketRequestPaymentOutputDeserializer;
4991 impl GetBucketRequestPaymentOutputDeserializer {
4992     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketRequestPaymentOutput, XmlParseError>4993     fn deserialize<T: Peek + Next>(
4994         tag_name: &str,
4995         stack: &mut T,
4996     ) -> Result<GetBucketRequestPaymentOutput, XmlParseError> {
4997         deserialize_elements::<_, GetBucketRequestPaymentOutput, _>(
4998             tag_name,
4999             stack,
5000             |name, stack, obj| {
5001                 match name {
5002                     "Payer" => {
5003                         obj.payer = Some(PayerDeserializer::deserialize("Payer", stack)?);
5004                     }
5005                     _ => skip_tree(stack),
5006                 }
5007                 Ok(())
5008             },
5009         )
5010     }
5011 }
5012 #[derive(Default, Debug, Clone, PartialEq)]
5013 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5014 pub struct GetBucketRequestPaymentRequest {
5015     /// <p>The name of the bucket for which to get the payment request configuration</p>
5016     pub bucket: String,
5017 }
5018 
5019 #[derive(Default, Debug, Clone, PartialEq)]
5020 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5021 pub struct GetBucketTaggingOutput {
5022     /// <p>Contains the tag set.</p>
5023     pub tag_set: Vec<Tag>,
5024 }
5025 
5026 #[allow(dead_code)]
5027 struct GetBucketTaggingOutputDeserializer;
5028 impl GetBucketTaggingOutputDeserializer {
5029     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketTaggingOutput, XmlParseError>5030     fn deserialize<T: Peek + Next>(
5031         tag_name: &str,
5032         stack: &mut T,
5033     ) -> Result<GetBucketTaggingOutput, XmlParseError> {
5034         deserialize_elements::<_, GetBucketTaggingOutput, _>(tag_name, stack, |name, stack, obj| {
5035             match name {
5036                 "TagSet" => {
5037                     obj.tag_set
5038                         .extend(TagSetDeserializer::deserialize("TagSet", stack)?);
5039                 }
5040                 _ => skip_tree(stack),
5041             }
5042             Ok(())
5043         })
5044     }
5045 }
5046 #[derive(Default, Debug, Clone, PartialEq)]
5047 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5048 pub struct GetBucketTaggingRequest {
5049     /// <p>The name of the bucket for which to get the tagging information.</p>
5050     pub bucket: String,
5051 }
5052 
5053 #[derive(Default, Debug, Clone, PartialEq)]
5054 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5055 pub struct GetBucketVersioningOutput {
5056     /// <p>Specifies whether MFA delete is enabled in the bucket versioning configuration. This element is only returned if the bucket has been configured with MFA delete. If the bucket has never been so configured, this element is not returned.</p>
5057     pub mfa_delete: Option<String>,
5058     /// <p>The versioning state of the bucket.</p>
5059     pub status: Option<String>,
5060 }
5061 
5062 #[allow(dead_code)]
5063 struct GetBucketVersioningOutputDeserializer;
5064 impl GetBucketVersioningOutputDeserializer {
5065     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketVersioningOutput, XmlParseError>5066     fn deserialize<T: Peek + Next>(
5067         tag_name: &str,
5068         stack: &mut T,
5069     ) -> Result<GetBucketVersioningOutput, XmlParseError> {
5070         deserialize_elements::<_, GetBucketVersioningOutput, _>(
5071             tag_name,
5072             stack,
5073             |name, stack, obj| {
5074                 match name {
5075                     "MfaDelete" => {
5076                         obj.mfa_delete = Some(MFADeleteStatusDeserializer::deserialize(
5077                             "MfaDelete",
5078                             stack,
5079                         )?);
5080                     }
5081                     "Status" => {
5082                         obj.status = Some(BucketVersioningStatusDeserializer::deserialize(
5083                             "Status", stack,
5084                         )?);
5085                     }
5086                     _ => skip_tree(stack),
5087                 }
5088                 Ok(())
5089             },
5090         )
5091     }
5092 }
5093 #[derive(Default, Debug, Clone, PartialEq)]
5094 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5095 pub struct GetBucketVersioningRequest {
5096     /// <p>The name of the bucket for which to get the versioning information.</p>
5097     pub bucket: String,
5098 }
5099 
5100 #[derive(Default, Debug, Clone, PartialEq)]
5101 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5102 pub struct GetBucketWebsiteOutput {
5103     /// <p>The name of the error document for the website.</p>
5104     pub error_document: Option<ErrorDocument>,
5105     /// <p>The name of the index document for the website.</p>
5106     pub index_document: Option<IndexDocument>,
5107     /// <p>Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 bucket.</p>
5108     pub redirect_all_requests_to: Option<RedirectAllRequestsTo>,
5109     /// <p>Rules that define when a redirect is applied and the redirect behavior.</p>
5110     pub routing_rules: Option<Vec<RoutingRule>>,
5111 }
5112 
5113 #[allow(dead_code)]
5114 struct GetBucketWebsiteOutputDeserializer;
5115 impl GetBucketWebsiteOutputDeserializer {
5116     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketWebsiteOutput, XmlParseError>5117     fn deserialize<T: Peek + Next>(
5118         tag_name: &str,
5119         stack: &mut T,
5120     ) -> Result<GetBucketWebsiteOutput, XmlParseError> {
5121         deserialize_elements::<_, GetBucketWebsiteOutput, _>(tag_name, stack, |name, stack, obj| {
5122             match name {
5123                 "ErrorDocument" => {
5124                     obj.error_document = Some(ErrorDocumentDeserializer::deserialize(
5125                         "ErrorDocument",
5126                         stack,
5127                     )?);
5128                 }
5129                 "IndexDocument" => {
5130                     obj.index_document = Some(IndexDocumentDeserializer::deserialize(
5131                         "IndexDocument",
5132                         stack,
5133                     )?);
5134                 }
5135                 "RedirectAllRequestsTo" => {
5136                     obj.redirect_all_requests_to =
5137                         Some(RedirectAllRequestsToDeserializer::deserialize(
5138                             "RedirectAllRequestsTo",
5139                             stack,
5140                         )?);
5141                 }
5142                 "RoutingRules" => {
5143                     obj.routing_rules.get_or_insert(vec![]).extend(
5144                         RoutingRulesDeserializer::deserialize("RoutingRules", stack)?,
5145                     );
5146                 }
5147                 _ => skip_tree(stack),
5148             }
5149             Ok(())
5150         })
5151     }
5152 }
5153 #[derive(Default, Debug, Clone, PartialEq)]
5154 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5155 pub struct GetBucketWebsiteRequest {
5156     /// <p>The bucket name for which to get the website configuration.</p>
5157     pub bucket: String,
5158 }
5159 
5160 #[derive(Default, Debug, Clone, PartialEq)]
5161 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5162 pub struct GetObjectAclOutput {
5163     /// <p>A list of grants.</p>
5164     pub grants: Option<Vec<Grant>>,
5165     /// <p> Container for the bucket owner's display name and ID.</p>
5166     pub owner: Option<Owner>,
5167     pub request_charged: Option<String>,
5168 }
5169 
5170 #[allow(dead_code)]
5171 struct GetObjectAclOutputDeserializer;
5172 impl GetObjectAclOutputDeserializer {
5173     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetObjectAclOutput, XmlParseError>5174     fn deserialize<T: Peek + Next>(
5175         tag_name: &str,
5176         stack: &mut T,
5177     ) -> Result<GetObjectAclOutput, XmlParseError> {
5178         deserialize_elements::<_, GetObjectAclOutput, _>(tag_name, stack, |name, stack, obj| {
5179             match name {
5180                 "AccessControlList" => {
5181                     obj.grants
5182                         .get_or_insert(vec![])
5183                         .extend(GrantsDeserializer::deserialize("AccessControlList", stack)?);
5184                 }
5185                 "Owner" => {
5186                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
5187                 }
5188                 _ => skip_tree(stack),
5189             }
5190             Ok(())
5191         })
5192     }
5193 }
5194 #[derive(Default, Debug, Clone, PartialEq)]
5195 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5196 pub struct GetObjectAclRequest {
5197     /// <p>The bucket name that contains the object for which to get the ACL information. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
5198     pub bucket: String,
5199     /// <p>The key of the object for which to get the ACL information.</p>
5200     pub key: String,
5201     pub request_payer: Option<String>,
5202     /// <p>VersionId used to reference a specific version of the object.</p>
5203     pub version_id: Option<String>,
5204 }
5205 
5206 #[derive(Default, Debug, Clone, PartialEq)]
5207 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5208 pub struct GetObjectLegalHoldOutput {
5209     /// <p>The current Legal Hold status for the specified object.</p>
5210     pub legal_hold: Option<ObjectLockLegalHold>,
5211 }
5212 
5213 #[allow(dead_code)]
5214 struct GetObjectLegalHoldOutputDeserializer;
5215 impl GetObjectLegalHoldOutputDeserializer {
5216     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetObjectLegalHoldOutput, XmlParseError>5217     fn deserialize<T: Peek + Next>(
5218         tag_name: &str,
5219         stack: &mut T,
5220     ) -> Result<GetObjectLegalHoldOutput, XmlParseError> {
5221         Ok(GetObjectLegalHoldOutput {
5222             legal_hold: Some(ObjectLockLegalHoldDeserializer::deserialize(
5223                 "LegalHold",
5224                 stack,
5225             )?),
5226             ..GetObjectLegalHoldOutput::default()
5227         })
5228     }
5229 }
5230 #[derive(Default, Debug, Clone, PartialEq)]
5231 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5232 pub struct GetObjectLegalHoldRequest {
5233     /// <p>The bucket name containing the object whose Legal Hold status you want to retrieve. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
5234     pub bucket: String,
5235     /// <p>The key name for the object whose Legal Hold status you want to retrieve.</p>
5236     pub key: String,
5237     pub request_payer: Option<String>,
5238     /// <p>The version ID of the object whose Legal Hold status you want to retrieve.</p>
5239     pub version_id: Option<String>,
5240 }
5241 
5242 #[derive(Default, Debug, Clone, PartialEq)]
5243 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5244 pub struct GetObjectLockConfigurationOutput {
5245     /// <p>The specified bucket's Object Lock configuration.</p>
5246     pub object_lock_configuration: Option<ObjectLockConfiguration>,
5247 }
5248 
5249 #[allow(dead_code)]
5250 struct GetObjectLockConfigurationOutputDeserializer;
5251 impl GetObjectLockConfigurationOutputDeserializer {
5252     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetObjectLockConfigurationOutput, XmlParseError>5253     fn deserialize<T: Peek + Next>(
5254         tag_name: &str,
5255         stack: &mut T,
5256     ) -> Result<GetObjectLockConfigurationOutput, XmlParseError> {
5257         Ok(GetObjectLockConfigurationOutput {
5258             object_lock_configuration: Some(ObjectLockConfigurationDeserializer::deserialize(
5259                 "ObjectLockConfiguration",
5260                 stack,
5261             )?),
5262             ..GetObjectLockConfigurationOutput::default()
5263         })
5264     }
5265 }
5266 #[derive(Default, Debug, Clone, PartialEq)]
5267 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5268 pub struct GetObjectLockConfigurationRequest {
5269     /// <p>The bucket whose Object Lock configuration you want to retrieve.</p>
5270     pub bucket: String,
5271 }
5272 
5273 #[derive(Default, Debug)]
5274 pub struct GetObjectOutput {
5275     /// <p>Indicates that a range of bytes was specified.</p>
5276     pub accept_ranges: Option<String>,
5277     /// <p>Object data.</p>
5278     pub body: Option<StreamingBody>,
5279     /// <p>Specifies caching behavior along the request/reply chain.</p>
5280     pub cache_control: Option<String>,
5281     /// <p>Specifies presentational information for the object.</p>
5282     pub content_disposition: Option<String>,
5283     /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p>
5284     pub content_encoding: Option<String>,
5285     /// <p>The language the content is in.</p>
5286     pub content_language: Option<String>,
5287     /// <p>Size of the body in bytes.</p>
5288     pub content_length: Option<i64>,
5289     /// <p>The portion of the object returned in the response.</p>
5290     pub content_range: Option<String>,
5291     /// <p>A standard MIME type describing the format of the object data.</p>
5292     pub content_type: Option<String>,
5293     /// <p>Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.</p>
5294     pub delete_marker: Option<bool>,
5295     /// <p>An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.</p>
5296     pub e_tag: Option<String>,
5297     /// <p>If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header. It includes the expiry-date and rule-id key-value pairs providing object expiration information. The value of the rule-id is URL encoded.</p>
5298     pub expiration: Option<String>,
5299     /// <p>The date and time at which the object is no longer cacheable.</p>
5300     pub expires: Option<String>,
5301     /// <p>Last modified date of the object</p>
5302     pub last_modified: Option<String>,
5303     /// <p>A map of metadata to store with the object in S3.</p>
5304     pub metadata: Option<::std::collections::HashMap<String, String>>,
5305     /// <p>This is set to the number of metadata entries not returned in <code>x-amz-meta</code> headers. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.</p>
5306     pub missing_meta: Option<i64>,
5307     /// <p>Indicates whether this object has an active legal hold. This field is only returned if you have permission to view an object's legal hold status. </p>
5308     pub object_lock_legal_hold_status: Option<String>,
5309     /// <p>The Object Lock mode currently in place for this object.</p>
5310     pub object_lock_mode: Option<String>,
5311     /// <p>The date and time when this object's Object Lock will expire.</p>
5312     pub object_lock_retain_until_date: Option<String>,
5313     /// <p>The count of parts this object has.</p>
5314     pub parts_count: Option<i64>,
5315     /// <p>Amazon S3 can return this if your request involves a bucket that is either a source or destination in a replication rule.</p>
5316     pub replication_status: Option<String>,
5317     pub request_charged: Option<String>,
5318     /// <p>Provides information about object restoration operation and expiration time of the restored object copy.</p>
5319     pub restore: Option<String>,
5320     /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.</p>
5321     pub sse_customer_algorithm: Option<String>,
5322     /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.</p>
5323     pub sse_customer_key_md5: Option<String>,
5324     /// <p>If present, specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) that was used for the object.</p>
5325     pub ssekms_key_id: Option<String>,
5326     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
5327     pub server_side_encryption: Option<String>,
5328     /// <p>Provides storage class information of the object. Amazon S3 returns this header for all objects except for Standard storage class objects.</p>
5329     pub storage_class: Option<String>,
5330     /// <p>The number of tags, if any, on the object.</p>
5331     pub tag_count: Option<i64>,
5332     /// <p>Version of the object.</p>
5333     pub version_id: Option<String>,
5334     /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.</p>
5335     pub website_redirect_location: Option<String>,
5336 }
5337 
5338 #[derive(Default, Debug, Clone, PartialEq)]
5339 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5340 pub struct GetObjectRequest {
5341     /// <p>The bucket name containing the object. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
5342     pub bucket: String,
5343     /// <p>Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).</p>
5344     pub if_match: Option<String>,
5345     /// <p>Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).</p>
5346     pub if_modified_since: Option<String>,
5347     /// <p>Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).</p>
5348     pub if_none_match: Option<String>,
5349     /// <p>Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).</p>
5350     pub if_unmodified_since: Option<String>,
5351     /// <p>Key of the object to get.</p>
5352     pub key: String,
5353     /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.</p>
5354     pub part_number: Option<i64>,
5355     /// <p>Downloads the specified range bytes of an object. For more information about the HTTP Range header, see <a href="">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35</a>.</p>
5356     pub range: Option<String>,
5357     pub request_payer: Option<String>,
5358     /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
5359     pub response_cache_control: Option<String>,
5360     /// <p>Sets the <code>Content-Disposition</code> header of the response</p>
5361     pub response_content_disposition: Option<String>,
5362     /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
5363     pub response_content_encoding: Option<String>,
5364     /// <p>Sets the <code>Content-Language</code> header of the response.</p>
5365     pub response_content_language: Option<String>,
5366     /// <p>Sets the <code>Content-Type</code> header of the response.</p>
5367     pub response_content_type: Option<String>,
5368     /// <p>Sets the <code>Expires</code> header of the response.</p>
5369     pub response_expires: Option<String>,
5370     /// <p>Specifies the algorithm to use to when encrypting the object (for example, AES256).</p>
5371     pub sse_customer_algorithm: Option<String>,
5372     /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side​-encryption​-customer-algorithm</code> header.</p>
5373     pub sse_customer_key: Option<String>,
5374     /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
5375     pub sse_customer_key_md5: Option<String>,
5376     /// <p>VersionId used to reference a specific version of the object.</p>
5377     pub version_id: Option<String>,
5378 }
5379 
5380 #[derive(Default, Debug, Clone, PartialEq)]
5381 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5382 pub struct GetObjectRetentionOutput {
5383     /// <p>The container element for an object's retention settings.</p>
5384     pub retention: Option<ObjectLockRetention>,
5385 }
5386 
5387 #[allow(dead_code)]
5388 struct GetObjectRetentionOutputDeserializer;
5389 impl GetObjectRetentionOutputDeserializer {
5390     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetObjectRetentionOutput, XmlParseError>5391     fn deserialize<T: Peek + Next>(
5392         tag_name: &str,
5393         stack: &mut T,
5394     ) -> Result<GetObjectRetentionOutput, XmlParseError> {
5395         Ok(GetObjectRetentionOutput {
5396             retention: Some(ObjectLockRetentionDeserializer::deserialize(
5397                 "Retention",
5398                 stack,
5399             )?),
5400             ..GetObjectRetentionOutput::default()
5401         })
5402     }
5403 }
5404 #[derive(Default, Debug, Clone, PartialEq)]
5405 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5406 pub struct GetObjectRetentionRequest {
5407     /// <p>The bucket name containing the object whose retention settings you want to retrieve. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
5408     pub bucket: String,
5409     /// <p>The key name for the object whose retention settings you want to retrieve.</p>
5410     pub key: String,
5411     pub request_payer: Option<String>,
5412     /// <p>The version ID for the object whose retention settings you want to retrieve.</p>
5413     pub version_id: Option<String>,
5414 }
5415 
5416 #[derive(Default, Debug, Clone, PartialEq)]
5417 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5418 pub struct GetObjectTaggingOutput {
5419     /// <p>Contains the tag set.</p>
5420     pub tag_set: Vec<Tag>,
5421     /// <p>The versionId of the object for which you got the tagging information.</p>
5422     pub version_id: Option<String>,
5423 }
5424 
5425 #[allow(dead_code)]
5426 struct GetObjectTaggingOutputDeserializer;
5427 impl GetObjectTaggingOutputDeserializer {
5428     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetObjectTaggingOutput, XmlParseError>5429     fn deserialize<T: Peek + Next>(
5430         tag_name: &str,
5431         stack: &mut T,
5432     ) -> Result<GetObjectTaggingOutput, XmlParseError> {
5433         deserialize_elements::<_, GetObjectTaggingOutput, _>(tag_name, stack, |name, stack, obj| {
5434             match name {
5435                 "TagSet" => {
5436                     obj.tag_set
5437                         .extend(TagSetDeserializer::deserialize("TagSet", stack)?);
5438                 }
5439                 _ => skip_tree(stack),
5440             }
5441             Ok(())
5442         })
5443     }
5444 }
5445 #[derive(Default, Debug, Clone, PartialEq)]
5446 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5447 pub struct GetObjectTaggingRequest {
5448     /// <p>The bucket name containing the object for which to get the tagging information. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
5449     pub bucket: String,
5450     /// <p>Object key for which to get the tagging information.</p>
5451     pub key: String,
5452     /// <p>The versionId of the object for which to get the tagging information.</p>
5453     pub version_id: Option<String>,
5454 }
5455 
5456 #[derive(Default, Debug)]
5457 pub struct GetObjectTorrentOutput {
5458     /// <p>A Bencoded dictionary as defined by the BitTorrent specification</p>
5459     pub body: Option<StreamingBody>,
5460     pub request_charged: Option<String>,
5461 }
5462 
5463 #[derive(Default, Debug, Clone, PartialEq)]
5464 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5465 pub struct GetObjectTorrentRequest {
5466     /// <p>The name of the bucket containing the object for which to get the torrent files.</p>
5467     pub bucket: String,
5468     /// <p>The object key for which to get the information.</p>
5469     pub key: String,
5470     pub request_payer: Option<String>,
5471 }
5472 
5473 #[derive(Default, Debug, Clone, PartialEq)]
5474 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5475 pub struct GetPublicAccessBlockOutput {
5476     /// <p>The <code>PublicAccessBlock</code> configuration currently in effect for this Amazon S3 bucket.</p>
5477     pub public_access_block_configuration: Option<PublicAccessBlockConfiguration>,
5478 }
5479 
5480 #[allow(dead_code)]
5481 struct GetPublicAccessBlockOutputDeserializer;
5482 impl GetPublicAccessBlockOutputDeserializer {
5483     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetPublicAccessBlockOutput, XmlParseError>5484     fn deserialize<T: Peek + Next>(
5485         tag_name: &str,
5486         stack: &mut T,
5487     ) -> Result<GetPublicAccessBlockOutput, XmlParseError> {
5488         Ok(GetPublicAccessBlockOutput {
5489             public_access_block_configuration: Some(
5490                 PublicAccessBlockConfigurationDeserializer::deserialize(
5491                     "PublicAccessBlockConfiguration",
5492                     stack,
5493                 )?,
5494             ),
5495             ..GetPublicAccessBlockOutput::default()
5496         })
5497     }
5498 }
5499 #[derive(Default, Debug, Clone, PartialEq)]
5500 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5501 pub struct GetPublicAccessBlockRequest {
5502     /// <p>The name of the Amazon S3 bucket whose <code>PublicAccessBlock</code> configuration you want to retrieve. </p>
5503     pub bucket: String,
5504 }
5505 
5506 /// <p>Container for Glacier job parameters.</p>
5507 #[derive(Default, Debug, Clone, PartialEq)]
5508 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5509 pub struct GlacierJobParameters {
5510     /// <p>Glacier retrieval tier at which the restore will be processed.</p>
5511     pub tier: String,
5512 }
5513 
5514 pub struct GlacierJobParametersSerializer;
5515 impl GlacierJobParametersSerializer {
5516     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &GlacierJobParameters, ) -> Result<(), xml::writer::Error> where W: Write,5517     pub fn serialize<W>(
5518         mut writer: &mut EventWriter<W>,
5519         name: &str,
5520         obj: &GlacierJobParameters,
5521     ) -> Result<(), xml::writer::Error>
5522     where
5523         W: Write,
5524     {
5525         writer.write(xml::writer::XmlEvent::start_element(name))?;
5526         writer.write(xml::writer::XmlEvent::start_element("Tier"))?;
5527         writer.write(xml::writer::XmlEvent::characters(&format!(
5528             "{value}",
5529             value = obj.tier
5530         )))?;
5531         writer.write(xml::writer::XmlEvent::end_element())?;
5532         writer.write(xml::writer::XmlEvent::end_element())
5533     }
5534 }
5535 
5536 /// <p>Container for grant information.</p>
5537 #[derive(Default, Debug, Clone, PartialEq)]
5538 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5539 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5540 pub struct Grant {
5541     /// <p>The person being granted permissions.</p>
5542     pub grantee: Option<Grantee>,
5543     /// <p>Specifies the permission given to the grantee.</p>
5544     pub permission: Option<String>,
5545 }
5546 
5547 #[allow(dead_code)]
5548 struct GrantDeserializer;
5549 impl GrantDeserializer {
5550     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Grant, XmlParseError>5551     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Grant, XmlParseError> {
5552         deserialize_elements::<_, Grant, _>(tag_name, stack, |name, stack, obj| {
5553             match name {
5554                 "Grantee" => {
5555                     obj.grantee = Some(GranteeDeserializer::deserialize("Grantee", stack)?);
5556                 }
5557                 "Permission" => {
5558                     obj.permission =
5559                         Some(PermissionDeserializer::deserialize("Permission", stack)?);
5560                 }
5561                 _ => skip_tree(stack),
5562             }
5563             Ok(())
5564         })
5565     }
5566 }
5567 
5568 pub struct GrantSerializer;
5569 impl GrantSerializer {
5570     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Grant, ) -> Result<(), xml::writer::Error> where W: Write,5571     pub fn serialize<W>(
5572         mut writer: &mut EventWriter<W>,
5573         name: &str,
5574         obj: &Grant,
5575     ) -> Result<(), xml::writer::Error>
5576     where
5577         W: Write,
5578     {
5579         writer.write(xml::writer::XmlEvent::start_element(name))?;
5580         if let Some(ref value) = obj.grantee {
5581             &GranteeSerializer::serialize(&mut writer, "Grantee", value)?;
5582         }
5583         if let Some(ref value) = obj.permission {
5584             writer.write(xml::writer::XmlEvent::start_element("Permission"))?;
5585             writer.write(xml::writer::XmlEvent::characters(&format!(
5586                 "{value}",
5587                 value = value
5588             )));
5589             writer.write(xml::writer::XmlEvent::end_element())?;
5590         }
5591         writer.write(xml::writer::XmlEvent::end_element())
5592     }
5593 }
5594 
5595 /// <p>Container for the person being granted permissions.</p>
5596 #[derive(Default, Debug, Clone, PartialEq)]
5597 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5598 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5599 pub struct Grantee {
5600     /// <p>Screen name of the grantee.</p>
5601     pub display_name: Option<String>,
5602     /// <p>Email address of the grantee.</p>
5603     pub email_address: Option<String>,
5604     /// <p>The canonical user ID of the grantee.</p>
5605     pub id: Option<String>,
5606     /// <p>Type of grantee</p>
5607     pub type_: String,
5608     /// <p>URI of the grantee group.</p>
5609     pub uri: Option<String>,
5610 }
5611 
5612 #[allow(dead_code)]
5613 struct GranteeDeserializer;
5614 impl GranteeDeserializer {
5615     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Grantee, XmlParseError>5616     fn deserialize<T: Peek + Next>(
5617         tag_name: &str,
5618         stack: &mut T,
5619     ) -> Result<Grantee, XmlParseError> {
5620         deserialize_elements::<_, Grantee, _>(tag_name, stack, |name, stack, obj| {
5621             match name {
5622                 "DisplayName" => {
5623                     obj.display_name =
5624                         Some(DisplayNameDeserializer::deserialize("DisplayName", stack)?);
5625                 }
5626                 "EmailAddress" => {
5627                     obj.email_address = Some(EmailAddressDeserializer::deserialize(
5628                         "EmailAddress",
5629                         stack,
5630                     )?);
5631                 }
5632                 "ID" => {
5633                     obj.id = Some(IDDeserializer::deserialize("ID", stack)?);
5634                 }
5635                 "xsi:type" => {
5636                     obj.type_ = TypeDeserializer::deserialize("xsi:type", stack)?;
5637                 }
5638                 "URI" => {
5639                     obj.uri = Some(URIDeserializer::deserialize("URI", stack)?);
5640                 }
5641                 _ => skip_tree(stack),
5642             }
5643             Ok(())
5644         })
5645     }
5646 }
5647 
5648 pub struct GranteeSerializer;
5649 impl GranteeSerializer {
5650     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Grantee, ) -> Result<(), xml::writer::Error> where W: Write,5651     pub fn serialize<W>(
5652         mut writer: &mut EventWriter<W>,
5653         name: &str,
5654         obj: &Grantee,
5655     ) -> Result<(), xml::writer::Error>
5656     where
5657         W: Write,
5658     {
5659         writer.write(xml::writer::XmlEvent::start_element(name))?;
5660         if let Some(ref value) = obj.display_name {
5661             writer.write(xml::writer::XmlEvent::start_element("DisplayName"))?;
5662             writer.write(xml::writer::XmlEvent::characters(&format!(
5663                 "{value}",
5664                 value = value
5665             )));
5666             writer.write(xml::writer::XmlEvent::end_element())?;
5667         }
5668         if let Some(ref value) = obj.email_address {
5669             writer.write(xml::writer::XmlEvent::start_element("EmailAddress"))?;
5670             writer.write(xml::writer::XmlEvent::characters(&format!(
5671                 "{value}",
5672                 value = value
5673             )));
5674             writer.write(xml::writer::XmlEvent::end_element())?;
5675         }
5676         if let Some(ref value) = obj.id {
5677             writer.write(xml::writer::XmlEvent::start_element("ID"))?;
5678             writer.write(xml::writer::XmlEvent::characters(&format!(
5679                 "{value}",
5680                 value = value
5681             )));
5682             writer.write(xml::writer::XmlEvent::end_element())?;
5683         }
5684         writer.write(xml::writer::XmlEvent::start_element("xsi:type"))?;
5685         writer.write(xml::writer::XmlEvent::characters(&format!(
5686             "{value}",
5687             value = obj.type_
5688         )))?;
5689         writer.write(xml::writer::XmlEvent::end_element())?;
5690         if let Some(ref value) = obj.uri {
5691             writer.write(xml::writer::XmlEvent::start_element("URI"))?;
5692             writer.write(xml::writer::XmlEvent::characters(&format!(
5693                 "{value}",
5694                 value = value
5695             )));
5696             writer.write(xml::writer::XmlEvent::end_element())?;
5697         }
5698         writer.write(xml::writer::XmlEvent::end_element())
5699     }
5700 }
5701 
5702 #[allow(dead_code)]
5703 struct GrantsDeserializer;
5704 impl GrantsDeserializer {
5705     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Grant>, XmlParseError>5706     fn deserialize<T: Peek + Next>(
5707         tag_name: &str,
5708         stack: &mut T,
5709     ) -> Result<Vec<Grant>, XmlParseError> {
5710         deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
5711             if name == "Grant" {
5712                 obj.push(GrantDeserializer::deserialize("Grant", stack)?);
5713             } else {
5714                 skip_tree(stack);
5715             }
5716             Ok(())
5717         })
5718     }
5719 }
5720 
5721 pub struct GrantsSerializer;
5722 impl GrantsSerializer {
5723     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<Grant>, ) -> Result<(), xml::writer::Error> where W: Write,5724     pub fn serialize<W>(
5725         mut writer: &mut EventWriter<W>,
5726         name: &str,
5727         obj: &Vec<Grant>,
5728     ) -> Result<(), xml::writer::Error>
5729     where
5730         W: Write,
5731     {
5732         writer.write(xml::writer::XmlEvent::start_element(name))?;
5733         for element in obj {
5734             GrantSerializer::serialize(writer, "Grant", element)?;
5735         }
5736         writer.write(xml::writer::XmlEvent::end_element())?;
5737         Ok(())
5738     }
5739 }
5740 
5741 #[derive(Default, Debug, Clone, PartialEq)]
5742 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5743 pub struct HeadBucketRequest {
5744     /// <p>The bucket name.</p>
5745     pub bucket: String,
5746 }
5747 
5748 #[derive(Default, Debug, Clone, PartialEq)]
5749 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5750 pub struct HeadObjectOutput {
5751     /// <p>Indicates that a range of bytes was specified.</p>
5752     pub accept_ranges: Option<String>,
5753     /// <p>Specifies caching behavior along the request/reply chain.</p>
5754     pub cache_control: Option<String>,
5755     /// <p>Specifies presentational information for the object.</p>
5756     pub content_disposition: Option<String>,
5757     /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p>
5758     pub content_encoding: Option<String>,
5759     /// <p>The language the content is in.</p>
5760     pub content_language: Option<String>,
5761     /// <p>Size of the body in bytes.</p>
5762     pub content_length: Option<i64>,
5763     /// <p>A standard MIME type describing the format of the object data.</p>
5764     pub content_type: Option<String>,
5765     /// <p>Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.</p>
5766     pub delete_marker: Option<bool>,
5767     /// <p>An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.</p>
5768     pub e_tag: Option<String>,
5769     /// <p>If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header. It includes the expiry-date and rule-id key-value pairs providing object expiration information. The value of the rule-id is URL encoded.</p>
5770     pub expiration: Option<String>,
5771     /// <p>The date and time at which the object is no longer cacheable.</p>
5772     pub expires: Option<String>,
5773     /// <p>Last modified date of the object</p>
5774     pub last_modified: Option<String>,
5775     /// <p>A map of metadata to store with the object in S3.</p>
5776     pub metadata: Option<::std::collections::HashMap<String, String>>,
5777     /// <p>This is set to the number of metadata entries not returned in <code>x-amz-meta</code> headers. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.</p>
5778     pub missing_meta: Option<i64>,
5779     /// <p>Specifies whether a legal hold is in effect for this object. This header is only returned if the requester has the <code>s3:GetObjectLegalHold</code> permission. This header is not returned if the specified version of this object has never had a legal hold applied. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a>.</p>
5780     pub object_lock_legal_hold_status: Option<String>,
5781     /// <p>The Object Lock mode, if any, that's in effect for this object. This header is only returned if the requester has the <code>s3:GetObjectRetention</code> permission. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a>. </p>
5782     pub object_lock_mode: Option<String>,
5783     /// <p>The date and time when the Object Lock retention period expires. This header is only returned if the requester has the <code>s3:GetObjectRetention</code> permission.</p>
5784     pub object_lock_retain_until_date: Option<String>,
5785     /// <p>The count of parts this object has.</p>
5786     pub parts_count: Option<i64>,
5787     /// <p>Amazon S3 can return this header if your request involves a bucket that is either a source or destination in a replication rule.</p> <p>In replication, you have a source bucket on which you configure replication and destination bucket where Amazon S3 stores object replicas. When you request an object (<code>GetObject</code>) or object metadata (<code>HeadObject</code>) from these buckets, Amazon S3 will return the <code>x-amz-replication-status</code> header in the response as follows:</p> <ul> <li> <p>If requesting an object from the source bucket — Amazon S3 will return the <code>x-amz-replication-status</code> header if the object in your request is eligible for replication.</p> <p> For example, suppose that in your replication configuration, you specify object prefix <code>TaxDocs</code> requesting Amazon S3 to replicate objects with key prefix <code>TaxDocs</code>. Any objects you upload with this key name prefix, for example <code>TaxDocs/document1.pdf</code>, are eligible for replication. For any object request with this key name prefix, Amazon S3 will return the <code>x-amz-replication-status</code> header with value PENDING, COMPLETED or FAILED indicating object replication status.</p> </li> <li> <p>If requesting an object from the destination bucket — Amazon S3 will return the <code>x-amz-replication-status</code> header with value REPLICA if the object in your request is a replica that Amazon S3 created.</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html">Replication</a>.</p>
5788     pub replication_status: Option<String>,
5789     pub request_charged: Option<String>,
5790     /// <p>If the object is an archived object (an object whose storage class is GLACIER), the response includes this header if either the archive restoration is in progress (see <a>RestoreObject</a> or an archive copy is already restored.</p> <p> If an archive copy is already restored, the header value indicates when Amazon S3 is scheduled to delete the object copy. For example:</p> <p> <code>x-amz-restore: ongoing-request="false", expiry-date="Fri, 23 Dec 2012 00:00:00 GMT"</code> </p> <p>If the object restoration is in progress, the header returns the value <code>ongoing-request="true"</code>.</p> <p>For more information about archiving objects, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations">Transitioning Objects: General Considerations</a>.</p>
5791     pub restore: Option<String>,
5792     /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.</p>
5793     pub sse_customer_algorithm: Option<String>,
5794     /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.</p>
5795     pub sse_customer_key_md5: Option<String>,
5796     /// <p>If present, specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) that was used for the object.</p>
5797     pub ssekms_key_id: Option<String>,
5798     /// <p>If the object is stored using server-side encryption either with an AWS KMS customer master key (CMK) or an Amazon S3-managed encryption key, the response includes this header with the value of the server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
5799     pub server_side_encryption: Option<String>,
5800     /// <p>Provides storage class information of the object. Amazon S3 returns this header for all objects except for Standard storage class objects.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a>.</p>
5801     pub storage_class: Option<String>,
5802     /// <p>Version of the object.</p>
5803     pub version_id: Option<String>,
5804     /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.</p>
5805     pub website_redirect_location: Option<String>,
5806 }
5807 
5808 #[allow(dead_code)]
5809 struct HeadObjectOutputDeserializer;
5810 impl HeadObjectOutputDeserializer {
5811     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<HeadObjectOutput, XmlParseError>5812     fn deserialize<T: Peek + Next>(
5813         tag_name: &str,
5814         stack: &mut T,
5815     ) -> Result<HeadObjectOutput, XmlParseError> {
5816         start_element(tag_name, stack)?;
5817 
5818         let obj = HeadObjectOutput::default();
5819 
5820         end_element(tag_name, stack)?;
5821 
5822         Ok(obj)
5823     }
5824 }
5825 #[derive(Default, Debug, Clone, PartialEq)]
5826 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5827 pub struct HeadObjectRequest {
5828     /// <p>The name of the bucket containing the object.</p>
5829     pub bucket: String,
5830     /// <p>Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).</p>
5831     pub if_match: Option<String>,
5832     /// <p>Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).</p>
5833     pub if_modified_since: Option<String>,
5834     /// <p>Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).</p>
5835     pub if_none_match: Option<String>,
5836     /// <p>Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).</p>
5837     pub if_unmodified_since: Option<String>,
5838     /// <p>The object key.</p>
5839     pub key: String,
5840     /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.</p>
5841     pub part_number: Option<i64>,
5842     /// <p>Downloads the specified range bytes of an object. For more information about the HTTP Range header, see <a href="">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35</a>.</p>
5843     pub range: Option<String>,
5844     pub request_payer: Option<String>,
5845     /// <p>Specifies the algorithm to use to when encrypting the object (for example, AES256).</p>
5846     pub sse_customer_algorithm: Option<String>,
5847     /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side​-encryption​-customer-algorithm</code> header.</p>
5848     pub sse_customer_key: Option<String>,
5849     /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
5850     pub sse_customer_key_md5: Option<String>,
5851     /// <p>VersionId used to reference a specific version of the object.</p>
5852     pub version_id: Option<String>,
5853 }
5854 
5855 #[allow(dead_code)]
5856 struct HostNameDeserializer;
5857 impl HostNameDeserializer {
5858     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>5859     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5860         start_element(tag_name, stack)?;
5861         let obj = characters(stack)?;
5862         end_element(tag_name, stack)?;
5863 
5864         Ok(obj)
5865     }
5866 }
5867 
5868 pub struct HostNameSerializer;
5869 impl HostNameSerializer {
5870     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,5871     pub fn serialize<W>(
5872         mut writer: &mut EventWriter<W>,
5873         name: &str,
5874         obj: &String,
5875     ) -> Result<(), xml::writer::Error>
5876     where
5877         W: Write,
5878     {
5879         writer.write(xml::writer::XmlEvent::start_element(name))?;
5880         writer.write(xml::writer::XmlEvent::characters(&format!(
5881             "{value}",
5882             value = obj.to_string()
5883         )))?;
5884         writer.write(xml::writer::XmlEvent::end_element())
5885     }
5886 }
5887 
5888 #[allow(dead_code)]
5889 struct HttpErrorCodeReturnedEqualsDeserializer;
5890 impl HttpErrorCodeReturnedEqualsDeserializer {
5891     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>5892     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5893         start_element(tag_name, stack)?;
5894         let obj = characters(stack)?;
5895         end_element(tag_name, stack)?;
5896 
5897         Ok(obj)
5898     }
5899 }
5900 
5901 pub struct HttpErrorCodeReturnedEqualsSerializer;
5902 impl HttpErrorCodeReturnedEqualsSerializer {
5903     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,5904     pub fn serialize<W>(
5905         mut writer: &mut EventWriter<W>,
5906         name: &str,
5907         obj: &String,
5908     ) -> Result<(), xml::writer::Error>
5909     where
5910         W: Write,
5911     {
5912         writer.write(xml::writer::XmlEvent::start_element(name))?;
5913         writer.write(xml::writer::XmlEvent::characters(&format!(
5914             "{value}",
5915             value = obj.to_string()
5916         )))?;
5917         writer.write(xml::writer::XmlEvent::end_element())
5918     }
5919 }
5920 
5921 #[allow(dead_code)]
5922 struct HttpRedirectCodeDeserializer;
5923 impl HttpRedirectCodeDeserializer {
5924     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>5925     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5926         start_element(tag_name, stack)?;
5927         let obj = characters(stack)?;
5928         end_element(tag_name, stack)?;
5929 
5930         Ok(obj)
5931     }
5932 }
5933 
5934 pub struct HttpRedirectCodeSerializer;
5935 impl HttpRedirectCodeSerializer {
5936     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,5937     pub fn serialize<W>(
5938         mut writer: &mut EventWriter<W>,
5939         name: &str,
5940         obj: &String,
5941     ) -> Result<(), xml::writer::Error>
5942     where
5943         W: Write,
5944     {
5945         writer.write(xml::writer::XmlEvent::start_element(name))?;
5946         writer.write(xml::writer::XmlEvent::characters(&format!(
5947             "{value}",
5948             value = obj.to_string()
5949         )))?;
5950         writer.write(xml::writer::XmlEvent::end_element())
5951     }
5952 }
5953 
5954 #[allow(dead_code)]
5955 struct IDDeserializer;
5956 impl IDDeserializer {
5957     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>5958     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5959         start_element(tag_name, stack)?;
5960         let obj = characters(stack)?;
5961         end_element(tag_name, stack)?;
5962 
5963         Ok(obj)
5964     }
5965 }
5966 
5967 pub struct IDSerializer;
5968 impl IDSerializer {
5969     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,5970     pub fn serialize<W>(
5971         mut writer: &mut EventWriter<W>,
5972         name: &str,
5973         obj: &String,
5974     ) -> Result<(), xml::writer::Error>
5975     where
5976         W: Write,
5977     {
5978         writer.write(xml::writer::XmlEvent::start_element(name))?;
5979         writer.write(xml::writer::XmlEvent::characters(&format!(
5980             "{value}",
5981             value = obj.to_string()
5982         )))?;
5983         writer.write(xml::writer::XmlEvent::end_element())
5984     }
5985 }
5986 
5987 /// <p>Container for the <code>Suffix</code> element.</p>
5988 #[derive(Default, Debug, Clone, PartialEq)]
5989 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5990 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5991 pub struct IndexDocument {
5992     /// <p>A suffix that is appended to a request that is for a directory on the website endpoint (for example,if the suffix is index.html and you make a request to samplebucket/images/ the data that is returned will be for the object with the key name images/index.html) The suffix must not be empty and must not include a slash character.</p>
5993     pub suffix: String,
5994 }
5995 
5996 #[allow(dead_code)]
5997 struct IndexDocumentDeserializer;
5998 impl IndexDocumentDeserializer {
5999     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<IndexDocument, XmlParseError>6000     fn deserialize<T: Peek + Next>(
6001         tag_name: &str,
6002         stack: &mut T,
6003     ) -> Result<IndexDocument, XmlParseError> {
6004         deserialize_elements::<_, IndexDocument, _>(tag_name, stack, |name, stack, obj| {
6005             match name {
6006                 "Suffix" => {
6007                     obj.suffix = SuffixDeserializer::deserialize("Suffix", stack)?;
6008                 }
6009                 _ => skip_tree(stack),
6010             }
6011             Ok(())
6012         })
6013     }
6014 }
6015 
6016 pub struct IndexDocumentSerializer;
6017 impl IndexDocumentSerializer {
6018     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &IndexDocument, ) -> Result<(), xml::writer::Error> where W: Write,6019     pub fn serialize<W>(
6020         mut writer: &mut EventWriter<W>,
6021         name: &str,
6022         obj: &IndexDocument,
6023     ) -> Result<(), xml::writer::Error>
6024     where
6025         W: Write,
6026     {
6027         writer.write(xml::writer::XmlEvent::start_element(name))?;
6028         writer.write(xml::writer::XmlEvent::start_element("Suffix"))?;
6029         writer.write(xml::writer::XmlEvent::characters(&format!(
6030             "{value}",
6031             value = obj.suffix
6032         )))?;
6033         writer.write(xml::writer::XmlEvent::end_element())?;
6034         writer.write(xml::writer::XmlEvent::end_element())
6035     }
6036 }
6037 
6038 #[allow(dead_code)]
6039 struct InitiatedDeserializer;
6040 impl InitiatedDeserializer {
6041     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6042     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6043         start_element(tag_name, stack)?;
6044         let obj = characters(stack)?;
6045         end_element(tag_name, stack)?;
6046 
6047         Ok(obj)
6048     }
6049 }
6050 /// <p>Container element that identifies who initiated the multipart upload. </p>
6051 #[derive(Default, Debug, Clone, PartialEq)]
6052 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6053 pub struct Initiator {
6054     /// <p>Name of the Principal.</p>
6055     pub display_name: Option<String>,
6056     /// <p>If the principal is an AWS account, it provides the Canonical User ID. If the principal is an IAM User, it provides a user ARN value.</p>
6057     pub id: Option<String>,
6058 }
6059 
6060 #[allow(dead_code)]
6061 struct InitiatorDeserializer;
6062 impl InitiatorDeserializer {
6063     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Initiator, XmlParseError>6064     fn deserialize<T: Peek + Next>(
6065         tag_name: &str,
6066         stack: &mut T,
6067     ) -> Result<Initiator, XmlParseError> {
6068         deserialize_elements::<_, Initiator, _>(tag_name, stack, |name, stack, obj| {
6069             match name {
6070                 "DisplayName" => {
6071                     obj.display_name =
6072                         Some(DisplayNameDeserializer::deserialize("DisplayName", stack)?);
6073                 }
6074                 "ID" => {
6075                     obj.id = Some(IDDeserializer::deserialize("ID", stack)?);
6076                 }
6077                 _ => skip_tree(stack),
6078             }
6079             Ok(())
6080         })
6081     }
6082 }
6083 /// <p>Describes the serialization format of the object.</p>
6084 #[derive(Default, Debug, Clone, PartialEq)]
6085 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6086 pub struct InputSerialization {
6087     /// <p>Describes the serialization of a CSV-encoded object.</p>
6088     pub csv: Option<CSVInput>,
6089     /// <p>Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value: NONE.</p>
6090     pub compression_type: Option<String>,
6091     /// <p>Specifies JSON as object's input serialization format.</p>
6092     pub json: Option<JSONInput>,
6093     /// <p>Specifies Parquet as object's input serialization format.</p>
6094     pub parquet: Option<ParquetInput>,
6095 }
6096 
6097 pub struct InputSerializationSerializer;
6098 impl InputSerializationSerializer {
6099     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &InputSerialization, ) -> Result<(), xml::writer::Error> where W: Write,6100     pub fn serialize<W>(
6101         mut writer: &mut EventWriter<W>,
6102         name: &str,
6103         obj: &InputSerialization,
6104     ) -> Result<(), xml::writer::Error>
6105     where
6106         W: Write,
6107     {
6108         writer.write(xml::writer::XmlEvent::start_element(name))?;
6109         if let Some(ref value) = obj.csv {
6110             &CSVInputSerializer::serialize(&mut writer, "CSV", value)?;
6111         }
6112         if let Some(ref value) = obj.compression_type {
6113             writer.write(xml::writer::XmlEvent::start_element("CompressionType"))?;
6114             writer.write(xml::writer::XmlEvent::characters(&format!(
6115                 "{value}",
6116                 value = value
6117             )));
6118             writer.write(xml::writer::XmlEvent::end_element())?;
6119         }
6120         if let Some(ref value) = obj.json {
6121             &JSONInputSerializer::serialize(&mut writer, "JSON", value)?;
6122         }
6123         if let Some(ref value) = obj.parquet {
6124             &ParquetInputSerializer::serialize(&mut writer, "Parquet", value)?;
6125         }
6126         writer.write(xml::writer::XmlEvent::end_element())
6127     }
6128 }
6129 
6130 /// <p>Specifies the inventory configuration for an Amazon S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETInventoryConfig.html">GET Bucket inventory</a> in the <i>Amazon Simple Storage Service API Reference</i>. </p>
6131 #[derive(Default, Debug, Clone, PartialEq)]
6132 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6133 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6134 pub struct InventoryConfiguration {
6135     /// <p>Contains information about where to publish the inventory results.</p>
6136     pub destination: InventoryDestination,
6137     /// <p>Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria.</p>
6138     pub filter: Option<InventoryFilter>,
6139     /// <p>The ID used to identify the inventory configuration.</p>
6140     pub id: String,
6141     /// <p>Object versions to include in the inventory list. If set to <code>All</code>, the list includes all the object versions, which adds the version-related fields <code>VersionId</code>, <code>IsLatest</code>, and <code>DeleteMarker</code> to the list. If set to <code>Current</code>, the list does not contain these version-related fields.</p>
6142     pub included_object_versions: String,
6143     /// <p>Specifies whether the inventory is enabled or disabled. If set to <code>True</code>, an inventory list is generated. If set to <code>False</code>, no inventory list is generated.</p>
6144     pub is_enabled: bool,
6145     /// <p>Contains the optional fields that are included in the inventory results.</p>
6146     pub optional_fields: Option<Vec<String>>,
6147     /// <p>Specifies the schedule for generating inventory results.</p>
6148     pub schedule: InventorySchedule,
6149 }
6150 
6151 #[allow(dead_code)]
6152 struct InventoryConfigurationDeserializer;
6153 impl InventoryConfigurationDeserializer {
6154     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<InventoryConfiguration, XmlParseError>6155     fn deserialize<T: Peek + Next>(
6156         tag_name: &str,
6157         stack: &mut T,
6158     ) -> Result<InventoryConfiguration, XmlParseError> {
6159         deserialize_elements::<_, InventoryConfiguration, _>(tag_name, stack, |name, stack, obj| {
6160             match name {
6161                 "Destination" => {
6162                     obj.destination =
6163                         InventoryDestinationDeserializer::deserialize("Destination", stack)?;
6164                 }
6165                 "Filter" => {
6166                     obj.filter = Some(InventoryFilterDeserializer::deserialize("Filter", stack)?);
6167                 }
6168                 "Id" => {
6169                     obj.id = InventoryIdDeserializer::deserialize("Id", stack)?;
6170                 }
6171                 "IncludedObjectVersions" => {
6172                     obj.included_object_versions =
6173                         InventoryIncludedObjectVersionsDeserializer::deserialize(
6174                             "IncludedObjectVersions",
6175                             stack,
6176                         )?;
6177                 }
6178                 "IsEnabled" => {
6179                     obj.is_enabled = IsEnabledDeserializer::deserialize("IsEnabled", stack)?;
6180                 }
6181                 "OptionalFields" => {
6182                     obj.optional_fields.get_or_insert(vec![]).extend(
6183                         InventoryOptionalFieldsDeserializer::deserialize("OptionalFields", stack)?,
6184                     );
6185                 }
6186                 "Schedule" => {
6187                     obj.schedule = InventoryScheduleDeserializer::deserialize("Schedule", stack)?;
6188                 }
6189                 _ => skip_tree(stack),
6190             }
6191             Ok(())
6192         })
6193     }
6194 }
6195 
6196 pub struct InventoryConfigurationSerializer;
6197 impl InventoryConfigurationSerializer {
6198     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &InventoryConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,6199     pub fn serialize<W>(
6200         mut writer: &mut EventWriter<W>,
6201         name: &str,
6202         obj: &InventoryConfiguration,
6203     ) -> Result<(), xml::writer::Error>
6204     where
6205         W: Write,
6206     {
6207         writer.write(xml::writer::XmlEvent::start_element(name))?;
6208         InventoryDestinationSerializer::serialize(&mut writer, "Destination", &obj.destination)?;
6209         if let Some(ref value) = obj.filter {
6210             &InventoryFilterSerializer::serialize(&mut writer, "Filter", value)?;
6211         }
6212         writer.write(xml::writer::XmlEvent::start_element("Id"))?;
6213         writer.write(xml::writer::XmlEvent::characters(&format!(
6214             "{value}",
6215             value = obj.id
6216         )))?;
6217         writer.write(xml::writer::XmlEvent::end_element())?;
6218         writer.write(xml::writer::XmlEvent::start_element(
6219             "IncludedObjectVersions",
6220         ))?;
6221         writer.write(xml::writer::XmlEvent::characters(&format!(
6222             "{value}",
6223             value = obj.included_object_versions
6224         )))?;
6225         writer.write(xml::writer::XmlEvent::end_element())?;
6226         writer.write(xml::writer::XmlEvent::start_element("IsEnabled"))?;
6227         writer.write(xml::writer::XmlEvent::characters(&format!(
6228             "{value}",
6229             value = obj.is_enabled
6230         )))?;
6231         writer.write(xml::writer::XmlEvent::end_element())?;
6232         if let Some(ref value) = obj.optional_fields {
6233             &InventoryOptionalFieldsSerializer::serialize(&mut writer, "OptionalFields", value)?;
6234         }
6235         InventoryScheduleSerializer::serialize(&mut writer, "Schedule", &obj.schedule)?;
6236         writer.write(xml::writer::XmlEvent::end_element())
6237     }
6238 }
6239 
6240 #[allow(dead_code)]
6241 struct InventoryConfigurationListDeserializer;
6242 impl InventoryConfigurationListDeserializer {
6243     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<InventoryConfiguration>, XmlParseError>6244     fn deserialize<T: Peek + Next>(
6245         tag_name: &str,
6246         stack: &mut T,
6247     ) -> Result<Vec<InventoryConfiguration>, XmlParseError> {
6248         let mut obj = vec![];
6249 
6250         loop {
6251             let consume_next_tag = match stack.peek() {
6252                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
6253                     name.local_name == tag_name
6254                 }
6255                 _ => false,
6256             };
6257 
6258             if consume_next_tag {
6259                 obj.push(InventoryConfigurationDeserializer::deserialize(
6260                     tag_name, stack,
6261                 )?);
6262             } else {
6263                 break;
6264             }
6265         }
6266 
6267         Ok(obj)
6268     }
6269 }
6270 /// <p>Specifies the inventory configuration for an Amazon S3 bucket.</p>
6271 #[derive(Default, Debug, Clone, PartialEq)]
6272 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6273 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6274 pub struct InventoryDestination {
6275     /// <p>Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.</p>
6276     pub s3_bucket_destination: InventoryS3BucketDestination,
6277 }
6278 
6279 #[allow(dead_code)]
6280 struct InventoryDestinationDeserializer;
6281 impl InventoryDestinationDeserializer {
6282     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<InventoryDestination, XmlParseError>6283     fn deserialize<T: Peek + Next>(
6284         tag_name: &str,
6285         stack: &mut T,
6286     ) -> Result<InventoryDestination, XmlParseError> {
6287         deserialize_elements::<_, InventoryDestination, _>(tag_name, stack, |name, stack, obj| {
6288             match name {
6289                 "S3BucketDestination" => {
6290                     obj.s3_bucket_destination =
6291                         InventoryS3BucketDestinationDeserializer::deserialize(
6292                             "S3BucketDestination",
6293                             stack,
6294                         )?;
6295                 }
6296                 _ => skip_tree(stack),
6297             }
6298             Ok(())
6299         })
6300     }
6301 }
6302 
6303 pub struct InventoryDestinationSerializer;
6304 impl InventoryDestinationSerializer {
6305     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &InventoryDestination, ) -> Result<(), xml::writer::Error> where W: Write,6306     pub fn serialize<W>(
6307         mut writer: &mut EventWriter<W>,
6308         name: &str,
6309         obj: &InventoryDestination,
6310     ) -> Result<(), xml::writer::Error>
6311     where
6312         W: Write,
6313     {
6314         writer.write(xml::writer::XmlEvent::start_element(name))?;
6315         InventoryS3BucketDestinationSerializer::serialize(
6316             &mut writer,
6317             "S3BucketDestination",
6318             &obj.s3_bucket_destination,
6319         )?;
6320         writer.write(xml::writer::XmlEvent::end_element())
6321     }
6322 }
6323 
6324 /// <p>Contains the type of server-side encryption used to encrypt the inventory results.</p>
6325 #[derive(Default, Debug, Clone, PartialEq)]
6326 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6327 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6328 pub struct InventoryEncryption {
6329     /// <p>Specifies the use of SSE-KMS to encrypt delivered inventory reports.</p>
6330     pub ssekms: Option<SSEKMS>,
6331     /// <p>Specifies the use of SSE-S3 to encrypt delivered inventory reports.</p>
6332     pub sses3: Option<SSES3>,
6333 }
6334 
6335 #[allow(dead_code)]
6336 struct InventoryEncryptionDeserializer;
6337 impl InventoryEncryptionDeserializer {
6338     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<InventoryEncryption, XmlParseError>6339     fn deserialize<T: Peek + Next>(
6340         tag_name: &str,
6341         stack: &mut T,
6342     ) -> Result<InventoryEncryption, XmlParseError> {
6343         deserialize_elements::<_, InventoryEncryption, _>(tag_name, stack, |name, stack, obj| {
6344             match name {
6345                 "SSE-KMS" => {
6346                     obj.ssekms = Some(SSEKMSDeserializer::deserialize("SSE-KMS", stack)?);
6347                 }
6348                 "SSE-S3" => {
6349                     obj.sses3 = Some(SSES3Deserializer::deserialize("SSE-S3", stack)?);
6350                 }
6351                 _ => skip_tree(stack),
6352             }
6353             Ok(())
6354         })
6355     }
6356 }
6357 
6358 pub struct InventoryEncryptionSerializer;
6359 impl InventoryEncryptionSerializer {
6360     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &InventoryEncryption, ) -> Result<(), xml::writer::Error> where W: Write,6361     pub fn serialize<W>(
6362         mut writer: &mut EventWriter<W>,
6363         name: &str,
6364         obj: &InventoryEncryption,
6365     ) -> Result<(), xml::writer::Error>
6366     where
6367         W: Write,
6368     {
6369         writer.write(xml::writer::XmlEvent::start_element(name))?;
6370         if let Some(ref value) = obj.ssekms {
6371             &SSEKMSSerializer::serialize(&mut writer, "SSE-KMS", value)?;
6372         }
6373         if let Some(ref value) = obj.sses3 {
6374             &SSES3Serializer::serialize(&mut writer, "SSE-S3", value)?;
6375         }
6376         writer.write(xml::writer::XmlEvent::end_element())
6377     }
6378 }
6379 
6380 /// <p>Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria.</p>
6381 #[derive(Default, Debug, Clone, PartialEq)]
6382 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6383 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6384 pub struct InventoryFilter {
6385     /// <p>The prefix that an object must have to be included in the inventory results.</p>
6386     pub prefix: String,
6387 }
6388 
6389 #[allow(dead_code)]
6390 struct InventoryFilterDeserializer;
6391 impl InventoryFilterDeserializer {
6392     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<InventoryFilter, XmlParseError>6393     fn deserialize<T: Peek + Next>(
6394         tag_name: &str,
6395         stack: &mut T,
6396     ) -> Result<InventoryFilter, XmlParseError> {
6397         deserialize_elements::<_, InventoryFilter, _>(tag_name, stack, |name, stack, obj| {
6398             match name {
6399                 "Prefix" => {
6400                     obj.prefix = PrefixDeserializer::deserialize("Prefix", stack)?;
6401                 }
6402                 _ => skip_tree(stack),
6403             }
6404             Ok(())
6405         })
6406     }
6407 }
6408 
6409 pub struct InventoryFilterSerializer;
6410 impl InventoryFilterSerializer {
6411     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &InventoryFilter, ) -> Result<(), xml::writer::Error> where W: Write,6412     pub fn serialize<W>(
6413         mut writer: &mut EventWriter<W>,
6414         name: &str,
6415         obj: &InventoryFilter,
6416     ) -> Result<(), xml::writer::Error>
6417     where
6418         W: Write,
6419     {
6420         writer.write(xml::writer::XmlEvent::start_element(name))?;
6421         writer.write(xml::writer::XmlEvent::start_element("Prefix"))?;
6422         writer.write(xml::writer::XmlEvent::characters(&format!(
6423             "{value}",
6424             value = obj.prefix
6425         )))?;
6426         writer.write(xml::writer::XmlEvent::end_element())?;
6427         writer.write(xml::writer::XmlEvent::end_element())
6428     }
6429 }
6430 
6431 #[allow(dead_code)]
6432 struct InventoryFormatDeserializer;
6433 impl InventoryFormatDeserializer {
6434     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6435     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6436         start_element(tag_name, stack)?;
6437         let obj = characters(stack)?;
6438         end_element(tag_name, stack)?;
6439 
6440         Ok(obj)
6441     }
6442 }
6443 
6444 pub struct InventoryFormatSerializer;
6445 impl InventoryFormatSerializer {
6446     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6447     pub fn serialize<W>(
6448         mut writer: &mut EventWriter<W>,
6449         name: &str,
6450         obj: &String,
6451     ) -> Result<(), xml::writer::Error>
6452     where
6453         W: Write,
6454     {
6455         writer.write(xml::writer::XmlEvent::start_element(name))?;
6456         writer.write(xml::writer::XmlEvent::characters(&format!(
6457             "{value}",
6458             value = obj.to_string()
6459         )))?;
6460         writer.write(xml::writer::XmlEvent::end_element())
6461     }
6462 }
6463 
6464 #[allow(dead_code)]
6465 struct InventoryFrequencyDeserializer;
6466 impl InventoryFrequencyDeserializer {
6467     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6468     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6469         start_element(tag_name, stack)?;
6470         let obj = characters(stack)?;
6471         end_element(tag_name, stack)?;
6472 
6473         Ok(obj)
6474     }
6475 }
6476 
6477 pub struct InventoryFrequencySerializer;
6478 impl InventoryFrequencySerializer {
6479     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6480     pub fn serialize<W>(
6481         mut writer: &mut EventWriter<W>,
6482         name: &str,
6483         obj: &String,
6484     ) -> Result<(), xml::writer::Error>
6485     where
6486         W: Write,
6487     {
6488         writer.write(xml::writer::XmlEvent::start_element(name))?;
6489         writer.write(xml::writer::XmlEvent::characters(&format!(
6490             "{value}",
6491             value = obj.to_string()
6492         )))?;
6493         writer.write(xml::writer::XmlEvent::end_element())
6494     }
6495 }
6496 
6497 #[allow(dead_code)]
6498 struct InventoryIdDeserializer;
6499 impl InventoryIdDeserializer {
6500     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6501     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6502         start_element(tag_name, stack)?;
6503         let obj = characters(stack)?;
6504         end_element(tag_name, stack)?;
6505 
6506         Ok(obj)
6507     }
6508 }
6509 
6510 pub struct InventoryIdSerializer;
6511 impl InventoryIdSerializer {
6512     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6513     pub fn serialize<W>(
6514         mut writer: &mut EventWriter<W>,
6515         name: &str,
6516         obj: &String,
6517     ) -> Result<(), xml::writer::Error>
6518     where
6519         W: Write,
6520     {
6521         writer.write(xml::writer::XmlEvent::start_element(name))?;
6522         writer.write(xml::writer::XmlEvent::characters(&format!(
6523             "{value}",
6524             value = obj.to_string()
6525         )))?;
6526         writer.write(xml::writer::XmlEvent::end_element())
6527     }
6528 }
6529 
6530 #[allow(dead_code)]
6531 struct InventoryIncludedObjectVersionsDeserializer;
6532 impl InventoryIncludedObjectVersionsDeserializer {
6533     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6534     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6535         start_element(tag_name, stack)?;
6536         let obj = characters(stack)?;
6537         end_element(tag_name, stack)?;
6538 
6539         Ok(obj)
6540     }
6541 }
6542 
6543 pub struct InventoryIncludedObjectVersionsSerializer;
6544 impl InventoryIncludedObjectVersionsSerializer {
6545     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6546     pub fn serialize<W>(
6547         mut writer: &mut EventWriter<W>,
6548         name: &str,
6549         obj: &String,
6550     ) -> Result<(), xml::writer::Error>
6551     where
6552         W: Write,
6553     {
6554         writer.write(xml::writer::XmlEvent::start_element(name))?;
6555         writer.write(xml::writer::XmlEvent::characters(&format!(
6556             "{value}",
6557             value = obj.to_string()
6558         )))?;
6559         writer.write(xml::writer::XmlEvent::end_element())
6560     }
6561 }
6562 
6563 #[allow(dead_code)]
6564 struct InventoryOptionalFieldDeserializer;
6565 impl InventoryOptionalFieldDeserializer {
6566     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6567     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6568         start_element(tag_name, stack)?;
6569         let obj = characters(stack)?;
6570         end_element(tag_name, stack)?;
6571 
6572         Ok(obj)
6573     }
6574 }
6575 
6576 pub struct InventoryOptionalFieldSerializer;
6577 impl InventoryOptionalFieldSerializer {
6578     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6579     pub fn serialize<W>(
6580         mut writer: &mut EventWriter<W>,
6581         name: &str,
6582         obj: &String,
6583     ) -> Result<(), xml::writer::Error>
6584     where
6585         W: Write,
6586     {
6587         writer.write(xml::writer::XmlEvent::start_element(name))?;
6588         writer.write(xml::writer::XmlEvent::characters(&format!(
6589             "{value}",
6590             value = obj.to_string()
6591         )))?;
6592         writer.write(xml::writer::XmlEvent::end_element())
6593     }
6594 }
6595 
6596 #[allow(dead_code)]
6597 struct InventoryOptionalFieldsDeserializer;
6598 impl InventoryOptionalFieldsDeserializer {
6599     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<String>, XmlParseError>6600     fn deserialize<T: Peek + Next>(
6601         tag_name: &str,
6602         stack: &mut T,
6603     ) -> Result<Vec<String>, XmlParseError> {
6604         deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
6605             if name == "Field" {
6606                 obj.push(InventoryOptionalFieldDeserializer::deserialize(
6607                     "Field", stack,
6608                 )?);
6609             } else {
6610                 skip_tree(stack);
6611             }
6612             Ok(())
6613         })
6614     }
6615 }
6616 
6617 pub struct InventoryOptionalFieldsSerializer;
6618 impl InventoryOptionalFieldsSerializer {
6619     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<String>, ) -> Result<(), xml::writer::Error> where W: Write,6620     pub fn serialize<W>(
6621         mut writer: &mut EventWriter<W>,
6622         name: &str,
6623         obj: &Vec<String>,
6624     ) -> Result<(), xml::writer::Error>
6625     where
6626         W: Write,
6627     {
6628         writer.write(xml::writer::XmlEvent::start_element(name))?;
6629         for element in obj {
6630             InventoryOptionalFieldSerializer::serialize(writer, "Field", element)?;
6631         }
6632         writer.write(xml::writer::XmlEvent::end_element())?;
6633         Ok(())
6634     }
6635 }
6636 
6637 /// <p>Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.</p>
6638 #[derive(Default, Debug, Clone, PartialEq)]
6639 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6640 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6641 pub struct InventoryS3BucketDestination {
6642     /// <p>The ID of the account that owns the destination bucket.</p>
6643     pub account_id: Option<String>,
6644     /// <p>The Amazon Resource Name (ARN) of the bucket where inventory results will be published.</p>
6645     pub bucket: String,
6646     /// <p>Contains the type of server-side encryption used to encrypt the inventory results.</p>
6647     pub encryption: Option<InventoryEncryption>,
6648     /// <p>Specifies the output format of the inventory results.</p>
6649     pub format: String,
6650     /// <p>The prefix that is prepended to all inventory results.</p>
6651     pub prefix: Option<String>,
6652 }
6653 
6654 #[allow(dead_code)]
6655 struct InventoryS3BucketDestinationDeserializer;
6656 impl InventoryS3BucketDestinationDeserializer {
6657     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<InventoryS3BucketDestination, XmlParseError>6658     fn deserialize<T: Peek + Next>(
6659         tag_name: &str,
6660         stack: &mut T,
6661     ) -> Result<InventoryS3BucketDestination, XmlParseError> {
6662         deserialize_elements::<_, InventoryS3BucketDestination, _>(
6663             tag_name,
6664             stack,
6665             |name, stack, obj| {
6666                 match name {
6667                     "AccountId" => {
6668                         obj.account_id =
6669                             Some(AccountIdDeserializer::deserialize("AccountId", stack)?);
6670                     }
6671                     "Bucket" => {
6672                         obj.bucket = BucketNameDeserializer::deserialize("Bucket", stack)?;
6673                     }
6674                     "Encryption" => {
6675                         obj.encryption = Some(InventoryEncryptionDeserializer::deserialize(
6676                             "Encryption",
6677                             stack,
6678                         )?);
6679                     }
6680                     "Format" => {
6681                         obj.format = InventoryFormatDeserializer::deserialize("Format", stack)?;
6682                     }
6683                     "Prefix" => {
6684                         obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
6685                     }
6686                     _ => skip_tree(stack),
6687                 }
6688                 Ok(())
6689             },
6690         )
6691     }
6692 }
6693 
6694 pub struct InventoryS3BucketDestinationSerializer;
6695 impl InventoryS3BucketDestinationSerializer {
6696     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &InventoryS3BucketDestination, ) -> Result<(), xml::writer::Error> where W: Write,6697     pub fn serialize<W>(
6698         mut writer: &mut EventWriter<W>,
6699         name: &str,
6700         obj: &InventoryS3BucketDestination,
6701     ) -> Result<(), xml::writer::Error>
6702     where
6703         W: Write,
6704     {
6705         writer.write(xml::writer::XmlEvent::start_element(name))?;
6706         if let Some(ref value) = obj.account_id {
6707             writer.write(xml::writer::XmlEvent::start_element("AccountId"))?;
6708             writer.write(xml::writer::XmlEvent::characters(&format!(
6709                 "{value}",
6710                 value = value
6711             )));
6712             writer.write(xml::writer::XmlEvent::end_element())?;
6713         }
6714         writer.write(xml::writer::XmlEvent::start_element("Bucket"))?;
6715         writer.write(xml::writer::XmlEvent::characters(&format!(
6716             "{value}",
6717             value = obj.bucket
6718         )))?;
6719         writer.write(xml::writer::XmlEvent::end_element())?;
6720         if let Some(ref value) = obj.encryption {
6721             &InventoryEncryptionSerializer::serialize(&mut writer, "Encryption", value)?;
6722         }
6723         writer.write(xml::writer::XmlEvent::start_element("Format"))?;
6724         writer.write(xml::writer::XmlEvent::characters(&format!(
6725             "{value}",
6726             value = obj.format
6727         )))?;
6728         writer.write(xml::writer::XmlEvent::end_element())?;
6729         if let Some(ref value) = obj.prefix {
6730             writer.write(xml::writer::XmlEvent::start_element("Prefix"))?;
6731             writer.write(xml::writer::XmlEvent::characters(&format!(
6732                 "{value}",
6733                 value = value
6734             )));
6735             writer.write(xml::writer::XmlEvent::end_element())?;
6736         }
6737         writer.write(xml::writer::XmlEvent::end_element())
6738     }
6739 }
6740 
6741 /// <p>Specifies the schedule for generating inventory results.</p>
6742 #[derive(Default, Debug, Clone, PartialEq)]
6743 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6744 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6745 pub struct InventorySchedule {
6746     /// <p>Specifies how frequently inventory results are produced.</p>
6747     pub frequency: String,
6748 }
6749 
6750 #[allow(dead_code)]
6751 struct InventoryScheduleDeserializer;
6752 impl InventoryScheduleDeserializer {
6753     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<InventorySchedule, XmlParseError>6754     fn deserialize<T: Peek + Next>(
6755         tag_name: &str,
6756         stack: &mut T,
6757     ) -> Result<InventorySchedule, XmlParseError> {
6758         deserialize_elements::<_, InventorySchedule, _>(tag_name, stack, |name, stack, obj| {
6759             match name {
6760                 "Frequency" => {
6761                     obj.frequency =
6762                         InventoryFrequencyDeserializer::deserialize("Frequency", stack)?;
6763                 }
6764                 _ => skip_tree(stack),
6765             }
6766             Ok(())
6767         })
6768     }
6769 }
6770 
6771 pub struct InventoryScheduleSerializer;
6772 impl InventoryScheduleSerializer {
6773     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &InventorySchedule, ) -> Result<(), xml::writer::Error> where W: Write,6774     pub fn serialize<W>(
6775         mut writer: &mut EventWriter<W>,
6776         name: &str,
6777         obj: &InventorySchedule,
6778     ) -> Result<(), xml::writer::Error>
6779     where
6780         W: Write,
6781     {
6782         writer.write(xml::writer::XmlEvent::start_element(name))?;
6783         writer.write(xml::writer::XmlEvent::start_element("Frequency"))?;
6784         writer.write(xml::writer::XmlEvent::characters(&format!(
6785             "{value}",
6786             value = obj.frequency
6787         )))?;
6788         writer.write(xml::writer::XmlEvent::end_element())?;
6789         writer.write(xml::writer::XmlEvent::end_element())
6790     }
6791 }
6792 
6793 #[allow(dead_code)]
6794 struct IsEnabledDeserializer;
6795 impl IsEnabledDeserializer {
6796     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>6797     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
6798         start_element(tag_name, stack)?;
6799         let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
6800         end_element(tag_name, stack)?;
6801 
6802         Ok(obj)
6803     }
6804 }
6805 
6806 pub struct IsEnabledSerializer;
6807 impl IsEnabledSerializer {
6808     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,6809     pub fn serialize<W>(
6810         mut writer: &mut EventWriter<W>,
6811         name: &str,
6812         obj: &bool,
6813     ) -> Result<(), xml::writer::Error>
6814     where
6815         W: Write,
6816     {
6817         writer.write(xml::writer::XmlEvent::start_element(name))?;
6818         writer.write(xml::writer::XmlEvent::characters(&format!(
6819             "{value}",
6820             value = obj.to_string()
6821         )))?;
6822         writer.write(xml::writer::XmlEvent::end_element())
6823     }
6824 }
6825 
6826 #[allow(dead_code)]
6827 struct IsLatestDeserializer;
6828 impl IsLatestDeserializer {
6829     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>6830     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
6831         start_element(tag_name, stack)?;
6832         let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
6833         end_element(tag_name, stack)?;
6834 
6835         Ok(obj)
6836     }
6837 }
6838 #[allow(dead_code)]
6839 struct IsPublicDeserializer;
6840 impl IsPublicDeserializer {
6841     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>6842     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
6843         start_element(tag_name, stack)?;
6844         let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
6845         end_element(tag_name, stack)?;
6846 
6847         Ok(obj)
6848     }
6849 }
6850 #[allow(dead_code)]
6851 struct IsTruncatedDeserializer;
6852 impl IsTruncatedDeserializer {
6853     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>6854     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
6855         start_element(tag_name, stack)?;
6856         let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
6857         end_element(tag_name, stack)?;
6858 
6859         Ok(obj)
6860     }
6861 }
6862 /// <p>Specifies JSON as object's input serialization format.</p>
6863 #[derive(Default, Debug, Clone, PartialEq)]
6864 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6865 pub struct JSONInput {
6866     /// <p>The type of JSON. Valid values: Document, Lines.</p>
6867     pub type_: Option<String>,
6868 }
6869 
6870 pub struct JSONInputSerializer;
6871 impl JSONInputSerializer {
6872     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &JSONInput, ) -> Result<(), xml::writer::Error> where W: Write,6873     pub fn serialize<W>(
6874         mut writer: &mut EventWriter<W>,
6875         name: &str,
6876         obj: &JSONInput,
6877     ) -> Result<(), xml::writer::Error>
6878     where
6879         W: Write,
6880     {
6881         writer.write(xml::writer::XmlEvent::start_element(name))?;
6882         if let Some(ref value) = obj.type_ {
6883             writer.write(xml::writer::XmlEvent::start_element("Type"))?;
6884             writer.write(xml::writer::XmlEvent::characters(&format!(
6885                 "{value}",
6886                 value = value
6887             )));
6888             writer.write(xml::writer::XmlEvent::end_element())?;
6889         }
6890         writer.write(xml::writer::XmlEvent::end_element())
6891     }
6892 }
6893 
6894 /// <p>Specifies JSON as request's output serialization format.</p>
6895 #[derive(Default, Debug, Clone, PartialEq)]
6896 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6897 pub struct JSONOutput {
6898     /// <p>The value used to separate individual records in the output.</p>
6899     pub record_delimiter: Option<String>,
6900 }
6901 
6902 pub struct JSONOutputSerializer;
6903 impl JSONOutputSerializer {
6904     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &JSONOutput, ) -> Result<(), xml::writer::Error> where W: Write,6905     pub fn serialize<W>(
6906         mut writer: &mut EventWriter<W>,
6907         name: &str,
6908         obj: &JSONOutput,
6909     ) -> Result<(), xml::writer::Error>
6910     where
6911         W: Write,
6912     {
6913         writer.write(xml::writer::XmlEvent::start_element(name))?;
6914         if let Some(ref value) = obj.record_delimiter {
6915             writer.write(xml::writer::XmlEvent::start_element("RecordDelimiter"))?;
6916             writer.write(xml::writer::XmlEvent::characters(&format!(
6917                 "{value}",
6918                 value = value
6919             )));
6920             writer.write(xml::writer::XmlEvent::end_element())?;
6921         }
6922         writer.write(xml::writer::XmlEvent::end_element())
6923     }
6924 }
6925 
6926 pub struct JSONTypeSerializer;
6927 impl JSONTypeSerializer {
6928     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6929     pub fn serialize<W>(
6930         mut writer: &mut EventWriter<W>,
6931         name: &str,
6932         obj: &String,
6933     ) -> Result<(), xml::writer::Error>
6934     where
6935         W: Write,
6936     {
6937         writer.write(xml::writer::XmlEvent::start_element(name))?;
6938         writer.write(xml::writer::XmlEvent::characters(&format!(
6939             "{value}",
6940             value = obj.to_string()
6941         )))?;
6942         writer.write(xml::writer::XmlEvent::end_element())
6943     }
6944 }
6945 
6946 pub struct KMSContextSerializer;
6947 impl KMSContextSerializer {
6948     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6949     pub fn serialize<W>(
6950         mut writer: &mut EventWriter<W>,
6951         name: &str,
6952         obj: &String,
6953     ) -> Result<(), xml::writer::Error>
6954     where
6955         W: Write,
6956     {
6957         writer.write(xml::writer::XmlEvent::start_element(name))?;
6958         writer.write(xml::writer::XmlEvent::characters(&format!(
6959             "{value}",
6960             value = obj.to_string()
6961         )))?;
6962         writer.write(xml::writer::XmlEvent::end_element())
6963     }
6964 }
6965 
6966 #[allow(dead_code)]
6967 struct KeyCountDeserializer;
6968 impl KeyCountDeserializer {
6969     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>6970     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
6971         start_element(tag_name, stack)?;
6972         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
6973         end_element(tag_name, stack)?;
6974 
6975         Ok(obj)
6976     }
6977 }
6978 #[allow(dead_code)]
6979 struct KeyMarkerDeserializer;
6980 impl KeyMarkerDeserializer {
6981     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6982     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6983         start_element(tag_name, stack)?;
6984         let obj = characters(stack)?;
6985         end_element(tag_name, stack)?;
6986 
6987         Ok(obj)
6988     }
6989 }
6990 
6991 pub struct KeyMarkerSerializer;
6992 impl KeyMarkerSerializer {
6993     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6994     pub fn serialize<W>(
6995         mut writer: &mut EventWriter<W>,
6996         name: &str,
6997         obj: &String,
6998     ) -> Result<(), xml::writer::Error>
6999     where
7000         W: Write,
7001     {
7002         writer.write(xml::writer::XmlEvent::start_element(name))?;
7003         writer.write(xml::writer::XmlEvent::characters(&format!(
7004             "{value}",
7005             value = obj.to_string()
7006         )))?;
7007         writer.write(xml::writer::XmlEvent::end_element())
7008     }
7009 }
7010 
7011 #[allow(dead_code)]
7012 struct KeyPrefixEqualsDeserializer;
7013 impl KeyPrefixEqualsDeserializer {
7014     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>7015     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
7016         start_element(tag_name, stack)?;
7017         let obj = characters(stack)?;
7018         end_element(tag_name, stack)?;
7019 
7020         Ok(obj)
7021     }
7022 }
7023 
7024 pub struct KeyPrefixEqualsSerializer;
7025 impl KeyPrefixEqualsSerializer {
7026     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,7027     pub fn serialize<W>(
7028         mut writer: &mut EventWriter<W>,
7029         name: &str,
7030         obj: &String,
7031     ) -> Result<(), xml::writer::Error>
7032     where
7033         W: Write,
7034     {
7035         writer.write(xml::writer::XmlEvent::start_element(name))?;
7036         writer.write(xml::writer::XmlEvent::characters(&format!(
7037             "{value}",
7038             value = obj.to_string()
7039         )))?;
7040         writer.write(xml::writer::XmlEvent::end_element())
7041     }
7042 }
7043 
7044 #[allow(dead_code)]
7045 struct LambdaFunctionArnDeserializer;
7046 impl LambdaFunctionArnDeserializer {
7047     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>7048     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
7049         start_element(tag_name, stack)?;
7050         let obj = characters(stack)?;
7051         end_element(tag_name, stack)?;
7052 
7053         Ok(obj)
7054     }
7055 }
7056 
7057 pub struct LambdaFunctionArnSerializer;
7058 impl LambdaFunctionArnSerializer {
7059     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,7060     pub fn serialize<W>(
7061         mut writer: &mut EventWriter<W>,
7062         name: &str,
7063         obj: &String,
7064     ) -> Result<(), xml::writer::Error>
7065     where
7066         W: Write,
7067     {
7068         writer.write(xml::writer::XmlEvent::start_element(name))?;
7069         writer.write(xml::writer::XmlEvent::characters(&format!(
7070             "{value}",
7071             value = obj.to_string()
7072         )))?;
7073         writer.write(xml::writer::XmlEvent::end_element())
7074     }
7075 }
7076 
7077 /// <p>A container for specifying the configuration for AWS Lambda notifications.</p>
7078 #[derive(Default, Debug, Clone, PartialEq)]
7079 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7080 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7081 pub struct LambdaFunctionConfiguration {
7082     /// <p>The Amazon S3 bucket event for which to invoke the AWS Lambda function. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html">Supported Event Types</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
7083     pub events: Vec<String>,
7084     pub filter: Option<NotificationConfigurationFilter>,
7085     pub id: Option<String>,
7086     /// <p>The Amazon Resource Name (ARN) of the AWS Lambda function that Amazon S3 invokes when the specified event type occurs.</p>
7087     pub lambda_function_arn: String,
7088 }
7089 
7090 #[allow(dead_code)]
7091 struct LambdaFunctionConfigurationDeserializer;
7092 impl LambdaFunctionConfigurationDeserializer {
7093     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<LambdaFunctionConfiguration, XmlParseError>7094     fn deserialize<T: Peek + Next>(
7095         tag_name: &str,
7096         stack: &mut T,
7097     ) -> Result<LambdaFunctionConfiguration, XmlParseError> {
7098         deserialize_elements::<_, LambdaFunctionConfiguration, _>(
7099             tag_name,
7100             stack,
7101             |name, stack, obj| {
7102                 match name {
7103                     "Event" => {
7104                         obj.events
7105                             .extend(EventListDeserializer::deserialize("Event", stack)?);
7106                     }
7107                     "Filter" => {
7108                         obj.filter =
7109                             Some(NotificationConfigurationFilterDeserializer::deserialize(
7110                                 "Filter", stack,
7111                             )?);
7112                     }
7113                     "Id" => {
7114                         obj.id = Some(NotificationIdDeserializer::deserialize("Id", stack)?);
7115                     }
7116                     "CloudFunction" => {
7117                         obj.lambda_function_arn =
7118                             LambdaFunctionArnDeserializer::deserialize("CloudFunction", stack)?;
7119                     }
7120                     _ => skip_tree(stack),
7121                 }
7122                 Ok(())
7123             },
7124         )
7125     }
7126 }
7127 
7128 pub struct LambdaFunctionConfigurationSerializer;
7129 impl LambdaFunctionConfigurationSerializer {
7130     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &LambdaFunctionConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,7131     pub fn serialize<W>(
7132         mut writer: &mut EventWriter<W>,
7133         name: &str,
7134         obj: &LambdaFunctionConfiguration,
7135     ) -> Result<(), xml::writer::Error>
7136     where
7137         W: Write,
7138     {
7139         writer.write(xml::writer::XmlEvent::start_element(name))?;
7140         EventListSerializer::serialize(&mut writer, "Event", &obj.events)?;
7141         if let Some(ref value) = obj.filter {
7142             &NotificationConfigurationFilterSerializer::serialize(&mut writer, "Filter", value)?;
7143         }
7144         if let Some(ref value) = obj.id {
7145             writer.write(xml::writer::XmlEvent::start_element("Id"))?;
7146             writer.write(xml::writer::XmlEvent::characters(&format!(
7147                 "{value}",
7148                 value = value
7149             )));
7150             writer.write(xml::writer::XmlEvent::end_element())?;
7151         }
7152         writer.write(xml::writer::XmlEvent::start_element("CloudFunction"))?;
7153         writer.write(xml::writer::XmlEvent::characters(&format!(
7154             "{value}",
7155             value = obj.lambda_function_arn
7156         )))?;
7157         writer.write(xml::writer::XmlEvent::end_element())?;
7158         writer.write(xml::writer::XmlEvent::end_element())
7159     }
7160 }
7161 
7162 #[allow(dead_code)]
7163 struct LambdaFunctionConfigurationListDeserializer;
7164 impl LambdaFunctionConfigurationListDeserializer {
7165     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<LambdaFunctionConfiguration>, XmlParseError>7166     fn deserialize<T: Peek + Next>(
7167         tag_name: &str,
7168         stack: &mut T,
7169     ) -> Result<Vec<LambdaFunctionConfiguration>, XmlParseError> {
7170         let mut obj = vec![];
7171 
7172         loop {
7173             let consume_next_tag = match stack.peek() {
7174                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
7175                     name.local_name == tag_name
7176                 }
7177                 _ => false,
7178             };
7179 
7180             if consume_next_tag {
7181                 obj.push(LambdaFunctionConfigurationDeserializer::deserialize(
7182                     tag_name, stack,
7183                 )?);
7184             } else {
7185                 break;
7186             }
7187         }
7188 
7189         Ok(obj)
7190     }
7191 }
7192 
7193 pub struct LambdaFunctionConfigurationListSerializer;
7194 impl LambdaFunctionConfigurationListSerializer {
7195     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<LambdaFunctionConfiguration>, ) -> Result<(), xml::writer::Error> where W: Write,7196     pub fn serialize<W>(
7197         mut writer: &mut EventWriter<W>,
7198         name: &str,
7199         obj: &Vec<LambdaFunctionConfiguration>,
7200     ) -> Result<(), xml::writer::Error>
7201     where
7202         W: Write,
7203     {
7204         for element in obj {
7205             LambdaFunctionConfigurationSerializer::serialize(writer, name, element)?;
7206         }
7207         Ok(())
7208     }
7209 }
7210 
7211 #[allow(dead_code)]
7212 struct LastModifiedDeserializer;
7213 impl LastModifiedDeserializer {
7214     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>7215     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
7216         start_element(tag_name, stack)?;
7217         let obj = characters(stack)?;
7218         end_element(tag_name, stack)?;
7219 
7220         Ok(obj)
7221     }
7222 }
7223 /// <p>Container for lifecycle rules. You can add as many as 1000 rules.</p>
7224 #[derive(Default, Debug, Clone, PartialEq)]
7225 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7226 pub struct LifecycleConfiguration {
7227     /// <p>Specifies lifecycle configuration rules for an Amazon S3 bucket. </p>
7228     pub rules: Vec<Rule>,
7229 }
7230 
7231 pub struct LifecycleConfigurationSerializer;
7232 impl LifecycleConfigurationSerializer {
7233     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &LifecycleConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,7234     pub fn serialize<W>(
7235         mut writer: &mut EventWriter<W>,
7236         name: &str,
7237         obj: &LifecycleConfiguration,
7238     ) -> Result<(), xml::writer::Error>
7239     where
7240         W: Write,
7241     {
7242         writer.write(xml::writer::XmlEvent::start_element(name))?;
7243         RulesSerializer::serialize(&mut writer, "Rule", &obj.rules)?;
7244         writer.write(xml::writer::XmlEvent::end_element())
7245     }
7246 }
7247 
7248 /// <p>Container for the expiration for the lifecycle of the object.</p>
7249 #[derive(Default, Debug, Clone, PartialEq)]
7250 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7251 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7252 pub struct LifecycleExpiration {
7253     /// <p>Indicates at what date the object is to be moved or deleted. Should be in GMT ISO 8601 Format.</p>
7254     pub date: Option<String>,
7255     /// <p>Indicates the lifetime, in days, of the objects that are subject to the rule. The value must be a non-zero positive integer.</p>
7256     pub days: Option<i64>,
7257     /// <p>Indicates whether Amazon S3 will remove a delete marker with no noncurrent versions. If set to true, the delete marker will be expired; if set to false the policy takes no action. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.</p>
7258     pub expired_object_delete_marker: Option<bool>,
7259 }
7260 
7261 #[allow(dead_code)]
7262 struct LifecycleExpirationDeserializer;
7263 impl LifecycleExpirationDeserializer {
7264     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<LifecycleExpiration, XmlParseError>7265     fn deserialize<T: Peek + Next>(
7266         tag_name: &str,
7267         stack: &mut T,
7268     ) -> Result<LifecycleExpiration, XmlParseError> {
7269         deserialize_elements::<_, LifecycleExpiration, _>(tag_name, stack, |name, stack, obj| {
7270             match name {
7271                 "Date" => {
7272                     obj.date = Some(DateDeserializer::deserialize("Date", stack)?);
7273                 }
7274                 "Days" => {
7275                     obj.days = Some(DaysDeserializer::deserialize("Days", stack)?);
7276                 }
7277                 "ExpiredObjectDeleteMarker" => {
7278                     obj.expired_object_delete_marker =
7279                         Some(ExpiredObjectDeleteMarkerDeserializer::deserialize(
7280                             "ExpiredObjectDeleteMarker",
7281                             stack,
7282                         )?);
7283                 }
7284                 _ => skip_tree(stack),
7285             }
7286             Ok(())
7287         })
7288     }
7289 }
7290 
7291 pub struct LifecycleExpirationSerializer;
7292 impl LifecycleExpirationSerializer {
7293     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &LifecycleExpiration, ) -> Result<(), xml::writer::Error> where W: Write,7294     pub fn serialize<W>(
7295         mut writer: &mut EventWriter<W>,
7296         name: &str,
7297         obj: &LifecycleExpiration,
7298     ) -> Result<(), xml::writer::Error>
7299     where
7300         W: Write,
7301     {
7302         writer.write(xml::writer::XmlEvent::start_element(name))?;
7303         if let Some(ref value) = obj.date {
7304             writer.write(xml::writer::XmlEvent::start_element("Date"))?;
7305             writer.write(xml::writer::XmlEvent::characters(&format!(
7306                 "{value}",
7307                 value = value
7308             )));
7309             writer.write(xml::writer::XmlEvent::end_element())?;
7310         }
7311         if let Some(ref value) = obj.days {
7312             writer.write(xml::writer::XmlEvent::start_element("Days"))?;
7313             writer.write(xml::writer::XmlEvent::characters(&format!(
7314                 "{value}",
7315                 value = value
7316             )));
7317             writer.write(xml::writer::XmlEvent::end_element())?;
7318         }
7319         if let Some(ref value) = obj.expired_object_delete_marker {
7320             writer.write(xml::writer::XmlEvent::start_element(
7321                 "ExpiredObjectDeleteMarker",
7322             ))?;
7323             writer.write(xml::writer::XmlEvent::characters(&format!(
7324                 "{value}",
7325                 value = value
7326             )));
7327             writer.write(xml::writer::XmlEvent::end_element())?;
7328         }
7329         writer.write(xml::writer::XmlEvent::end_element())
7330     }
7331 }
7332 
7333 /// <p>A lifecycle rule for individual objects in an Amazon S3 bucket.</p>
7334 #[derive(Default, Debug, Clone, PartialEq)]
7335 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7336 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7337 pub struct LifecycleRule {
7338     pub abort_incomplete_multipart_upload: Option<AbortIncompleteMultipartUpload>,
7339     /// <p>Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.</p>
7340     pub expiration: Option<LifecycleExpiration>,
7341     pub filter: Option<LifecycleRuleFilter>,
7342     /// <p>Unique identifier for the rule. The value cannot be longer than 255 characters.</p>
7343     pub id: Option<String>,
7344     pub noncurrent_version_expiration: Option<NoncurrentVersionExpiration>,
7345     /// <p> Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object's lifetime. </p>
7346     pub noncurrent_version_transitions: Option<Vec<NoncurrentVersionTransition>>,
7347     /// <p>If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied.</p>
7348     pub status: String,
7349     /// <p>Specifies when an Amazon S3 object transitions to a specified storage class.</p>
7350     pub transitions: Option<Vec<Transition>>,
7351 }
7352 
7353 #[allow(dead_code)]
7354 struct LifecycleRuleDeserializer;
7355 impl LifecycleRuleDeserializer {
7356     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<LifecycleRule, XmlParseError>7357     fn deserialize<T: Peek + Next>(
7358         tag_name: &str,
7359         stack: &mut T,
7360     ) -> Result<LifecycleRule, XmlParseError> {
7361         deserialize_elements::<_, LifecycleRule, _>(tag_name, stack, |name, stack, obj| {
7362             match name {
7363                 "AbortIncompleteMultipartUpload" => {
7364                     obj.abort_incomplete_multipart_upload =
7365                         Some(AbortIncompleteMultipartUploadDeserializer::deserialize(
7366                             "AbortIncompleteMultipartUpload",
7367                             stack,
7368                         )?);
7369                 }
7370                 "Expiration" => {
7371                     obj.expiration = Some(LifecycleExpirationDeserializer::deserialize(
7372                         "Expiration",
7373                         stack,
7374                     )?);
7375                 }
7376                 "Filter" => {
7377                     obj.filter = Some(LifecycleRuleFilterDeserializer::deserialize(
7378                         "Filter", stack,
7379                     )?);
7380                 }
7381                 "ID" => {
7382                     obj.id = Some(IDDeserializer::deserialize("ID", stack)?);
7383                 }
7384                 "NoncurrentVersionExpiration" => {
7385                     obj.noncurrent_version_expiration =
7386                         Some(NoncurrentVersionExpirationDeserializer::deserialize(
7387                             "NoncurrentVersionExpiration",
7388                             stack,
7389                         )?);
7390                 }
7391                 "NoncurrentVersionTransition" => {
7392                     obj.noncurrent_version_transitions
7393                         .get_or_insert(vec![])
7394                         .extend(NoncurrentVersionTransitionListDeserializer::deserialize(
7395                             "NoncurrentVersionTransition",
7396                             stack,
7397                         )?);
7398                 }
7399                 "Status" => {
7400                     obj.status = ExpirationStatusDeserializer::deserialize("Status", stack)?;
7401                 }
7402                 "Transition" => {
7403                     obj.transitions.get_or_insert(vec![]).extend(
7404                         TransitionListDeserializer::deserialize("Transition", stack)?,
7405                     );
7406                 }
7407                 _ => skip_tree(stack),
7408             }
7409             Ok(())
7410         })
7411     }
7412 }
7413 
7414 pub struct LifecycleRuleSerializer;
7415 impl LifecycleRuleSerializer {
7416     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &LifecycleRule, ) -> Result<(), xml::writer::Error> where W: Write,7417     pub fn serialize<W>(
7418         mut writer: &mut EventWriter<W>,
7419         name: &str,
7420         obj: &LifecycleRule,
7421     ) -> Result<(), xml::writer::Error>
7422     where
7423         W: Write,
7424     {
7425         writer.write(xml::writer::XmlEvent::start_element(name))?;
7426         if let Some(ref value) = obj.abort_incomplete_multipart_upload {
7427             &AbortIncompleteMultipartUploadSerializer::serialize(
7428                 &mut writer,
7429                 "AbortIncompleteMultipartUpload",
7430                 value,
7431             )?;
7432         }
7433         if let Some(ref value) = obj.expiration {
7434             &LifecycleExpirationSerializer::serialize(&mut writer, "Expiration", value)?;
7435         }
7436         if let Some(ref value) = obj.filter {
7437             &LifecycleRuleFilterSerializer::serialize(&mut writer, "Filter", value)?;
7438         }
7439         if let Some(ref value) = obj.id {
7440             writer.write(xml::writer::XmlEvent::start_element("ID"))?;
7441             writer.write(xml::writer::XmlEvent::characters(&format!(
7442                 "{value}",
7443                 value = value
7444             )));
7445             writer.write(xml::writer::XmlEvent::end_element())?;
7446         }
7447         if let Some(ref value) = obj.noncurrent_version_expiration {
7448             &NoncurrentVersionExpirationSerializer::serialize(
7449                 &mut writer,
7450                 "NoncurrentVersionExpiration",
7451                 value,
7452             )?;
7453         }
7454         if let Some(ref value) = obj.noncurrent_version_transitions {
7455             &NoncurrentVersionTransitionListSerializer::serialize(
7456                 &mut writer,
7457                 "NoncurrentVersionTransition",
7458                 value,
7459             )?;
7460         }
7461         writer.write(xml::writer::XmlEvent::start_element("Status"))?;
7462         writer.write(xml::writer::XmlEvent::characters(&format!(
7463             "{value}",
7464             value = obj.status
7465         )))?;
7466         writer.write(xml::writer::XmlEvent::end_element())?;
7467         if let Some(ref value) = obj.transitions {
7468             &TransitionListSerializer::serialize(&mut writer, "Transition", value)?;
7469         }
7470         writer.write(xml::writer::XmlEvent::end_element())
7471     }
7472 }
7473 
7474 /// <p>This is used in a Lifecycle Rule Filter to apply a logical AND to two or more predicates. The Lifecycle Rule will apply to any object matching all of the predicates configured inside the And operator.</p>
7475 #[derive(Default, Debug, Clone, PartialEq)]
7476 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7477 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7478 pub struct LifecycleRuleAndOperator {
7479     /// <p>Prefix identifying one or more objects to which the rule applies.</p>
7480     pub prefix: Option<String>,
7481     /// <p>All of these tags must exist in the object's tag set in order for the rule to apply.</p>
7482     pub tags: Option<Vec<Tag>>,
7483 }
7484 
7485 #[allow(dead_code)]
7486 struct LifecycleRuleAndOperatorDeserializer;
7487 impl LifecycleRuleAndOperatorDeserializer {
7488     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<LifecycleRuleAndOperator, XmlParseError>7489     fn deserialize<T: Peek + Next>(
7490         tag_name: &str,
7491         stack: &mut T,
7492     ) -> Result<LifecycleRuleAndOperator, XmlParseError> {
7493         deserialize_elements::<_, LifecycleRuleAndOperator, _>(
7494             tag_name,
7495             stack,
7496             |name, stack, obj| {
7497                 match name {
7498                     "Prefix" => {
7499                         obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
7500                     }
7501                     "Tag" => {
7502                         obj.tags
7503                             .get_or_insert(vec![])
7504                             .extend(TagSetDeserializer::deserialize("Tag", stack)?);
7505                     }
7506                     _ => skip_tree(stack),
7507                 }
7508                 Ok(())
7509             },
7510         )
7511     }
7512 }
7513 
7514 pub struct LifecycleRuleAndOperatorSerializer;
7515 impl LifecycleRuleAndOperatorSerializer {
7516     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &LifecycleRuleAndOperator, ) -> Result<(), xml::writer::Error> where W: Write,7517     pub fn serialize<W>(
7518         mut writer: &mut EventWriter<W>,
7519         name: &str,
7520         obj: &LifecycleRuleAndOperator,
7521     ) -> Result<(), xml::writer::Error>
7522     where
7523         W: Write,
7524     {
7525         writer.write(xml::writer::XmlEvent::start_element(name))?;
7526         if let Some(ref value) = obj.prefix {
7527             writer.write(xml::writer::XmlEvent::start_element("Prefix"))?;
7528             writer.write(xml::writer::XmlEvent::characters(&format!(
7529                 "{value}",
7530                 value = value
7531             )));
7532             writer.write(xml::writer::XmlEvent::end_element())?;
7533         }
7534         if let Some(ref value) = obj.tags {
7535             &TagSetSerializer::serialize(&mut writer, "Tag", value)?;
7536         }
7537         writer.write(xml::writer::XmlEvent::end_element())
7538     }
7539 }
7540 
7541 /// <p>The <code>Filter</code> is used to identify objects that a Lifecycle Rule applies to. A <code>Filter</code> must have exactly one of <code>Prefix</code>, <code>Tag</code>, or <code>And</code> specified.</p>
7542 #[derive(Default, Debug, Clone, PartialEq)]
7543 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7544 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7545 pub struct LifecycleRuleFilter {
7546     pub and: Option<LifecycleRuleAndOperator>,
7547     /// <p>Prefix identifying one or more objects to which the rule applies.</p>
7548     pub prefix: Option<String>,
7549     /// <p>This tag must exist in the object's tag set in order for the rule to apply.</p>
7550     pub tag: Option<Tag>,
7551 }
7552 
7553 #[allow(dead_code)]
7554 struct LifecycleRuleFilterDeserializer;
7555 impl LifecycleRuleFilterDeserializer {
7556     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<LifecycleRuleFilter, XmlParseError>7557     fn deserialize<T: Peek + Next>(
7558         tag_name: &str,
7559         stack: &mut T,
7560     ) -> Result<LifecycleRuleFilter, XmlParseError> {
7561         deserialize_elements::<_, LifecycleRuleFilter, _>(tag_name, stack, |name, stack, obj| {
7562             match name {
7563                 "And" => {
7564                     obj.and = Some(LifecycleRuleAndOperatorDeserializer::deserialize(
7565                         "And", stack,
7566                     )?);
7567                 }
7568                 "Prefix" => {
7569                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
7570                 }
7571                 "Tag" => {
7572                     obj.tag = Some(TagDeserializer::deserialize("Tag", stack)?);
7573                 }
7574                 _ => skip_tree(stack),
7575             }
7576             Ok(())
7577         })
7578     }
7579 }
7580 
7581 pub struct LifecycleRuleFilterSerializer;
7582 impl LifecycleRuleFilterSerializer {
7583     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &LifecycleRuleFilter, ) -> Result<(), xml::writer::Error> where W: Write,7584     pub fn serialize<W>(
7585         mut writer: &mut EventWriter<W>,
7586         name: &str,
7587         obj: &LifecycleRuleFilter,
7588     ) -> Result<(), xml::writer::Error>
7589     where
7590         W: Write,
7591     {
7592         writer.write(xml::writer::XmlEvent::start_element(name))?;
7593         if let Some(ref value) = obj.and {
7594             &LifecycleRuleAndOperatorSerializer::serialize(&mut writer, "And", value)?;
7595         }
7596         if let Some(ref value) = obj.prefix {
7597             writer.write(xml::writer::XmlEvent::start_element("Prefix"))?;
7598             writer.write(xml::writer::XmlEvent::characters(&format!(
7599                 "{value}",
7600                 value = value
7601             )));
7602             writer.write(xml::writer::XmlEvent::end_element())?;
7603         }
7604         if let Some(ref value) = obj.tag {
7605             &TagSerializer::serialize(&mut writer, "Tag", value)?;
7606         }
7607         writer.write(xml::writer::XmlEvent::end_element())
7608     }
7609 }
7610 
7611 #[allow(dead_code)]
7612 struct LifecycleRulesDeserializer;
7613 impl LifecycleRulesDeserializer {
7614     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<LifecycleRule>, XmlParseError>7615     fn deserialize<T: Peek + Next>(
7616         tag_name: &str,
7617         stack: &mut T,
7618     ) -> Result<Vec<LifecycleRule>, XmlParseError> {
7619         let mut obj = vec![];
7620 
7621         loop {
7622             let consume_next_tag = match stack.peek() {
7623                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
7624                     name.local_name == tag_name
7625                 }
7626                 _ => false,
7627             };
7628 
7629             if consume_next_tag {
7630                 obj.push(LifecycleRuleDeserializer::deserialize(tag_name, stack)?);
7631             } else {
7632                 break;
7633             }
7634         }
7635 
7636         Ok(obj)
7637     }
7638 }
7639 
7640 pub struct LifecycleRulesSerializer;
7641 impl LifecycleRulesSerializer {
7642     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<LifecycleRule>, ) -> Result<(), xml::writer::Error> where W: Write,7643     pub fn serialize<W>(
7644         mut writer: &mut EventWriter<W>,
7645         name: &str,
7646         obj: &Vec<LifecycleRule>,
7647     ) -> Result<(), xml::writer::Error>
7648     where
7649         W: Write,
7650     {
7651         for element in obj {
7652             LifecycleRuleSerializer::serialize(writer, name, element)?;
7653         }
7654         Ok(())
7655     }
7656 }
7657 
7658 #[derive(Default, Debug, Clone, PartialEq)]
7659 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7660 pub struct ListBucketAnalyticsConfigurationsOutput {
7661     /// <p>The list of analytics configurations for a bucket.</p>
7662     pub analytics_configuration_list: Option<Vec<AnalyticsConfiguration>>,
7663     /// <p>The marker that is used as a starting point for this analytics configuration list response. This value is present if it was sent in the request.</p>
7664     pub continuation_token: Option<String>,
7665     /// <p>Indicates whether the returned list of analytics configurations is complete. A value of true indicates that the list is not complete and the NextContinuationToken will be provided for a subsequent request.</p>
7666     pub is_truncated: Option<bool>,
7667     /// <p> <code>NextContinuationToken</code> is sent when <code>isTruncated</code> is true, which indicates that there are more analytics configurations to list. The next request must include this <code>NextContinuationToken</code>. The token is obfuscated and is not a usable value.</p>
7668     pub next_continuation_token: Option<String>,
7669 }
7670 
7671 #[allow(dead_code)]
7672 struct ListBucketAnalyticsConfigurationsOutputDeserializer;
7673 impl ListBucketAnalyticsConfigurationsOutputDeserializer {
7674     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListBucketAnalyticsConfigurationsOutput, XmlParseError>7675     fn deserialize<T: Peek + Next>(
7676         tag_name: &str,
7677         stack: &mut T,
7678     ) -> Result<ListBucketAnalyticsConfigurationsOutput, XmlParseError> {
7679         deserialize_elements::<_, ListBucketAnalyticsConfigurationsOutput, _>(
7680             tag_name,
7681             stack,
7682             |name, stack, obj| {
7683                 match name {
7684                     "AnalyticsConfiguration" => {
7685                         obj.analytics_configuration_list
7686                             .get_or_insert(vec![])
7687                             .extend(AnalyticsConfigurationListDeserializer::deserialize(
7688                                 "AnalyticsConfiguration",
7689                                 stack,
7690                             )?);
7691                     }
7692                     "ContinuationToken" => {
7693                         obj.continuation_token =
7694                             Some(TokenDeserializer::deserialize("ContinuationToken", stack)?);
7695                     }
7696                     "IsTruncated" => {
7697                         obj.is_truncated =
7698                             Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
7699                     }
7700                     "NextContinuationToken" => {
7701                         obj.next_continuation_token = Some(NextTokenDeserializer::deserialize(
7702                             "NextContinuationToken",
7703                             stack,
7704                         )?);
7705                     }
7706                     _ => skip_tree(stack),
7707                 }
7708                 Ok(())
7709             },
7710         )
7711     }
7712 }
7713 #[derive(Default, Debug, Clone, PartialEq)]
7714 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7715 pub struct ListBucketAnalyticsConfigurationsRequest {
7716     /// <p>The name of the bucket from which analytics configurations are retrieved.</p>
7717     pub bucket: String,
7718     /// <p>The ContinuationToken that represents a placeholder from where this request should begin.</p>
7719     pub continuation_token: Option<String>,
7720 }
7721 
7722 #[derive(Default, Debug, Clone, PartialEq)]
7723 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7724 pub struct ListBucketInventoryConfigurationsOutput {
7725     /// <p>If sent in the request, the marker that is used as a starting point for this inventory configuration list response.</p>
7726     pub continuation_token: Option<String>,
7727     /// <p>The list of inventory configurations for a bucket.</p>
7728     pub inventory_configuration_list: Option<Vec<InventoryConfiguration>>,
7729     /// <p>Tells whether the returned list of inventory configurations is complete. A value of true indicates that the list is not complete and the NextContinuationToken is provided for a subsequent request.</p>
7730     pub is_truncated: Option<bool>,
7731     /// <p>The marker used to continue this inventory configuration listing. Use the <code>NextContinuationToken</code> from this response to continue the listing in a subsequent request. The continuation token is an opaque value that Amazon S3 understands.</p>
7732     pub next_continuation_token: Option<String>,
7733 }
7734 
7735 #[allow(dead_code)]
7736 struct ListBucketInventoryConfigurationsOutputDeserializer;
7737 impl ListBucketInventoryConfigurationsOutputDeserializer {
7738     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListBucketInventoryConfigurationsOutput, XmlParseError>7739     fn deserialize<T: Peek + Next>(
7740         tag_name: &str,
7741         stack: &mut T,
7742     ) -> Result<ListBucketInventoryConfigurationsOutput, XmlParseError> {
7743         deserialize_elements::<_, ListBucketInventoryConfigurationsOutput, _>(
7744             tag_name,
7745             stack,
7746             |name, stack, obj| {
7747                 match name {
7748                     "ContinuationToken" => {
7749                         obj.continuation_token =
7750                             Some(TokenDeserializer::deserialize("ContinuationToken", stack)?);
7751                     }
7752                     "InventoryConfiguration" => {
7753                         obj.inventory_configuration_list
7754                             .get_or_insert(vec![])
7755                             .extend(InventoryConfigurationListDeserializer::deserialize(
7756                                 "InventoryConfiguration",
7757                                 stack,
7758                             )?);
7759                     }
7760                     "IsTruncated" => {
7761                         obj.is_truncated =
7762                             Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
7763                     }
7764                     "NextContinuationToken" => {
7765                         obj.next_continuation_token = Some(NextTokenDeserializer::deserialize(
7766                             "NextContinuationToken",
7767                             stack,
7768                         )?);
7769                     }
7770                     _ => skip_tree(stack),
7771                 }
7772                 Ok(())
7773             },
7774         )
7775     }
7776 }
7777 #[derive(Default, Debug, Clone, PartialEq)]
7778 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7779 pub struct ListBucketInventoryConfigurationsRequest {
7780     /// <p>The name of the bucket containing the inventory configurations to retrieve.</p>
7781     pub bucket: String,
7782     /// <p>The marker used to continue an inventory configuration listing that has been truncated. Use the NextContinuationToken from a previously truncated list response to continue the listing. The continuation token is an opaque value that Amazon S3 understands.</p>
7783     pub continuation_token: Option<String>,
7784 }
7785 
7786 #[derive(Default, Debug, Clone, PartialEq)]
7787 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7788 pub struct ListBucketMetricsConfigurationsOutput {
7789     /// <p>The marker that is used as a starting point for this metrics configuration list response. This value is present if it was sent in the request.</p>
7790     pub continuation_token: Option<String>,
7791     /// <p>Indicates whether the returned list of metrics configurations is complete. A value of true indicates that the list is not complete and the NextContinuationToken will be provided for a subsequent request.</p>
7792     pub is_truncated: Option<bool>,
7793     /// <p>The list of metrics configurations for a bucket.</p>
7794     pub metrics_configuration_list: Option<Vec<MetricsConfiguration>>,
7795     /// <p>The marker used to continue a metrics configuration listing that has been truncated. Use the <code>NextContinuationToken</code> from a previously truncated list response to continue the listing. The continuation token is an opaque value that Amazon S3 understands.</p>
7796     pub next_continuation_token: Option<String>,
7797 }
7798 
7799 #[allow(dead_code)]
7800 struct ListBucketMetricsConfigurationsOutputDeserializer;
7801 impl ListBucketMetricsConfigurationsOutputDeserializer {
7802     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListBucketMetricsConfigurationsOutput, XmlParseError>7803     fn deserialize<T: Peek + Next>(
7804         tag_name: &str,
7805         stack: &mut T,
7806     ) -> Result<ListBucketMetricsConfigurationsOutput, XmlParseError> {
7807         deserialize_elements::<_, ListBucketMetricsConfigurationsOutput, _>(
7808             tag_name,
7809             stack,
7810             |name, stack, obj| {
7811                 match name {
7812                     "ContinuationToken" => {
7813                         obj.continuation_token =
7814                             Some(TokenDeserializer::deserialize("ContinuationToken", stack)?);
7815                     }
7816                     "IsTruncated" => {
7817                         obj.is_truncated =
7818                             Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
7819                     }
7820                     "MetricsConfiguration" => {
7821                         obj.metrics_configuration_list.get_or_insert(vec![]).extend(
7822                             MetricsConfigurationListDeserializer::deserialize(
7823                                 "MetricsConfiguration",
7824                                 stack,
7825                             )?,
7826                         );
7827                     }
7828                     "NextContinuationToken" => {
7829                         obj.next_continuation_token = Some(NextTokenDeserializer::deserialize(
7830                             "NextContinuationToken",
7831                             stack,
7832                         )?);
7833                     }
7834                     _ => skip_tree(stack),
7835                 }
7836                 Ok(())
7837             },
7838         )
7839     }
7840 }
7841 #[derive(Default, Debug, Clone, PartialEq)]
7842 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7843 pub struct ListBucketMetricsConfigurationsRequest {
7844     /// <p>The name of the bucket containing the metrics configurations to retrieve.</p>
7845     pub bucket: String,
7846     /// <p>The marker that is used to continue a metrics configuration listing that has been truncated. Use the NextContinuationToken from a previously truncated list response to continue the listing. The continuation token is an opaque value that Amazon S3 understands.</p>
7847     pub continuation_token: Option<String>,
7848 }
7849 
7850 #[derive(Default, Debug, Clone, PartialEq)]
7851 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7852 pub struct ListBucketsOutput {
7853     /// <p>The list of buckets owned by the requestor.</p>
7854     pub buckets: Option<Vec<Bucket>>,
7855     /// <p>The owner of the buckets listed.</p>
7856     pub owner: Option<Owner>,
7857 }
7858 
7859 #[allow(dead_code)]
7860 struct ListBucketsOutputDeserializer;
7861 impl ListBucketsOutputDeserializer {
7862     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListBucketsOutput, XmlParseError>7863     fn deserialize<T: Peek + Next>(
7864         tag_name: &str,
7865         stack: &mut T,
7866     ) -> Result<ListBucketsOutput, XmlParseError> {
7867         deserialize_elements::<_, ListBucketsOutput, _>(tag_name, stack, |name, stack, obj| {
7868             match name {
7869                 "Buckets" => {
7870                     obj.buckets
7871                         .get_or_insert(vec![])
7872                         .extend(BucketsDeserializer::deserialize("Buckets", stack)?);
7873                 }
7874                 "Owner" => {
7875                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
7876                 }
7877                 _ => skip_tree(stack),
7878             }
7879             Ok(())
7880         })
7881     }
7882 }
7883 #[derive(Default, Debug, Clone, PartialEq)]
7884 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7885 pub struct ListMultipartUploadsOutput {
7886     /// <p>Name of the bucket to which the multipart upload was initiated.</p>
7887     pub bucket: Option<String>,
7888     /// <p>If you specify a delimiter in the request, then the result returns each distinct key prefix containing the delimiter in a <code>CommonPrefixes</code> element. The distinct key prefixes are returned in the <code>Prefix</code> child element.</p>
7889     pub common_prefixes: Option<Vec<CommonPrefix>>,
7890     /// <p>Contains the delimiter you specified in the request. If you don't specify a delimiter in your request, this element is absent from the response.</p>
7891     pub delimiter: Option<String>,
7892     /// <p>Encoding type used by Amazon S3 to encode object keys in the response.</p> <p>If you specify <code>encoding-type</code> request parameter, Amazon S3 includes this element in the response, and returns encoded key name values in the following response elements:</p> <p> <code>Delimiter</code>, <code>KeyMarker</code>, <code>Prefix</code>, <code>NextKeyMarker</code>, <code>Key</code>.</p>
7893     pub encoding_type: Option<String>,
7894     /// <p>Indicates whether the returned list of multipart uploads is truncated. A value of true indicates that the list was truncated. The list can be truncated if the number of multipart uploads exceeds the limit allowed or specified by max uploads.</p>
7895     pub is_truncated: Option<bool>,
7896     /// <p>The key at or after which the listing began.</p>
7897     pub key_marker: Option<String>,
7898     /// <p>Maximum number of multipart uploads that could have been included in the response.</p>
7899     pub max_uploads: Option<i64>,
7900     /// <p>When a list is truncated, this element specifies the value that should be used for the key-marker request parameter in a subsequent request.</p>
7901     pub next_key_marker: Option<String>,
7902     /// <p>When a list is truncated, this element specifies the value that should be used for the <code>upload-id-marker</code> request parameter in a subsequent request.</p>
7903     pub next_upload_id_marker: Option<String>,
7904     /// <p>When a prefix is provided in the request, this field contains the specified prefix. The result contains only keys starting with the specified prefix.</p>
7905     pub prefix: Option<String>,
7906     /// <p>Upload ID after which listing began.</p>
7907     pub upload_id_marker: Option<String>,
7908     /// <p>Container for elements related to a particular multipart upload. A response can contain zero or more <code>Upload</code> elements.</p>
7909     pub uploads: Option<Vec<MultipartUpload>>,
7910 }
7911 
7912 #[allow(dead_code)]
7913 struct ListMultipartUploadsOutputDeserializer;
7914 impl ListMultipartUploadsOutputDeserializer {
7915     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListMultipartUploadsOutput, XmlParseError>7916     fn deserialize<T: Peek + Next>(
7917         tag_name: &str,
7918         stack: &mut T,
7919     ) -> Result<ListMultipartUploadsOutput, XmlParseError> {
7920         deserialize_elements::<_, ListMultipartUploadsOutput, _>(
7921             tag_name,
7922             stack,
7923             |name, stack, obj| {
7924                 match name {
7925                     "Bucket" => {
7926                         obj.bucket = Some(BucketNameDeserializer::deserialize("Bucket", stack)?);
7927                     }
7928                     "CommonPrefixes" => {
7929                         obj.common_prefixes.get_or_insert(vec![]).extend(
7930                             CommonPrefixListDeserializer::deserialize("CommonPrefixes", stack)?,
7931                         );
7932                     }
7933                     "Delimiter" => {
7934                         obj.delimiter =
7935                             Some(DelimiterDeserializer::deserialize("Delimiter", stack)?);
7936                     }
7937                     "EncodingType" => {
7938                         obj.encoding_type = Some(EncodingTypeDeserializer::deserialize(
7939                             "EncodingType",
7940                             stack,
7941                         )?);
7942                     }
7943                     "IsTruncated" => {
7944                         obj.is_truncated =
7945                             Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
7946                     }
7947                     "KeyMarker" => {
7948                         obj.key_marker =
7949                             Some(KeyMarkerDeserializer::deserialize("KeyMarker", stack)?);
7950                     }
7951                     "MaxUploads" => {
7952                         obj.max_uploads =
7953                             Some(MaxUploadsDeserializer::deserialize("MaxUploads", stack)?);
7954                     }
7955                     "NextKeyMarker" => {
7956                         obj.next_key_marker = Some(NextKeyMarkerDeserializer::deserialize(
7957                             "NextKeyMarker",
7958                             stack,
7959                         )?);
7960                     }
7961                     "NextUploadIdMarker" => {
7962                         obj.next_upload_id_marker =
7963                             Some(NextUploadIdMarkerDeserializer::deserialize(
7964                                 "NextUploadIdMarker",
7965                                 stack,
7966                             )?);
7967                     }
7968                     "Prefix" => {
7969                         obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
7970                     }
7971                     "UploadIdMarker" => {
7972                         obj.upload_id_marker = Some(UploadIdMarkerDeserializer::deserialize(
7973                             "UploadIdMarker",
7974                             stack,
7975                         )?);
7976                     }
7977                     "Upload" => {
7978                         obj.uploads.get_or_insert(vec![]).extend(
7979                             MultipartUploadListDeserializer::deserialize("Upload", stack)?,
7980                         );
7981                     }
7982                     _ => skip_tree(stack),
7983                 }
7984                 Ok(())
7985             },
7986         )
7987     }
7988 }
7989 #[derive(Default, Debug, Clone, PartialEq)]
7990 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7991 pub struct ListMultipartUploadsRequest {
7992     /// <p>Name of the bucket to which the multipart upload was initiated. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
7993     pub bucket: String,
7994     /// <p>Character you use to group keys.</p> <p>All keys that contain the same string between the prefix, if specified, and the first occurrence of the delimiter after the prefix are grouped under a single result element, <code>CommonPrefixes</code>. If you don't specify the prefix parameter, then the substring starts at the beginning of the key. The keys that are grouped under <code>CommonPrefixes</code> result element are not returned elsewhere in the response.</p>
7995     pub delimiter: Option<String>,
7996     pub encoding_type: Option<String>,
7997     /// <p>Together with upload-id-marker, this parameter specifies the multipart upload after which listing should begin.</p> <p>If <code>upload-id-marker</code> is not specified, only the keys lexicographically greater than the specified <code>key-marker</code> will be included in the list.</p> <p>If <code>upload-id-marker</code> is specified, any multipart uploads for a key equal to the <code>key-marker</code> might also be included, provided those multipart uploads have upload IDs lexicographically greater than the specified <code>upload-id-marker</code>.</p>
7998     pub key_marker: Option<String>,
7999     /// <p>Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response body. 1,000 is the maximum number of uploads that can be returned in a response.</p>
8000     pub max_uploads: Option<i64>,
8001     /// <p>Lists in-progress uploads only for those keys that begin with the specified prefix. You can use prefixes to separate a bucket into different grouping of keys. (You can think of using prefix to make groups in the same way you'd use a folder in a file system.)</p>
8002     pub prefix: Option<String>,
8003     /// <p>Together with key-marker, specifies the multipart upload after which listing should begin. If key-marker is not specified, the upload-id-marker parameter is ignored. Otherwise, any multipart uploads for a key equal to the key-marker might be included in the list only if they have an upload ID lexicographically greater than the specified <code>upload-id-marker</code>.</p>
8004     pub upload_id_marker: Option<String>,
8005 }
8006 
8007 #[derive(Default, Debug, Clone, PartialEq)]
8008 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8009 pub struct ListObjectVersionsOutput {
8010     /// <p>All of the keys rolled up into a common prefix count as a single return when calculating the number of returns.</p>
8011     pub common_prefixes: Option<Vec<CommonPrefix>>,
8012     /// <p>Container for an object that is a delete marker.</p>
8013     pub delete_markers: Option<Vec<DeleteMarkerEntry>>,
8014     /// <p>The delimiter grouping the included keys. A delimiter is a character that you specify to group keys. All keys that contain the same string between the prefix and the first occurrence of the delimiter are grouped under a single result element in <code>CommonPrefixes</code>. These groups are counted as one result against the max-keys limitation. These keys are not returned elsewhere in the response.</p>
8015     pub delimiter: Option<String>,
8016     /// <p> Encoding type used by Amazon S3 to encode object key names in the XML response.</p> <p>If you specify encoding-type request parameter, Amazon S3 includes this element in the response, and returns encoded key name values in the following response elements:</p> <p> <code>KeyMarker, NextKeyMarker, Prefix, Key</code>, and <code>Delimiter</code>.</p>
8017     pub encoding_type: Option<String>,
8018     /// <p>A flag that indicates whether Amazon S3 returned all of the results that satisfied the search criteria. If your results were truncated, you can make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker response parameters as a starting place in another request to return the rest of the results.</p>
8019     pub is_truncated: Option<bool>,
8020     /// <p>Marks the last key returned in a truncated response.</p>
8021     pub key_marker: Option<String>,
8022     /// <p>Specifies the maximum number of objects to return.</p>
8023     pub max_keys: Option<i64>,
8024     /// <p>Bucket name.</p>
8025     pub name: Option<String>,
8026     /// <p>When the number of responses exceeds the value of <code>MaxKeys</code>, <code>NextKeyMarker</code> specifies the first key not returned that satisfies the search criteria. Use this value for the key-marker request parameter in a subsequent request.</p>
8027     pub next_key_marker: Option<String>,
8028     /// <p>When the number of responses exceeds the value of <code>MaxKeys</code>, <code>NextVersionIdMarker</code> specifies the first object version not returned that satisfies the search criteria. Use this value for the version-id-marker request parameter in a subsequent request.</p>
8029     pub next_version_id_marker: Option<String>,
8030     /// <p>Selects objects that start with the value supplied by this parameter.</p>
8031     pub prefix: Option<String>,
8032     /// <p>Marks the last version of the key returned in a truncated response.</p>
8033     pub version_id_marker: Option<String>,
8034     /// <p>Container for version information.</p>
8035     pub versions: Option<Vec<ObjectVersion>>,
8036 }
8037 
8038 #[allow(dead_code)]
8039 struct ListObjectVersionsOutputDeserializer;
8040 impl ListObjectVersionsOutputDeserializer {
8041     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListObjectVersionsOutput, XmlParseError>8042     fn deserialize<T: Peek + Next>(
8043         tag_name: &str,
8044         stack: &mut T,
8045     ) -> Result<ListObjectVersionsOutput, XmlParseError> {
8046         deserialize_elements::<_, ListObjectVersionsOutput, _>(
8047             tag_name,
8048             stack,
8049             |name, stack, obj| {
8050                 match name {
8051                     "CommonPrefixes" => {
8052                         obj.common_prefixes.get_or_insert(vec![]).extend(
8053                             CommonPrefixListDeserializer::deserialize("CommonPrefixes", stack)?,
8054                         );
8055                     }
8056                     "DeleteMarker" => {
8057                         obj.delete_markers.get_or_insert(vec![]).extend(
8058                             DeleteMarkersDeserializer::deserialize("DeleteMarker", stack)?,
8059                         );
8060                     }
8061                     "Delimiter" => {
8062                         obj.delimiter =
8063                             Some(DelimiterDeserializer::deserialize("Delimiter", stack)?);
8064                     }
8065                     "EncodingType" => {
8066                         obj.encoding_type = Some(EncodingTypeDeserializer::deserialize(
8067                             "EncodingType",
8068                             stack,
8069                         )?);
8070                     }
8071                     "IsTruncated" => {
8072                         obj.is_truncated =
8073                             Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
8074                     }
8075                     "KeyMarker" => {
8076                         obj.key_marker =
8077                             Some(KeyMarkerDeserializer::deserialize("KeyMarker", stack)?);
8078                     }
8079                     "MaxKeys" => {
8080                         obj.max_keys = Some(MaxKeysDeserializer::deserialize("MaxKeys", stack)?);
8081                     }
8082                     "Name" => {
8083                         obj.name = Some(BucketNameDeserializer::deserialize("Name", stack)?);
8084                     }
8085                     "NextKeyMarker" => {
8086                         obj.next_key_marker = Some(NextKeyMarkerDeserializer::deserialize(
8087                             "NextKeyMarker",
8088                             stack,
8089                         )?);
8090                     }
8091                     "NextVersionIdMarker" => {
8092                         obj.next_version_id_marker =
8093                             Some(NextVersionIdMarkerDeserializer::deserialize(
8094                                 "NextVersionIdMarker",
8095                                 stack,
8096                             )?);
8097                     }
8098                     "Prefix" => {
8099                         obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
8100                     }
8101                     "VersionIdMarker" => {
8102                         obj.version_id_marker = Some(VersionIdMarkerDeserializer::deserialize(
8103                             "VersionIdMarker",
8104                             stack,
8105                         )?);
8106                     }
8107                     "Version" => {
8108                         obj.versions.get_or_insert(vec![]).extend(
8109                             ObjectVersionListDeserializer::deserialize("Version", stack)?,
8110                         );
8111                     }
8112                     _ => skip_tree(stack),
8113                 }
8114                 Ok(())
8115             },
8116         )
8117     }
8118 }
8119 #[derive(Default, Debug, Clone, PartialEq)]
8120 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8121 pub struct ListObjectVersionsRequest {
8122     /// <p>The bucket name that contains the objects. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
8123     pub bucket: String,
8124     /// <p>A delimiter is a character that you specify to group keys. All keys that contain the same string between the <code>prefix</code> and the first occurrence of the delimiter are grouped under a single result element in CommonPrefixes. These groups are counted as one result against the max-keys limitation. These keys are not returned elsewhere in the response.</p>
8125     pub delimiter: Option<String>,
8126     pub encoding_type: Option<String>,
8127     /// <p>Specifies the key to start with when listing objects in a bucket.</p>
8128     pub key_marker: Option<String>,
8129     /// <p>Sets the maximum number of keys returned in the response. The response might contain fewer keys but will never contain more. If additional keys satisfy the search criteria, but were not returned because max-keys was exceeded, the response contains &lt;isTruncated&gt;true&lt;/isTruncated&gt;. To return the additional keys, see key-marker and version-id-marker.</p>
8130     pub max_keys: Option<i64>,
8131     /// <p>Use this parameter to select only those keys that begin with the specified prefix. You can use prefixes to separate a bucket into different groupings of keys. (You can think of using prefix to make groups in the same way you'd use a folder in a file system.) You can use prefix with delimiter to roll up numerous objects into a single result under CommonPrefixes. </p>
8132     pub prefix: Option<String>,
8133     /// <p>Specifies the object version you want to start listing from.</p>
8134     pub version_id_marker: Option<String>,
8135 }
8136 
8137 #[derive(Default, Debug, Clone, PartialEq)]
8138 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8139 pub struct ListObjectsOutput {
8140     /// <p>All of the keys rolled up in a common prefix count as a single return when calculating the number of returns. </p> <p>A response can contain CommonPrefixes only if you specify a delimiter.</p> <p>CommonPrefixes contains all (if there are any) keys between Prefix and the next occurrence of the string specified by the delimiter.</p> <p> CommonPrefixes lists keys that act like subdirectories in the directory specified by Prefix.</p> <p>For example, if the prefix is notes/ and the delimiter is a slash (/) as in notes/summer/july, the common prefix is notes/summer/. All of the keys that roll up into a common prefix count as a single return when calculating the number of returns.</p>
8141     pub common_prefixes: Option<Vec<CommonPrefix>>,
8142     /// <p>Metadata about each object returned.</p>
8143     pub contents: Option<Vec<Object>>,
8144     /// <p>Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the <code>CommonPrefixes</code> collection. These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the <code>MaxKeys</code> value.</p>
8145     pub delimiter: Option<String>,
8146     /// <p>Encoding type used by Amazon S3 to encode object keys in the response.</p>
8147     pub encoding_type: Option<String>,
8148     /// <p>A flag that indicates whether Amazon S3 returned all of the results that satisfied the search criteria.</p>
8149     pub is_truncated: Option<bool>,
8150     /// <p>Indicates where in the bucket listing begins. Marker is included in the response if it was sent with the request.</p>
8151     pub marker: Option<String>,
8152     /// <p>The maximum number of keys returned in the response body.</p>
8153     pub max_keys: Option<i64>,
8154     /// <p>Bucket name.</p>
8155     pub name: Option<String>,
8156     /// <p>When response is truncated (the IsTruncated element value in the response is true), you can use the key name in this field as marker in the subsequent request to get next set of objects. Amazon S3 lists objects in alphabetical order Note: This element is returned only if you have delimiter request parameter specified. If response does not include the NextMaker and it is truncated, you can use the value of the last Key in the response as the marker in the subsequent request to get the next set of object keys.</p>
8157     pub next_marker: Option<String>,
8158     /// <p>Keys that begin with the indicated prefix.</p>
8159     pub prefix: Option<String>,
8160 }
8161 
8162 #[allow(dead_code)]
8163 struct ListObjectsOutputDeserializer;
8164 impl ListObjectsOutputDeserializer {
8165     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListObjectsOutput, XmlParseError>8166     fn deserialize<T: Peek + Next>(
8167         tag_name: &str,
8168         stack: &mut T,
8169     ) -> Result<ListObjectsOutput, XmlParseError> {
8170         deserialize_elements::<_, ListObjectsOutput, _>(tag_name, stack, |name, stack, obj| {
8171             match name {
8172                 "CommonPrefixes" => {
8173                     obj.common_prefixes.get_or_insert(vec![]).extend(
8174                         CommonPrefixListDeserializer::deserialize("CommonPrefixes", stack)?,
8175                     );
8176                 }
8177                 "Contents" => {
8178                     obj.contents
8179                         .get_or_insert(vec![])
8180                         .extend(ObjectListDeserializer::deserialize("Contents", stack)?);
8181                 }
8182                 "Delimiter" => {
8183                     obj.delimiter = Some(DelimiterDeserializer::deserialize("Delimiter", stack)?);
8184                 }
8185                 "EncodingType" => {
8186                     obj.encoding_type = Some(EncodingTypeDeserializer::deserialize(
8187                         "EncodingType",
8188                         stack,
8189                     )?);
8190                 }
8191                 "IsTruncated" => {
8192                     obj.is_truncated =
8193                         Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
8194                 }
8195                 "Marker" => {
8196                     obj.marker = Some(MarkerDeserializer::deserialize("Marker", stack)?);
8197                 }
8198                 "MaxKeys" => {
8199                     obj.max_keys = Some(MaxKeysDeserializer::deserialize("MaxKeys", stack)?);
8200                 }
8201                 "Name" => {
8202                     obj.name = Some(BucketNameDeserializer::deserialize("Name", stack)?);
8203                 }
8204                 "NextMarker" => {
8205                     obj.next_marker =
8206                         Some(NextMarkerDeserializer::deserialize("NextMarker", stack)?);
8207                 }
8208                 "Prefix" => {
8209                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
8210                 }
8211                 _ => skip_tree(stack),
8212             }
8213             Ok(())
8214         })
8215     }
8216 }
8217 #[derive(Default, Debug, Clone, PartialEq)]
8218 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8219 pub struct ListObjectsRequest {
8220     /// <p>The name of the bucket containing the objects.</p>
8221     pub bucket: String,
8222     /// <p>A delimiter is a character you use to group keys.</p>
8223     pub delimiter: Option<String>,
8224     pub encoding_type: Option<String>,
8225     /// <p>Specifies the key to start with when listing objects in a bucket.</p>
8226     pub marker: Option<String>,
8227     /// <p>Sets the maximum number of keys returned in the response. The response might contain fewer keys but will never contain more.</p>
8228     pub max_keys: Option<i64>,
8229     /// <p>Limits the response to keys that begin with the specified prefix.</p>
8230     pub prefix: Option<String>,
8231     /// <p>Confirms that the requester knows that she or he will be charged for the list objects request. Bucket owners need not specify this parameter in their requests.</p>
8232     pub request_payer: Option<String>,
8233 }
8234 
8235 #[derive(Default, Debug, Clone, PartialEq)]
8236 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8237 pub struct ListObjectsV2Output {
8238     /// <p>All of the keys rolled up into a common prefix count as a single return when calculating the number of returns.</p> <p>A response can contain <code>CommonPrefixes</code> only if you specify a delimiter.</p> <p> <code>CommonPrefixes</code> contains all (if there are any) keys between <code>Prefix</code> and the next occurrence of the string specified by a delimiter.</p> <p> <code>CommonPrefixes</code> lists keys that act like subdirectories in the directory specified by <code>Prefix</code>.</p> <p>For example, if the prefix is <code>notes/</code> and the delimiter is a slash (<code>/</code>) as in <code>notes/summer/july</code>, the common prefix is <code>notes/summer/</code>. All of the keys that roll up into a common prefix count as a single return when calculating the number of returns. </p>
8239     pub common_prefixes: Option<Vec<CommonPrefix>>,
8240     /// <p>Metadata about each object returned.</p>
8241     pub contents: Option<Vec<Object>>,
8242     /// <p> If ContinuationToken was sent with the request, it is included in the response.</p>
8243     pub continuation_token: Option<String>,
8244     /// <p>Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the <code>MaxKeys</code> value.</p>
8245     pub delimiter: Option<String>,
8246     /// <p>Encoding type used by Amazon S3 to encode object key names in the XML response.</p> <p>If you specify the encoding-type request parameter, Amazon S3 includes this element in the response, and returns encoded key name values in the following response elements:</p> <p> <code>Delimiter, Prefix, Key,</code> and <code>StartAfter</code>.</p>
8247     pub encoding_type: Option<String>,
8248     /// <p>Set to false if all of the results were returned. Set to true if more keys are available to return. If the number of results exceeds that specified by MaxKeys, all of the results might not be returned.</p>
8249     pub is_truncated: Option<bool>,
8250     /// <p>KeyCount is the number of keys returned with this request. KeyCount will always be less than equals to MaxKeys field. Say you ask for 50 keys, your result will include less than equals 50 keys </p>
8251     pub key_count: Option<i64>,
8252     /// <p>Sets the maximum number of keys returned in the response. The response might contain fewer keys but will never contain more.</p>
8253     pub max_keys: Option<i64>,
8254     /// <p>Bucket name. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
8255     pub name: Option<String>,
8256     /// <p> <code>NextContinuationToken</code> is sent when <code>isTruncated</code> is true, which means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 can be continued with this <code>NextContinuationToken</code>. <code>NextContinuationToken</code> is obfuscated and is not a real key</p>
8257     pub next_continuation_token: Option<String>,
8258     /// <p> Keys that begin with the indicated prefix.</p>
8259     pub prefix: Option<String>,
8260     /// <p>If StartAfter was sent with the request, it is included in the response.</p>
8261     pub start_after: Option<String>,
8262 }
8263 
8264 #[allow(dead_code)]
8265 struct ListObjectsV2OutputDeserializer;
8266 impl ListObjectsV2OutputDeserializer {
8267     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListObjectsV2Output, XmlParseError>8268     fn deserialize<T: Peek + Next>(
8269         tag_name: &str,
8270         stack: &mut T,
8271     ) -> Result<ListObjectsV2Output, XmlParseError> {
8272         deserialize_elements::<_, ListObjectsV2Output, _>(tag_name, stack, |name, stack, obj| {
8273             match name {
8274                 "CommonPrefixes" => {
8275                     obj.common_prefixes.get_or_insert(vec![]).extend(
8276                         CommonPrefixListDeserializer::deserialize("CommonPrefixes", stack)?,
8277                     );
8278                 }
8279                 "Contents" => {
8280                     obj.contents
8281                         .get_or_insert(vec![])
8282                         .extend(ObjectListDeserializer::deserialize("Contents", stack)?);
8283                 }
8284                 "ContinuationToken" => {
8285                     obj.continuation_token =
8286                         Some(TokenDeserializer::deserialize("ContinuationToken", stack)?);
8287                 }
8288                 "Delimiter" => {
8289                     obj.delimiter = Some(DelimiterDeserializer::deserialize("Delimiter", stack)?);
8290                 }
8291                 "EncodingType" => {
8292                     obj.encoding_type = Some(EncodingTypeDeserializer::deserialize(
8293                         "EncodingType",
8294                         stack,
8295                     )?);
8296                 }
8297                 "IsTruncated" => {
8298                     obj.is_truncated =
8299                         Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
8300                 }
8301                 "KeyCount" => {
8302                     obj.key_count = Some(KeyCountDeserializer::deserialize("KeyCount", stack)?);
8303                 }
8304                 "MaxKeys" => {
8305                     obj.max_keys = Some(MaxKeysDeserializer::deserialize("MaxKeys", stack)?);
8306                 }
8307                 "Name" => {
8308                     obj.name = Some(BucketNameDeserializer::deserialize("Name", stack)?);
8309                 }
8310                 "NextContinuationToken" => {
8311                     obj.next_continuation_token = Some(NextTokenDeserializer::deserialize(
8312                         "NextContinuationToken",
8313                         stack,
8314                     )?);
8315                 }
8316                 "Prefix" => {
8317                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
8318                 }
8319                 "StartAfter" => {
8320                     obj.start_after =
8321                         Some(StartAfterDeserializer::deserialize("StartAfter", stack)?);
8322                 }
8323                 _ => skip_tree(stack),
8324             }
8325             Ok(())
8326         })
8327     }
8328 }
8329 #[derive(Default, Debug, Clone, PartialEq)]
8330 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8331 pub struct ListObjectsV2Request {
8332     /// <p>Bucket name to list. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
8333     pub bucket: String,
8334     /// <p>ContinuationToken indicates Amazon S3 that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key.</p>
8335     pub continuation_token: Option<String>,
8336     /// <p>A delimiter is a character you use to group keys.</p>
8337     pub delimiter: Option<String>,
8338     /// <p>Encoding type used by Amazon S3 to encode object keys in the response.</p>
8339     pub encoding_type: Option<String>,
8340     /// <p>The owner field is not present in listV2 by default, if you want to return owner field with each key in the result then set the fetch owner field to true.</p>
8341     pub fetch_owner: Option<bool>,
8342     /// <p>Sets the maximum number of keys returned in the response. The response might contain fewer keys but will never contain more.</p>
8343     pub max_keys: Option<i64>,
8344     /// <p>Limits the response to keys that begin with the specified prefix.</p>
8345     pub prefix: Option<String>,
8346     /// <p>Confirms that the requester knows that she or he will be charged for the list objects request in V2 style. Bucket owners need not specify this parameter in their requests.</p>
8347     pub request_payer: Option<String>,
8348     /// <p>StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket.</p>
8349     pub start_after: Option<String>,
8350 }
8351 
8352 #[derive(Default, Debug, Clone, PartialEq)]
8353 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8354 pub struct ListPartsOutput {
8355     /// <p>If the bucket has a lifecycle rule configured with an action to abort incomplete multipart uploads and the prefix in the lifecycle rule matches the object name in the request, then the response includes this header indicating when the initiated multipart upload will become eligible for abort operation. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config">Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy</a>.</p> <p>The response will also include the <code>x-amz-abort-rule-id</code> header that will provide the ID of the lifecycle configuration rule that defines this action.</p>
8356     pub abort_date: Option<String>,
8357     /// <p>This header is returned along with the <code>x-amz-abort-date</code> header. It identifies applicable lifecycle configuration rule that defines the action to abort incomplete multipart uploads.</p>
8358     pub abort_rule_id: Option<String>,
8359     /// <p>Name of the bucket to which the multipart upload was initiated.</p>
8360     pub bucket: Option<String>,
8361     /// <p>Container element that identifies who initiated the multipart upload. If the initiator is an AWS account, this element provides the same information as the <code>Owner</code> element. If the initiator is an IAM User, this element provides the user ARN and display name.</p>
8362     pub initiator: Option<Initiator>,
8363     /// <p> Indicates whether the returned list of parts is truncated. A true value indicates that the list was truncated. A list can be truncated if the number of parts exceeds the limit returned in the MaxParts element.</p>
8364     pub is_truncated: Option<bool>,
8365     /// <p>Object key for which the multipart upload was initiated.</p>
8366     pub key: Option<String>,
8367     /// <p>Maximum number of parts that were allowed in the response.</p>
8368     pub max_parts: Option<i64>,
8369     /// <p>When a list is truncated, this element specifies the last part in the list, as well as the value to use for the part-number-marker request parameter in a subsequent request.</p>
8370     pub next_part_number_marker: Option<i64>,
8371     /// <p> Container element that identifies the object owner, after the object is created. If multipart upload is initiated by an IAM user, this element provides the parent account ID and display name.</p>
8372     pub owner: Option<Owner>,
8373     /// <p>When a list is truncated, this element specifies the last part in the list, as well as the value to use for the part-number-marker request parameter in a subsequent request.</p>
8374     pub part_number_marker: Option<i64>,
8375     /// <p> Container for elements related to a particular part. A response can contain zero or more <code>Part</code> elements.</p>
8376     pub parts: Option<Vec<Part>>,
8377     pub request_charged: Option<String>,
8378     /// <p>Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the uploaded object.</p>
8379     pub storage_class: Option<String>,
8380     /// <p>Upload ID identifying the multipart upload whose parts are being listed.</p>
8381     pub upload_id: Option<String>,
8382 }
8383 
8384 #[allow(dead_code)]
8385 struct ListPartsOutputDeserializer;
8386 impl ListPartsOutputDeserializer {
8387     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListPartsOutput, XmlParseError>8388     fn deserialize<T: Peek + Next>(
8389         tag_name: &str,
8390         stack: &mut T,
8391     ) -> Result<ListPartsOutput, XmlParseError> {
8392         deserialize_elements::<_, ListPartsOutput, _>(tag_name, stack, |name, stack, obj| {
8393             match name {
8394                 "Bucket" => {
8395                     obj.bucket = Some(BucketNameDeserializer::deserialize("Bucket", stack)?);
8396                 }
8397                 "Initiator" => {
8398                     obj.initiator = Some(InitiatorDeserializer::deserialize("Initiator", stack)?);
8399                 }
8400                 "IsTruncated" => {
8401                     obj.is_truncated =
8402                         Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
8403                 }
8404                 "Key" => {
8405                     obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
8406                 }
8407                 "MaxParts" => {
8408                     obj.max_parts = Some(MaxPartsDeserializer::deserialize("MaxParts", stack)?);
8409                 }
8410                 "NextPartNumberMarker" => {
8411                     obj.next_part_number_marker =
8412                         Some(NextPartNumberMarkerDeserializer::deserialize(
8413                             "NextPartNumberMarker",
8414                             stack,
8415                         )?);
8416                 }
8417                 "Owner" => {
8418                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
8419                 }
8420                 "PartNumberMarker" => {
8421                     obj.part_number_marker = Some(PartNumberMarkerDeserializer::deserialize(
8422                         "PartNumberMarker",
8423                         stack,
8424                     )?);
8425                 }
8426                 "Part" => {
8427                     obj.parts
8428                         .get_or_insert(vec![])
8429                         .extend(PartsDeserializer::deserialize("Part", stack)?);
8430                 }
8431                 "StorageClass" => {
8432                     obj.storage_class = Some(StorageClassDeserializer::deserialize(
8433                         "StorageClass",
8434                         stack,
8435                     )?);
8436                 }
8437                 "UploadId" => {
8438                     obj.upload_id = Some(MultipartUploadIdDeserializer::deserialize(
8439                         "UploadId", stack,
8440                     )?);
8441                 }
8442                 _ => skip_tree(stack),
8443             }
8444             Ok(())
8445         })
8446     }
8447 }
8448 #[derive(Default, Debug, Clone, PartialEq)]
8449 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8450 pub struct ListPartsRequest {
8451     /// <p>Name of the bucket to which the parts are being uploaded. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
8452     pub bucket: String,
8453     /// <p>Object key for which the multipart upload was initiated.</p>
8454     pub key: String,
8455     /// <p>Sets the maximum number of parts to return.</p>
8456     pub max_parts: Option<i64>,
8457     /// <p>Specifies the part after which listing should begin. Only parts with higher part numbers will be listed.</p>
8458     pub part_number_marker: Option<i64>,
8459     pub request_payer: Option<String>,
8460     /// <p>Upload ID identifying the multipart upload whose parts are being listed.</p>
8461     pub upload_id: String,
8462 }
8463 
8464 #[allow(dead_code)]
8465 struct LocationDeserializer;
8466 impl LocationDeserializer {
8467     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>8468     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8469         start_element(tag_name, stack)?;
8470         let obj = characters(stack)?;
8471         end_element(tag_name, stack)?;
8472 
8473         Ok(obj)
8474     }
8475 }
8476 
8477 pub struct LocationPrefixSerializer;
8478 impl LocationPrefixSerializer {
8479     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,8480     pub fn serialize<W>(
8481         mut writer: &mut EventWriter<W>,
8482         name: &str,
8483         obj: &String,
8484     ) -> Result<(), xml::writer::Error>
8485     where
8486         W: Write,
8487     {
8488         writer.write(xml::writer::XmlEvent::start_element(name))?;
8489         writer.write(xml::writer::XmlEvent::characters(&format!(
8490             "{value}",
8491             value = obj.to_string()
8492         )))?;
8493         writer.write(xml::writer::XmlEvent::end_element())
8494     }
8495 }
8496 
8497 /// <p>Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html">PUT Bucket logging</a> in the <i>Amazon Simple Storage Service API Reference</i>.</p>
8498 #[derive(Default, Debug, Clone, PartialEq)]
8499 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8500 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8501 pub struct LoggingEnabled {
8502     /// <p>Specifies the bucket where you want Amazon S3 to store server access logs. You can have your logs delivered to any bucket that you own, including the same bucket that is being logged. You can also configure multiple buckets to deliver their logs to the same target bucket. In this case, you should choose a different <code>TargetPrefix</code> for each source bucket so that the delivered log files can be distinguished by key.</p>
8503     pub target_bucket: String,
8504     /// <p>Container for granting information.</p>
8505     pub target_grants: Option<Vec<TargetGrant>>,
8506     /// <p>A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a single bucket, you can use a prefix to distinguish which log files came from which bucket.</p>
8507     pub target_prefix: String,
8508 }
8509 
8510 #[allow(dead_code)]
8511 struct LoggingEnabledDeserializer;
8512 impl LoggingEnabledDeserializer {
8513     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<LoggingEnabled, XmlParseError>8514     fn deserialize<T: Peek + Next>(
8515         tag_name: &str,
8516         stack: &mut T,
8517     ) -> Result<LoggingEnabled, XmlParseError> {
8518         deserialize_elements::<_, LoggingEnabled, _>(tag_name, stack, |name, stack, obj| {
8519             match name {
8520                 "TargetBucket" => {
8521                     obj.target_bucket =
8522                         TargetBucketDeserializer::deserialize("TargetBucket", stack)?;
8523                 }
8524                 "TargetGrants" => {
8525                     obj.target_grants.get_or_insert(vec![]).extend(
8526                         TargetGrantsDeserializer::deserialize("TargetGrants", stack)?,
8527                     );
8528                 }
8529                 "TargetPrefix" => {
8530                     obj.target_prefix =
8531                         TargetPrefixDeserializer::deserialize("TargetPrefix", stack)?;
8532                 }
8533                 _ => skip_tree(stack),
8534             }
8535             Ok(())
8536         })
8537     }
8538 }
8539 
8540 pub struct LoggingEnabledSerializer;
8541 impl LoggingEnabledSerializer {
8542     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &LoggingEnabled, ) -> Result<(), xml::writer::Error> where W: Write,8543     pub fn serialize<W>(
8544         mut writer: &mut EventWriter<W>,
8545         name: &str,
8546         obj: &LoggingEnabled,
8547     ) -> Result<(), xml::writer::Error>
8548     where
8549         W: Write,
8550     {
8551         writer.write(xml::writer::XmlEvent::start_element(name))?;
8552         writer.write(xml::writer::XmlEvent::start_element("TargetBucket"))?;
8553         writer.write(xml::writer::XmlEvent::characters(&format!(
8554             "{value}",
8555             value = obj.target_bucket
8556         )))?;
8557         writer.write(xml::writer::XmlEvent::end_element())?;
8558         if let Some(ref value) = obj.target_grants {
8559             &TargetGrantsSerializer::serialize(&mut writer, "TargetGrants", value)?;
8560         }
8561         writer.write(xml::writer::XmlEvent::start_element("TargetPrefix"))?;
8562         writer.write(xml::writer::XmlEvent::characters(&format!(
8563             "{value}",
8564             value = obj.target_prefix
8565         )))?;
8566         writer.write(xml::writer::XmlEvent::end_element())?;
8567         writer.write(xml::writer::XmlEvent::end_element())
8568     }
8569 }
8570 
8571 pub struct MFADeleteSerializer;
8572 impl MFADeleteSerializer {
8573     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,8574     pub fn serialize<W>(
8575         mut writer: &mut EventWriter<W>,
8576         name: &str,
8577         obj: &String,
8578     ) -> Result<(), xml::writer::Error>
8579     where
8580         W: Write,
8581     {
8582         writer.write(xml::writer::XmlEvent::start_element(name))?;
8583         writer.write(xml::writer::XmlEvent::characters(&format!(
8584             "{value}",
8585             value = obj.to_string()
8586         )))?;
8587         writer.write(xml::writer::XmlEvent::end_element())
8588     }
8589 }
8590 
8591 #[allow(dead_code)]
8592 struct MFADeleteStatusDeserializer;
8593 impl MFADeleteStatusDeserializer {
8594     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>8595     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8596         start_element(tag_name, stack)?;
8597         let obj = characters(stack)?;
8598         end_element(tag_name, stack)?;
8599 
8600         Ok(obj)
8601     }
8602 }
8603 #[allow(dead_code)]
8604 struct MarkerDeserializer;
8605 impl MarkerDeserializer {
8606     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>8607     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8608         start_element(tag_name, stack)?;
8609         let obj = characters(stack)?;
8610         end_element(tag_name, stack)?;
8611 
8612         Ok(obj)
8613     }
8614 }
8615 
8616 pub struct MarkerSerializer;
8617 impl MarkerSerializer {
8618     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,8619     pub fn serialize<W>(
8620         mut writer: &mut EventWriter<W>,
8621         name: &str,
8622         obj: &String,
8623     ) -> Result<(), xml::writer::Error>
8624     where
8625         W: Write,
8626     {
8627         writer.write(xml::writer::XmlEvent::start_element(name))?;
8628         writer.write(xml::writer::XmlEvent::characters(&format!(
8629             "{value}",
8630             value = obj.to_string()
8631         )))?;
8632         writer.write(xml::writer::XmlEvent::end_element())
8633     }
8634 }
8635 
8636 #[allow(dead_code)]
8637 struct MaxAgeSecondsDeserializer;
8638 impl MaxAgeSecondsDeserializer {
8639     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>8640     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
8641         start_element(tag_name, stack)?;
8642         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
8643         end_element(tag_name, stack)?;
8644 
8645         Ok(obj)
8646     }
8647 }
8648 
8649 pub struct MaxAgeSecondsSerializer;
8650 impl MaxAgeSecondsSerializer {
8651     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,8652     pub fn serialize<W>(
8653         mut writer: &mut EventWriter<W>,
8654         name: &str,
8655         obj: &i64,
8656     ) -> Result<(), xml::writer::Error>
8657     where
8658         W: Write,
8659     {
8660         writer.write(xml::writer::XmlEvent::start_element(name))?;
8661         writer.write(xml::writer::XmlEvent::characters(&format!(
8662             "{value}",
8663             value = obj.to_string()
8664         )))?;
8665         writer.write(xml::writer::XmlEvent::end_element())
8666     }
8667 }
8668 
8669 #[allow(dead_code)]
8670 struct MaxKeysDeserializer;
8671 impl MaxKeysDeserializer {
8672     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>8673     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
8674         start_element(tag_name, stack)?;
8675         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
8676         end_element(tag_name, stack)?;
8677 
8678         Ok(obj)
8679     }
8680 }
8681 
8682 pub struct MaxKeysSerializer;
8683 impl MaxKeysSerializer {
8684     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,8685     pub fn serialize<W>(
8686         mut writer: &mut EventWriter<W>,
8687         name: &str,
8688         obj: &i64,
8689     ) -> Result<(), xml::writer::Error>
8690     where
8691         W: Write,
8692     {
8693         writer.write(xml::writer::XmlEvent::start_element(name))?;
8694         writer.write(xml::writer::XmlEvent::characters(&format!(
8695             "{value}",
8696             value = obj.to_string()
8697         )))?;
8698         writer.write(xml::writer::XmlEvent::end_element())
8699     }
8700 }
8701 
8702 #[allow(dead_code)]
8703 struct MaxPartsDeserializer;
8704 impl MaxPartsDeserializer {
8705     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>8706     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
8707         start_element(tag_name, stack)?;
8708         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
8709         end_element(tag_name, stack)?;
8710 
8711         Ok(obj)
8712     }
8713 }
8714 
8715 pub struct MaxPartsSerializer;
8716 impl MaxPartsSerializer {
8717     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,8718     pub fn serialize<W>(
8719         mut writer: &mut EventWriter<W>,
8720         name: &str,
8721         obj: &i64,
8722     ) -> Result<(), xml::writer::Error>
8723     where
8724         W: Write,
8725     {
8726         writer.write(xml::writer::XmlEvent::start_element(name))?;
8727         writer.write(xml::writer::XmlEvent::characters(&format!(
8728             "{value}",
8729             value = obj.to_string()
8730         )))?;
8731         writer.write(xml::writer::XmlEvent::end_element())
8732     }
8733 }
8734 
8735 #[allow(dead_code)]
8736 struct MaxUploadsDeserializer;
8737 impl MaxUploadsDeserializer {
8738     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>8739     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
8740         start_element(tag_name, stack)?;
8741         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
8742         end_element(tag_name, stack)?;
8743 
8744         Ok(obj)
8745     }
8746 }
8747 
8748 pub struct MaxUploadsSerializer;
8749 impl MaxUploadsSerializer {
8750     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,8751     pub fn serialize<W>(
8752         mut writer: &mut EventWriter<W>,
8753         name: &str,
8754         obj: &i64,
8755     ) -> Result<(), xml::writer::Error>
8756     where
8757         W: Write,
8758     {
8759         writer.write(xml::writer::XmlEvent::start_element(name))?;
8760         writer.write(xml::writer::XmlEvent::characters(&format!(
8761             "{value}",
8762             value = obj.to_string()
8763         )))?;
8764         writer.write(xml::writer::XmlEvent::end_element())
8765     }
8766 }
8767 
8768 #[allow(dead_code)]
8769 struct MessageDeserializer;
8770 impl MessageDeserializer {
8771     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>8772     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8773         start_element(tag_name, stack)?;
8774         let obj = characters(stack)?;
8775         end_element(tag_name, stack)?;
8776 
8777         Ok(obj)
8778     }
8779 }
8780 /// <p>A metadata key-value pair to store with an object.</p>
8781 #[derive(Default, Debug, Clone, PartialEq)]
8782 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8783 pub struct MetadataEntry {
8784     /// <p>Name of the Object.</p>
8785     pub name: Option<String>,
8786     /// <p>Value of the Object.</p>
8787     pub value: Option<String>,
8788 }
8789 
8790 pub struct MetadataEntrySerializer;
8791 impl MetadataEntrySerializer {
8792     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &MetadataEntry, ) -> Result<(), xml::writer::Error> where W: Write,8793     pub fn serialize<W>(
8794         mut writer: &mut EventWriter<W>,
8795         name: &str,
8796         obj: &MetadataEntry,
8797     ) -> Result<(), xml::writer::Error>
8798     where
8799         W: Write,
8800     {
8801         writer.write(xml::writer::XmlEvent::start_element(name))?;
8802         if let Some(ref value) = obj.name {
8803             writer.write(xml::writer::XmlEvent::start_element("Name"))?;
8804             writer.write(xml::writer::XmlEvent::characters(&format!(
8805                 "{value}",
8806                 value = value
8807             )));
8808             writer.write(xml::writer::XmlEvent::end_element())?;
8809         }
8810         if let Some(ref value) = obj.value {
8811             writer.write(xml::writer::XmlEvent::start_element("Value"))?;
8812             writer.write(xml::writer::XmlEvent::characters(&format!(
8813                 "{value}",
8814                 value = value
8815             )));
8816             writer.write(xml::writer::XmlEvent::end_element())?;
8817         }
8818         writer.write(xml::writer::XmlEvent::end_element())
8819     }
8820 }
8821 
8822 pub struct MetadataKeySerializer;
8823 impl MetadataKeySerializer {
8824     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,8825     pub fn serialize<W>(
8826         mut writer: &mut EventWriter<W>,
8827         name: &str,
8828         obj: &String,
8829     ) -> Result<(), xml::writer::Error>
8830     where
8831         W: Write,
8832     {
8833         writer.write(xml::writer::XmlEvent::start_element(name))?;
8834         writer.write(xml::writer::XmlEvent::characters(&format!(
8835             "{value}",
8836             value = obj.to_string()
8837         )))?;
8838         writer.write(xml::writer::XmlEvent::end_element())
8839     }
8840 }
8841 
8842 pub struct MetadataValueSerializer;
8843 impl MetadataValueSerializer {
8844     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,8845     pub fn serialize<W>(
8846         mut writer: &mut EventWriter<W>,
8847         name: &str,
8848         obj: &String,
8849     ) -> Result<(), xml::writer::Error>
8850     where
8851         W: Write,
8852     {
8853         writer.write(xml::writer::XmlEvent::start_element(name))?;
8854         writer.write(xml::writer::XmlEvent::characters(&format!(
8855             "{value}",
8856             value = obj.to_string()
8857         )))?;
8858         writer.write(xml::writer::XmlEvent::end_element())
8859     }
8860 }
8861 
8862 /// <p> A container specifying replication metrics-related settings enabling metrics and Amazon S3 events for S3 Replication Time Control (S3 RTC). Must be specified together with a <code>ReplicationTime</code> block. </p>
8863 #[derive(Default, Debug, Clone, PartialEq)]
8864 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8865 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8866 pub struct Metrics {
8867     /// <p> A container specifying the time threshold for emitting the <code>s3:Replication:OperationMissedThreshold</code> event. </p>
8868     pub event_threshold: ReplicationTimeValue,
8869     /// <p> Specifies whether the replication metrics are enabled. </p>
8870     pub status: String,
8871 }
8872 
8873 #[allow(dead_code)]
8874 struct MetricsDeserializer;
8875 impl MetricsDeserializer {
8876     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Metrics, XmlParseError>8877     fn deserialize<T: Peek + Next>(
8878         tag_name: &str,
8879         stack: &mut T,
8880     ) -> Result<Metrics, XmlParseError> {
8881         deserialize_elements::<_, Metrics, _>(tag_name, stack, |name, stack, obj| {
8882             match name {
8883                 "EventThreshold" => {
8884                     obj.event_threshold =
8885                         ReplicationTimeValueDeserializer::deserialize("EventThreshold", stack)?;
8886                 }
8887                 "Status" => {
8888                     obj.status = MetricsStatusDeserializer::deserialize("Status", stack)?;
8889                 }
8890                 _ => skip_tree(stack),
8891             }
8892             Ok(())
8893         })
8894     }
8895 }
8896 
8897 pub struct MetricsSerializer;
8898 impl MetricsSerializer {
8899     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Metrics, ) -> Result<(), xml::writer::Error> where W: Write,8900     pub fn serialize<W>(
8901         mut writer: &mut EventWriter<W>,
8902         name: &str,
8903         obj: &Metrics,
8904     ) -> Result<(), xml::writer::Error>
8905     where
8906         W: Write,
8907     {
8908         writer.write(xml::writer::XmlEvent::start_element(name))?;
8909         ReplicationTimeValueSerializer::serialize(
8910             &mut writer,
8911             "EventThreshold",
8912             &obj.event_threshold,
8913         )?;
8914         writer.write(xml::writer::XmlEvent::start_element("Status"))?;
8915         writer.write(xml::writer::XmlEvent::characters(&format!(
8916             "{value}",
8917             value = obj.status
8918         )))?;
8919         writer.write(xml::writer::XmlEvent::end_element())?;
8920         writer.write(xml::writer::XmlEvent::end_element())
8921     }
8922 }
8923 
8924 /// <p>A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. The operator must have at least two predicates, and an object must match all of the predicates in order for the filter to apply.</p>
8925 #[derive(Default, Debug, Clone, PartialEq)]
8926 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8927 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8928 pub struct MetricsAndOperator {
8929     /// <p>The prefix used when evaluating an AND predicate.</p>
8930     pub prefix: Option<String>,
8931     /// <p>The list of tags used when evaluating an AND predicate.</p>
8932     pub tags: Option<Vec<Tag>>,
8933 }
8934 
8935 #[allow(dead_code)]
8936 struct MetricsAndOperatorDeserializer;
8937 impl MetricsAndOperatorDeserializer {
8938     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<MetricsAndOperator, XmlParseError>8939     fn deserialize<T: Peek + Next>(
8940         tag_name: &str,
8941         stack: &mut T,
8942     ) -> Result<MetricsAndOperator, XmlParseError> {
8943         deserialize_elements::<_, MetricsAndOperator, _>(tag_name, stack, |name, stack, obj| {
8944             match name {
8945                 "Prefix" => {
8946                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
8947                 }
8948                 "Tag" => {
8949                     obj.tags
8950                         .get_or_insert(vec![])
8951                         .extend(TagSetDeserializer::deserialize("Tag", stack)?);
8952                 }
8953                 _ => skip_tree(stack),
8954             }
8955             Ok(())
8956         })
8957     }
8958 }
8959 
8960 pub struct MetricsAndOperatorSerializer;
8961 impl MetricsAndOperatorSerializer {
8962     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &MetricsAndOperator, ) -> Result<(), xml::writer::Error> where W: Write,8963     pub fn serialize<W>(
8964         mut writer: &mut EventWriter<W>,
8965         name: &str,
8966         obj: &MetricsAndOperator,
8967     ) -> Result<(), xml::writer::Error>
8968     where
8969         W: Write,
8970     {
8971         writer.write(xml::writer::XmlEvent::start_element(name))?;
8972         if let Some(ref value) = obj.prefix {
8973             writer.write(xml::writer::XmlEvent::start_element("Prefix"))?;
8974             writer.write(xml::writer::XmlEvent::characters(&format!(
8975                 "{value}",
8976                 value = value
8977             )));
8978             writer.write(xml::writer::XmlEvent::end_element())?;
8979         }
8980         if let Some(ref value) = obj.tags {
8981             &TagSetSerializer::serialize(&mut writer, "Tag", value)?;
8982         }
8983         writer.write(xml::writer::XmlEvent::end_element())
8984     }
8985 }
8986 
8987 /// <p>Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket. If you're updating an existing metrics configuration, note that this is a full replacement of the existing metrics configuration. If you don't include the elements you want to keep, they are erased. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTMetricConfiguration.html"> PUT Bucket metrics</a> in the <i>Amazon Simple Storage Service API Reference</i>.</p>
8988 #[derive(Default, Debug, Clone, PartialEq)]
8989 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8990 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8991 pub struct MetricsConfiguration {
8992     /// <p>Specifies a metrics configuration filter. The metrics configuration will only include objects that meet the filter's criteria. A filter must be a prefix, a tag, or a conjunction (MetricsAndOperator).</p>
8993     pub filter: Option<MetricsFilter>,
8994     /// <p>The ID used to identify the metrics configuration.</p>
8995     pub id: String,
8996 }
8997 
8998 #[allow(dead_code)]
8999 struct MetricsConfigurationDeserializer;
9000 impl MetricsConfigurationDeserializer {
9001     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<MetricsConfiguration, XmlParseError>9002     fn deserialize<T: Peek + Next>(
9003         tag_name: &str,
9004         stack: &mut T,
9005     ) -> Result<MetricsConfiguration, XmlParseError> {
9006         deserialize_elements::<_, MetricsConfiguration, _>(tag_name, stack, |name, stack, obj| {
9007             match name {
9008                 "Filter" => {
9009                     obj.filter = Some(MetricsFilterDeserializer::deserialize("Filter", stack)?);
9010                 }
9011                 "Id" => {
9012                     obj.id = MetricsIdDeserializer::deserialize("Id", stack)?;
9013                 }
9014                 _ => skip_tree(stack),
9015             }
9016             Ok(())
9017         })
9018     }
9019 }
9020 
9021 pub struct MetricsConfigurationSerializer;
9022 impl MetricsConfigurationSerializer {
9023     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &MetricsConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,9024     pub fn serialize<W>(
9025         mut writer: &mut EventWriter<W>,
9026         name: &str,
9027         obj: &MetricsConfiguration,
9028     ) -> Result<(), xml::writer::Error>
9029     where
9030         W: Write,
9031     {
9032         writer.write(xml::writer::XmlEvent::start_element(name))?;
9033         if let Some(ref value) = obj.filter {
9034             &MetricsFilterSerializer::serialize(&mut writer, "Filter", value)?;
9035         }
9036         writer.write(xml::writer::XmlEvent::start_element("Id"))?;
9037         writer.write(xml::writer::XmlEvent::characters(&format!(
9038             "{value}",
9039             value = obj.id
9040         )))?;
9041         writer.write(xml::writer::XmlEvent::end_element())?;
9042         writer.write(xml::writer::XmlEvent::end_element())
9043     }
9044 }
9045 
9046 #[allow(dead_code)]
9047 struct MetricsConfigurationListDeserializer;
9048 impl MetricsConfigurationListDeserializer {
9049     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<MetricsConfiguration>, XmlParseError>9050     fn deserialize<T: Peek + Next>(
9051         tag_name: &str,
9052         stack: &mut T,
9053     ) -> Result<Vec<MetricsConfiguration>, XmlParseError> {
9054         let mut obj = vec![];
9055 
9056         loop {
9057             let consume_next_tag = match stack.peek() {
9058                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
9059                     name.local_name == tag_name
9060                 }
9061                 _ => false,
9062             };
9063 
9064             if consume_next_tag {
9065                 obj.push(MetricsConfigurationDeserializer::deserialize(
9066                     tag_name, stack,
9067                 )?);
9068             } else {
9069                 break;
9070             }
9071         }
9072 
9073         Ok(obj)
9074     }
9075 }
9076 /// <p>Specifies a metrics configuration filter. The metrics configuration only includes objects that meet the filter's criteria. A filter must be a prefix, a tag, or a conjunction (MetricsAndOperator).</p>
9077 #[derive(Default, Debug, Clone, PartialEq)]
9078 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9079 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9080 pub struct MetricsFilter {
9081     /// <p>A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. The operator must have at least two predicates, and an object must match all of the predicates in order for the filter to apply.</p>
9082     pub and: Option<MetricsAndOperator>,
9083     /// <p>The prefix used when evaluating a metrics filter.</p>
9084     pub prefix: Option<String>,
9085     /// <p>The tag used when evaluating a metrics filter.</p>
9086     pub tag: Option<Tag>,
9087 }
9088 
9089 #[allow(dead_code)]
9090 struct MetricsFilterDeserializer;
9091 impl MetricsFilterDeserializer {
9092     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<MetricsFilter, XmlParseError>9093     fn deserialize<T: Peek + Next>(
9094         tag_name: &str,
9095         stack: &mut T,
9096     ) -> Result<MetricsFilter, XmlParseError> {
9097         deserialize_elements::<_, MetricsFilter, _>(tag_name, stack, |name, stack, obj| {
9098             match name {
9099                 "And" => {
9100                     obj.and = Some(MetricsAndOperatorDeserializer::deserialize("And", stack)?);
9101                 }
9102                 "Prefix" => {
9103                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
9104                 }
9105                 "Tag" => {
9106                     obj.tag = Some(TagDeserializer::deserialize("Tag", stack)?);
9107                 }
9108                 _ => skip_tree(stack),
9109             }
9110             Ok(())
9111         })
9112     }
9113 }
9114 
9115 pub struct MetricsFilterSerializer;
9116 impl MetricsFilterSerializer {
9117     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &MetricsFilter, ) -> Result<(), xml::writer::Error> where W: Write,9118     pub fn serialize<W>(
9119         mut writer: &mut EventWriter<W>,
9120         name: &str,
9121         obj: &MetricsFilter,
9122     ) -> Result<(), xml::writer::Error>
9123     where
9124         W: Write,
9125     {
9126         writer.write(xml::writer::XmlEvent::start_element(name))?;
9127         if let Some(ref value) = obj.and {
9128             &MetricsAndOperatorSerializer::serialize(&mut writer, "And", value)?;
9129         }
9130         if let Some(ref value) = obj.prefix {
9131             writer.write(xml::writer::XmlEvent::start_element("Prefix"))?;
9132             writer.write(xml::writer::XmlEvent::characters(&format!(
9133                 "{value}",
9134                 value = value
9135             )));
9136             writer.write(xml::writer::XmlEvent::end_element())?;
9137         }
9138         if let Some(ref value) = obj.tag {
9139             &TagSerializer::serialize(&mut writer, "Tag", value)?;
9140         }
9141         writer.write(xml::writer::XmlEvent::end_element())
9142     }
9143 }
9144 
9145 #[allow(dead_code)]
9146 struct MetricsIdDeserializer;
9147 impl MetricsIdDeserializer {
9148     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9149     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9150         start_element(tag_name, stack)?;
9151         let obj = characters(stack)?;
9152         end_element(tag_name, stack)?;
9153 
9154         Ok(obj)
9155     }
9156 }
9157 
9158 pub struct MetricsIdSerializer;
9159 impl MetricsIdSerializer {
9160     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,9161     pub fn serialize<W>(
9162         mut writer: &mut EventWriter<W>,
9163         name: &str,
9164         obj: &String,
9165     ) -> Result<(), xml::writer::Error>
9166     where
9167         W: Write,
9168     {
9169         writer.write(xml::writer::XmlEvent::start_element(name))?;
9170         writer.write(xml::writer::XmlEvent::characters(&format!(
9171             "{value}",
9172             value = obj.to_string()
9173         )))?;
9174         writer.write(xml::writer::XmlEvent::end_element())
9175     }
9176 }
9177 
9178 #[allow(dead_code)]
9179 struct MetricsStatusDeserializer;
9180 impl MetricsStatusDeserializer {
9181     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9182     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9183         start_element(tag_name, stack)?;
9184         let obj = characters(stack)?;
9185         end_element(tag_name, stack)?;
9186 
9187         Ok(obj)
9188     }
9189 }
9190 
9191 pub struct MetricsStatusSerializer;
9192 impl MetricsStatusSerializer {
9193     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,9194     pub fn serialize<W>(
9195         mut writer: &mut EventWriter<W>,
9196         name: &str,
9197         obj: &String,
9198     ) -> Result<(), xml::writer::Error>
9199     where
9200         W: Write,
9201     {
9202         writer.write(xml::writer::XmlEvent::start_element(name))?;
9203         writer.write(xml::writer::XmlEvent::characters(&format!(
9204             "{value}",
9205             value = obj.to_string()
9206         )))?;
9207         writer.write(xml::writer::XmlEvent::end_element())
9208     }
9209 }
9210 
9211 #[allow(dead_code)]
9212 struct MinutesDeserializer;
9213 impl MinutesDeserializer {
9214     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>9215     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
9216         start_element(tag_name, stack)?;
9217         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
9218         end_element(tag_name, stack)?;
9219 
9220         Ok(obj)
9221     }
9222 }
9223 
9224 pub struct MinutesSerializer;
9225 impl MinutesSerializer {
9226     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,9227     pub fn serialize<W>(
9228         mut writer: &mut EventWriter<W>,
9229         name: &str,
9230         obj: &i64,
9231     ) -> Result<(), xml::writer::Error>
9232     where
9233         W: Write,
9234     {
9235         writer.write(xml::writer::XmlEvent::start_element(name))?;
9236         writer.write(xml::writer::XmlEvent::characters(&format!(
9237             "{value}",
9238             value = obj.to_string()
9239         )))?;
9240         writer.write(xml::writer::XmlEvent::end_element())
9241     }
9242 }
9243 
9244 /// <p>Container for the <code>MultipartUpload</code> for the Amazon S3 object.</p>
9245 #[derive(Default, Debug, Clone, PartialEq)]
9246 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9247 pub struct MultipartUpload {
9248     /// <p>Date and time at which the multipart upload was initiated.</p>
9249     pub initiated: Option<String>,
9250     /// <p>Identifies who initiated the multipart upload.</p>
9251     pub initiator: Option<Initiator>,
9252     /// <p>Key of the object for which the multipart upload was initiated.</p>
9253     pub key: Option<String>,
9254     /// <p>Specifies the owner of the object that is part of the multipart upload. </p>
9255     pub owner: Option<Owner>,
9256     /// <p>The class of storage used to store the object.</p>
9257     pub storage_class: Option<String>,
9258     /// <p>Upload ID that identifies the multipart upload.</p>
9259     pub upload_id: Option<String>,
9260 }
9261 
9262 #[allow(dead_code)]
9263 struct MultipartUploadDeserializer;
9264 impl MultipartUploadDeserializer {
9265     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<MultipartUpload, XmlParseError>9266     fn deserialize<T: Peek + Next>(
9267         tag_name: &str,
9268         stack: &mut T,
9269     ) -> Result<MultipartUpload, XmlParseError> {
9270         deserialize_elements::<_, MultipartUpload, _>(tag_name, stack, |name, stack, obj| {
9271             match name {
9272                 "Initiated" => {
9273                     obj.initiated = Some(InitiatedDeserializer::deserialize("Initiated", stack)?);
9274                 }
9275                 "Initiator" => {
9276                     obj.initiator = Some(InitiatorDeserializer::deserialize("Initiator", stack)?);
9277                 }
9278                 "Key" => {
9279                     obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
9280                 }
9281                 "Owner" => {
9282                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
9283                 }
9284                 "StorageClass" => {
9285                     obj.storage_class = Some(StorageClassDeserializer::deserialize(
9286                         "StorageClass",
9287                         stack,
9288                     )?);
9289                 }
9290                 "UploadId" => {
9291                     obj.upload_id = Some(MultipartUploadIdDeserializer::deserialize(
9292                         "UploadId", stack,
9293                     )?);
9294                 }
9295                 _ => skip_tree(stack),
9296             }
9297             Ok(())
9298         })
9299     }
9300 }
9301 #[allow(dead_code)]
9302 struct MultipartUploadIdDeserializer;
9303 impl MultipartUploadIdDeserializer {
9304     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9305     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9306         start_element(tag_name, stack)?;
9307         let obj = characters(stack)?;
9308         end_element(tag_name, stack)?;
9309 
9310         Ok(obj)
9311     }
9312 }
9313 
9314 pub struct MultipartUploadIdSerializer;
9315 impl MultipartUploadIdSerializer {
9316     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,9317     pub fn serialize<W>(
9318         mut writer: &mut EventWriter<W>,
9319         name: &str,
9320         obj: &String,
9321     ) -> Result<(), xml::writer::Error>
9322     where
9323         W: Write,
9324     {
9325         writer.write(xml::writer::XmlEvent::start_element(name))?;
9326         writer.write(xml::writer::XmlEvent::characters(&format!(
9327             "{value}",
9328             value = obj.to_string()
9329         )))?;
9330         writer.write(xml::writer::XmlEvent::end_element())
9331     }
9332 }
9333 
9334 #[allow(dead_code)]
9335 struct MultipartUploadListDeserializer;
9336 impl MultipartUploadListDeserializer {
9337     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<MultipartUpload>, XmlParseError>9338     fn deserialize<T: Peek + Next>(
9339         tag_name: &str,
9340         stack: &mut T,
9341     ) -> Result<Vec<MultipartUpload>, XmlParseError> {
9342         let mut obj = vec![];
9343 
9344         loop {
9345             let consume_next_tag = match stack.peek() {
9346                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
9347                     name.local_name == tag_name
9348                 }
9349                 _ => false,
9350             };
9351 
9352             if consume_next_tag {
9353                 obj.push(MultipartUploadDeserializer::deserialize(tag_name, stack)?);
9354             } else {
9355                 break;
9356             }
9357         }
9358 
9359         Ok(obj)
9360     }
9361 }
9362 #[allow(dead_code)]
9363 struct NextKeyMarkerDeserializer;
9364 impl NextKeyMarkerDeserializer {
9365     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9366     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9367         start_element(tag_name, stack)?;
9368         let obj = characters(stack)?;
9369         end_element(tag_name, stack)?;
9370 
9371         Ok(obj)
9372     }
9373 }
9374 #[allow(dead_code)]
9375 struct NextMarkerDeserializer;
9376 impl NextMarkerDeserializer {
9377     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9378     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9379         start_element(tag_name, stack)?;
9380         let obj = characters(stack)?;
9381         end_element(tag_name, stack)?;
9382 
9383         Ok(obj)
9384     }
9385 }
9386 #[allow(dead_code)]
9387 struct NextPartNumberMarkerDeserializer;
9388 impl NextPartNumberMarkerDeserializer {
9389     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>9390     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
9391         start_element(tag_name, stack)?;
9392         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
9393         end_element(tag_name, stack)?;
9394 
9395         Ok(obj)
9396     }
9397 }
9398 #[allow(dead_code)]
9399 struct NextTokenDeserializer;
9400 impl NextTokenDeserializer {
9401     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9402     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9403         start_element(tag_name, stack)?;
9404         let obj = characters(stack)?;
9405         end_element(tag_name, stack)?;
9406 
9407         Ok(obj)
9408     }
9409 }
9410 #[allow(dead_code)]
9411 struct NextUploadIdMarkerDeserializer;
9412 impl NextUploadIdMarkerDeserializer {
9413     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9414     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9415         start_element(tag_name, stack)?;
9416         let obj = characters(stack)?;
9417         end_element(tag_name, stack)?;
9418 
9419         Ok(obj)
9420     }
9421 }
9422 #[allow(dead_code)]
9423 struct NextVersionIdMarkerDeserializer;
9424 impl NextVersionIdMarkerDeserializer {
9425     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9426     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9427         start_element(tag_name, stack)?;
9428         let obj = characters(stack)?;
9429         end_element(tag_name, stack)?;
9430 
9431         Ok(obj)
9432     }
9433 }
9434 /// <p>Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent object versions at a specific period in the object's lifetime.</p>
9435 #[derive(Default, Debug, Clone, PartialEq)]
9436 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9437 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9438 pub struct NoncurrentVersionExpiration {
9439     /// <p>Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations">How Amazon S3 Calculates When an Object Became Noncurrent</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
9440     pub noncurrent_days: Option<i64>,
9441 }
9442 
9443 #[allow(dead_code)]
9444 struct NoncurrentVersionExpirationDeserializer;
9445 impl NoncurrentVersionExpirationDeserializer {
9446     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<NoncurrentVersionExpiration, XmlParseError>9447     fn deserialize<T: Peek + Next>(
9448         tag_name: &str,
9449         stack: &mut T,
9450     ) -> Result<NoncurrentVersionExpiration, XmlParseError> {
9451         deserialize_elements::<_, NoncurrentVersionExpiration, _>(
9452             tag_name,
9453             stack,
9454             |name, stack, obj| {
9455                 match name {
9456                     "NoncurrentDays" => {
9457                         obj.noncurrent_days =
9458                             Some(DaysDeserializer::deserialize("NoncurrentDays", stack)?);
9459                     }
9460                     _ => skip_tree(stack),
9461                 }
9462                 Ok(())
9463             },
9464         )
9465     }
9466 }
9467 
9468 pub struct NoncurrentVersionExpirationSerializer;
9469 impl NoncurrentVersionExpirationSerializer {
9470     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &NoncurrentVersionExpiration, ) -> Result<(), xml::writer::Error> where W: Write,9471     pub fn serialize<W>(
9472         mut writer: &mut EventWriter<W>,
9473         name: &str,
9474         obj: &NoncurrentVersionExpiration,
9475     ) -> Result<(), xml::writer::Error>
9476     where
9477         W: Write,
9478     {
9479         writer.write(xml::writer::XmlEvent::start_element(name))?;
9480         if let Some(ref value) = obj.noncurrent_days {
9481             writer.write(xml::writer::XmlEvent::start_element("NoncurrentDays"))?;
9482             writer.write(xml::writer::XmlEvent::characters(&format!(
9483                 "{value}",
9484                 value = value
9485             )));
9486             writer.write(xml::writer::XmlEvent::end_element())?;
9487         }
9488         writer.write(xml::writer::XmlEvent::end_element())
9489     }
9490 }
9491 
9492 /// <p>Container for the transition rule that describes when noncurrent objects transition to the <code>STANDARD_IA</code>, <code>ONEZONE_IA</code>, <code>INTELLIGENT_TIERING</code>, <code>GLACIER</code>, or <code>DEEP_ARCHIVE</code> storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to the <code>STANDARD_IA</code>, <code>ONEZONE_IA</code>, <code>INTELLIGENT_TIERING</code>, <code>GLACIER</code>, or <code>DEEP_ARCHIVE</code> storage class at a specific period in the object's lifetime.</p>
9493 #[derive(Default, Debug, Clone, PartialEq)]
9494 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9495 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9496 pub struct NoncurrentVersionTransition {
9497     /// <p>Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations">How Amazon S3 Calculates How Long an Object Has Been Noncurrent</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
9498     pub noncurrent_days: Option<i64>,
9499     /// <p>The class of storage used to store the object.</p>
9500     pub storage_class: Option<String>,
9501 }
9502 
9503 #[allow(dead_code)]
9504 struct NoncurrentVersionTransitionDeserializer;
9505 impl NoncurrentVersionTransitionDeserializer {
9506     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<NoncurrentVersionTransition, XmlParseError>9507     fn deserialize<T: Peek + Next>(
9508         tag_name: &str,
9509         stack: &mut T,
9510     ) -> Result<NoncurrentVersionTransition, XmlParseError> {
9511         deserialize_elements::<_, NoncurrentVersionTransition, _>(
9512             tag_name,
9513             stack,
9514             |name, stack, obj| {
9515                 match name {
9516                     "NoncurrentDays" => {
9517                         obj.noncurrent_days =
9518                             Some(DaysDeserializer::deserialize("NoncurrentDays", stack)?);
9519                     }
9520                     "StorageClass" => {
9521                         obj.storage_class = Some(TransitionStorageClassDeserializer::deserialize(
9522                             "StorageClass",
9523                             stack,
9524                         )?);
9525                     }
9526                     _ => skip_tree(stack),
9527                 }
9528                 Ok(())
9529             },
9530         )
9531     }
9532 }
9533 
9534 pub struct NoncurrentVersionTransitionSerializer;
9535 impl NoncurrentVersionTransitionSerializer {
9536     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &NoncurrentVersionTransition, ) -> Result<(), xml::writer::Error> where W: Write,9537     pub fn serialize<W>(
9538         mut writer: &mut EventWriter<W>,
9539         name: &str,
9540         obj: &NoncurrentVersionTransition,
9541     ) -> Result<(), xml::writer::Error>
9542     where
9543         W: Write,
9544     {
9545         writer.write(xml::writer::XmlEvent::start_element(name))?;
9546         if let Some(ref value) = obj.noncurrent_days {
9547             writer.write(xml::writer::XmlEvent::start_element("NoncurrentDays"))?;
9548             writer.write(xml::writer::XmlEvent::characters(&format!(
9549                 "{value}",
9550                 value = value
9551             )));
9552             writer.write(xml::writer::XmlEvent::end_element())?;
9553         }
9554         if let Some(ref value) = obj.storage_class {
9555             writer.write(xml::writer::XmlEvent::start_element("StorageClass"))?;
9556             writer.write(xml::writer::XmlEvent::characters(&format!(
9557                 "{value}",
9558                 value = value
9559             )));
9560             writer.write(xml::writer::XmlEvent::end_element())?;
9561         }
9562         writer.write(xml::writer::XmlEvent::end_element())
9563     }
9564 }
9565 
9566 #[allow(dead_code)]
9567 struct NoncurrentVersionTransitionListDeserializer;
9568 impl NoncurrentVersionTransitionListDeserializer {
9569     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<NoncurrentVersionTransition>, XmlParseError>9570     fn deserialize<T: Peek + Next>(
9571         tag_name: &str,
9572         stack: &mut T,
9573     ) -> Result<Vec<NoncurrentVersionTransition>, XmlParseError> {
9574         let mut obj = vec![];
9575 
9576         loop {
9577             let consume_next_tag = match stack.peek() {
9578                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
9579                     name.local_name == tag_name
9580                 }
9581                 _ => false,
9582             };
9583 
9584             if consume_next_tag {
9585                 obj.push(NoncurrentVersionTransitionDeserializer::deserialize(
9586                     tag_name, stack,
9587                 )?);
9588             } else {
9589                 break;
9590             }
9591         }
9592 
9593         Ok(obj)
9594     }
9595 }
9596 
9597 pub struct NoncurrentVersionTransitionListSerializer;
9598 impl NoncurrentVersionTransitionListSerializer {
9599     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<NoncurrentVersionTransition>, ) -> Result<(), xml::writer::Error> where W: Write,9600     pub fn serialize<W>(
9601         mut writer: &mut EventWriter<W>,
9602         name: &str,
9603         obj: &Vec<NoncurrentVersionTransition>,
9604     ) -> Result<(), xml::writer::Error>
9605     where
9606         W: Write,
9607     {
9608         for element in obj {
9609             NoncurrentVersionTransitionSerializer::serialize(writer, name, element)?;
9610         }
9611         Ok(())
9612     }
9613 }
9614 
9615 /// <p>A container for specifying the notification configuration of the bucket. If this element is empty, notifications are turned off for the bucket.</p>
9616 #[derive(Default, Debug, Clone, PartialEq)]
9617 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9618 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9619 pub struct NotificationConfiguration {
9620     /// <p>Describes the AWS Lambda functions to invoke and the events for which to invoke them.</p>
9621     pub lambda_function_configurations: Option<Vec<LambdaFunctionConfiguration>>,
9622     /// <p>The Amazon Simple Queue Service queues to publish messages to and the events for which to publish messages.</p>
9623     pub queue_configurations: Option<Vec<QueueConfiguration>>,
9624     /// <p>The topic to which notifications are sent and the events for which notifications are generated.</p>
9625     pub topic_configurations: Option<Vec<TopicConfiguration>>,
9626 }
9627 
9628 #[allow(dead_code)]
9629 struct NotificationConfigurationDeserializer;
9630 impl NotificationConfigurationDeserializer {
9631     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<NotificationConfiguration, XmlParseError>9632     fn deserialize<T: Peek + Next>(
9633         tag_name: &str,
9634         stack: &mut T,
9635     ) -> Result<NotificationConfiguration, XmlParseError> {
9636         deserialize_elements::<_, NotificationConfiguration, _>(
9637             tag_name,
9638             stack,
9639             |name, stack, obj| {
9640                 match name {
9641                     "CloudFunctionConfiguration" => {
9642                         obj.lambda_function_configurations
9643                             .get_or_insert(vec![])
9644                             .extend(LambdaFunctionConfigurationListDeserializer::deserialize(
9645                                 "CloudFunctionConfiguration",
9646                                 stack,
9647                             )?);
9648                     }
9649                     "QueueConfiguration" => {
9650                         obj.queue_configurations.get_or_insert(vec![]).extend(
9651                             QueueConfigurationListDeserializer::deserialize(
9652                                 "QueueConfiguration",
9653                                 stack,
9654                             )?,
9655                         );
9656                     }
9657                     "TopicConfiguration" => {
9658                         obj.topic_configurations.get_or_insert(vec![]).extend(
9659                             TopicConfigurationListDeserializer::deserialize(
9660                                 "TopicConfiguration",
9661                                 stack,
9662                             )?,
9663                         );
9664                     }
9665                     _ => skip_tree(stack),
9666                 }
9667                 Ok(())
9668             },
9669         )
9670     }
9671 }
9672 
9673 pub struct NotificationConfigurationSerializer;
9674 impl NotificationConfigurationSerializer {
9675     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &NotificationConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,9676     pub fn serialize<W>(
9677         mut writer: &mut EventWriter<W>,
9678         name: &str,
9679         obj: &NotificationConfiguration,
9680     ) -> Result<(), xml::writer::Error>
9681     where
9682         W: Write,
9683     {
9684         writer.write(xml::writer::XmlEvent::start_element(name))?;
9685         if let Some(ref value) = obj.lambda_function_configurations {
9686             &LambdaFunctionConfigurationListSerializer::serialize(
9687                 &mut writer,
9688                 "CloudFunctionConfiguration",
9689                 value,
9690             )?;
9691         }
9692         if let Some(ref value) = obj.queue_configurations {
9693             &QueueConfigurationListSerializer::serialize(&mut writer, "QueueConfiguration", value)?;
9694         }
9695         if let Some(ref value) = obj.topic_configurations {
9696             &TopicConfigurationListSerializer::serialize(&mut writer, "TopicConfiguration", value)?;
9697         }
9698         writer.write(xml::writer::XmlEvent::end_element())
9699     }
9700 }
9701 
9702 #[derive(Default, Debug, Clone, PartialEq)]
9703 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9704 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9705 pub struct NotificationConfigurationDeprecated {
9706     /// <p>Container for specifying the AWS Lambda notification configuration.</p>
9707     pub cloud_function_configuration: Option<CloudFunctionConfiguration>,
9708     /// <p>This data type is deprecated. This data type specifies the configuration for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue when Amazon S3 detects specified events. </p>
9709     pub queue_configuration: Option<QueueConfigurationDeprecated>,
9710     /// <p>This data type is deprecated. A container for specifying the configuration for publication of messages to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events. </p>
9711     pub topic_configuration: Option<TopicConfigurationDeprecated>,
9712 }
9713 
9714 #[allow(dead_code)]
9715 struct NotificationConfigurationDeprecatedDeserializer;
9716 impl NotificationConfigurationDeprecatedDeserializer {
9717     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<NotificationConfigurationDeprecated, XmlParseError>9718     fn deserialize<T: Peek + Next>(
9719         tag_name: &str,
9720         stack: &mut T,
9721     ) -> Result<NotificationConfigurationDeprecated, XmlParseError> {
9722         deserialize_elements::<_, NotificationConfigurationDeprecated, _>(
9723             tag_name,
9724             stack,
9725             |name, stack, obj| {
9726                 match name {
9727                     "CloudFunctionConfiguration" => {
9728                         obj.cloud_function_configuration =
9729                             Some(CloudFunctionConfigurationDeserializer::deserialize(
9730                                 "CloudFunctionConfiguration",
9731                                 stack,
9732                             )?);
9733                     }
9734                     "QueueConfiguration" => {
9735                         obj.queue_configuration =
9736                             Some(QueueConfigurationDeprecatedDeserializer::deserialize(
9737                                 "QueueConfiguration",
9738                                 stack,
9739                             )?);
9740                     }
9741                     "TopicConfiguration" => {
9742                         obj.topic_configuration =
9743                             Some(TopicConfigurationDeprecatedDeserializer::deserialize(
9744                                 "TopicConfiguration",
9745                                 stack,
9746                             )?);
9747                     }
9748                     _ => skip_tree(stack),
9749                 }
9750                 Ok(())
9751             },
9752         )
9753     }
9754 }
9755 
9756 pub struct NotificationConfigurationDeprecatedSerializer;
9757 impl NotificationConfigurationDeprecatedSerializer {
9758     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &NotificationConfigurationDeprecated, ) -> Result<(), xml::writer::Error> where W: Write,9759     pub fn serialize<W>(
9760         mut writer: &mut EventWriter<W>,
9761         name: &str,
9762         obj: &NotificationConfigurationDeprecated,
9763     ) -> Result<(), xml::writer::Error>
9764     where
9765         W: Write,
9766     {
9767         writer.write(xml::writer::XmlEvent::start_element(name))?;
9768         if let Some(ref value) = obj.cloud_function_configuration {
9769             &CloudFunctionConfigurationSerializer::serialize(
9770                 &mut writer,
9771                 "CloudFunctionConfiguration",
9772                 value,
9773             )?;
9774         }
9775         if let Some(ref value) = obj.queue_configuration {
9776             &QueueConfigurationDeprecatedSerializer::serialize(
9777                 &mut writer,
9778                 "QueueConfiguration",
9779                 value,
9780             )?;
9781         }
9782         if let Some(ref value) = obj.topic_configuration {
9783             &TopicConfigurationDeprecatedSerializer::serialize(
9784                 &mut writer,
9785                 "TopicConfiguration",
9786                 value,
9787             )?;
9788         }
9789         writer.write(xml::writer::XmlEvent::end_element())
9790     }
9791 }
9792 
9793 /// <p>Specifies object key name filtering rules. For information about key name filtering, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html">Configuring Event Notifications</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
9794 #[derive(Default, Debug, Clone, PartialEq)]
9795 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9796 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9797 pub struct NotificationConfigurationFilter {
9798     pub key: Option<S3KeyFilter>,
9799 }
9800 
9801 #[allow(dead_code)]
9802 struct NotificationConfigurationFilterDeserializer;
9803 impl NotificationConfigurationFilterDeserializer {
9804     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<NotificationConfigurationFilter, XmlParseError>9805     fn deserialize<T: Peek + Next>(
9806         tag_name: &str,
9807         stack: &mut T,
9808     ) -> Result<NotificationConfigurationFilter, XmlParseError> {
9809         deserialize_elements::<_, NotificationConfigurationFilter, _>(
9810             tag_name,
9811             stack,
9812             |name, stack, obj| {
9813                 match name {
9814                     "S3Key" => {
9815                         obj.key = Some(S3KeyFilterDeserializer::deserialize("S3Key", stack)?);
9816                     }
9817                     _ => skip_tree(stack),
9818                 }
9819                 Ok(())
9820             },
9821         )
9822     }
9823 }
9824 
9825 pub struct NotificationConfigurationFilterSerializer;
9826 impl NotificationConfigurationFilterSerializer {
9827     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &NotificationConfigurationFilter, ) -> Result<(), xml::writer::Error> where W: Write,9828     pub fn serialize<W>(
9829         mut writer: &mut EventWriter<W>,
9830         name: &str,
9831         obj: &NotificationConfigurationFilter,
9832     ) -> Result<(), xml::writer::Error>
9833     where
9834         W: Write,
9835     {
9836         writer.write(xml::writer::XmlEvent::start_element(name))?;
9837         if let Some(ref value) = obj.key {
9838             &S3KeyFilterSerializer::serialize(&mut writer, "S3Key", value)?;
9839         }
9840         writer.write(xml::writer::XmlEvent::end_element())
9841     }
9842 }
9843 
9844 #[allow(dead_code)]
9845 struct NotificationIdDeserializer;
9846 impl NotificationIdDeserializer {
9847     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9848     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9849         start_element(tag_name, stack)?;
9850         let obj = characters(stack)?;
9851         end_element(tag_name, stack)?;
9852 
9853         Ok(obj)
9854     }
9855 }
9856 
9857 pub struct NotificationIdSerializer;
9858 impl NotificationIdSerializer {
9859     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,9860     pub fn serialize<W>(
9861         mut writer: &mut EventWriter<W>,
9862         name: &str,
9863         obj: &String,
9864     ) -> Result<(), xml::writer::Error>
9865     where
9866         W: Write,
9867     {
9868         writer.write(xml::writer::XmlEvent::start_element(name))?;
9869         writer.write(xml::writer::XmlEvent::characters(&format!(
9870             "{value}",
9871             value = obj.to_string()
9872         )))?;
9873         writer.write(xml::writer::XmlEvent::end_element())
9874     }
9875 }
9876 
9877 /// <p>An object consists of data and its descriptive metadata.</p>
9878 #[derive(Default, Debug, Clone, PartialEq)]
9879 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9880 pub struct Object {
9881     /// <p>The entity tag is an MD5 hash of the object. ETag reflects only changes to the contents of an object, not its metadata.</p>
9882     pub e_tag: Option<String>,
9883     /// <p>The name that you assign to an object. You use the object key to retrieve the object.</p>
9884     pub key: Option<String>,
9885     /// <p>The date the Object was Last Modified</p>
9886     pub last_modified: Option<String>,
9887     /// <p>The owner of the object</p>
9888     pub owner: Option<Owner>,
9889     /// <p>Size in bytes of the object</p>
9890     pub size: Option<i64>,
9891     /// <p>The class of storage used to store the object.</p>
9892     pub storage_class: Option<String>,
9893 }
9894 
9895 #[allow(dead_code)]
9896 struct ObjectDeserializer;
9897 impl ObjectDeserializer {
9898     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Object, XmlParseError>9899     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Object, XmlParseError> {
9900         deserialize_elements::<_, Object, _>(tag_name, stack, |name, stack, obj| {
9901             match name {
9902                 "ETag" => {
9903                     obj.e_tag = Some(ETagDeserializer::deserialize("ETag", stack)?);
9904                 }
9905                 "Key" => {
9906                     obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
9907                 }
9908                 "LastModified" => {
9909                     obj.last_modified = Some(LastModifiedDeserializer::deserialize(
9910                         "LastModified",
9911                         stack,
9912                     )?);
9913                 }
9914                 "Owner" => {
9915                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
9916                 }
9917                 "Size" => {
9918                     obj.size = Some(SizeDeserializer::deserialize("Size", stack)?);
9919                 }
9920                 "StorageClass" => {
9921                     obj.storage_class = Some(ObjectStorageClassDeserializer::deserialize(
9922                         "StorageClass",
9923                         stack,
9924                     )?);
9925                 }
9926                 _ => skip_tree(stack),
9927             }
9928             Ok(())
9929         })
9930     }
9931 }
9932 
9933 pub struct ObjectCannedACLSerializer;
9934 impl ObjectCannedACLSerializer {
9935     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,9936     pub fn serialize<W>(
9937         mut writer: &mut EventWriter<W>,
9938         name: &str,
9939         obj: &String,
9940     ) -> Result<(), xml::writer::Error>
9941     where
9942         W: Write,
9943     {
9944         writer.write(xml::writer::XmlEvent::start_element(name))?;
9945         writer.write(xml::writer::XmlEvent::characters(&format!(
9946             "{value}",
9947             value = obj.to_string()
9948         )))?;
9949         writer.write(xml::writer::XmlEvent::end_element())
9950     }
9951 }
9952 
9953 /// <p>Object Identifier is unique value to identify objects.</p>
9954 #[derive(Default, Debug, Clone, PartialEq)]
9955 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9956 pub struct ObjectIdentifier {
9957     /// <p>Key name of the object to delete.</p>
9958     pub key: String,
9959     /// <p>VersionId for the specific version of the object to delete.</p>
9960     pub version_id: Option<String>,
9961 }
9962 
9963 pub struct ObjectIdentifierSerializer;
9964 impl ObjectIdentifierSerializer {
9965     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ObjectIdentifier, ) -> Result<(), xml::writer::Error> where W: Write,9966     pub fn serialize<W>(
9967         mut writer: &mut EventWriter<W>,
9968         name: &str,
9969         obj: &ObjectIdentifier,
9970     ) -> Result<(), xml::writer::Error>
9971     where
9972         W: Write,
9973     {
9974         writer.write(xml::writer::XmlEvent::start_element(name))?;
9975         writer.write(xml::writer::XmlEvent::start_element("Key"))?;
9976         writer.write(xml::writer::XmlEvent::characters(&format!(
9977             "{value}",
9978             value = obj.key
9979         )))?;
9980         writer.write(xml::writer::XmlEvent::end_element())?;
9981         if let Some(ref value) = obj.version_id {
9982             writer.write(xml::writer::XmlEvent::start_element("VersionId"))?;
9983             writer.write(xml::writer::XmlEvent::characters(&format!(
9984                 "{value}",
9985                 value = value
9986             )));
9987             writer.write(xml::writer::XmlEvent::end_element())?;
9988         }
9989         writer.write(xml::writer::XmlEvent::end_element())
9990     }
9991 }
9992 
9993 pub struct ObjectIdentifierListSerializer;
9994 impl ObjectIdentifierListSerializer {
9995     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<ObjectIdentifier>, ) -> Result<(), xml::writer::Error> where W: Write,9996     pub fn serialize<W>(
9997         mut writer: &mut EventWriter<W>,
9998         name: &str,
9999         obj: &Vec<ObjectIdentifier>,
10000     ) -> Result<(), xml::writer::Error>
10001     where
10002         W: Write,
10003     {
10004         for element in obj {
10005             ObjectIdentifierSerializer::serialize(writer, name, element)?;
10006         }
10007         Ok(())
10008     }
10009 }
10010 
10011 #[allow(dead_code)]
10012 struct ObjectKeyDeserializer;
10013 impl ObjectKeyDeserializer {
10014     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10015     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10016         start_element(tag_name, stack)?;
10017         let obj = characters(stack)?;
10018         end_element(tag_name, stack)?;
10019 
10020         Ok(obj)
10021     }
10022 }
10023 
10024 pub struct ObjectKeySerializer;
10025 impl ObjectKeySerializer {
10026     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10027     pub fn serialize<W>(
10028         mut writer: &mut EventWriter<W>,
10029         name: &str,
10030         obj: &String,
10031     ) -> Result<(), xml::writer::Error>
10032     where
10033         W: Write,
10034     {
10035         writer.write(xml::writer::XmlEvent::start_element(name))?;
10036         writer.write(xml::writer::XmlEvent::characters(&format!(
10037             "{value}",
10038             value = obj.to_string()
10039         )))?;
10040         writer.write(xml::writer::XmlEvent::end_element())
10041     }
10042 }
10043 
10044 #[allow(dead_code)]
10045 struct ObjectListDeserializer;
10046 impl ObjectListDeserializer {
10047     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Object>, XmlParseError>10048     fn deserialize<T: Peek + Next>(
10049         tag_name: &str,
10050         stack: &mut T,
10051     ) -> Result<Vec<Object>, XmlParseError> {
10052         let mut obj = vec![];
10053 
10054         loop {
10055             let consume_next_tag = match stack.peek() {
10056                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
10057                     name.local_name == tag_name
10058                 }
10059                 _ => false,
10060             };
10061 
10062             if consume_next_tag {
10063                 obj.push(ObjectDeserializer::deserialize(tag_name, stack)?);
10064             } else {
10065                 break;
10066             }
10067         }
10068 
10069         Ok(obj)
10070     }
10071 }
10072 /// <p>The container element for Object Lock configuration parameters.</p>
10073 #[derive(Default, Debug, Clone, PartialEq)]
10074 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10075 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10076 pub struct ObjectLockConfiguration {
10077     /// <p>Indicates whether this bucket has an Object Lock configuration enabled.</p>
10078     pub object_lock_enabled: Option<String>,
10079     /// <p>The Object Lock rule in place for the specified object.</p>
10080     pub rule: Option<ObjectLockRule>,
10081 }
10082 
10083 #[allow(dead_code)]
10084 struct ObjectLockConfigurationDeserializer;
10085 impl ObjectLockConfigurationDeserializer {
10086     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ObjectLockConfiguration, XmlParseError>10087     fn deserialize<T: Peek + Next>(
10088         tag_name: &str,
10089         stack: &mut T,
10090     ) -> Result<ObjectLockConfiguration, XmlParseError> {
10091         deserialize_elements::<_, ObjectLockConfiguration, _>(
10092             tag_name,
10093             stack,
10094             |name, stack, obj| {
10095                 match name {
10096                     "ObjectLockEnabled" => {
10097                         obj.object_lock_enabled = Some(ObjectLockEnabledDeserializer::deserialize(
10098                             "ObjectLockEnabled",
10099                             stack,
10100                         )?);
10101                     }
10102                     "Rule" => {
10103                         obj.rule = Some(ObjectLockRuleDeserializer::deserialize("Rule", stack)?);
10104                     }
10105                     _ => skip_tree(stack),
10106                 }
10107                 Ok(())
10108             },
10109         )
10110     }
10111 }
10112 
10113 pub struct ObjectLockConfigurationSerializer;
10114 impl ObjectLockConfigurationSerializer {
10115     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ObjectLockConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,10116     pub fn serialize<W>(
10117         mut writer: &mut EventWriter<W>,
10118         name: &str,
10119         obj: &ObjectLockConfiguration,
10120     ) -> Result<(), xml::writer::Error>
10121     where
10122         W: Write,
10123     {
10124         writer.write(xml::writer::XmlEvent::start_element(name))?;
10125         if let Some(ref value) = obj.object_lock_enabled {
10126             writer.write(xml::writer::XmlEvent::start_element("ObjectLockEnabled"))?;
10127             writer.write(xml::writer::XmlEvent::characters(&format!(
10128                 "{value}",
10129                 value = value
10130             )));
10131             writer.write(xml::writer::XmlEvent::end_element())?;
10132         }
10133         if let Some(ref value) = obj.rule {
10134             &ObjectLockRuleSerializer::serialize(&mut writer, "Rule", value)?;
10135         }
10136         writer.write(xml::writer::XmlEvent::end_element())
10137     }
10138 }
10139 
10140 #[allow(dead_code)]
10141 struct ObjectLockEnabledDeserializer;
10142 impl ObjectLockEnabledDeserializer {
10143     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10144     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10145         start_element(tag_name, stack)?;
10146         let obj = characters(stack)?;
10147         end_element(tag_name, stack)?;
10148 
10149         Ok(obj)
10150     }
10151 }
10152 
10153 pub struct ObjectLockEnabledSerializer;
10154 impl ObjectLockEnabledSerializer {
10155     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10156     pub fn serialize<W>(
10157         mut writer: &mut EventWriter<W>,
10158         name: &str,
10159         obj: &String,
10160     ) -> Result<(), xml::writer::Error>
10161     where
10162         W: Write,
10163     {
10164         writer.write(xml::writer::XmlEvent::start_element(name))?;
10165         writer.write(xml::writer::XmlEvent::characters(&format!(
10166             "{value}",
10167             value = obj.to_string()
10168         )))?;
10169         writer.write(xml::writer::XmlEvent::end_element())
10170     }
10171 }
10172 
10173 /// <p>A Legal Hold configuration for an object.</p>
10174 #[derive(Default, Debug, Clone, PartialEq)]
10175 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10176 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10177 pub struct ObjectLockLegalHold {
10178     /// <p>Indicates whether the specified object has a Legal Hold in place.</p>
10179     pub status: Option<String>,
10180 }
10181 
10182 #[allow(dead_code)]
10183 struct ObjectLockLegalHoldDeserializer;
10184 impl ObjectLockLegalHoldDeserializer {
10185     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ObjectLockLegalHold, XmlParseError>10186     fn deserialize<T: Peek + Next>(
10187         tag_name: &str,
10188         stack: &mut T,
10189     ) -> Result<ObjectLockLegalHold, XmlParseError> {
10190         deserialize_elements::<_, ObjectLockLegalHold, _>(tag_name, stack, |name, stack, obj| {
10191             match name {
10192                 "Status" => {
10193                     obj.status = Some(ObjectLockLegalHoldStatusDeserializer::deserialize(
10194                         "Status", stack,
10195                     )?);
10196                 }
10197                 _ => skip_tree(stack),
10198             }
10199             Ok(())
10200         })
10201     }
10202 }
10203 
10204 pub struct ObjectLockLegalHoldSerializer;
10205 impl ObjectLockLegalHoldSerializer {
10206     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ObjectLockLegalHold, ) -> Result<(), xml::writer::Error> where W: Write,10207     pub fn serialize<W>(
10208         mut writer: &mut EventWriter<W>,
10209         name: &str,
10210         obj: &ObjectLockLegalHold,
10211     ) -> Result<(), xml::writer::Error>
10212     where
10213         W: Write,
10214     {
10215         writer.write(xml::writer::XmlEvent::start_element(name))?;
10216         if let Some(ref value) = obj.status {
10217             writer.write(xml::writer::XmlEvent::start_element("Status"))?;
10218             writer.write(xml::writer::XmlEvent::characters(&format!(
10219                 "{value}",
10220                 value = value
10221             )));
10222             writer.write(xml::writer::XmlEvent::end_element())?;
10223         }
10224         writer.write(xml::writer::XmlEvent::end_element())
10225     }
10226 }
10227 
10228 #[allow(dead_code)]
10229 struct ObjectLockLegalHoldStatusDeserializer;
10230 impl ObjectLockLegalHoldStatusDeserializer {
10231     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10232     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10233         start_element(tag_name, stack)?;
10234         let obj = characters(stack)?;
10235         end_element(tag_name, stack)?;
10236 
10237         Ok(obj)
10238     }
10239 }
10240 
10241 pub struct ObjectLockLegalHoldStatusSerializer;
10242 impl ObjectLockLegalHoldStatusSerializer {
10243     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10244     pub fn serialize<W>(
10245         mut writer: &mut EventWriter<W>,
10246         name: &str,
10247         obj: &String,
10248     ) -> Result<(), xml::writer::Error>
10249     where
10250         W: Write,
10251     {
10252         writer.write(xml::writer::XmlEvent::start_element(name))?;
10253         writer.write(xml::writer::XmlEvent::characters(&format!(
10254             "{value}",
10255             value = obj.to_string()
10256         )))?;
10257         writer.write(xml::writer::XmlEvent::end_element())
10258     }
10259 }
10260 
10261 /// <p>A Retention configuration for an object.</p>
10262 #[derive(Default, Debug, Clone, PartialEq)]
10263 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10264 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10265 pub struct ObjectLockRetention {
10266     /// <p>Indicates the Retention mode for the specified object.</p>
10267     pub mode: Option<String>,
10268     /// <p>The date on which this Object Lock Retention will expire.</p>
10269     pub retain_until_date: Option<String>,
10270 }
10271 
10272 #[allow(dead_code)]
10273 struct ObjectLockRetentionDeserializer;
10274 impl ObjectLockRetentionDeserializer {
10275     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ObjectLockRetention, XmlParseError>10276     fn deserialize<T: Peek + Next>(
10277         tag_name: &str,
10278         stack: &mut T,
10279     ) -> Result<ObjectLockRetention, XmlParseError> {
10280         deserialize_elements::<_, ObjectLockRetention, _>(tag_name, stack, |name, stack, obj| {
10281             match name {
10282                 "Mode" => {
10283                     obj.mode = Some(ObjectLockRetentionModeDeserializer::deserialize(
10284                         "Mode", stack,
10285                     )?);
10286                 }
10287                 "RetainUntilDate" => {
10288                     obj.retain_until_date =
10289                         Some(DateDeserializer::deserialize("RetainUntilDate", stack)?);
10290                 }
10291                 _ => skip_tree(stack),
10292             }
10293             Ok(())
10294         })
10295     }
10296 }
10297 
10298 pub struct ObjectLockRetentionSerializer;
10299 impl ObjectLockRetentionSerializer {
10300     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ObjectLockRetention, ) -> Result<(), xml::writer::Error> where W: Write,10301     pub fn serialize<W>(
10302         mut writer: &mut EventWriter<W>,
10303         name: &str,
10304         obj: &ObjectLockRetention,
10305     ) -> Result<(), xml::writer::Error>
10306     where
10307         W: Write,
10308     {
10309         writer.write(xml::writer::XmlEvent::start_element(name))?;
10310         if let Some(ref value) = obj.mode {
10311             writer.write(xml::writer::XmlEvent::start_element("Mode"))?;
10312             writer.write(xml::writer::XmlEvent::characters(&format!(
10313                 "{value}",
10314                 value = value
10315             )));
10316             writer.write(xml::writer::XmlEvent::end_element())?;
10317         }
10318         if let Some(ref value) = obj.retain_until_date {
10319             writer.write(xml::writer::XmlEvent::start_element("RetainUntilDate"))?;
10320             writer.write(xml::writer::XmlEvent::characters(&format!(
10321                 "{value}",
10322                 value = value
10323             )));
10324             writer.write(xml::writer::XmlEvent::end_element())?;
10325         }
10326         writer.write(xml::writer::XmlEvent::end_element())
10327     }
10328 }
10329 
10330 #[allow(dead_code)]
10331 struct ObjectLockRetentionModeDeserializer;
10332 impl ObjectLockRetentionModeDeserializer {
10333     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10334     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10335         start_element(tag_name, stack)?;
10336         let obj = characters(stack)?;
10337         end_element(tag_name, stack)?;
10338 
10339         Ok(obj)
10340     }
10341 }
10342 
10343 pub struct ObjectLockRetentionModeSerializer;
10344 impl ObjectLockRetentionModeSerializer {
10345     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10346     pub fn serialize<W>(
10347         mut writer: &mut EventWriter<W>,
10348         name: &str,
10349         obj: &String,
10350     ) -> Result<(), xml::writer::Error>
10351     where
10352         W: Write,
10353     {
10354         writer.write(xml::writer::XmlEvent::start_element(name))?;
10355         writer.write(xml::writer::XmlEvent::characters(&format!(
10356             "{value}",
10357             value = obj.to_string()
10358         )))?;
10359         writer.write(xml::writer::XmlEvent::end_element())
10360     }
10361 }
10362 
10363 /// <p>The container element for an Object Lock rule.</p>
10364 #[derive(Default, Debug, Clone, PartialEq)]
10365 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10366 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10367 pub struct ObjectLockRule {
10368     /// <p>The default retention period that you want to apply to new objects placed in the specified bucket.</p>
10369     pub default_retention: Option<DefaultRetention>,
10370 }
10371 
10372 #[allow(dead_code)]
10373 struct ObjectLockRuleDeserializer;
10374 impl ObjectLockRuleDeserializer {
10375     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ObjectLockRule, XmlParseError>10376     fn deserialize<T: Peek + Next>(
10377         tag_name: &str,
10378         stack: &mut T,
10379     ) -> Result<ObjectLockRule, XmlParseError> {
10380         deserialize_elements::<_, ObjectLockRule, _>(tag_name, stack, |name, stack, obj| {
10381             match name {
10382                 "DefaultRetention" => {
10383                     obj.default_retention = Some(DefaultRetentionDeserializer::deserialize(
10384                         "DefaultRetention",
10385                         stack,
10386                     )?);
10387                 }
10388                 _ => skip_tree(stack),
10389             }
10390             Ok(())
10391         })
10392     }
10393 }
10394 
10395 pub struct ObjectLockRuleSerializer;
10396 impl ObjectLockRuleSerializer {
10397     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ObjectLockRule, ) -> Result<(), xml::writer::Error> where W: Write,10398     pub fn serialize<W>(
10399         mut writer: &mut EventWriter<W>,
10400         name: &str,
10401         obj: &ObjectLockRule,
10402     ) -> Result<(), xml::writer::Error>
10403     where
10404         W: Write,
10405     {
10406         writer.write(xml::writer::XmlEvent::start_element(name))?;
10407         if let Some(ref value) = obj.default_retention {
10408             &DefaultRetentionSerializer::serialize(&mut writer, "DefaultRetention", value)?;
10409         }
10410         writer.write(xml::writer::XmlEvent::end_element())
10411     }
10412 }
10413 
10414 #[allow(dead_code)]
10415 struct ObjectStorageClassDeserializer;
10416 impl ObjectStorageClassDeserializer {
10417     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10418     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10419         start_element(tag_name, stack)?;
10420         let obj = characters(stack)?;
10421         end_element(tag_name, stack)?;
10422 
10423         Ok(obj)
10424     }
10425 }
10426 /// <p>The version of an object.</p>
10427 #[derive(Default, Debug, Clone, PartialEq)]
10428 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10429 pub struct ObjectVersion {
10430     /// <p>The entity tag is an MD5 hash of that version of the object.</p>
10431     pub e_tag: Option<String>,
10432     /// <p>Specifies whether the object is (true) or is not (false) the latest version of an object.</p>
10433     pub is_latest: Option<bool>,
10434     /// <p>The object key.</p>
10435     pub key: Option<String>,
10436     /// <p>Date and time the object was last modified.</p>
10437     pub last_modified: Option<String>,
10438     /// <p>Specifies the owner of the object.</p>
10439     pub owner: Option<Owner>,
10440     /// <p>Size in bytes of the object.</p>
10441     pub size: Option<i64>,
10442     /// <p>The class of storage used to store the object.</p>
10443     pub storage_class: Option<String>,
10444     /// <p>Version ID of an object.</p>
10445     pub version_id: Option<String>,
10446 }
10447 
10448 #[allow(dead_code)]
10449 struct ObjectVersionDeserializer;
10450 impl ObjectVersionDeserializer {
10451     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ObjectVersion, XmlParseError>10452     fn deserialize<T: Peek + Next>(
10453         tag_name: &str,
10454         stack: &mut T,
10455     ) -> Result<ObjectVersion, XmlParseError> {
10456         deserialize_elements::<_, ObjectVersion, _>(tag_name, stack, |name, stack, obj| {
10457             match name {
10458                 "ETag" => {
10459                     obj.e_tag = Some(ETagDeserializer::deserialize("ETag", stack)?);
10460                 }
10461                 "IsLatest" => {
10462                     obj.is_latest = Some(IsLatestDeserializer::deserialize("IsLatest", stack)?);
10463                 }
10464                 "Key" => {
10465                     obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
10466                 }
10467                 "LastModified" => {
10468                     obj.last_modified = Some(LastModifiedDeserializer::deserialize(
10469                         "LastModified",
10470                         stack,
10471                     )?);
10472                 }
10473                 "Owner" => {
10474                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
10475                 }
10476                 "Size" => {
10477                     obj.size = Some(SizeDeserializer::deserialize("Size", stack)?);
10478                 }
10479                 "StorageClass" => {
10480                     obj.storage_class = Some(ObjectVersionStorageClassDeserializer::deserialize(
10481                         "StorageClass",
10482                         stack,
10483                     )?);
10484                 }
10485                 "VersionId" => {
10486                     obj.version_id = Some(ObjectVersionIdDeserializer::deserialize(
10487                         "VersionId",
10488                         stack,
10489                     )?);
10490                 }
10491                 _ => skip_tree(stack),
10492             }
10493             Ok(())
10494         })
10495     }
10496 }
10497 #[allow(dead_code)]
10498 struct ObjectVersionIdDeserializer;
10499 impl ObjectVersionIdDeserializer {
10500     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10501     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10502         start_element(tag_name, stack)?;
10503         let obj = characters(stack)?;
10504         end_element(tag_name, stack)?;
10505 
10506         Ok(obj)
10507     }
10508 }
10509 
10510 pub struct ObjectVersionIdSerializer;
10511 impl ObjectVersionIdSerializer {
10512     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10513     pub fn serialize<W>(
10514         mut writer: &mut EventWriter<W>,
10515         name: &str,
10516         obj: &String,
10517     ) -> Result<(), xml::writer::Error>
10518     where
10519         W: Write,
10520     {
10521         writer.write(xml::writer::XmlEvent::start_element(name))?;
10522         writer.write(xml::writer::XmlEvent::characters(&format!(
10523             "{value}",
10524             value = obj.to_string()
10525         )))?;
10526         writer.write(xml::writer::XmlEvent::end_element())
10527     }
10528 }
10529 
10530 #[allow(dead_code)]
10531 struct ObjectVersionListDeserializer;
10532 impl ObjectVersionListDeserializer {
10533     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<ObjectVersion>, XmlParseError>10534     fn deserialize<T: Peek + Next>(
10535         tag_name: &str,
10536         stack: &mut T,
10537     ) -> Result<Vec<ObjectVersion>, XmlParseError> {
10538         let mut obj = vec![];
10539 
10540         loop {
10541             let consume_next_tag = match stack.peek() {
10542                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
10543                     name.local_name == tag_name
10544                 }
10545                 _ => false,
10546             };
10547 
10548             if consume_next_tag {
10549                 obj.push(ObjectVersionDeserializer::deserialize(tag_name, stack)?);
10550             } else {
10551                 break;
10552             }
10553         }
10554 
10555         Ok(obj)
10556     }
10557 }
10558 #[allow(dead_code)]
10559 struct ObjectVersionStorageClassDeserializer;
10560 impl ObjectVersionStorageClassDeserializer {
10561     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10562     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10563         start_element(tag_name, stack)?;
10564         let obj = characters(stack)?;
10565         end_element(tag_name, stack)?;
10566 
10567         Ok(obj)
10568     }
10569 }
10570 /// <p>Describes the location where the restore job's output is stored.</p>
10571 #[derive(Default, Debug, Clone, PartialEq)]
10572 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10573 pub struct OutputLocation {
10574     /// <p>Describes an S3 location that will receive the results of the restore request.</p>
10575     pub s3: Option<S3Location>,
10576 }
10577 
10578 pub struct OutputLocationSerializer;
10579 impl OutputLocationSerializer {
10580     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &OutputLocation, ) -> Result<(), xml::writer::Error> where W: Write,10581     pub fn serialize<W>(
10582         mut writer: &mut EventWriter<W>,
10583         name: &str,
10584         obj: &OutputLocation,
10585     ) -> Result<(), xml::writer::Error>
10586     where
10587         W: Write,
10588     {
10589         writer.write(xml::writer::XmlEvent::start_element(name))?;
10590         if let Some(ref value) = obj.s3 {
10591             &S3LocationSerializer::serialize(&mut writer, "S3", value)?;
10592         }
10593         writer.write(xml::writer::XmlEvent::end_element())
10594     }
10595 }
10596 
10597 /// <p>Describes how results of the Select job are serialized.</p>
10598 #[derive(Default, Debug, Clone, PartialEq)]
10599 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10600 pub struct OutputSerialization {
10601     /// <p>Describes the serialization of CSV-encoded Select results.</p>
10602     pub csv: Option<CSVOutput>,
10603     /// <p>Specifies JSON as request's output serialization format.</p>
10604     pub json: Option<JSONOutput>,
10605 }
10606 
10607 pub struct OutputSerializationSerializer;
10608 impl OutputSerializationSerializer {
10609     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &OutputSerialization, ) -> Result<(), xml::writer::Error> where W: Write,10610     pub fn serialize<W>(
10611         mut writer: &mut EventWriter<W>,
10612         name: &str,
10613         obj: &OutputSerialization,
10614     ) -> Result<(), xml::writer::Error>
10615     where
10616         W: Write,
10617     {
10618         writer.write(xml::writer::XmlEvent::start_element(name))?;
10619         if let Some(ref value) = obj.csv {
10620             &CSVOutputSerializer::serialize(&mut writer, "CSV", value)?;
10621         }
10622         if let Some(ref value) = obj.json {
10623             &JSONOutputSerializer::serialize(&mut writer, "JSON", value)?;
10624         }
10625         writer.write(xml::writer::XmlEvent::end_element())
10626     }
10627 }
10628 
10629 /// <p>Container for the owner's display name and ID.</p>
10630 #[derive(Default, Debug, Clone, PartialEq)]
10631 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10632 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10633 pub struct Owner {
10634     /// <p>Container for the display name of the owner.</p>
10635     pub display_name: Option<String>,
10636     /// <p>Container for the ID of the owner.</p>
10637     pub id: Option<String>,
10638 }
10639 
10640 #[allow(dead_code)]
10641 struct OwnerDeserializer;
10642 impl OwnerDeserializer {
10643     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Owner, XmlParseError>10644     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Owner, XmlParseError> {
10645         deserialize_elements::<_, Owner, _>(tag_name, stack, |name, stack, obj| {
10646             match name {
10647                 "DisplayName" => {
10648                     obj.display_name =
10649                         Some(DisplayNameDeserializer::deserialize("DisplayName", stack)?);
10650                 }
10651                 "ID" => {
10652                     obj.id = Some(IDDeserializer::deserialize("ID", stack)?);
10653                 }
10654                 _ => skip_tree(stack),
10655             }
10656             Ok(())
10657         })
10658     }
10659 }
10660 
10661 pub struct OwnerSerializer;
10662 impl OwnerSerializer {
10663     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Owner, ) -> Result<(), xml::writer::Error> where W: Write,10664     pub fn serialize<W>(
10665         mut writer: &mut EventWriter<W>,
10666         name: &str,
10667         obj: &Owner,
10668     ) -> Result<(), xml::writer::Error>
10669     where
10670         W: Write,
10671     {
10672         writer.write(xml::writer::XmlEvent::start_element(name))?;
10673         if let Some(ref value) = obj.display_name {
10674             writer.write(xml::writer::XmlEvent::start_element("DisplayName"))?;
10675             writer.write(xml::writer::XmlEvent::characters(&format!(
10676                 "{value}",
10677                 value = value
10678             )));
10679             writer.write(xml::writer::XmlEvent::end_element())?;
10680         }
10681         if let Some(ref value) = obj.id {
10682             writer.write(xml::writer::XmlEvent::start_element("ID"))?;
10683             writer.write(xml::writer::XmlEvent::characters(&format!(
10684                 "{value}",
10685                 value = value
10686             )));
10687             writer.write(xml::writer::XmlEvent::end_element())?;
10688         }
10689         writer.write(xml::writer::XmlEvent::end_element())
10690     }
10691 }
10692 
10693 #[allow(dead_code)]
10694 struct OwnerOverrideDeserializer;
10695 impl OwnerOverrideDeserializer {
10696     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10697     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10698         start_element(tag_name, stack)?;
10699         let obj = characters(stack)?;
10700         end_element(tag_name, stack)?;
10701 
10702         Ok(obj)
10703     }
10704 }
10705 
10706 pub struct OwnerOverrideSerializer;
10707 impl OwnerOverrideSerializer {
10708     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10709     pub fn serialize<W>(
10710         mut writer: &mut EventWriter<W>,
10711         name: &str,
10712         obj: &String,
10713     ) -> Result<(), xml::writer::Error>
10714     where
10715         W: Write,
10716     {
10717         writer.write(xml::writer::XmlEvent::start_element(name))?;
10718         writer.write(xml::writer::XmlEvent::characters(&format!(
10719             "{value}",
10720             value = obj.to_string()
10721         )))?;
10722         writer.write(xml::writer::XmlEvent::end_element())
10723     }
10724 }
10725 
10726 /// <p>Container for Parquet.</p>
10727 #[derive(Default, Debug, Clone, PartialEq)]
10728 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10729 pub struct ParquetInput {}
10730 
10731 pub struct ParquetInputSerializer;
10732 impl ParquetInputSerializer {
10733     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ParquetInput, ) -> Result<(), xml::writer::Error> where W: Write,10734     pub fn serialize<W>(
10735         mut writer: &mut EventWriter<W>,
10736         name: &str,
10737         obj: &ParquetInput,
10738     ) -> Result<(), xml::writer::Error>
10739     where
10740         W: Write,
10741     {
10742         writer.write(xml::writer::XmlEvent::start_element(name))?;
10743         writer.write(xml::writer::XmlEvent::end_element())
10744     }
10745 }
10746 
10747 /// <p>Container for elements related to a part.</p>
10748 #[derive(Default, Debug, Clone, PartialEq)]
10749 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10750 pub struct Part {
10751     /// <p>Entity tag returned when the part was uploaded.</p>
10752     pub e_tag: Option<String>,
10753     /// <p>Date and time at which the part was uploaded.</p>
10754     pub last_modified: Option<String>,
10755     /// <p>Part number identifying the part. This is a positive integer between 1 and 10,000.</p>
10756     pub part_number: Option<i64>,
10757     /// <p>Size in bytes of the uploaded part data.</p>
10758     pub size: Option<i64>,
10759 }
10760 
10761 #[allow(dead_code)]
10762 struct PartDeserializer;
10763 impl PartDeserializer {
10764     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Part, XmlParseError>10765     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Part, XmlParseError> {
10766         deserialize_elements::<_, Part, _>(tag_name, stack, |name, stack, obj| {
10767             match name {
10768                 "ETag" => {
10769                     obj.e_tag = Some(ETagDeserializer::deserialize("ETag", stack)?);
10770                 }
10771                 "LastModified" => {
10772                     obj.last_modified = Some(LastModifiedDeserializer::deserialize(
10773                         "LastModified",
10774                         stack,
10775                     )?);
10776                 }
10777                 "PartNumber" => {
10778                     obj.part_number =
10779                         Some(PartNumberDeserializer::deserialize("PartNumber", stack)?);
10780                 }
10781                 "Size" => {
10782                     obj.size = Some(SizeDeserializer::deserialize("Size", stack)?);
10783                 }
10784                 _ => skip_tree(stack),
10785             }
10786             Ok(())
10787         })
10788     }
10789 }
10790 #[allow(dead_code)]
10791 struct PartNumberDeserializer;
10792 impl PartNumberDeserializer {
10793     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>10794     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
10795         start_element(tag_name, stack)?;
10796         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
10797         end_element(tag_name, stack)?;
10798 
10799         Ok(obj)
10800     }
10801 }
10802 
10803 pub struct PartNumberSerializer;
10804 impl PartNumberSerializer {
10805     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,10806     pub fn serialize<W>(
10807         mut writer: &mut EventWriter<W>,
10808         name: &str,
10809         obj: &i64,
10810     ) -> Result<(), xml::writer::Error>
10811     where
10812         W: Write,
10813     {
10814         writer.write(xml::writer::XmlEvent::start_element(name))?;
10815         writer.write(xml::writer::XmlEvent::characters(&format!(
10816             "{value}",
10817             value = obj.to_string()
10818         )))?;
10819         writer.write(xml::writer::XmlEvent::end_element())
10820     }
10821 }
10822 
10823 #[allow(dead_code)]
10824 struct PartNumberMarkerDeserializer;
10825 impl PartNumberMarkerDeserializer {
10826     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>10827     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
10828         start_element(tag_name, stack)?;
10829         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
10830         end_element(tag_name, stack)?;
10831 
10832         Ok(obj)
10833     }
10834 }
10835 
10836 pub struct PartNumberMarkerSerializer;
10837 impl PartNumberMarkerSerializer {
10838     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,10839     pub fn serialize<W>(
10840         mut writer: &mut EventWriter<W>,
10841         name: &str,
10842         obj: &i64,
10843     ) -> Result<(), xml::writer::Error>
10844     where
10845         W: Write,
10846     {
10847         writer.write(xml::writer::XmlEvent::start_element(name))?;
10848         writer.write(xml::writer::XmlEvent::characters(&format!(
10849             "{value}",
10850             value = obj.to_string()
10851         )))?;
10852         writer.write(xml::writer::XmlEvent::end_element())
10853     }
10854 }
10855 
10856 #[allow(dead_code)]
10857 struct PartsDeserializer;
10858 impl PartsDeserializer {
10859     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Part>, XmlParseError>10860     fn deserialize<T: Peek + Next>(
10861         tag_name: &str,
10862         stack: &mut T,
10863     ) -> Result<Vec<Part>, XmlParseError> {
10864         let mut obj = vec![];
10865 
10866         loop {
10867             let consume_next_tag = match stack.peek() {
10868                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
10869                     name.local_name == tag_name
10870                 }
10871                 _ => false,
10872             };
10873 
10874             if consume_next_tag {
10875                 obj.push(PartDeserializer::deserialize(tag_name, stack)?);
10876             } else {
10877                 break;
10878             }
10879         }
10880 
10881         Ok(obj)
10882     }
10883 }
10884 #[allow(dead_code)]
10885 struct PayerDeserializer;
10886 impl PayerDeserializer {
10887     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10888     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10889         start_element(tag_name, stack)?;
10890         let obj = characters(stack)?;
10891         end_element(tag_name, stack)?;
10892 
10893         Ok(obj)
10894     }
10895 }
10896 
10897 pub struct PayerSerializer;
10898 impl PayerSerializer {
10899     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10900     pub fn serialize<W>(
10901         mut writer: &mut EventWriter<W>,
10902         name: &str,
10903         obj: &String,
10904     ) -> Result<(), xml::writer::Error>
10905     where
10906         W: Write,
10907     {
10908         writer.write(xml::writer::XmlEvent::start_element(name))?;
10909         writer.write(xml::writer::XmlEvent::characters(&format!(
10910             "{value}",
10911             value = obj.to_string()
10912         )))?;
10913         writer.write(xml::writer::XmlEvent::end_element())
10914     }
10915 }
10916 
10917 #[allow(dead_code)]
10918 struct PermissionDeserializer;
10919 impl PermissionDeserializer {
10920     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10921     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10922         start_element(tag_name, stack)?;
10923         let obj = characters(stack)?;
10924         end_element(tag_name, stack)?;
10925 
10926         Ok(obj)
10927     }
10928 }
10929 
10930 pub struct PermissionSerializer;
10931 impl PermissionSerializer {
10932     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10933     pub fn serialize<W>(
10934         mut writer: &mut EventWriter<W>,
10935         name: &str,
10936         obj: &String,
10937     ) -> Result<(), xml::writer::Error>
10938     where
10939         W: Write,
10940     {
10941         writer.write(xml::writer::XmlEvent::start_element(name))?;
10942         writer.write(xml::writer::XmlEvent::characters(&format!(
10943             "{value}",
10944             value = obj.to_string()
10945         )))?;
10946         writer.write(xml::writer::XmlEvent::end_element())
10947     }
10948 }
10949 
10950 /// <p>The container element for a bucket's policy status.</p>
10951 #[derive(Default, Debug, Clone, PartialEq)]
10952 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10953 pub struct PolicyStatus {
10954     /// <p>The policy status for this bucket. <code>TRUE</code> indicates that this bucket is public. <code>FALSE</code> indicates that the bucket is not public.</p>
10955     pub is_public: Option<bool>,
10956 }
10957 
10958 #[allow(dead_code)]
10959 struct PolicyStatusDeserializer;
10960 impl PolicyStatusDeserializer {
10961     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PolicyStatus, XmlParseError>10962     fn deserialize<T: Peek + Next>(
10963         tag_name: &str,
10964         stack: &mut T,
10965     ) -> Result<PolicyStatus, XmlParseError> {
10966         deserialize_elements::<_, PolicyStatus, _>(tag_name, stack, |name, stack, obj| {
10967             match name {
10968                 "IsPublic" => {
10969                     obj.is_public = Some(IsPublicDeserializer::deserialize("IsPublic", stack)?);
10970                 }
10971                 _ => skip_tree(stack),
10972             }
10973             Ok(())
10974         })
10975     }
10976 }
10977 #[allow(dead_code)]
10978 struct PrefixDeserializer;
10979 impl PrefixDeserializer {
10980     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10981     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10982         start_element(tag_name, stack)?;
10983         let obj = characters(stack)?;
10984         end_element(tag_name, stack)?;
10985 
10986         Ok(obj)
10987     }
10988 }
10989 
10990 pub struct PrefixSerializer;
10991 impl PrefixSerializer {
10992     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10993     pub fn serialize<W>(
10994         mut writer: &mut EventWriter<W>,
10995         name: &str,
10996         obj: &String,
10997     ) -> Result<(), xml::writer::Error>
10998     where
10999         W: Write,
11000     {
11001         writer.write(xml::writer::XmlEvent::start_element(name))?;
11002         writer.write(xml::writer::XmlEvent::characters(&format!(
11003             "{value}",
11004             value = obj.to_string()
11005         )))?;
11006         writer.write(xml::writer::XmlEvent::end_element())
11007     }
11008 }
11009 
11010 #[allow(dead_code)]
11011 struct PriorityDeserializer;
11012 impl PriorityDeserializer {
11013     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>11014     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
11015         start_element(tag_name, stack)?;
11016         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
11017         end_element(tag_name, stack)?;
11018 
11019         Ok(obj)
11020     }
11021 }
11022 
11023 pub struct PrioritySerializer;
11024 impl PrioritySerializer {
11025     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,11026     pub fn serialize<W>(
11027         mut writer: &mut EventWriter<W>,
11028         name: &str,
11029         obj: &i64,
11030     ) -> Result<(), xml::writer::Error>
11031     where
11032         W: Write,
11033     {
11034         writer.write(xml::writer::XmlEvent::start_element(name))?;
11035         writer.write(xml::writer::XmlEvent::characters(&format!(
11036             "{value}",
11037             value = obj.to_string()
11038         )))?;
11039         writer.write(xml::writer::XmlEvent::end_element())
11040     }
11041 }
11042 
11043 /// <p>This data type contains information about progress of an operation.</p>
11044 #[derive(Default, Debug, Clone, PartialEq)]
11045 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11046 pub struct Progress {
11047     /// <p>The current number of uncompressed object bytes processed.</p>
11048     pub bytes_processed: Option<i64>,
11049     /// <p>The current number of bytes of records payload data returned.</p>
11050     pub bytes_returned: Option<i64>,
11051     /// <p>The current number of object bytes scanned.</p>
11052     pub bytes_scanned: Option<i64>,
11053 }
11054 
11055 #[allow(dead_code)]
11056 struct ProgressDeserializer;
11057 impl ProgressDeserializer {
11058     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Progress, XmlParseError>11059     fn deserialize<T: Peek + Next>(
11060         tag_name: &str,
11061         stack: &mut T,
11062     ) -> Result<Progress, XmlParseError> {
11063         deserialize_elements::<_, Progress, _>(tag_name, stack, |name, stack, obj| {
11064             match name {
11065                 "BytesProcessed" => {
11066                     obj.bytes_processed = Some(BytesProcessedDeserializer::deserialize(
11067                         "BytesProcessed",
11068                         stack,
11069                     )?);
11070                 }
11071                 "BytesReturned" => {
11072                     obj.bytes_returned = Some(BytesReturnedDeserializer::deserialize(
11073                         "BytesReturned",
11074                         stack,
11075                     )?);
11076                 }
11077                 "BytesScanned" => {
11078                     obj.bytes_scanned = Some(BytesScannedDeserializer::deserialize(
11079                         "BytesScanned",
11080                         stack,
11081                     )?);
11082                 }
11083                 _ => skip_tree(stack),
11084             }
11085             Ok(())
11086         })
11087     }
11088 }
11089 /// <p>This data type contains information about the progress event of an operation.</p>
11090 #[derive(Default, Debug, Clone, PartialEq)]
11091 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11092 pub struct ProgressEvent {
11093     /// <p>The Progress event details.</p>
11094     pub details: Option<Progress>,
11095 }
11096 
11097 #[allow(dead_code)]
11098 struct ProgressEventDeserializer;
11099 impl ProgressEventDeserializer {
11100     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ProgressEvent, XmlParseError>11101     fn deserialize<T: Peek + Next>(
11102         tag_name: &str,
11103         stack: &mut T,
11104     ) -> Result<ProgressEvent, XmlParseError> {
11105         deserialize_elements::<_, ProgressEvent, _>(tag_name, stack, |name, stack, obj| {
11106             match name {
11107                 "Details" => {
11108                     obj.details = Some(ProgressDeserializer::deserialize("Details", stack)?);
11109                 }
11110                 _ => skip_tree(stack),
11111             }
11112             Ok(())
11113         })
11114     }
11115 }
11116 #[allow(dead_code)]
11117 struct ProtocolDeserializer;
11118 impl ProtocolDeserializer {
11119     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>11120     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
11121         start_element(tag_name, stack)?;
11122         let obj = characters(stack)?;
11123         end_element(tag_name, stack)?;
11124 
11125         Ok(obj)
11126     }
11127 }
11128 
11129 pub struct ProtocolSerializer;
11130 impl ProtocolSerializer {
11131     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,11132     pub fn serialize<W>(
11133         mut writer: &mut EventWriter<W>,
11134         name: &str,
11135         obj: &String,
11136     ) -> Result<(), xml::writer::Error>
11137     where
11138         W: Write,
11139     {
11140         writer.write(xml::writer::XmlEvent::start_element(name))?;
11141         writer.write(xml::writer::XmlEvent::characters(&format!(
11142             "{value}",
11143             value = obj.to_string()
11144         )))?;
11145         writer.write(xml::writer::XmlEvent::end_element())
11146     }
11147 }
11148 
11149 /// <p>The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can enable the configuration options in any combination. For more information about when Amazon S3 considers a bucket or object public, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status">The Meaning of "Public"</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. </p>
11150 #[derive(Default, Debug, Clone, PartialEq)]
11151 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11152 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11153 pub struct PublicAccessBlockConfiguration {
11154     /// <p>Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket and objects in this bucket. Setting this element to <code>TRUE</code> causes the following behavior:</p> <ul> <li> <p>PUT Bucket acl and PUT Object acl calls fail if the specified ACL is public.</p> </li> <li> <p>PUT Object calls fail if the request includes a public ACL.</p> </li> <li> <p>PUT Bucket calls fail if the request includes a public ACL.</p> </li> </ul> <p>Enabling this setting doesn't affect existing policies or ACLs.</p>
11155     pub block_public_acls: Option<bool>,
11156     /// <p>Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this element to <code>TRUE</code> causes Amazon S3 to reject calls to PUT Bucket policy if the specified bucket policy allows public access. </p> <p>Enabling this setting doesn't affect existing bucket policies.</p>
11157     pub block_public_policy: Option<bool>,
11158     /// <p>Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket. Setting this element to <code>TRUE</code> causes Amazon S3 to ignore all public ACLs on this bucket and objects in this bucket.</p> <p>Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set.</p>
11159     pub ignore_public_acls: Option<bool>,
11160     /// <p>Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting this element to <code>TRUE</code> restricts access to this bucket to only AWS services and authorized users within this account if the bucket has a public policy.</p> <p>Enabling this setting doesn't affect previously stored bucket policies, except that public and cross-account access within any public bucket policy, including non-public delegation to specific accounts, is blocked.</p>
11161     pub restrict_public_buckets: Option<bool>,
11162 }
11163 
11164 #[allow(dead_code)]
11165 struct PublicAccessBlockConfigurationDeserializer;
11166 impl PublicAccessBlockConfigurationDeserializer {
11167     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PublicAccessBlockConfiguration, XmlParseError>11168     fn deserialize<T: Peek + Next>(
11169         tag_name: &str,
11170         stack: &mut T,
11171     ) -> Result<PublicAccessBlockConfiguration, XmlParseError> {
11172         deserialize_elements::<_, PublicAccessBlockConfiguration, _>(
11173             tag_name,
11174             stack,
11175             |name, stack, obj| {
11176                 match name {
11177                     "BlockPublicAcls" => {
11178                         obj.block_public_acls =
11179                             Some(SettingDeserializer::deserialize("BlockPublicAcls", stack)?);
11180                     }
11181                     "BlockPublicPolicy" => {
11182                         obj.block_public_policy = Some(SettingDeserializer::deserialize(
11183                             "BlockPublicPolicy",
11184                             stack,
11185                         )?);
11186                     }
11187                     "IgnorePublicAcls" => {
11188                         obj.ignore_public_acls =
11189                             Some(SettingDeserializer::deserialize("IgnorePublicAcls", stack)?);
11190                     }
11191                     "RestrictPublicBuckets" => {
11192                         obj.restrict_public_buckets = Some(SettingDeserializer::deserialize(
11193                             "RestrictPublicBuckets",
11194                             stack,
11195                         )?);
11196                     }
11197                     _ => skip_tree(stack),
11198                 }
11199                 Ok(())
11200             },
11201         )
11202     }
11203 }
11204 
11205 pub struct PublicAccessBlockConfigurationSerializer;
11206 impl PublicAccessBlockConfigurationSerializer {
11207     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &PublicAccessBlockConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,11208     pub fn serialize<W>(
11209         mut writer: &mut EventWriter<W>,
11210         name: &str,
11211         obj: &PublicAccessBlockConfiguration,
11212     ) -> Result<(), xml::writer::Error>
11213     where
11214         W: Write,
11215     {
11216         writer.write(xml::writer::XmlEvent::start_element(name))?;
11217         if let Some(ref value) = obj.block_public_acls {
11218             writer.write(xml::writer::XmlEvent::start_element("BlockPublicAcls"))?;
11219             writer.write(xml::writer::XmlEvent::characters(&format!(
11220                 "{value}",
11221                 value = value
11222             )));
11223             writer.write(xml::writer::XmlEvent::end_element())?;
11224         }
11225         if let Some(ref value) = obj.block_public_policy {
11226             writer.write(xml::writer::XmlEvent::start_element("BlockPublicPolicy"))?;
11227             writer.write(xml::writer::XmlEvent::characters(&format!(
11228                 "{value}",
11229                 value = value
11230             )));
11231             writer.write(xml::writer::XmlEvent::end_element())?;
11232         }
11233         if let Some(ref value) = obj.ignore_public_acls {
11234             writer.write(xml::writer::XmlEvent::start_element("IgnorePublicAcls"))?;
11235             writer.write(xml::writer::XmlEvent::characters(&format!(
11236                 "{value}",
11237                 value = value
11238             )));
11239             writer.write(xml::writer::XmlEvent::end_element())?;
11240         }
11241         if let Some(ref value) = obj.restrict_public_buckets {
11242             writer.write(xml::writer::XmlEvent::start_element(
11243                 "RestrictPublicBuckets",
11244             ))?;
11245             writer.write(xml::writer::XmlEvent::characters(&format!(
11246                 "{value}",
11247                 value = value
11248             )));
11249             writer.write(xml::writer::XmlEvent::end_element())?;
11250         }
11251         writer.write(xml::writer::XmlEvent::end_element())
11252     }
11253 }
11254 
11255 #[derive(Default, Debug, Clone, PartialEq)]
11256 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11257 pub struct PutBucketAccelerateConfigurationRequest {
11258     /// <p>Container for setting the transfer acceleration state.</p>
11259     pub accelerate_configuration: AccelerateConfiguration,
11260     /// <p>Name of the bucket for which the accelerate configuration is set.</p>
11261     pub bucket: String,
11262 }
11263 
11264 #[derive(Default, Debug, Clone, PartialEq)]
11265 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11266 pub struct PutBucketAclRequest {
11267     /// <p>The canned ACL to apply to the bucket.</p>
11268     pub acl: Option<String>,
11269     /// <p>Contains the elements that set the ACL permissions for an object per grantee.</p>
11270     pub access_control_policy: Option<AccessControlPolicy>,
11271     /// <p>The bucket to which to apply the ACL.</p>
11272     pub bucket: String,
11273     /// <p>The base64-encoded 128-bit MD5 digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864.</a> </p>
11274     pub content_md5: Option<String>,
11275     /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p>
11276     pub grant_full_control: Option<String>,
11277     /// <p>Allows grantee to list the objects in the bucket.</p>
11278     pub grant_read: Option<String>,
11279     /// <p>Allows grantee to read the bucket ACL.</p>
11280     pub grant_read_acp: Option<String>,
11281     /// <p>Allows grantee to create, overwrite, and delete any object in the bucket.</p>
11282     pub grant_write: Option<String>,
11283     /// <p>Allows grantee to write the ACL for the applicable bucket.</p>
11284     pub grant_write_acp: Option<String>,
11285 }
11286 
11287 #[derive(Default, Debug, Clone, PartialEq)]
11288 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11289 pub struct PutBucketAnalyticsConfigurationRequest {
11290     /// <p>The configuration and any analyses for the analytics filter.</p>
11291     pub analytics_configuration: AnalyticsConfiguration,
11292     /// <p>The name of the bucket to which an analytics configuration is stored.</p>
11293     pub bucket: String,
11294     /// <p>The ID that identifies the analytics configuration.</p>
11295     pub id: String,
11296 }
11297 
11298 #[derive(Default, Debug, Clone, PartialEq)]
11299 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11300 pub struct PutBucketCorsRequest {
11301     /// <p>Specifies the bucket impacted by the <code>cors</code>configuration.</p>
11302     pub bucket: String,
11303     /// <p>Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//cors.html">Enabling Cross-Origin Resource Sharing</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
11304     pub cors_configuration: CORSConfiguration,
11305     /// <p>The base64-encoded 128-bit MD5 digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864.</a> </p>
11306     pub content_md5: Option<String>,
11307 }
11308 
11309 #[derive(Default, Debug, Clone, PartialEq)]
11310 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11311 pub struct PutBucketEncryptionRequest {
11312     /// <p>Specifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3) or customer master keys stored in AWS KMS (SSE-KMS). For information about the Amazon S3 default encryption feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html">Amazon S3 Default Bucket Encryption</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
11313     pub bucket: String,
11314     /// <p>The base64-encoded 128-bit MD5 digest of the server-side encryption configuration. This parameter is auto-populated when using the command from the CLI.</p>
11315     pub content_md5: Option<String>,
11316     pub server_side_encryption_configuration: ServerSideEncryptionConfiguration,
11317 }
11318 
11319 #[derive(Default, Debug, Clone, PartialEq)]
11320 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11321 pub struct PutBucketInventoryConfigurationRequest {
11322     /// <p>The name of the bucket where the inventory configuration will be stored.</p>
11323     pub bucket: String,
11324     /// <p>The ID used to identify the inventory configuration.</p>
11325     pub id: String,
11326     /// <p>Specifies the inventory configuration.</p>
11327     pub inventory_configuration: InventoryConfiguration,
11328 }
11329 
11330 #[derive(Default, Debug, Clone, PartialEq)]
11331 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11332 pub struct PutBucketLifecycleConfigurationRequest {
11333     /// <p>The name of the bucket for which to set the configuration.</p>
11334     pub bucket: String,
11335     /// <p>Container for lifecycle rules. You can add as many as 1,000 rules.</p>
11336     pub lifecycle_configuration: Option<BucketLifecycleConfiguration>,
11337 }
11338 
11339 #[derive(Default, Debug, Clone, PartialEq)]
11340 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11341 pub struct PutBucketLifecycleRequest {
11342     /// <p><p/></p>
11343     pub bucket: String,
11344     /// <p><p/></p>
11345     pub content_md5: Option<String>,
11346     /// <p><p/></p>
11347     pub lifecycle_configuration: Option<LifecycleConfiguration>,
11348 }
11349 
11350 #[derive(Default, Debug, Clone, PartialEq)]
11351 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11352 pub struct PutBucketLoggingRequest {
11353     /// <p>The name of the bucket for which to set the logging parameters.</p>
11354     pub bucket: String,
11355     /// <p>Container for logging status information.</p>
11356     pub bucket_logging_status: BucketLoggingStatus,
11357     /// <p>The MD5 hash of the <code>PutBucketLogging</code> request body.</p>
11358     pub content_md5: Option<String>,
11359 }
11360 
11361 #[derive(Default, Debug, Clone, PartialEq)]
11362 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11363 pub struct PutBucketMetricsConfigurationRequest {
11364     /// <p>The name of the bucket for which the metrics configuration is set.</p>
11365     pub bucket: String,
11366     /// <p>The ID used to identify the metrics configuration.</p>
11367     pub id: String,
11368     /// <p>Specifies the metrics configuration.</p>
11369     pub metrics_configuration: MetricsConfiguration,
11370 }
11371 
11372 #[derive(Default, Debug, Clone, PartialEq)]
11373 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11374 pub struct PutBucketNotificationConfigurationRequest {
11375     /// <p>The name of the bucket.</p>
11376     pub bucket: String,
11377     pub notification_configuration: NotificationConfiguration,
11378 }
11379 
11380 #[derive(Default, Debug, Clone, PartialEq)]
11381 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11382 pub struct PutBucketNotificationRequest {
11383     /// <p>The name of the bucket.</p>
11384     pub bucket: String,
11385     /// <p>The MD5 hash of the <code>PutPublicAccessBlock</code> request body.</p>
11386     pub content_md5: Option<String>,
11387     /// <p>The container for the configuration.</p>
11388     pub notification_configuration: NotificationConfigurationDeprecated,
11389 }
11390 
11391 #[derive(Default, Debug, Clone, PartialEq)]
11392 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11393 pub struct PutBucketPolicyRequest {
11394     /// <p>The name of the bucket.</p>
11395     pub bucket: String,
11396     /// <p>Set this parameter to true to confirm that you want to remove your permissions to change this bucket policy in the future.</p>
11397     pub confirm_remove_self_bucket_access: Option<bool>,
11398     /// <p>The MD5 hash of the request body.</p>
11399     pub content_md5: Option<String>,
11400     /// <p>The bucket policy as a JSON document.</p>
11401     pub policy: String,
11402 }
11403 
11404 #[derive(Default, Debug, Clone, PartialEq)]
11405 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11406 pub struct PutBucketReplicationRequest {
11407     /// <p>The name of the bucket</p>
11408     pub bucket: String,
11409     /// <p>The base64-encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p>
11410     pub content_md5: Option<String>,
11411     pub replication_configuration: ReplicationConfiguration,
11412     /// <p><p/></p>
11413     pub token: Option<String>,
11414 }
11415 
11416 #[derive(Default, Debug, Clone, PartialEq)]
11417 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11418 pub struct PutBucketRequestPaymentRequest {
11419     /// <p>The bucket name.</p>
11420     pub bucket: String,
11421     /// <p>&gt;The base64-encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p>
11422     pub content_md5: Option<String>,
11423     /// <p>Container for Payer.</p>
11424     pub request_payment_configuration: RequestPaymentConfiguration,
11425 }
11426 
11427 #[derive(Default, Debug, Clone, PartialEq)]
11428 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11429 pub struct PutBucketTaggingRequest {
11430     /// <p>The bucket name.</p>
11431     pub bucket: String,
11432     /// <p>The base64-encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p>
11433     pub content_md5: Option<String>,
11434     /// <p>Container for the <code>TagSet</code> and <code>Tag</code> elements.</p>
11435     pub tagging: Tagging,
11436 }
11437 
11438 #[derive(Default, Debug, Clone, PartialEq)]
11439 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11440 pub struct PutBucketVersioningRequest {
11441     /// <p>The bucket name.</p>
11442     pub bucket: String,
11443     /// <p>&gt;The base64-encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p>
11444     pub content_md5: Option<String>,
11445     /// <p>The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.</p>
11446     pub mfa: Option<String>,
11447     /// <p>Container for setting the versioning state.</p>
11448     pub versioning_configuration: VersioningConfiguration,
11449 }
11450 
11451 #[derive(Default, Debug, Clone, PartialEq)]
11452 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11453 pub struct PutBucketWebsiteRequest {
11454     /// <p>The bucket name.</p>
11455     pub bucket: String,
11456     /// <p>The base64-encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p>
11457     pub content_md5: Option<String>,
11458     /// <p>Container for the request.</p>
11459     pub website_configuration: WebsiteConfiguration,
11460 }
11461 
11462 #[derive(Default, Debug, Clone, PartialEq)]
11463 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11464 pub struct PutObjectAclOutput {
11465     pub request_charged: Option<String>,
11466 }
11467 
11468 #[allow(dead_code)]
11469 struct PutObjectAclOutputDeserializer;
11470 impl PutObjectAclOutputDeserializer {
11471     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PutObjectAclOutput, XmlParseError>11472     fn deserialize<T: Peek + Next>(
11473         tag_name: &str,
11474         stack: &mut T,
11475     ) -> Result<PutObjectAclOutput, XmlParseError> {
11476         start_element(tag_name, stack)?;
11477 
11478         let obj = PutObjectAclOutput::default();
11479 
11480         end_element(tag_name, stack)?;
11481 
11482         Ok(obj)
11483     }
11484 }
11485 #[derive(Default, Debug, Clone, PartialEq)]
11486 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11487 pub struct PutObjectAclRequest {
11488     /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p>
11489     pub acl: Option<String>,
11490     /// <p>Contains the elements that set the ACL permissions for an object per grantee.</p>
11491     pub access_control_policy: Option<AccessControlPolicy>,
11492     /// <p>The bucket name that contains the object to which you want to attach the ACL. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
11493     pub bucket: String,
11494     /// <p>The base64-encoded 128-bit MD5 digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864.&gt;</a> </p>
11495     pub content_md5: Option<String>,
11496     /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p>
11497     pub grant_full_control: Option<String>,
11498     /// <p>Allows grantee to list the objects in the bucket.</p>
11499     pub grant_read: Option<String>,
11500     /// <p>Allows grantee to read the bucket ACL.</p>
11501     pub grant_read_acp: Option<String>,
11502     /// <p>Allows grantee to create, overwrite, and delete any object in the bucket.</p>
11503     pub grant_write: Option<String>,
11504     /// <p>Allows grantee to write the ACL for the applicable bucket.</p>
11505     pub grant_write_acp: Option<String>,
11506     /// <p>Key for which the PUT operation was initiated.</p>
11507     pub key: String,
11508     pub request_payer: Option<String>,
11509     /// <p>VersionId used to reference a specific version of the object.</p>
11510     pub version_id: Option<String>,
11511 }
11512 
11513 #[derive(Default, Debug, Clone, PartialEq)]
11514 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11515 pub struct PutObjectLegalHoldOutput {
11516     pub request_charged: Option<String>,
11517 }
11518 
11519 #[allow(dead_code)]
11520 struct PutObjectLegalHoldOutputDeserializer;
11521 impl PutObjectLegalHoldOutputDeserializer {
11522     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PutObjectLegalHoldOutput, XmlParseError>11523     fn deserialize<T: Peek + Next>(
11524         tag_name: &str,
11525         stack: &mut T,
11526     ) -> Result<PutObjectLegalHoldOutput, XmlParseError> {
11527         start_element(tag_name, stack)?;
11528 
11529         let obj = PutObjectLegalHoldOutput::default();
11530 
11531         end_element(tag_name, stack)?;
11532 
11533         Ok(obj)
11534     }
11535 }
11536 #[derive(Default, Debug, Clone, PartialEq)]
11537 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11538 pub struct PutObjectLegalHoldRequest {
11539     /// <p>The bucket name containing the object that you want to place a Legal Hold on. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
11540     pub bucket: String,
11541     /// <p>The MD5 hash for the request body.</p>
11542     pub content_md5: Option<String>,
11543     /// <p>The key name for the object that you want to place a Legal Hold on.</p>
11544     pub key: String,
11545     /// <p>Container element for the Legal Hold configuration you want to apply to the specified object.</p>
11546     pub legal_hold: Option<ObjectLockLegalHold>,
11547     pub request_payer: Option<String>,
11548     /// <p>The version ID of the object that you want to place a Legal Hold on.</p>
11549     pub version_id: Option<String>,
11550 }
11551 
11552 #[derive(Default, Debug, Clone, PartialEq)]
11553 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11554 pub struct PutObjectLockConfigurationOutput {
11555     pub request_charged: Option<String>,
11556 }
11557 
11558 #[allow(dead_code)]
11559 struct PutObjectLockConfigurationOutputDeserializer;
11560 impl PutObjectLockConfigurationOutputDeserializer {
11561     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PutObjectLockConfigurationOutput, XmlParseError>11562     fn deserialize<T: Peek + Next>(
11563         tag_name: &str,
11564         stack: &mut T,
11565     ) -> Result<PutObjectLockConfigurationOutput, XmlParseError> {
11566         start_element(tag_name, stack)?;
11567 
11568         let obj = PutObjectLockConfigurationOutput::default();
11569 
11570         end_element(tag_name, stack)?;
11571 
11572         Ok(obj)
11573     }
11574 }
11575 #[derive(Default, Debug, Clone, PartialEq)]
11576 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11577 pub struct PutObjectLockConfigurationRequest {
11578     /// <p>The bucket whose Object Lock configuration you want to create or replace.</p>
11579     pub bucket: String,
11580     /// <p>The MD5 hash for the request body.</p>
11581     pub content_md5: Option<String>,
11582     /// <p>The Object Lock configuration that you want to apply to the specified bucket.</p>
11583     pub object_lock_configuration: Option<ObjectLockConfiguration>,
11584     pub request_payer: Option<String>,
11585     /// <p>A token to allow Object Lock to be enabled for an existing bucket.</p>
11586     pub token: Option<String>,
11587 }
11588 
11589 #[derive(Default, Debug, Clone, PartialEq)]
11590 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11591 pub struct PutObjectOutput {
11592     /// <p>Entity tag for the uploaded object.</p>
11593     pub e_tag: Option<String>,
11594     /// <p> If the expiration is configured for the object (see <a>PutBucketLifecycleConfiguration</a>), the response includes this header. It includes the expiry-date and rule-id key-value pairs that provide information about object expiration. The value of the rule-id is URL encoded.</p>
11595     pub expiration: Option<String>,
11596     pub request_charged: Option<String>,
11597     /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.</p>
11598     pub sse_customer_algorithm: Option<String>,
11599     /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.</p>
11600     pub sse_customer_key_md5: Option<String>,
11601     /// <p>If present, specifies the AWS KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
11602     pub ssekms_encryption_context: Option<String>,
11603     /// <p>If <code>x-amz-server-side-encryption</code> is present and has the value of <code>aws:kms</code>, this header specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) that was used for the object. </p>
11604     pub ssekms_key_id: Option<String>,
11605     /// <p>If you specified server-side encryption either with an AWS KMS customer master key (CMK) or Amazon S3-managed encryption key in your PUT request, the response includes this header. It confirms the encryption algorithm that Amazon S3 used to encrypt the object.</p>
11606     pub server_side_encryption: Option<String>,
11607     /// <p>Version of the object.</p>
11608     pub version_id: Option<String>,
11609 }
11610 
11611 #[allow(dead_code)]
11612 struct PutObjectOutputDeserializer;
11613 impl PutObjectOutputDeserializer {
11614     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PutObjectOutput, XmlParseError>11615     fn deserialize<T: Peek + Next>(
11616         tag_name: &str,
11617         stack: &mut T,
11618     ) -> Result<PutObjectOutput, XmlParseError> {
11619         start_element(tag_name, stack)?;
11620 
11621         let obj = PutObjectOutput::default();
11622 
11623         end_element(tag_name, stack)?;
11624 
11625         Ok(obj)
11626     }
11627 }
11628 #[derive(Default, Debug)]
11629 pub struct PutObjectRequest {
11630     /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p>
11631     pub acl: Option<String>,
11632     /// <p>Object data.</p>
11633     pub body: Option<StreamingBody>,
11634     /// <p>Bucket name to which the PUT operation was initiated. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
11635     pub bucket: String,
11636     /// <p> Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
11637     pub cache_control: Option<String>,
11638     /// <p>Specifies presentational information for the object. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1">http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1</a>.</p>
11639     pub content_disposition: Option<String>,
11640     /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11</a>.</p>
11641     pub content_encoding: Option<String>,
11642     /// <p>The language the content is in.</p>
11643     pub content_language: Option<String>,
11644     /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13</a>.</p>
11645     pub content_length: Option<i64>,
11646     /// <p>The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p>
11647     pub content_md5: Option<String>,
11648     /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17</a>.</p>
11649     pub content_type: Option<String>,
11650     /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21</a>.</p>
11651     pub expires: Option<String>,
11652     /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p>
11653     pub grant_full_control: Option<String>,
11654     /// <p>Allows grantee to read the object data and its metadata.</p>
11655     pub grant_read: Option<String>,
11656     /// <p>Allows grantee to read the object ACL.</p>
11657     pub grant_read_acp: Option<String>,
11658     /// <p>Allows grantee to write the ACL for the applicable object.</p>
11659     pub grant_write_acp: Option<String>,
11660     /// <p>Object key for which the PUT operation was initiated.</p>
11661     pub key: String,
11662     /// <p>A map of metadata to store with the object in S3.</p>
11663     pub metadata: Option<::std::collections::HashMap<String, String>>,
11664     /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a>.</p>
11665     pub object_lock_legal_hold_status: Option<String>,
11666     /// <p>The Object Lock mode that you want to apply to this object.</p>
11667     pub object_lock_mode: Option<String>,
11668     /// <p>The date and time when you want this object's Object Lock to expire.</p>
11669     pub object_lock_retain_until_date: Option<String>,
11670     pub request_payer: Option<String>,
11671     /// <p>Specifies the algorithm to use to when encrypting the object (for example, AES256).</p>
11672     pub sse_customer_algorithm: Option<String>,
11673     /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side​-encryption​-customer-algorithm</code> header.</p>
11674     pub sse_customer_key: Option<String>,
11675     /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
11676     pub sse_customer_key_md5: Option<String>,
11677     /// <p>Specifies the AWS KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
11678     pub ssekms_encryption_context: Option<String>,
11679     /// <p>If <code>x-amz-server-side-encryption</code> is present and has the value of <code>aws:kms</code>, this header specifies the ID of the AWS Key Management Service (AWS KMS) symmetrical customer managed customer master key (CMK) that was used for the object.</p> <p> If the value of <code>x-amz-server-side-encryption</code> is <code>aws:kms</code>, this header specifies the ID of the symmetric customer managed AWS KMS CMK that will be used for the object. If you specify <code>x-amz-server-side-encryption:aws:kms</code>, but do not provide<code> x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the AWS managed CMK in AWS to protect the data.</p>
11680     pub ssekms_key_id: Option<String>,
11681     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
11682     pub server_side_encryption: Option<String>,
11683     /// <p>If you don't specify, Standard is the default storage class. Amazon S3 supports other storage classes.</p>
11684     pub storage_class: Option<String>,
11685     /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p>
11686     pub tagging: Option<String>,
11687     /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a>.</p> <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p> <p> <code>x-amz-website-redirect-location: /anotherPage.html</code> </p> <p>In the following example, the request header sets the object redirect to another website:</p> <p> <code>x-amz-website-redirect-location: http://www.example.com/</code> </p> <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a>. </p>
11688     pub website_redirect_location: Option<String>,
11689 }
11690 
11691 #[derive(Default, Debug, Clone, PartialEq)]
11692 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11693 pub struct PutObjectRetentionOutput {
11694     pub request_charged: Option<String>,
11695 }
11696 
11697 #[allow(dead_code)]
11698 struct PutObjectRetentionOutputDeserializer;
11699 impl PutObjectRetentionOutputDeserializer {
11700     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PutObjectRetentionOutput, XmlParseError>11701     fn deserialize<T: Peek + Next>(
11702         tag_name: &str,
11703         stack: &mut T,
11704     ) -> Result<PutObjectRetentionOutput, XmlParseError> {
11705         start_element(tag_name, stack)?;
11706 
11707         let obj = PutObjectRetentionOutput::default();
11708 
11709         end_element(tag_name, stack)?;
11710 
11711         Ok(obj)
11712     }
11713 }
11714 #[derive(Default, Debug, Clone, PartialEq)]
11715 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11716 pub struct PutObjectRetentionRequest {
11717     /// <p>The bucket name that contains the object you want to apply this Object Retention configuration to. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
11718     pub bucket: String,
11719     /// <p>Indicates whether this operation should bypass Governance-mode restrictions.</p>
11720     pub bypass_governance_retention: Option<bool>,
11721     /// <p>The MD5 hash for the request body.</p>
11722     pub content_md5: Option<String>,
11723     /// <p>The key name for the object that you want to apply this Object Retention configuration to.</p>
11724     pub key: String,
11725     pub request_payer: Option<String>,
11726     /// <p>The container element for the Object Retention configuration.</p>
11727     pub retention: Option<ObjectLockRetention>,
11728     /// <p>The version ID for the object that you want to apply this Object Retention configuration to.</p>
11729     pub version_id: Option<String>,
11730 }
11731 
11732 #[derive(Default, Debug, Clone, PartialEq)]
11733 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11734 pub struct PutObjectTaggingOutput {
11735     /// <p>The versionId of the object the tag-set was added to.</p>
11736     pub version_id: Option<String>,
11737 }
11738 
11739 #[allow(dead_code)]
11740 struct PutObjectTaggingOutputDeserializer;
11741 impl PutObjectTaggingOutputDeserializer {
11742     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PutObjectTaggingOutput, XmlParseError>11743     fn deserialize<T: Peek + Next>(
11744         tag_name: &str,
11745         stack: &mut T,
11746     ) -> Result<PutObjectTaggingOutput, XmlParseError> {
11747         start_element(tag_name, stack)?;
11748 
11749         let obj = PutObjectTaggingOutput::default();
11750 
11751         end_element(tag_name, stack)?;
11752 
11753         Ok(obj)
11754     }
11755 }
11756 #[derive(Default, Debug, Clone, PartialEq)]
11757 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11758 pub struct PutObjectTaggingRequest {
11759     /// <p>The bucket name containing the object. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
11760     pub bucket: String,
11761     /// <p>The MD5 hash for the request body.</p>
11762     pub content_md5: Option<String>,
11763     /// <p>Name of the tag.</p>
11764     pub key: String,
11765     /// <p>Container for the <code>TagSet</code> and <code>Tag</code> elements</p>
11766     pub tagging: Tagging,
11767     /// <p>The versionId of the object that the tag-set will be added to.</p>
11768     pub version_id: Option<String>,
11769 }
11770 
11771 #[derive(Default, Debug, Clone, PartialEq)]
11772 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11773 pub struct PutPublicAccessBlockRequest {
11774     /// <p>The name of the Amazon S3 bucket whose <code>PublicAccessBlock</code> configuration you want to set.</p>
11775     pub bucket: String,
11776     /// <p>The MD5 hash of the <code>PutPublicAccessBlock</code> request body. </p>
11777     pub content_md5: Option<String>,
11778     /// <p>The <code>PublicAccessBlock</code> configuration that you want to apply to this Amazon S3 bucket. You can enable the configuration options in any combination. For more information about when Amazon S3 considers a bucket or object public, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status">The Meaning of "Public"</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
11779     pub public_access_block_configuration: PublicAccessBlockConfiguration,
11780 }
11781 
11782 #[allow(dead_code)]
11783 struct QueueArnDeserializer;
11784 impl QueueArnDeserializer {
11785     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>11786     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
11787         start_element(tag_name, stack)?;
11788         let obj = characters(stack)?;
11789         end_element(tag_name, stack)?;
11790 
11791         Ok(obj)
11792     }
11793 }
11794 
11795 pub struct QueueArnSerializer;
11796 impl QueueArnSerializer {
11797     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,11798     pub fn serialize<W>(
11799         mut writer: &mut EventWriter<W>,
11800         name: &str,
11801         obj: &String,
11802     ) -> Result<(), xml::writer::Error>
11803     where
11804         W: Write,
11805     {
11806         writer.write(xml::writer::XmlEvent::start_element(name))?;
11807         writer.write(xml::writer::XmlEvent::characters(&format!(
11808             "{value}",
11809             value = obj.to_string()
11810         )))?;
11811         writer.write(xml::writer::XmlEvent::end_element())
11812     }
11813 }
11814 
11815 /// <p>Specifies the configuration for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue when Amazon S3 detects specified events.</p>
11816 #[derive(Default, Debug, Clone, PartialEq)]
11817 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11818 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11819 pub struct QueueConfiguration {
11820     /// <p>A collection of bucket events for which to send notifications</p>
11821     pub events: Vec<String>,
11822     pub filter: Option<NotificationConfigurationFilter>,
11823     pub id: Option<String>,
11824     /// <p>The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message when it detects events of the specified type.</p>
11825     pub queue_arn: String,
11826 }
11827 
11828 #[allow(dead_code)]
11829 struct QueueConfigurationDeserializer;
11830 impl QueueConfigurationDeserializer {
11831     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<QueueConfiguration, XmlParseError>11832     fn deserialize<T: Peek + Next>(
11833         tag_name: &str,
11834         stack: &mut T,
11835     ) -> Result<QueueConfiguration, XmlParseError> {
11836         deserialize_elements::<_, QueueConfiguration, _>(tag_name, stack, |name, stack, obj| {
11837             match name {
11838                 "Event" => {
11839                     obj.events
11840                         .extend(EventListDeserializer::deserialize("Event", stack)?);
11841                 }
11842                 "Filter" => {
11843                     obj.filter = Some(NotificationConfigurationFilterDeserializer::deserialize(
11844                         "Filter", stack,
11845                     )?);
11846                 }
11847                 "Id" => {
11848                     obj.id = Some(NotificationIdDeserializer::deserialize("Id", stack)?);
11849                 }
11850                 "Queue" => {
11851                     obj.queue_arn = QueueArnDeserializer::deserialize("Queue", stack)?;
11852                 }
11853                 _ => skip_tree(stack),
11854             }
11855             Ok(())
11856         })
11857     }
11858 }
11859 
11860 pub struct QueueConfigurationSerializer;
11861 impl QueueConfigurationSerializer {
11862     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &QueueConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,11863     pub fn serialize<W>(
11864         mut writer: &mut EventWriter<W>,
11865         name: &str,
11866         obj: &QueueConfiguration,
11867     ) -> Result<(), xml::writer::Error>
11868     where
11869         W: Write,
11870     {
11871         writer.write(xml::writer::XmlEvent::start_element(name))?;
11872         EventListSerializer::serialize(&mut writer, "Event", &obj.events)?;
11873         if let Some(ref value) = obj.filter {
11874             &NotificationConfigurationFilterSerializer::serialize(&mut writer, "Filter", value)?;
11875         }
11876         if let Some(ref value) = obj.id {
11877             writer.write(xml::writer::XmlEvent::start_element("Id"))?;
11878             writer.write(xml::writer::XmlEvent::characters(&format!(
11879                 "{value}",
11880                 value = value
11881             )));
11882             writer.write(xml::writer::XmlEvent::end_element())?;
11883         }
11884         writer.write(xml::writer::XmlEvent::start_element("Queue"))?;
11885         writer.write(xml::writer::XmlEvent::characters(&format!(
11886             "{value}",
11887             value = obj.queue_arn
11888         )))?;
11889         writer.write(xml::writer::XmlEvent::end_element())?;
11890         writer.write(xml::writer::XmlEvent::end_element())
11891     }
11892 }
11893 
11894 /// <p>This data type is deprecated. Use <a>QueueConfiguration</a> for the same purposes. This data type specifies the configuration for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue when Amazon S3 detects specified events. </p>
11895 #[derive(Default, Debug, Clone, PartialEq)]
11896 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11897 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11898 pub struct QueueConfigurationDeprecated {
11899     /// <p>A collection of bucket events for which to send notifications</p>
11900     pub events: Option<Vec<String>>,
11901     pub id: Option<String>,
11902     /// <p>The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message when it detects events of the specified type. </p>
11903     pub queue: Option<String>,
11904 }
11905 
11906 #[allow(dead_code)]
11907 struct QueueConfigurationDeprecatedDeserializer;
11908 impl QueueConfigurationDeprecatedDeserializer {
11909     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<QueueConfigurationDeprecated, XmlParseError>11910     fn deserialize<T: Peek + Next>(
11911         tag_name: &str,
11912         stack: &mut T,
11913     ) -> Result<QueueConfigurationDeprecated, XmlParseError> {
11914         deserialize_elements::<_, QueueConfigurationDeprecated, _>(
11915             tag_name,
11916             stack,
11917             |name, stack, obj| {
11918                 match name {
11919                     "Event" => {
11920                         obj.events
11921                             .get_or_insert(vec![])
11922                             .extend(EventListDeserializer::deserialize("Event", stack)?);
11923                     }
11924                     "Id" => {
11925                         obj.id = Some(NotificationIdDeserializer::deserialize("Id", stack)?);
11926                     }
11927                     "Queue" => {
11928                         obj.queue = Some(QueueArnDeserializer::deserialize("Queue", stack)?);
11929                     }
11930                     _ => skip_tree(stack),
11931                 }
11932                 Ok(())
11933             },
11934         )
11935     }
11936 }
11937 
11938 pub struct QueueConfigurationDeprecatedSerializer;
11939 impl QueueConfigurationDeprecatedSerializer {
11940     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &QueueConfigurationDeprecated, ) -> Result<(), xml::writer::Error> where W: Write,11941     pub fn serialize<W>(
11942         mut writer: &mut EventWriter<W>,
11943         name: &str,
11944         obj: &QueueConfigurationDeprecated,
11945     ) -> Result<(), xml::writer::Error>
11946     where
11947         W: Write,
11948     {
11949         writer.write(xml::writer::XmlEvent::start_element(name))?;
11950         if let Some(ref value) = obj.events {
11951             &EventListSerializer::serialize(&mut writer, "Event", value)?;
11952         }
11953         if let Some(ref value) = obj.id {
11954             writer.write(xml::writer::XmlEvent::start_element("Id"))?;
11955             writer.write(xml::writer::XmlEvent::characters(&format!(
11956                 "{value}",
11957                 value = value
11958             )));
11959             writer.write(xml::writer::XmlEvent::end_element())?;
11960         }
11961         if let Some(ref value) = obj.queue {
11962             writer.write(xml::writer::XmlEvent::start_element("Queue"))?;
11963             writer.write(xml::writer::XmlEvent::characters(&format!(
11964                 "{value}",
11965                 value = value
11966             )));
11967             writer.write(xml::writer::XmlEvent::end_element())?;
11968         }
11969         writer.write(xml::writer::XmlEvent::end_element())
11970     }
11971 }
11972 
11973 #[allow(dead_code)]
11974 struct QueueConfigurationListDeserializer;
11975 impl QueueConfigurationListDeserializer {
11976     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<QueueConfiguration>, XmlParseError>11977     fn deserialize<T: Peek + Next>(
11978         tag_name: &str,
11979         stack: &mut T,
11980     ) -> Result<Vec<QueueConfiguration>, XmlParseError> {
11981         let mut obj = vec![];
11982 
11983         loop {
11984             let consume_next_tag = match stack.peek() {
11985                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
11986                     name.local_name == tag_name
11987                 }
11988                 _ => false,
11989             };
11990 
11991             if consume_next_tag {
11992                 obj.push(QueueConfigurationDeserializer::deserialize(
11993                     tag_name, stack,
11994                 )?);
11995             } else {
11996                 break;
11997             }
11998         }
11999 
12000         Ok(obj)
12001     }
12002 }
12003 
12004 pub struct QueueConfigurationListSerializer;
12005 impl QueueConfigurationListSerializer {
12006     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<QueueConfiguration>, ) -> Result<(), xml::writer::Error> where W: Write,12007     pub fn serialize<W>(
12008         mut writer: &mut EventWriter<W>,
12009         name: &str,
12010         obj: &Vec<QueueConfiguration>,
12011     ) -> Result<(), xml::writer::Error>
12012     where
12013         W: Write,
12014     {
12015         for element in obj {
12016             QueueConfigurationSerializer::serialize(writer, name, element)?;
12017         }
12018         Ok(())
12019     }
12020 }
12021 
12022 pub struct QuietSerializer;
12023 impl QuietSerializer {
12024     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,12025     pub fn serialize<W>(
12026         mut writer: &mut EventWriter<W>,
12027         name: &str,
12028         obj: &bool,
12029     ) -> Result<(), xml::writer::Error>
12030     where
12031         W: Write,
12032     {
12033         writer.write(xml::writer::XmlEvent::start_element(name))?;
12034         writer.write(xml::writer::XmlEvent::characters(&format!(
12035             "{value}",
12036             value = obj.to_string()
12037         )))?;
12038         writer.write(xml::writer::XmlEvent::end_element())
12039     }
12040 }
12041 
12042 pub struct QuoteCharacterSerializer;
12043 impl QuoteCharacterSerializer {
12044     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12045     pub fn serialize<W>(
12046         mut writer: &mut EventWriter<W>,
12047         name: &str,
12048         obj: &String,
12049     ) -> Result<(), xml::writer::Error>
12050     where
12051         W: Write,
12052     {
12053         writer.write(xml::writer::XmlEvent::start_element(name))?;
12054         writer.write(xml::writer::XmlEvent::characters(&format!(
12055             "{value}",
12056             value = obj.to_string()
12057         )))?;
12058         writer.write(xml::writer::XmlEvent::end_element())
12059     }
12060 }
12061 
12062 pub struct QuoteEscapeCharacterSerializer;
12063 impl QuoteEscapeCharacterSerializer {
12064     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12065     pub fn serialize<W>(
12066         mut writer: &mut EventWriter<W>,
12067         name: &str,
12068         obj: &String,
12069     ) -> Result<(), xml::writer::Error>
12070     where
12071         W: Write,
12072     {
12073         writer.write(xml::writer::XmlEvent::start_element(name))?;
12074         writer.write(xml::writer::XmlEvent::characters(&format!(
12075             "{value}",
12076             value = obj.to_string()
12077         )))?;
12078         writer.write(xml::writer::XmlEvent::end_element())
12079     }
12080 }
12081 
12082 pub struct QuoteFieldsSerializer;
12083 impl QuoteFieldsSerializer {
12084     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12085     pub fn serialize<W>(
12086         mut writer: &mut EventWriter<W>,
12087         name: &str,
12088         obj: &String,
12089     ) -> Result<(), xml::writer::Error>
12090     where
12091         W: Write,
12092     {
12093         writer.write(xml::writer::XmlEvent::start_element(name))?;
12094         writer.write(xml::writer::XmlEvent::characters(&format!(
12095             "{value}",
12096             value = obj.to_string()
12097         )))?;
12098         writer.write(xml::writer::XmlEvent::end_element())
12099     }
12100 }
12101 
12102 pub struct RecordDelimiterSerializer;
12103 impl RecordDelimiterSerializer {
12104     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12105     pub fn serialize<W>(
12106         mut writer: &mut EventWriter<W>,
12107         name: &str,
12108         obj: &String,
12109     ) -> Result<(), xml::writer::Error>
12110     where
12111         W: Write,
12112     {
12113         writer.write(xml::writer::XmlEvent::start_element(name))?;
12114         writer.write(xml::writer::XmlEvent::characters(&format!(
12115             "{value}",
12116             value = obj.to_string()
12117         )))?;
12118         writer.write(xml::writer::XmlEvent::end_element())
12119     }
12120 }
12121 
12122 /// <p>The container for the records event.</p>
12123 #[derive(Default, Debug, Clone, PartialEq)]
12124 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12125 pub struct RecordsEvent {
12126     /// <p>The byte array of partial, one or more result records.</p>
12127     pub payload: Option<bytes::Bytes>,
12128 }
12129 
12130 #[allow(dead_code)]
12131 struct RecordsEventDeserializer;
12132 impl RecordsEventDeserializer {
12133     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<RecordsEvent, XmlParseError>12134     fn deserialize<T: Peek + Next>(
12135         tag_name: &str,
12136         stack: &mut T,
12137     ) -> Result<RecordsEvent, XmlParseError> {
12138         deserialize_elements::<_, RecordsEvent, _>(tag_name, stack, |name, stack, obj| {
12139             match name {
12140                 "Payload" => {
12141                     obj.payload = Some(BodyDeserializer::deserialize("Payload", stack)?);
12142                 }
12143                 _ => skip_tree(stack),
12144             }
12145             Ok(())
12146         })
12147     }
12148 }
12149 /// <p>Specifies how requests are redirected. In the event of an error, you can specify a different error code to return.</p>
12150 #[derive(Default, Debug, Clone, PartialEq)]
12151 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12152 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12153 pub struct Redirect {
12154     /// <p>The host name to use in the redirect request.</p>
12155     pub host_name: Option<String>,
12156     /// <p>The HTTP redirect code to use on the response. Not required if one of the siblings is present.</p>
12157     pub http_redirect_code: Option<String>,
12158     /// <p>Protocol to use when redirecting requests. The default is the protocol that is used in the original request.</p>
12159     pub protocol: Option<String>,
12160     /// <p>The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix <code>docs/</code> (objects in the <code>docs/</code> folder) to <code>documents/</code>, you can set a condition block with <code>KeyPrefixEquals</code> set to <code>docs/</code> and in the Redirect set <code>ReplaceKeyPrefixWith</code> to <code>/documents</code>. Not required if one of the siblings is present. Can be present only if <code>ReplaceKeyWith</code> is not provided.</p>
12161     pub replace_key_prefix_with: Option<String>,
12162     /// <p>The specific object key to use in the redirect request. For example, redirect request to <code>error.html</code>. Not required if one of the siblings is present. Can be present only if <code>ReplaceKeyPrefixWith</code> is not provided.</p>
12163     pub replace_key_with: Option<String>,
12164 }
12165 
12166 #[allow(dead_code)]
12167 struct RedirectDeserializer;
12168 impl RedirectDeserializer {
12169     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Redirect, XmlParseError>12170     fn deserialize<T: Peek + Next>(
12171         tag_name: &str,
12172         stack: &mut T,
12173     ) -> Result<Redirect, XmlParseError> {
12174         deserialize_elements::<_, Redirect, _>(tag_name, stack, |name, stack, obj| {
12175             match name {
12176                 "HostName" => {
12177                     obj.host_name = Some(HostNameDeserializer::deserialize("HostName", stack)?);
12178                 }
12179                 "HttpRedirectCode" => {
12180                     obj.http_redirect_code = Some(HttpRedirectCodeDeserializer::deserialize(
12181                         "HttpRedirectCode",
12182                         stack,
12183                     )?);
12184                 }
12185                 "Protocol" => {
12186                     obj.protocol = Some(ProtocolDeserializer::deserialize("Protocol", stack)?);
12187                 }
12188                 "ReplaceKeyPrefixWith" => {
12189                     obj.replace_key_prefix_with =
12190                         Some(ReplaceKeyPrefixWithDeserializer::deserialize(
12191                             "ReplaceKeyPrefixWith",
12192                             stack,
12193                         )?);
12194                 }
12195                 "ReplaceKeyWith" => {
12196                     obj.replace_key_with = Some(ReplaceKeyWithDeserializer::deserialize(
12197                         "ReplaceKeyWith",
12198                         stack,
12199                     )?);
12200                 }
12201                 _ => skip_tree(stack),
12202             }
12203             Ok(())
12204         })
12205     }
12206 }
12207 
12208 pub struct RedirectSerializer;
12209 impl RedirectSerializer {
12210     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Redirect, ) -> Result<(), xml::writer::Error> where W: Write,12211     pub fn serialize<W>(
12212         mut writer: &mut EventWriter<W>,
12213         name: &str,
12214         obj: &Redirect,
12215     ) -> Result<(), xml::writer::Error>
12216     where
12217         W: Write,
12218     {
12219         writer.write(xml::writer::XmlEvent::start_element(name))?;
12220         if let Some(ref value) = obj.host_name {
12221             writer.write(xml::writer::XmlEvent::start_element("HostName"))?;
12222             writer.write(xml::writer::XmlEvent::characters(&format!(
12223                 "{value}",
12224                 value = value
12225             )));
12226             writer.write(xml::writer::XmlEvent::end_element())?;
12227         }
12228         if let Some(ref value) = obj.http_redirect_code {
12229             writer.write(xml::writer::XmlEvent::start_element("HttpRedirectCode"))?;
12230             writer.write(xml::writer::XmlEvent::characters(&format!(
12231                 "{value}",
12232                 value = value
12233             )));
12234             writer.write(xml::writer::XmlEvent::end_element())?;
12235         }
12236         if let Some(ref value) = obj.protocol {
12237             writer.write(xml::writer::XmlEvent::start_element("Protocol"))?;
12238             writer.write(xml::writer::XmlEvent::characters(&format!(
12239                 "{value}",
12240                 value = value
12241             )));
12242             writer.write(xml::writer::XmlEvent::end_element())?;
12243         }
12244         if let Some(ref value) = obj.replace_key_prefix_with {
12245             writer.write(xml::writer::XmlEvent::start_element("ReplaceKeyPrefixWith"))?;
12246             writer.write(xml::writer::XmlEvent::characters(&format!(
12247                 "{value}",
12248                 value = value
12249             )));
12250             writer.write(xml::writer::XmlEvent::end_element())?;
12251         }
12252         if let Some(ref value) = obj.replace_key_with {
12253             writer.write(xml::writer::XmlEvent::start_element("ReplaceKeyWith"))?;
12254             writer.write(xml::writer::XmlEvent::characters(&format!(
12255                 "{value}",
12256                 value = value
12257             )));
12258             writer.write(xml::writer::XmlEvent::end_element())?;
12259         }
12260         writer.write(xml::writer::XmlEvent::end_element())
12261     }
12262 }
12263 
12264 /// <p>Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 bucket.</p>
12265 #[derive(Default, Debug, Clone, PartialEq)]
12266 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12267 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12268 pub struct RedirectAllRequestsTo {
12269     /// <p>Name of the host where requests are redirected.</p>
12270     pub host_name: String,
12271     /// <p>Protocol to use when redirecting requests. The default is the protocol that is used in the original request.</p>
12272     pub protocol: Option<String>,
12273 }
12274 
12275 #[allow(dead_code)]
12276 struct RedirectAllRequestsToDeserializer;
12277 impl RedirectAllRequestsToDeserializer {
12278     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<RedirectAllRequestsTo, XmlParseError>12279     fn deserialize<T: Peek + Next>(
12280         tag_name: &str,
12281         stack: &mut T,
12282     ) -> Result<RedirectAllRequestsTo, XmlParseError> {
12283         deserialize_elements::<_, RedirectAllRequestsTo, _>(tag_name, stack, |name, stack, obj| {
12284             match name {
12285                 "HostName" => {
12286                     obj.host_name = HostNameDeserializer::deserialize("HostName", stack)?;
12287                 }
12288                 "Protocol" => {
12289                     obj.protocol = Some(ProtocolDeserializer::deserialize("Protocol", stack)?);
12290                 }
12291                 _ => skip_tree(stack),
12292             }
12293             Ok(())
12294         })
12295     }
12296 }
12297 
12298 pub struct RedirectAllRequestsToSerializer;
12299 impl RedirectAllRequestsToSerializer {
12300     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &RedirectAllRequestsTo, ) -> Result<(), xml::writer::Error> where W: Write,12301     pub fn serialize<W>(
12302         mut writer: &mut EventWriter<W>,
12303         name: &str,
12304         obj: &RedirectAllRequestsTo,
12305     ) -> Result<(), xml::writer::Error>
12306     where
12307         W: Write,
12308     {
12309         writer.write(xml::writer::XmlEvent::start_element(name))?;
12310         writer.write(xml::writer::XmlEvent::start_element("HostName"))?;
12311         writer.write(xml::writer::XmlEvent::characters(&format!(
12312             "{value}",
12313             value = obj.host_name
12314         )))?;
12315         writer.write(xml::writer::XmlEvent::end_element())?;
12316         if let Some(ref value) = obj.protocol {
12317             writer.write(xml::writer::XmlEvent::start_element("Protocol"))?;
12318             writer.write(xml::writer::XmlEvent::characters(&format!(
12319                 "{value}",
12320                 value = value
12321             )));
12322             writer.write(xml::writer::XmlEvent::end_element())?;
12323         }
12324         writer.write(xml::writer::XmlEvent::end_element())
12325     }
12326 }
12327 
12328 #[allow(dead_code)]
12329 struct ReplaceKeyPrefixWithDeserializer;
12330 impl ReplaceKeyPrefixWithDeserializer {
12331     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>12332     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
12333         start_element(tag_name, stack)?;
12334         let obj = characters(stack)?;
12335         end_element(tag_name, stack)?;
12336 
12337         Ok(obj)
12338     }
12339 }
12340 
12341 pub struct ReplaceKeyPrefixWithSerializer;
12342 impl ReplaceKeyPrefixWithSerializer {
12343     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12344     pub fn serialize<W>(
12345         mut writer: &mut EventWriter<W>,
12346         name: &str,
12347         obj: &String,
12348     ) -> Result<(), xml::writer::Error>
12349     where
12350         W: Write,
12351     {
12352         writer.write(xml::writer::XmlEvent::start_element(name))?;
12353         writer.write(xml::writer::XmlEvent::characters(&format!(
12354             "{value}",
12355             value = obj.to_string()
12356         )))?;
12357         writer.write(xml::writer::XmlEvent::end_element())
12358     }
12359 }
12360 
12361 #[allow(dead_code)]
12362 struct ReplaceKeyWithDeserializer;
12363 impl ReplaceKeyWithDeserializer {
12364     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>12365     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
12366         start_element(tag_name, stack)?;
12367         let obj = characters(stack)?;
12368         end_element(tag_name, stack)?;
12369 
12370         Ok(obj)
12371     }
12372 }
12373 
12374 pub struct ReplaceKeyWithSerializer;
12375 impl ReplaceKeyWithSerializer {
12376     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12377     pub fn serialize<W>(
12378         mut writer: &mut EventWriter<W>,
12379         name: &str,
12380         obj: &String,
12381     ) -> Result<(), xml::writer::Error>
12382     where
12383         W: Write,
12384     {
12385         writer.write(xml::writer::XmlEvent::start_element(name))?;
12386         writer.write(xml::writer::XmlEvent::characters(&format!(
12387             "{value}",
12388             value = obj.to_string()
12389         )))?;
12390         writer.write(xml::writer::XmlEvent::end_element())
12391     }
12392 }
12393 
12394 #[allow(dead_code)]
12395 struct ReplicaKmsKeyIDDeserializer;
12396 impl ReplicaKmsKeyIDDeserializer {
12397     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>12398     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
12399         start_element(tag_name, stack)?;
12400         let obj = characters(stack)?;
12401         end_element(tag_name, stack)?;
12402 
12403         Ok(obj)
12404     }
12405 }
12406 
12407 pub struct ReplicaKmsKeyIDSerializer;
12408 impl ReplicaKmsKeyIDSerializer {
12409     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12410     pub fn serialize<W>(
12411         mut writer: &mut EventWriter<W>,
12412         name: &str,
12413         obj: &String,
12414     ) -> Result<(), xml::writer::Error>
12415     where
12416         W: Write,
12417     {
12418         writer.write(xml::writer::XmlEvent::start_element(name))?;
12419         writer.write(xml::writer::XmlEvent::characters(&format!(
12420             "{value}",
12421             value = obj.to_string()
12422         )))?;
12423         writer.write(xml::writer::XmlEvent::end_element())
12424     }
12425 }
12426 
12427 /// <p>A container for replication rules. You can add up to 1,000 rules. The maximum size of a replication configuration is 2 MB.</p>
12428 #[derive(Default, Debug, Clone, PartialEq)]
12429 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12430 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12431 pub struct ReplicationConfiguration {
12432     /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that Amazon S3 assumes when replicating objects. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html">How to Set Up Replication</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
12433     pub role: String,
12434     /// <p>A container for one or more replication rules. A replication configuration must have at least one rule and can contain a maximum of 1,000 rules. </p>
12435     pub rules: Vec<ReplicationRule>,
12436 }
12437 
12438 #[allow(dead_code)]
12439 struct ReplicationConfigurationDeserializer;
12440 impl ReplicationConfigurationDeserializer {
12441     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ReplicationConfiguration, XmlParseError>12442     fn deserialize<T: Peek + Next>(
12443         tag_name: &str,
12444         stack: &mut T,
12445     ) -> Result<ReplicationConfiguration, XmlParseError> {
12446         deserialize_elements::<_, ReplicationConfiguration, _>(
12447             tag_name,
12448             stack,
12449             |name, stack, obj| {
12450                 match name {
12451                     "Role" => {
12452                         obj.role = RoleDeserializer::deserialize("Role", stack)?;
12453                     }
12454                     "Rule" => {
12455                         obj.rules
12456                             .extend(ReplicationRulesDeserializer::deserialize("Rule", stack)?);
12457                     }
12458                     _ => skip_tree(stack),
12459                 }
12460                 Ok(())
12461             },
12462         )
12463     }
12464 }
12465 
12466 pub struct ReplicationConfigurationSerializer;
12467 impl ReplicationConfigurationSerializer {
12468     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ReplicationConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,12469     pub fn serialize<W>(
12470         mut writer: &mut EventWriter<W>,
12471         name: &str,
12472         obj: &ReplicationConfiguration,
12473     ) -> Result<(), xml::writer::Error>
12474     where
12475         W: Write,
12476     {
12477         writer.write(xml::writer::XmlEvent::start_element(name))?;
12478         writer.write(xml::writer::XmlEvent::start_element("Role"))?;
12479         writer.write(xml::writer::XmlEvent::characters(&format!(
12480             "{value}",
12481             value = obj.role
12482         )))?;
12483         writer.write(xml::writer::XmlEvent::end_element())?;
12484         ReplicationRulesSerializer::serialize(&mut writer, "Rule", &obj.rules)?;
12485         writer.write(xml::writer::XmlEvent::end_element())
12486     }
12487 }
12488 
12489 /// <p>Specifies which Amazon S3 objects to replicate and where to store the replicas.</p>
12490 #[derive(Default, Debug, Clone, PartialEq)]
12491 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12492 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12493 pub struct ReplicationRule {
12494     pub delete_marker_replication: Option<DeleteMarkerReplication>,
12495     /// <p>A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).</p>
12496     pub destination: Destination,
12497     /// <p><p/></p>
12498     pub existing_object_replication: Option<ExistingObjectReplication>,
12499     pub filter: Option<ReplicationRuleFilter>,
12500     /// <p>A unique identifier for the rule. The maximum value is 255 characters.</p>
12501     pub id: Option<String>,
12502     /// <p>The priority associated with the rule. If you specify multiple rules in a replication configuration, Amazon S3 prioritizes the rules to prevent conflicts when filtering. If two or more rules identify the same object based on a specified filter, the rule with higher priority takes precedence. For example:</p> <ul> <li> <p>Same object quality prefix-based filter criteria if prefixes you specified in multiple rules overlap </p> </li> <li> <p>Same object qualify tag-based filter criteria specified in multiple rules</p> </li> </ul> <p>For more information, see <a href=" https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html">Replication</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
12503     pub priority: Option<i64>,
12504     /// <p>A container that describes additional filters for identifying the source objects that you want to replicate. You can choose to enable or disable the replication of these objects. Currently, Amazon S3 supports only the filter that you can specify for objects created with server-side encryption using a customer master key (CMK) stored in AWS Key Management Service (SSE-KMS).</p>
12505     pub source_selection_criteria: Option<SourceSelectionCriteria>,
12506     /// <p>Specifies whether the rule is enabled.</p>
12507     pub status: String,
12508 }
12509 
12510 #[allow(dead_code)]
12511 struct ReplicationRuleDeserializer;
12512 impl ReplicationRuleDeserializer {
12513     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ReplicationRule, XmlParseError>12514     fn deserialize<T: Peek + Next>(
12515         tag_name: &str,
12516         stack: &mut T,
12517     ) -> Result<ReplicationRule, XmlParseError> {
12518         deserialize_elements::<_, ReplicationRule, _>(tag_name, stack, |name, stack, obj| {
12519             match name {
12520                 "DeleteMarkerReplication" => {
12521                     obj.delete_marker_replication =
12522                         Some(DeleteMarkerReplicationDeserializer::deserialize(
12523                             "DeleteMarkerReplication",
12524                             stack,
12525                         )?);
12526                 }
12527                 "Destination" => {
12528                     obj.destination = DestinationDeserializer::deserialize("Destination", stack)?;
12529                 }
12530                 "ExistingObjectReplication" => {
12531                     obj.existing_object_replication =
12532                         Some(ExistingObjectReplicationDeserializer::deserialize(
12533                             "ExistingObjectReplication",
12534                             stack,
12535                         )?);
12536                 }
12537                 "Filter" => {
12538                     obj.filter = Some(ReplicationRuleFilterDeserializer::deserialize(
12539                         "Filter", stack,
12540                     )?);
12541                 }
12542                 "ID" => {
12543                     obj.id = Some(IDDeserializer::deserialize("ID", stack)?);
12544                 }
12545                 "Priority" => {
12546                     obj.priority = Some(PriorityDeserializer::deserialize("Priority", stack)?);
12547                 }
12548                 "SourceSelectionCriteria" => {
12549                     obj.source_selection_criteria =
12550                         Some(SourceSelectionCriteriaDeserializer::deserialize(
12551                             "SourceSelectionCriteria",
12552                             stack,
12553                         )?);
12554                 }
12555                 "Status" => {
12556                     obj.status = ReplicationRuleStatusDeserializer::deserialize("Status", stack)?;
12557                 }
12558                 _ => skip_tree(stack),
12559             }
12560             Ok(())
12561         })
12562     }
12563 }
12564 
12565 pub struct ReplicationRuleSerializer;
12566 impl ReplicationRuleSerializer {
12567     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ReplicationRule, ) -> Result<(), xml::writer::Error> where W: Write,12568     pub fn serialize<W>(
12569         mut writer: &mut EventWriter<W>,
12570         name: &str,
12571         obj: &ReplicationRule,
12572     ) -> Result<(), xml::writer::Error>
12573     where
12574         W: Write,
12575     {
12576         writer.write(xml::writer::XmlEvent::start_element(name))?;
12577         if let Some(ref value) = obj.delete_marker_replication {
12578             &DeleteMarkerReplicationSerializer::serialize(
12579                 &mut writer,
12580                 "DeleteMarkerReplication",
12581                 value,
12582             )?;
12583         }
12584         DestinationSerializer::serialize(&mut writer, "Destination", &obj.destination)?;
12585         if let Some(ref value) = obj.existing_object_replication {
12586             &ExistingObjectReplicationSerializer::serialize(
12587                 &mut writer,
12588                 "ExistingObjectReplication",
12589                 value,
12590             )?;
12591         }
12592         if let Some(ref value) = obj.filter {
12593             &ReplicationRuleFilterSerializer::serialize(&mut writer, "Filter", value)?;
12594         }
12595         if let Some(ref value) = obj.id {
12596             writer.write(xml::writer::XmlEvent::start_element("ID"))?;
12597             writer.write(xml::writer::XmlEvent::characters(&format!(
12598                 "{value}",
12599                 value = value
12600             )));
12601             writer.write(xml::writer::XmlEvent::end_element())?;
12602         }
12603         if let Some(ref value) = obj.priority {
12604             writer.write(xml::writer::XmlEvent::start_element("Priority"))?;
12605             writer.write(xml::writer::XmlEvent::characters(&format!(
12606                 "{value}",
12607                 value = value
12608             )));
12609             writer.write(xml::writer::XmlEvent::end_element())?;
12610         }
12611         if let Some(ref value) = obj.source_selection_criteria {
12612             &SourceSelectionCriteriaSerializer::serialize(
12613                 &mut writer,
12614                 "SourceSelectionCriteria",
12615                 value,
12616             )?;
12617         }
12618         writer.write(xml::writer::XmlEvent::start_element("Status"))?;
12619         writer.write(xml::writer::XmlEvent::characters(&format!(
12620             "{value}",
12621             value = obj.status
12622         )))?;
12623         writer.write(xml::writer::XmlEvent::end_element())?;
12624         writer.write(xml::writer::XmlEvent::end_element())
12625     }
12626 }
12627 
12628 /// <p><p>A container for specifying rule filters. The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. </p> <p>For example:</p> <ul> <li> <p>If you specify both a <code>Prefix</code> and a <code>Tag</code> filter, wrap these filters in an <code>And</code> tag. </p> </li> <li> <p>If you specify a filter based on multiple tags, wrap the <code>Tag</code> elements in an <code>And</code> tag</p> </li> </ul></p>
12629 #[derive(Default, Debug, Clone, PartialEq)]
12630 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12631 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12632 pub struct ReplicationRuleAndOperator {
12633     /// <p>An object key name prefix that identifies the subset of objects to which the rule applies.</p>
12634     pub prefix: Option<String>,
12635     /// <p>An array of tags containing key and value pairs.</p>
12636     pub tags: Option<Vec<Tag>>,
12637 }
12638 
12639 #[allow(dead_code)]
12640 struct ReplicationRuleAndOperatorDeserializer;
12641 impl ReplicationRuleAndOperatorDeserializer {
12642     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ReplicationRuleAndOperator, XmlParseError>12643     fn deserialize<T: Peek + Next>(
12644         tag_name: &str,
12645         stack: &mut T,
12646     ) -> Result<ReplicationRuleAndOperator, XmlParseError> {
12647         deserialize_elements::<_, ReplicationRuleAndOperator, _>(
12648             tag_name,
12649             stack,
12650             |name, stack, obj| {
12651                 match name {
12652                     "Prefix" => {
12653                         obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
12654                     }
12655                     "Tag" => {
12656                         obj.tags
12657                             .get_or_insert(vec![])
12658                             .extend(TagSetDeserializer::deserialize("Tag", stack)?);
12659                     }
12660                     _ => skip_tree(stack),
12661                 }
12662                 Ok(())
12663             },
12664         )
12665     }
12666 }
12667 
12668 pub struct ReplicationRuleAndOperatorSerializer;
12669 impl ReplicationRuleAndOperatorSerializer {
12670     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ReplicationRuleAndOperator, ) -> Result<(), xml::writer::Error> where W: Write,12671     pub fn serialize<W>(
12672         mut writer: &mut EventWriter<W>,
12673         name: &str,
12674         obj: &ReplicationRuleAndOperator,
12675     ) -> Result<(), xml::writer::Error>
12676     where
12677         W: Write,
12678     {
12679         writer.write(xml::writer::XmlEvent::start_element(name))?;
12680         if let Some(ref value) = obj.prefix {
12681             writer.write(xml::writer::XmlEvent::start_element("Prefix"))?;
12682             writer.write(xml::writer::XmlEvent::characters(&format!(
12683                 "{value}",
12684                 value = value
12685             )));
12686             writer.write(xml::writer::XmlEvent::end_element())?;
12687         }
12688         if let Some(ref value) = obj.tags {
12689             &TagSetSerializer::serialize(&mut writer, "Tag", value)?;
12690         }
12691         writer.write(xml::writer::XmlEvent::end_element())
12692     }
12693 }
12694 
12695 /// <p>A filter that identifies the subset of objects to which the replication rule applies. A <code>Filter</code> must specify exactly one <code>Prefix</code>, <code>Tag</code>, or an <code>And</code> child element.</p>
12696 #[derive(Default, Debug, Clone, PartialEq)]
12697 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12698 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12699 pub struct ReplicationRuleFilter {
12700     /// <p><p>A container for specifying rule filters. The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example: </p> <ul> <li> <p>If you specify both a <code>Prefix</code> and a <code>Tag</code> filter, wrap these filters in an <code>And</code> tag.</p> </li> <li> <p>If you specify a filter based on multiple tags, wrap the <code>Tag</code> elements in an <code>And</code> tag.</p> </li> </ul></p>
12701     pub and: Option<ReplicationRuleAndOperator>,
12702     /// <p>An object key name prefix that identifies the subset of objects to which the rule applies.</p>
12703     pub prefix: Option<String>,
12704     /// <p>A container for specifying a tag key and value. </p> <p>The rule applies only to objects that have the tag in their tag set.</p>
12705     pub tag: Option<Tag>,
12706 }
12707 
12708 #[allow(dead_code)]
12709 struct ReplicationRuleFilterDeserializer;
12710 impl ReplicationRuleFilterDeserializer {
12711     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ReplicationRuleFilter, XmlParseError>12712     fn deserialize<T: Peek + Next>(
12713         tag_name: &str,
12714         stack: &mut T,
12715     ) -> Result<ReplicationRuleFilter, XmlParseError> {
12716         deserialize_elements::<_, ReplicationRuleFilter, _>(tag_name, stack, |name, stack, obj| {
12717             match name {
12718                 "And" => {
12719                     obj.and = Some(ReplicationRuleAndOperatorDeserializer::deserialize(
12720                         "And", stack,
12721                     )?);
12722                 }
12723                 "Prefix" => {
12724                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
12725                 }
12726                 "Tag" => {
12727                     obj.tag = Some(TagDeserializer::deserialize("Tag", stack)?);
12728                 }
12729                 _ => skip_tree(stack),
12730             }
12731             Ok(())
12732         })
12733     }
12734 }
12735 
12736 pub struct ReplicationRuleFilterSerializer;
12737 impl ReplicationRuleFilterSerializer {
12738     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ReplicationRuleFilter, ) -> Result<(), xml::writer::Error> where W: Write,12739     pub fn serialize<W>(
12740         mut writer: &mut EventWriter<W>,
12741         name: &str,
12742         obj: &ReplicationRuleFilter,
12743     ) -> Result<(), xml::writer::Error>
12744     where
12745         W: Write,
12746     {
12747         writer.write(xml::writer::XmlEvent::start_element(name))?;
12748         if let Some(ref value) = obj.and {
12749             &ReplicationRuleAndOperatorSerializer::serialize(&mut writer, "And", value)?;
12750         }
12751         if let Some(ref value) = obj.prefix {
12752             writer.write(xml::writer::XmlEvent::start_element("Prefix"))?;
12753             writer.write(xml::writer::XmlEvent::characters(&format!(
12754                 "{value}",
12755                 value = value
12756             )));
12757             writer.write(xml::writer::XmlEvent::end_element())?;
12758         }
12759         if let Some(ref value) = obj.tag {
12760             &TagSerializer::serialize(&mut writer, "Tag", value)?;
12761         }
12762         writer.write(xml::writer::XmlEvent::end_element())
12763     }
12764 }
12765 
12766 #[allow(dead_code)]
12767 struct ReplicationRuleStatusDeserializer;
12768 impl ReplicationRuleStatusDeserializer {
12769     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>12770     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
12771         start_element(tag_name, stack)?;
12772         let obj = characters(stack)?;
12773         end_element(tag_name, stack)?;
12774 
12775         Ok(obj)
12776     }
12777 }
12778 
12779 pub struct ReplicationRuleStatusSerializer;
12780 impl ReplicationRuleStatusSerializer {
12781     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12782     pub fn serialize<W>(
12783         mut writer: &mut EventWriter<W>,
12784         name: &str,
12785         obj: &String,
12786     ) -> Result<(), xml::writer::Error>
12787     where
12788         W: Write,
12789     {
12790         writer.write(xml::writer::XmlEvent::start_element(name))?;
12791         writer.write(xml::writer::XmlEvent::characters(&format!(
12792             "{value}",
12793             value = obj.to_string()
12794         )))?;
12795         writer.write(xml::writer::XmlEvent::end_element())
12796     }
12797 }
12798 
12799 #[allow(dead_code)]
12800 struct ReplicationRulesDeserializer;
12801 impl ReplicationRulesDeserializer {
12802     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<ReplicationRule>, XmlParseError>12803     fn deserialize<T: Peek + Next>(
12804         tag_name: &str,
12805         stack: &mut T,
12806     ) -> Result<Vec<ReplicationRule>, XmlParseError> {
12807         let mut obj = vec![];
12808 
12809         loop {
12810             let consume_next_tag = match stack.peek() {
12811                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
12812                     name.local_name == tag_name
12813                 }
12814                 _ => false,
12815             };
12816 
12817             if consume_next_tag {
12818                 obj.push(ReplicationRuleDeserializer::deserialize(tag_name, stack)?);
12819             } else {
12820                 break;
12821             }
12822         }
12823 
12824         Ok(obj)
12825     }
12826 }
12827 
12828 pub struct ReplicationRulesSerializer;
12829 impl ReplicationRulesSerializer {
12830     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<ReplicationRule>, ) -> Result<(), xml::writer::Error> where W: Write,12831     pub fn serialize<W>(
12832         mut writer: &mut EventWriter<W>,
12833         name: &str,
12834         obj: &Vec<ReplicationRule>,
12835     ) -> Result<(), xml::writer::Error>
12836     where
12837         W: Write,
12838     {
12839         for element in obj {
12840             ReplicationRuleSerializer::serialize(writer, name, element)?;
12841         }
12842         Ok(())
12843     }
12844 }
12845 
12846 /// <p> A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated. Must be specified together with a <code>Metrics</code> block. </p>
12847 #[derive(Default, Debug, Clone, PartialEq)]
12848 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12849 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12850 pub struct ReplicationTime {
12851     /// <p> Specifies whether the replication time is enabled. </p>
12852     pub status: String,
12853     /// <p> A container specifying the time by which replication should be complete for all objects and operations on objects. </p>
12854     pub time: ReplicationTimeValue,
12855 }
12856 
12857 #[allow(dead_code)]
12858 struct ReplicationTimeDeserializer;
12859 impl ReplicationTimeDeserializer {
12860     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ReplicationTime, XmlParseError>12861     fn deserialize<T: Peek + Next>(
12862         tag_name: &str,
12863         stack: &mut T,
12864     ) -> Result<ReplicationTime, XmlParseError> {
12865         deserialize_elements::<_, ReplicationTime, _>(tag_name, stack, |name, stack, obj| {
12866             match name {
12867                 "Status" => {
12868                     obj.status = ReplicationTimeStatusDeserializer::deserialize("Status", stack)?;
12869                 }
12870                 "Time" => {
12871                     obj.time = ReplicationTimeValueDeserializer::deserialize("Time", stack)?;
12872                 }
12873                 _ => skip_tree(stack),
12874             }
12875             Ok(())
12876         })
12877     }
12878 }
12879 
12880 pub struct ReplicationTimeSerializer;
12881 impl ReplicationTimeSerializer {
12882     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ReplicationTime, ) -> Result<(), xml::writer::Error> where W: Write,12883     pub fn serialize<W>(
12884         mut writer: &mut EventWriter<W>,
12885         name: &str,
12886         obj: &ReplicationTime,
12887     ) -> Result<(), xml::writer::Error>
12888     where
12889         W: Write,
12890     {
12891         writer.write(xml::writer::XmlEvent::start_element(name))?;
12892         writer.write(xml::writer::XmlEvent::start_element("Status"))?;
12893         writer.write(xml::writer::XmlEvent::characters(&format!(
12894             "{value}",
12895             value = obj.status
12896         )))?;
12897         writer.write(xml::writer::XmlEvent::end_element())?;
12898         ReplicationTimeValueSerializer::serialize(&mut writer, "Time", &obj.time)?;
12899         writer.write(xml::writer::XmlEvent::end_element())
12900     }
12901 }
12902 
12903 #[allow(dead_code)]
12904 struct ReplicationTimeStatusDeserializer;
12905 impl ReplicationTimeStatusDeserializer {
12906     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>12907     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
12908         start_element(tag_name, stack)?;
12909         let obj = characters(stack)?;
12910         end_element(tag_name, stack)?;
12911 
12912         Ok(obj)
12913     }
12914 }
12915 
12916 pub struct ReplicationTimeStatusSerializer;
12917 impl ReplicationTimeStatusSerializer {
12918     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12919     pub fn serialize<W>(
12920         mut writer: &mut EventWriter<W>,
12921         name: &str,
12922         obj: &String,
12923     ) -> Result<(), xml::writer::Error>
12924     where
12925         W: Write,
12926     {
12927         writer.write(xml::writer::XmlEvent::start_element(name))?;
12928         writer.write(xml::writer::XmlEvent::characters(&format!(
12929             "{value}",
12930             value = obj.to_string()
12931         )))?;
12932         writer.write(xml::writer::XmlEvent::end_element())
12933     }
12934 }
12935 
12936 /// <p> A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics <code>EventThreshold</code>. </p>
12937 #[derive(Default, Debug, Clone, PartialEq)]
12938 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12939 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12940 pub struct ReplicationTimeValue {
12941     /// <p> Contains an integer specifying time in minutes. </p> <p> Valid values: 15 minutes. </p>
12942     pub minutes: Option<i64>,
12943 }
12944 
12945 #[allow(dead_code)]
12946 struct ReplicationTimeValueDeserializer;
12947 impl ReplicationTimeValueDeserializer {
12948     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ReplicationTimeValue, XmlParseError>12949     fn deserialize<T: Peek + Next>(
12950         tag_name: &str,
12951         stack: &mut T,
12952     ) -> Result<ReplicationTimeValue, XmlParseError> {
12953         deserialize_elements::<_, ReplicationTimeValue, _>(tag_name, stack, |name, stack, obj| {
12954             match name {
12955                 "Minutes" => {
12956                     obj.minutes = Some(MinutesDeserializer::deserialize("Minutes", stack)?);
12957                 }
12958                 _ => skip_tree(stack),
12959             }
12960             Ok(())
12961         })
12962     }
12963 }
12964 
12965 pub struct ReplicationTimeValueSerializer;
12966 impl ReplicationTimeValueSerializer {
12967     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ReplicationTimeValue, ) -> Result<(), xml::writer::Error> where W: Write,12968     pub fn serialize<W>(
12969         mut writer: &mut EventWriter<W>,
12970         name: &str,
12971         obj: &ReplicationTimeValue,
12972     ) -> Result<(), xml::writer::Error>
12973     where
12974         W: Write,
12975     {
12976         writer.write(xml::writer::XmlEvent::start_element(name))?;
12977         if let Some(ref value) = obj.minutes {
12978             writer.write(xml::writer::XmlEvent::start_element("Minutes"))?;
12979             writer.write(xml::writer::XmlEvent::characters(&format!(
12980                 "{value}",
12981                 value = value
12982             )));
12983             writer.write(xml::writer::XmlEvent::end_element())?;
12984         }
12985         writer.write(xml::writer::XmlEvent::end_element())
12986     }
12987 }
12988 
12989 /// <p>Container for Payer.</p>
12990 #[derive(Default, Debug, Clone, PartialEq)]
12991 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12992 pub struct RequestPaymentConfiguration {
12993     /// <p>Specifies who pays for the download and request fees.</p>
12994     pub payer: String,
12995 }
12996 
12997 pub struct RequestPaymentConfigurationSerializer;
12998 impl RequestPaymentConfigurationSerializer {
12999     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &RequestPaymentConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,13000     pub fn serialize<W>(
13001         mut writer: &mut EventWriter<W>,
13002         name: &str,
13003         obj: &RequestPaymentConfiguration,
13004     ) -> Result<(), xml::writer::Error>
13005     where
13006         W: Write,
13007     {
13008         writer.write(xml::writer::XmlEvent::start_element(name))?;
13009         writer.write(xml::writer::XmlEvent::start_element("Payer"))?;
13010         writer.write(xml::writer::XmlEvent::characters(&format!(
13011             "{value}",
13012             value = obj.payer
13013         )))?;
13014         writer.write(xml::writer::XmlEvent::end_element())?;
13015         writer.write(xml::writer::XmlEvent::end_element())
13016     }
13017 }
13018 
13019 /// <p>Container for specifying if periodic <code>QueryProgress</code> messages should be sent.</p>
13020 #[derive(Default, Debug, Clone, PartialEq)]
13021 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13022 pub struct RequestProgress {
13023     /// <p>Specifies whether periodic QueryProgress frames should be sent. Valid values: TRUE, FALSE. Default value: FALSE.</p>
13024     pub enabled: Option<bool>,
13025 }
13026 
13027 pub struct RequestProgressSerializer;
13028 impl RequestProgressSerializer {
13029     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &RequestProgress, ) -> Result<(), xml::writer::Error> where W: Write,13030     pub fn serialize<W>(
13031         mut writer: &mut EventWriter<W>,
13032         name: &str,
13033         obj: &RequestProgress,
13034     ) -> Result<(), xml::writer::Error>
13035     where
13036         W: Write,
13037     {
13038         writer.write(xml::writer::XmlEvent::start_element(name))?;
13039         if let Some(ref value) = obj.enabled {
13040             writer.write(xml::writer::XmlEvent::start_element("Enabled"))?;
13041             writer.write(xml::writer::XmlEvent::characters(&format!(
13042                 "{value}",
13043                 value = value
13044             )));
13045             writer.write(xml::writer::XmlEvent::end_element())?;
13046         }
13047         writer.write(xml::writer::XmlEvent::end_element())
13048     }
13049 }
13050 
13051 pub struct ResponseCacheControlSerializer;
13052 impl ResponseCacheControlSerializer {
13053     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,13054     pub fn serialize<W>(
13055         mut writer: &mut EventWriter<W>,
13056         name: &str,
13057         obj: &String,
13058     ) -> Result<(), xml::writer::Error>
13059     where
13060         W: Write,
13061     {
13062         writer.write(xml::writer::XmlEvent::start_element(name))?;
13063         writer.write(xml::writer::XmlEvent::characters(&format!(
13064             "{value}",
13065             value = obj.to_string()
13066         )))?;
13067         writer.write(xml::writer::XmlEvent::end_element())
13068     }
13069 }
13070 
13071 pub struct ResponseContentDispositionSerializer;
13072 impl ResponseContentDispositionSerializer {
13073     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,13074     pub fn serialize<W>(
13075         mut writer: &mut EventWriter<W>,
13076         name: &str,
13077         obj: &String,
13078     ) -> Result<(), xml::writer::Error>
13079     where
13080         W: Write,
13081     {
13082         writer.write(xml::writer::XmlEvent::start_element(name))?;
13083         writer.write(xml::writer::XmlEvent::characters(&format!(
13084             "{value}",
13085             value = obj.to_string()
13086         )))?;
13087         writer.write(xml::writer::XmlEvent::end_element())
13088     }
13089 }
13090 
13091 pub struct ResponseContentEncodingSerializer;
13092 impl ResponseContentEncodingSerializer {
13093     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,13094     pub fn serialize<W>(
13095         mut writer: &mut EventWriter<W>,
13096         name: &str,
13097         obj: &String,
13098     ) -> Result<(), xml::writer::Error>
13099     where
13100         W: Write,
13101     {
13102         writer.write(xml::writer::XmlEvent::start_element(name))?;
13103         writer.write(xml::writer::XmlEvent::characters(&format!(
13104             "{value}",
13105             value = obj.to_string()
13106         )))?;
13107         writer.write(xml::writer::XmlEvent::end_element())
13108     }
13109 }
13110 
13111 pub struct ResponseContentLanguageSerializer;
13112 impl ResponseContentLanguageSerializer {
13113     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,13114     pub fn serialize<W>(
13115         mut writer: &mut EventWriter<W>,
13116         name: &str,
13117         obj: &String,
13118     ) -> Result<(), xml::writer::Error>
13119     where
13120         W: Write,
13121     {
13122         writer.write(xml::writer::XmlEvent::start_element(name))?;
13123         writer.write(xml::writer::XmlEvent::characters(&format!(
13124             "{value}",
13125             value = obj.to_string()
13126         )))?;
13127         writer.write(xml::writer::XmlEvent::end_element())
13128     }
13129 }
13130 
13131 pub struct ResponseContentTypeSerializer;
13132 impl ResponseContentTypeSerializer {
13133     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,13134     pub fn serialize<W>(
13135         mut writer: &mut EventWriter<W>,
13136         name: &str,
13137         obj: &String,
13138     ) -> Result<(), xml::writer::Error>
13139     where
13140         W: Write,
13141     {
13142         writer.write(xml::writer::XmlEvent::start_element(name))?;
13143         writer.write(xml::writer::XmlEvent::characters(&format!(
13144             "{value}",
13145             value = obj.to_string()
13146         )))?;
13147         writer.write(xml::writer::XmlEvent::end_element())
13148     }
13149 }
13150 
13151 pub struct ResponseExpiresSerializer;
13152 impl ResponseExpiresSerializer {
13153     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,13154     pub fn serialize<W>(
13155         mut writer: &mut EventWriter<W>,
13156         name: &str,
13157         obj: &String,
13158     ) -> Result<(), xml::writer::Error>
13159     where
13160         W: Write,
13161     {
13162         writer.write(xml::writer::XmlEvent::start_element(name))?;
13163         writer.write(xml::writer::XmlEvent::characters(&format!(
13164             "{value}",
13165             value = obj.to_string()
13166         )))?;
13167         writer.write(xml::writer::XmlEvent::end_element())
13168     }
13169 }
13170 
13171 #[derive(Default, Debug, Clone, PartialEq)]
13172 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13173 pub struct RestoreObjectOutput {
13174     pub request_charged: Option<String>,
13175     /// <p>Indicates the path in the provided S3 output location where Select results will be restored to.</p>
13176     pub restore_output_path: Option<String>,
13177 }
13178 
13179 #[allow(dead_code)]
13180 struct RestoreObjectOutputDeserializer;
13181 impl RestoreObjectOutputDeserializer {
13182     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<RestoreObjectOutput, XmlParseError>13183     fn deserialize<T: Peek + Next>(
13184         tag_name: &str,
13185         stack: &mut T,
13186     ) -> Result<RestoreObjectOutput, XmlParseError> {
13187         start_element(tag_name, stack)?;
13188 
13189         let obj = RestoreObjectOutput::default();
13190 
13191         end_element(tag_name, stack)?;
13192 
13193         Ok(obj)
13194     }
13195 }
13196 #[derive(Default, Debug, Clone, PartialEq)]
13197 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13198 pub struct RestoreObjectRequest {
13199     /// <p>The bucket name or containing the object to restore. </p> <p>When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this operation using an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html">Using Access Points</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
13200     pub bucket: String,
13201     /// <p>Object key for which the operation was initiated.</p>
13202     pub key: String,
13203     pub request_payer: Option<String>,
13204     pub restore_request: Option<RestoreRequest>,
13205     /// <p>VersionId used to reference a specific version of the object.</p>
13206     pub version_id: Option<String>,
13207 }
13208 
13209 /// <p>Container for restore job parameters.</p>
13210 #[derive(Default, Debug, Clone, PartialEq)]
13211 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13212 pub struct RestoreRequest {
13213     /// <p>Lifetime of the active copy in days. Do not use with restores that specify <code>OutputLocation</code>.</p>
13214     pub days: Option<i64>,
13215     /// <p>The optional description for the job.</p>
13216     pub description: Option<String>,
13217     /// <p>Glacier related parameters pertaining to this job. Do not use with restores that specify <code>OutputLocation</code>.</p>
13218     pub glacier_job_parameters: Option<GlacierJobParameters>,
13219     /// <p>Describes the location where the restore job's output is stored.</p>
13220     pub output_location: Option<OutputLocation>,
13221     /// <p>Describes the parameters for Select job types.</p>
13222     pub select_parameters: Option<SelectParameters>,
13223     /// <p>Glacier retrieval tier at which the restore will be processed.</p>
13224     pub tier: Option<String>,
13225     /// <p>Type of restore request.</p>
13226     pub type_: Option<String>,
13227 }
13228 
13229 pub struct RestoreRequestSerializer;
13230 impl RestoreRequestSerializer {
13231     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &RestoreRequest, ) -> Result<(), xml::writer::Error> where W: Write,13232     pub fn serialize<W>(
13233         mut writer: &mut EventWriter<W>,
13234         name: &str,
13235         obj: &RestoreRequest,
13236     ) -> Result<(), xml::writer::Error>
13237     where
13238         W: Write,
13239     {
13240         writer.write(xml::writer::XmlEvent::start_element(name))?;
13241         if let Some(ref value) = obj.days {
13242             writer.write(xml::writer::XmlEvent::start_element("Days"))?;
13243             writer.write(xml::writer::XmlEvent::characters(&format!(
13244                 "{value}",
13245                 value = value
13246             )));
13247             writer.write(xml::writer::XmlEvent::end_element())?;
13248         }
13249         if let Some(ref value) = obj.description {
13250             writer.write(xml::writer::XmlEvent::start_element("Description"))?;
13251             writer.write(xml::writer::XmlEvent::characters(&format!(
13252                 "{value}",
13253                 value = value
13254             )));
13255             writer.write(xml::writer::XmlEvent::end_element())?;
13256         }
13257         if let Some(ref value) = obj.glacier_job_parameters {
13258             &GlacierJobParametersSerializer::serialize(&mut writer, "GlacierJobParameters", value)?;
13259         }
13260         if let Some(ref value) = obj.output_location {
13261             &OutputLocationSerializer::serialize(&mut writer, "OutputLocation", value)?;
13262         }
13263         if let Some(ref value) = obj.select_parameters {
13264             &SelectParametersSerializer::serialize(&mut writer, "SelectParameters", value)?;
13265         }
13266         if let Some(ref value) = obj.tier {
13267             writer.write(xml::writer::XmlEvent::start_element("Tier"))?;
13268             writer.write(xml::writer::XmlEvent::characters(&format!(
13269                 "{value}",
13270                 value = value
13271             )));
13272             writer.write(xml::writer::XmlEvent::end_element())?;
13273         }
13274         if let Some(ref value) = obj.type_ {
13275             writer.write(xml::writer::XmlEvent::start_element("Type"))?;
13276             writer.write(xml::writer::XmlEvent::characters(&format!(
13277                 "{value}",
13278                 value = value
13279             )));
13280             writer.write(xml::writer::XmlEvent::end_element())?;
13281         }
13282         writer.write(xml::writer::XmlEvent::end_element())
13283     }
13284 }
13285 
13286 pub struct RestoreRequestTypeSerializer;
13287 impl RestoreRequestTypeSerializer {
13288     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,13289     pub fn serialize<W>(
13290         mut writer: &mut EventWriter<W>,
13291         name: &str,
13292         obj: &String,
13293     ) -> Result<(), xml::writer::Error>
13294     where
13295         W: Write,
13296     {
13297         writer.write(xml::writer::XmlEvent::start_element(name))?;
13298         writer.write(xml::writer::XmlEvent::characters(&format!(
13299             "{value}",
13300             value = obj.to_string()
13301         )))?;
13302         writer.write(xml::writer::XmlEvent::end_element())
13303     }
13304 }
13305 
13306 #[allow(dead_code)]
13307 struct RoleDeserializer;
13308 impl RoleDeserializer {
13309     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>13310     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
13311         start_element(tag_name, stack)?;
13312         let obj = characters(stack)?;
13313         end_element(tag_name, stack)?;
13314 
13315         Ok(obj)
13316     }
13317 }
13318 
13319 pub struct RoleSerializer;
13320 impl RoleSerializer {
13321     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,13322     pub fn serialize<W>(
13323         mut writer: &mut EventWriter<W>,
13324         name: &str,
13325         obj: &String,
13326     ) -> Result<(), xml::writer::Error>
13327     where
13328         W: Write,
13329     {
13330         writer.write(xml::writer::XmlEvent::start_element(name))?;
13331         writer.write(xml::writer::XmlEvent::characters(&format!(
13332             "{value}",
13333             value = obj.to_string()
13334         )))?;
13335         writer.write(xml::writer::XmlEvent::end_element())
13336     }
13337 }
13338 
13339 /// <p>Specifies the redirect behavior and when a redirect is applied.</p>
13340 #[derive(Default, Debug, Clone, PartialEq)]
13341 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13342 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13343 pub struct RoutingRule {
13344     /// <p>A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If request is for pages in the <code>/docs</code> folder, redirect to the <code>/documents</code> folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.</p>
13345     pub condition: Option<Condition>,
13346     /// <p>Container for redirect information. You can redirect requests to another host, to another page, or with another protocol. In the event of an error, you can specify a different error code to return.</p>
13347     pub redirect: Redirect,
13348 }
13349 
13350 #[allow(dead_code)]
13351 struct RoutingRuleDeserializer;
13352 impl RoutingRuleDeserializer {
13353     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<RoutingRule, XmlParseError>13354     fn deserialize<T: Peek + Next>(
13355         tag_name: &str,
13356         stack: &mut T,
13357     ) -> Result<RoutingRule, XmlParseError> {
13358         deserialize_elements::<_, RoutingRule, _>(tag_name, stack, |name, stack, obj| {
13359             match name {
13360                 "Condition" => {
13361                     obj.condition = Some(ConditionDeserializer::deserialize("Condition", stack)?);
13362                 }
13363                 "Redirect" => {
13364                     obj.redirect = RedirectDeserializer::deserialize("Redirect", stack)?;
13365                 }
13366                 _ => skip_tree(stack),
13367             }
13368             Ok(())
13369         })
13370     }
13371 }
13372 
13373 pub struct RoutingRuleSerializer;
13374 impl RoutingRuleSerializer {
13375     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &RoutingRule, ) -> Result<(), xml::writer::Error> where W: Write,13376     pub fn serialize<W>(
13377         mut writer: &mut EventWriter<W>,
13378         name: &str,
13379         obj: &RoutingRule,
13380     ) -> Result<(), xml::writer::Error>
13381     where
13382         W: Write,
13383     {
13384         writer.write(xml::writer::XmlEvent::start_element(name))?;
13385         if let Some(ref value) = obj.condition {
13386             &ConditionSerializer::serialize(&mut writer, "Condition", value)?;
13387         }
13388         RedirectSerializer::serialize(&mut writer, "Redirect", &obj.redirect)?;
13389         writer.write(xml::writer::XmlEvent::end_element())
13390     }
13391 }
13392 
13393 #[allow(dead_code)]
13394 struct RoutingRulesDeserializer;
13395 impl RoutingRulesDeserializer {
13396     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<RoutingRule>, XmlParseError>13397     fn deserialize<T: Peek + Next>(
13398         tag_name: &str,
13399         stack: &mut T,
13400     ) -> Result<Vec<RoutingRule>, XmlParseError> {
13401         deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
13402             if name == "RoutingRule" {
13403                 obj.push(RoutingRuleDeserializer::deserialize("RoutingRule", stack)?);
13404             } else {
13405                 skip_tree(stack);
13406             }
13407             Ok(())
13408         })
13409     }
13410 }
13411 
13412 pub struct RoutingRulesSerializer;
13413 impl RoutingRulesSerializer {
13414     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<RoutingRule>, ) -> Result<(), xml::writer::Error> where W: Write,13415     pub fn serialize<W>(
13416         mut writer: &mut EventWriter<W>,
13417         name: &str,
13418         obj: &Vec<RoutingRule>,
13419     ) -> Result<(), xml::writer::Error>
13420     where
13421         W: Write,
13422     {
13423         writer.write(xml::writer::XmlEvent::start_element(name))?;
13424         for element in obj {
13425             RoutingRuleSerializer::serialize(writer, "RoutingRule", element)?;
13426         }
13427         writer.write(xml::writer::XmlEvent::end_element())?;
13428         Ok(())
13429     }
13430 }
13431 
13432 /// <p>Specifies lifecycle rules for an Amazon S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html">PUT Bucket lifecycle</a> in the <i>Amazon Simple Storage Service API Reference</i>.</p>
13433 #[derive(Default, Debug, Clone, PartialEq)]
13434 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13435 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13436 pub struct Rule {
13437     pub abort_incomplete_multipart_upload: Option<AbortIncompleteMultipartUpload>,
13438     /// <p>Specifies the expiration for the lifecycle of the object.</p>
13439     pub expiration: Option<LifecycleExpiration>,
13440     /// <p>Unique identifier for the rule. The value can't be longer than 255 characters.</p>
13441     pub id: Option<String>,
13442     pub noncurrent_version_expiration: Option<NoncurrentVersionExpiration>,
13443     pub noncurrent_version_transition: Option<NoncurrentVersionTransition>,
13444     /// <p>Object key prefix that identifies one or more objects to which this rule applies.</p>
13445     pub prefix: String,
13446     /// <p>If <code>Enabled</code>, the rule is currently being applied. If <code>Disabled</code>, the rule is not currently being applied.</p>
13447     pub status: String,
13448     /// <p>Specifies when an object transitions to a specified storage class.</p>
13449     pub transition: Option<Transition>,
13450 }
13451 
13452 #[allow(dead_code)]
13453 struct RuleDeserializer;
13454 impl RuleDeserializer {
13455     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Rule, XmlParseError>13456     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Rule, XmlParseError> {
13457         deserialize_elements::<_, Rule, _>(tag_name, stack, |name, stack, obj| {
13458             match name {
13459                 "AbortIncompleteMultipartUpload" => {
13460                     obj.abort_incomplete_multipart_upload =
13461                         Some(AbortIncompleteMultipartUploadDeserializer::deserialize(
13462                             "AbortIncompleteMultipartUpload",
13463                             stack,
13464                         )?);
13465                 }
13466                 "Expiration" => {
13467                     obj.expiration = Some(LifecycleExpirationDeserializer::deserialize(
13468                         "Expiration",
13469                         stack,
13470                     )?);
13471                 }
13472                 "ID" => {
13473                     obj.id = Some(IDDeserializer::deserialize("ID", stack)?);
13474                 }
13475                 "NoncurrentVersionExpiration" => {
13476                     obj.noncurrent_version_expiration =
13477                         Some(NoncurrentVersionExpirationDeserializer::deserialize(
13478                             "NoncurrentVersionExpiration",
13479                             stack,
13480                         )?);
13481                 }
13482                 "NoncurrentVersionTransition" => {
13483                     obj.noncurrent_version_transition =
13484                         Some(NoncurrentVersionTransitionDeserializer::deserialize(
13485                             "NoncurrentVersionTransition",
13486                             stack,
13487                         )?);
13488                 }
13489                 "Prefix" => {
13490                     obj.prefix = PrefixDeserializer::deserialize("Prefix", stack)?;
13491                 }
13492                 "Status" => {
13493                     obj.status = ExpirationStatusDeserializer::deserialize("Status", stack)?;
13494                 }
13495                 "Transition" => {
13496                     obj.transition =
13497                         Some(TransitionDeserializer::deserialize("Transition", stack)?);
13498                 }
13499                 _ => skip_tree(stack),
13500             }
13501             Ok(())
13502         })
13503     }
13504 }
13505 
13506 pub struct RuleSerializer;
13507 impl RuleSerializer {
13508     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Rule, ) -> Result<(), xml::writer::Error> where W: Write,13509     pub fn serialize<W>(
13510         mut writer: &mut EventWriter<W>,
13511         name: &str,
13512         obj: &Rule,
13513     ) -> Result<(), xml::writer::Error>
13514     where
13515         W: Write,
13516     {
13517         writer.write(xml::writer::XmlEvent::start_element(name))?;
13518         if let Some(ref value) = obj.abort_incomplete_multipart_upload {
13519             &AbortIncompleteMultipartUploadSerializer::serialize(
13520                 &mut writer,
13521                 "AbortIncompleteMultipartUpload",
13522                 value,
13523             )?;
13524         }
13525         if let Some(ref value) = obj.expiration {
13526             &LifecycleExpirationSerializer::serialize(&mut writer, "Expiration", value)?;
13527         }
13528         if let Some(ref value) = obj.id {
13529             writer.write(xml::writer::XmlEvent::start_element("ID"))?;
13530             writer.write(xml::writer::XmlEvent::characters(&format!(
13531                 "{value}",
13532                 value = value
13533             )));
13534             writer.write(xml::writer::XmlEvent::end_element())?;
13535         }
13536         if let Some(ref value) = obj.noncurrent_version_expiration {
13537             &NoncurrentVersionExpirationSerializer::serialize(
13538                 &mut writer,
13539                 "NoncurrentVersionExpiration",
13540                 value,
13541             )?;
13542         }
13543         if let Some(ref value) = obj.noncurrent_version_transition {
13544             &NoncurrentVersionTransitionSerializer::serialize(
13545                 &mut writer,
13546                 "NoncurrentVersionTransition",
13547                 value,
13548             )?;
13549         }
13550         writer.write(xml::writer::XmlEvent::start_element("Prefix"))?;
13551         writer.write(xml::writer::XmlEvent::characters(&format!(
13552             "{value}",
13553             value = obj.prefix
13554         )))?;
13555         writer.write(xml::writer::XmlEvent::end_element())?;
13556         writer.write(xml::writer::XmlEvent::start_element("Status"))?;
13557         writer.write(xml::writer::XmlEvent::characters(&format!(
13558             "{value}",
13559             value = obj.status
13560         )))?;
13561         writer.write(xml::writer::XmlEvent::end_element())?;
13562         if let Some(ref value) = obj.transition {
13563             &TransitionSerializer::serialize(&mut writer, "Transition", value)?;
13564         }
13565         writer.write(xml::writer::XmlEvent::end_element())
13566     }
13567 }
13568 
13569 #[allow(dead_code)]
13570 struct RulesDeserializer;
13571 impl RulesDeserializer {
13572     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Rule>, XmlParseError>13573     fn deserialize<T: Peek + Next>(
13574         tag_name: &str,
13575         stack: &mut T,
13576     ) -> Result<Vec<Rule>, XmlParseError> {
13577         let mut obj = vec![];
13578 
13579         loop {
13580             let consume_next_tag = match stack.peek() {
13581                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
13582                     name.local_name == tag_name
13583                 }
13584                 _ => false,
13585             };
13586 
13587             if consume_next_tag {
13588                 obj.push(RuleDeserializer::deserialize(tag_name, stack)?);
13589             } else {
13590                 break;
13591             }
13592         }
13593 
13594         Ok(obj)
13595     }
13596 }
13597 
13598 pub struct RulesSerializer;
13599 impl RulesSerializer {
13600     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<Rule>, ) -> Result<(), xml::writer::Error> where W: Write,13601     pub fn serialize<W>(
13602         mut writer: &mut EventWriter<W>,
13603         name: &str,
13604         obj: &Vec<Rule>,
13605     ) -> Result<(), xml::writer::Error>
13606     where
13607         W: Write,
13608     {
13609         for element in obj {
13610             RuleSerializer::serialize(writer, name, element)?;
13611         }
13612         Ok(())
13613     }
13614 }
13615 
13616 /// <p>A container for object key name prefix and suffix filtering rules.</p>
13617 #[derive(Default, Debug, Clone, PartialEq)]
13618 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13619 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13620 pub struct S3KeyFilter {
13621     pub filter_rules: Option<Vec<FilterRule>>,
13622 }
13623 
13624 #[allow(dead_code)]
13625 struct S3KeyFilterDeserializer;
13626 impl S3KeyFilterDeserializer {
13627     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<S3KeyFilter, XmlParseError>13628     fn deserialize<T: Peek + Next>(
13629         tag_name: &str,
13630         stack: &mut T,
13631     ) -> Result<S3KeyFilter, XmlParseError> {
13632         deserialize_elements::<_, S3KeyFilter, _>(tag_name, stack, |name, stack, obj| {
13633             match name {
13634                 "FilterRule" => {
13635                     obj.filter_rules.get_or_insert(vec![]).extend(
13636                         FilterRuleListDeserializer::deserialize("FilterRule", stack)?,
13637                     );
13638                 }
13639                 _ => skip_tree(stack),
13640             }
13641             Ok(())
13642         })
13643     }
13644 }
13645 
13646 pub struct S3KeyFilterSerializer;
13647 impl S3KeyFilterSerializer {
13648     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &S3KeyFilter, ) -> Result<(), xml::writer::Error> where W: Write,13649     pub fn serialize<W>(
13650         mut writer: &mut EventWriter<W>,
13651         name: &str,
13652         obj: &S3KeyFilter,
13653     ) -> Result<(), xml::writer::Error>
13654     where
13655         W: Write,
13656     {
13657         writer.write(xml::writer::XmlEvent::start_element(name))?;
13658         if let Some(ref value) = obj.filter_rules {
13659             &FilterRuleListSerializer::serialize(&mut writer, "FilterRule", value)?;
13660         }
13661         writer.write(xml::writer::XmlEvent::end_element())
13662     }
13663 }
13664 
13665 /// <p>Describes an Amazon S3 location that will receive the results of the restore request.</p>
13666 #[derive(Default, Debug, Clone, PartialEq)]
13667 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13668 pub struct S3Location {
13669     /// <p>A list of grants that control access to the staged results.</p>
13670     pub access_control_list: Option<Vec<Grant>>,
13671     /// <p>The name of the bucket where the restore results will be placed.</p>
13672     pub bucket_name: String,
13673     /// <p>The canned ACL to apply to the restore results.</p>
13674     pub canned_acl: Option<String>,
13675     pub encryption: Option<Encryption>,
13676     /// <p>The prefix that is prepended to the restore results for this request.</p>
13677     pub prefix: String,
13678     /// <p>The class of storage used to store the restore results.</p>
13679     pub storage_class: Option<String>,
13680     /// <p>The tag-set that is applied to the restore results.</p>
13681     pub tagging: Option<Tagging>,
13682     /// <p>A list of metadata to store with the restore results in S3.</p>
13683     pub user_metadata: Option<Vec<MetadataEntry>>,
13684 }
13685 
13686 pub struct S3LocationSerializer;
13687 impl S3LocationSerializer {
13688     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &S3Location, ) -> Result<(), xml::writer::Error> where W: Write,13689     pub fn serialize<W>(
13690         mut writer: &mut EventWriter<W>,
13691         name: &str,
13692         obj: &S3Location,
13693     ) -> Result<(), xml::writer::Error>
13694     where
13695         W: Write,
13696     {
13697         writer.write(xml::writer::XmlEvent::start_element(name))?;
13698         if let Some(ref value) = obj.access_control_list {
13699             &GrantsSerializer::serialize(&mut writer, "AccessControlList", value)?;
13700         }
13701         writer.write(xml::writer::XmlEvent::start_element("BucketName"))?;
13702         writer.write(xml::writer::XmlEvent::characters(&format!(
13703             "{value}",
13704             value = obj.bucket_name
13705         )))?;
13706         writer.write(xml::writer::XmlEvent::end_element())?;
13707         if let Some(ref value) = obj.canned_acl {
13708             writer.write(xml::writer::XmlEvent::start_element("CannedACL"))?;
13709             writer.write(xml::writer::XmlEvent::characters(&format!(
13710                 "{value}",
13711                 value = value
13712             )));
13713             writer.write(xml::writer::XmlEvent::end_element())?;
13714         }
13715         if let Some(ref value) = obj.encryption {
13716             &EncryptionSerializer::serialize(&mut writer, "Encryption", value)?;
13717         }
13718         writer.write(xml::writer::XmlEvent::start_element("Prefix"))?;
13719         writer.write(xml::writer::XmlEvent::characters(&format!(
13720             "{value}",
13721             value = obj.prefix
13722         )))?;
13723         writer.write(xml::writer::XmlEvent::end_element())?;
13724         if let Some(ref value) = obj.storage_class {
13725             writer.write(xml::writer::XmlEvent::start_element("StorageClass"))?;
13726             writer.write(xml::writer::XmlEvent::characters(&format!(
13727                 "{value}",
13728                 value = value
13729             )));
13730             writer.write(xml::writer::XmlEvent::end_element())?;
13731         }
13732         if let Some(ref value) = obj.tagging {
13733             &TaggingSerializer::serialize(&mut writer, "Tagging", value)?;
13734         }
13735         if let Some(ref value) = obj.user_metadata {
13736             &UserMetadataSerializer::serialize(&mut writer, "UserMetadata", value)?;
13737         }
13738         writer.write(xml::writer::XmlEvent::end_element())
13739     }
13740 }
13741 
13742 /// <p>Specifies the use of SSE-KMS to encrypt delivered inventory reports.</p>
13743 #[derive(Default, Debug, Clone, PartialEq)]
13744 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13745 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13746 pub struct SSEKMS {
13747     /// <p>Specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) to use for encrypting inventory reports.</p>
13748     pub key_id: String,
13749 }
13750 
13751 #[allow(dead_code)]
13752 struct SSEKMSDeserializer;
13753 impl SSEKMSDeserializer {
13754     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<SSEKMS, XmlParseError>13755     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<SSEKMS, XmlParseError> {
13756         deserialize_elements::<_, SSEKMS, _>(tag_name, stack, |name, stack, obj| {
13757             match name {
13758                 "KeyId" => {
13759                     obj.key_id = SSEKMSKeyIdDeserializer::deserialize("KeyId", stack)?;
13760                 }
13761                 _ => skip_tree(stack),
13762             }
13763             Ok(())
13764         })
13765     }
13766 }
13767 
13768 pub struct SSEKMSSerializer;
13769 impl SSEKMSSerializer {
13770     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &SSEKMS, ) -> Result<(), xml::writer::Error> where W: Write,13771     pub fn serialize<W>(
13772         mut writer: &mut EventWriter<W>,
13773         name: &str,
13774         obj: &SSEKMS,
13775     ) -> Result<(), xml::writer::Error>
13776     where
13777         W: Write,
13778     {
13779         writer.write(xml::writer::XmlEvent::start_element(name))?;
13780         writer.write(xml::writer::XmlEvent::start_element("KeyId"))?;
13781         writer.write(xml::writer::XmlEvent::characters(&format!(
13782             "{value}",
13783             value = obj.key_id
13784         )))?;
13785         writer.write(xml::writer::XmlEvent::end_element())?;
13786         writer.write(xml::writer::XmlEvent::end_element())
13787     }
13788 }
13789 
13790 #[allow(dead_code)]
13791 struct SSEKMSKeyIdDeserializer;
13792 impl SSEKMSKeyIdDeserializer {
13793     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>13794     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
13795         start_element(tag_name, stack)?;
13796         let obj = characters(stack)?;
13797         end_element(tag_name, stack)?;
13798 
13799         Ok(obj)
13800     }
13801 }
13802 
13803 pub struct SSEKMSKeyIdSerializer;
13804 impl SSEKMSKeyIdSerializer {
13805     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,13806     pub fn serialize<W>(
13807         mut writer: &mut EventWriter<W>,
13808         name: &str,
13809         obj: &String,
13810     ) -> Result<(), xml::writer::Error>
13811     where
13812         W: Write,
13813     {
13814         writer.write(xml::writer::XmlEvent::start_element(name))?;
13815         writer.write(xml::writer::XmlEvent::characters(&format!(
13816             "{value}",
13817             value = obj.to_string()
13818         )))?;
13819         writer.write(xml::writer::XmlEvent::end_element())
13820     }
13821 }
13822 
13823 /// <p>Specifies the use of SSE-S3 to encrypt delivered inventory reports.</p>
13824 #[derive(Default, Debug, Clone, PartialEq)]
13825 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13826 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13827 pub struct SSES3 {}
13828 
13829 #[allow(dead_code)]
13830 struct SSES3Deserializer;
13831 impl SSES3Deserializer {
13832     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<SSES3, XmlParseError>13833     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<SSES3, XmlParseError> {
13834         start_element(tag_name, stack)?;
13835 
13836         let obj = SSES3::default();
13837 
13838         end_element(tag_name, stack)?;
13839 
13840         Ok(obj)
13841     }
13842 }
13843 
13844 pub struct SSES3Serializer;
13845 impl SSES3Serializer {
13846     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &SSES3, ) -> Result<(), xml::writer::Error> where W: Write,13847     pub fn serialize<W>(
13848         mut writer: &mut EventWriter<W>,
13849         name: &str,
13850         obj: &SSES3,
13851     ) -> Result<(), xml::writer::Error>
13852     where
13853         W: Write,
13854     {
13855         writer.write(xml::writer::XmlEvent::start_element(name))?;
13856         writer.write(xml::writer::XmlEvent::end_element())
13857     }
13858 }
13859 
13860 /// <p>Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range.</p>
13861 #[derive(Default, Debug, Clone, PartialEq)]
13862 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13863 pub struct ScanRange {
13864     /// <p>Specifies the end of the byte range. This parameter is optional. Valid values: non-negative integers. The default value is one less than the size of the object being queried. If only the End parameter is supplied, it is interpreted to mean scan the last N bytes of the file. For example, <code>&lt;scanrange&gt;&lt;end&gt;50&lt;/end&gt;&lt;/scanrange&gt;</code> means scan the last 50 bytes.</p>
13865     pub end: Option<i64>,
13866     /// <p>Specifies the start of the byte range. This parameter is optional. Valid values: non-negative integers. The default value is 0. If only start is supplied, it means scan from that point to the end of the file.For example; <code>&lt;scanrange&gt;&lt;start&gt;50&lt;/start&gt;&lt;/scanrange&gt;</code> means scan from byte 50 until the end of the file.</p>
13867     pub start: Option<i64>,
13868 }
13869 
13870 pub struct ScanRangeSerializer;
13871 impl ScanRangeSerializer {
13872     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ScanRange, ) -> Result<(), xml::writer::Error> where W: Write,13873     pub fn serialize<W>(
13874         mut writer: &mut EventWriter<W>,
13875         name: &str,
13876         obj: &ScanRange,
13877     ) -> Result<(), xml::writer::Error>
13878     where
13879         W: Write,
13880     {
13881         writer.write(xml::writer::XmlEvent::start_element(name))?;
13882         if let Some(ref value) = obj.end {
13883             writer.write(xml::writer::XmlEvent::start_element("End"))?;
13884             writer.write(xml::writer::XmlEvent::characters(&format!(
13885                 "{value}",
13886                 value = value
13887             )));
13888             writer.write(xml::writer::XmlEvent::end_element())?;
13889         }
13890         if let Some(ref value) = obj.start {
13891             writer.write(xml::writer::XmlEvent::start_element("Start"))?;
13892             writer.write(xml::writer::XmlEvent::characters(&format!(
13893                 "{value}",
13894                 value = value
13895             )));
13896             writer.write(xml::writer::XmlEvent::end_element())?;
13897         }
13898         writer.write(xml::writer::XmlEvent::end_element())
13899     }
13900 }
13901 
13902 /// <p>The container for selecting objects from a content event stream.</p>
13903 #[derive(Default, Debug, Clone, PartialEq)]
13904 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13905 pub struct SelectObjectContentEventStream {
13906     /// <p>The Continuation Event.</p>
13907     pub cont: Option<ContinuationEvent>,
13908     /// <p>The End Event.</p>
13909     pub end: Option<EndEvent>,
13910     /// <p>The Progress Event.</p>
13911     pub progress: Option<ProgressEvent>,
13912     /// <p>The Records Event.</p>
13913     pub records: Option<RecordsEvent>,
13914     /// <p>The Stats Event.</p>
13915     pub stats: Option<StatsEvent>,
13916 }
13917 
13918 #[allow(dead_code)]
13919 struct SelectObjectContentEventStreamDeserializer;
13920 impl SelectObjectContentEventStreamDeserializer {
13921     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<SelectObjectContentEventStream, XmlParseError>13922     fn deserialize<T: Peek + Next>(
13923         tag_name: &str,
13924         stack: &mut T,
13925     ) -> Result<SelectObjectContentEventStream, XmlParseError> {
13926         deserialize_elements::<_, SelectObjectContentEventStream, _>(
13927             tag_name,
13928             stack,
13929             |name, stack, obj| {
13930                 match name {
13931                     "Cont" => {
13932                         obj.cont = Some(ContinuationEventDeserializer::deserialize("Cont", stack)?);
13933                     }
13934                     "End" => {
13935                         obj.end = Some(EndEventDeserializer::deserialize("End", stack)?);
13936                     }
13937                     "Progress" => {
13938                         obj.progress =
13939                             Some(ProgressEventDeserializer::deserialize("Progress", stack)?);
13940                     }
13941                     "Records" => {
13942                         obj.records =
13943                             Some(RecordsEventDeserializer::deserialize("Records", stack)?);
13944                     }
13945                     "Stats" => {
13946                         obj.stats = Some(StatsEventDeserializer::deserialize("Stats", stack)?);
13947                     }
13948                     _ => skip_tree(stack),
13949                 }
13950                 Ok(())
13951             },
13952         )
13953     }
13954 }
13955 #[derive(Default, Debug, Clone, PartialEq)]
13956 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13957 pub struct SelectObjectContentOutput {
13958     /// <p>The array of results.</p>
13959     pub payload: Option<SelectObjectContentEventStream>,
13960 }
13961 
13962 #[allow(dead_code)]
13963 struct SelectObjectContentOutputDeserializer;
13964 impl SelectObjectContentOutputDeserializer {
13965     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<SelectObjectContentOutput, XmlParseError>13966     fn deserialize<T: Peek + Next>(
13967         tag_name: &str,
13968         stack: &mut T,
13969     ) -> Result<SelectObjectContentOutput, XmlParseError> {
13970         Ok(SelectObjectContentOutput {
13971             payload: Some(SelectObjectContentEventStreamDeserializer::deserialize(
13972                 "Payload", stack,
13973             )?),
13974             ..SelectObjectContentOutput::default()
13975         })
13976     }
13977 }
13978 /// <p>Request to filter the contents of an Amazon S3 object based on a simple Structured Query Language (SQL) statement. In the request, along with the SQL expression, you must specify a data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data into records. It returns only records that match the specified SQL expression. You must also specify the data serialization format for the response. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html">S3Select API Documentation</a>.</p>
13979 #[derive(Default, Debug, Clone, PartialEq)]
13980 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13981 pub struct SelectObjectContentRequest {
13982     /// <p>The S3 bucket.</p>
13983     pub bucket: String,
13984     /// <p>The expression that is used to query the object.</p>
13985     pub expression: String,
13986     /// <p>The type of the provided expression (for example, SQL).</p>
13987     pub expression_type: String,
13988     /// <p>Describes the format of the data in the object that is being queried.</p>
13989     pub input_serialization: InputSerialization,
13990     /// <p>The object key.</p>
13991     pub key: String,
13992     /// <p>Describes the format of the data that you want Amazon S3 to return in response.</p>
13993     pub output_serialization: OutputSerialization,
13994     /// <p>Specifies if periodic request progress information should be enabled.</p>
13995     pub request_progress: Option<RequestProgress>,
13996     /// <p>The SSE Algorithm used to encrypt the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys</a>. </p>
13997     pub sse_customer_algorithm: Option<String>,
13998     /// <p>The SSE Customer Key. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys</a>. </p>
13999     pub sse_customer_key: Option<String>,
14000     /// <p>The SSE Customer Key MD5. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys</a>. </p>
14001     pub sse_customer_key_md5: Option<String>,
14002     /// <p><p>Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range.</p> <p> <code>ScanRange</code>may be used in the following ways:</p> <ul> <li> <p> <code>&lt;scanrange&gt;&lt;start&gt;50&lt;/start&gt;&lt;end&gt;100&lt;/end&gt;&lt;/scanrange&gt;</code> - process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)</p> </li> <li> <p> <code>&lt;scanrange&gt;&lt;start&gt;50&lt;/start&gt;&lt;/scanrange&gt;</code> - process only the records starting after the byte 50</p> </li> <li> <p> <code>&lt;scanrange&gt;&lt;end&gt;50&lt;/end&gt;&lt;/scanrange&gt;</code> - process only the records within the last 50 bytes of the file.</p> </li> </ul></p>
14003     pub scan_range: Option<ScanRange>,
14004 }
14005 
14006 pub struct SelectObjectContentRequestSerializer;
14007 impl SelectObjectContentRequestSerializer {
14008     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &SelectObjectContentRequest, xmlns: &str, ) -> Result<(), xml::writer::Error> where W: Write,14009     pub fn serialize<W>(
14010         mut writer: &mut EventWriter<W>,
14011         name: &str,
14012         obj: &SelectObjectContentRequest,
14013         xmlns: &str,
14014     ) -> Result<(), xml::writer::Error>
14015     where
14016         W: Write,
14017     {
14018         writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
14019         ExpressionSerializer::serialize(&mut writer, "Expression", &obj.expression)?;
14020         ExpressionTypeSerializer::serialize(&mut writer, "ExpressionType", &obj.expression_type)?;
14021         InputSerializationSerializer::serialize(
14022             &mut writer,
14023             "InputSerialization",
14024             &obj.input_serialization,
14025         )?;
14026         OutputSerializationSerializer::serialize(
14027             &mut writer,
14028             "OutputSerialization",
14029             &obj.output_serialization,
14030         )?;
14031         if let Some(ref value) = obj.request_progress {
14032             &RequestProgressSerializer::serialize(&mut writer, "RequestProgress", value)?;
14033         }
14034         if let Some(ref value) = obj.scan_range {
14035             &ScanRangeSerializer::serialize(&mut writer, "ScanRange", value)?;
14036         }
14037         writer.write(xml::writer::XmlEvent::end_element())
14038     }
14039 }
14040 /// <p>Describes the parameters for Select job types.</p>
14041 #[derive(Default, Debug, Clone, PartialEq)]
14042 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14043 pub struct SelectParameters {
14044     /// <p>The expression that is used to query the object.</p>
14045     pub expression: String,
14046     /// <p>The type of the provided expression (for example, SQL).</p>
14047     pub expression_type: String,
14048     /// <p>Describes the serialization format of the object.</p>
14049     pub input_serialization: InputSerialization,
14050     /// <p>Describes how the results of the Select job are serialized.</p>
14051     pub output_serialization: OutputSerialization,
14052 }
14053 
14054 pub struct SelectParametersSerializer;
14055 impl SelectParametersSerializer {
14056     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &SelectParameters, ) -> Result<(), xml::writer::Error> where W: Write,14057     pub fn serialize<W>(
14058         mut writer: &mut EventWriter<W>,
14059         name: &str,
14060         obj: &SelectParameters,
14061     ) -> Result<(), xml::writer::Error>
14062     where
14063         W: Write,
14064     {
14065         writer.write(xml::writer::XmlEvent::start_element(name))?;
14066         writer.write(xml::writer::XmlEvent::start_element("Expression"))?;
14067         writer.write(xml::writer::XmlEvent::characters(&format!(
14068             "{value}",
14069             value = obj.expression
14070         )))?;
14071         writer.write(xml::writer::XmlEvent::end_element())?;
14072         writer.write(xml::writer::XmlEvent::start_element("ExpressionType"))?;
14073         writer.write(xml::writer::XmlEvent::characters(&format!(
14074             "{value}",
14075             value = obj.expression_type
14076         )))?;
14077         writer.write(xml::writer::XmlEvent::end_element())?;
14078         InputSerializationSerializer::serialize(
14079             &mut writer,
14080             "InputSerialization",
14081             &obj.input_serialization,
14082         )?;
14083         OutputSerializationSerializer::serialize(
14084             &mut writer,
14085             "OutputSerialization",
14086             &obj.output_serialization,
14087         )?;
14088         writer.write(xml::writer::XmlEvent::end_element())
14089     }
14090 }
14091 
14092 #[allow(dead_code)]
14093 struct ServerSideEncryptionDeserializer;
14094 impl ServerSideEncryptionDeserializer {
14095     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14096     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14097         start_element(tag_name, stack)?;
14098         let obj = characters(stack)?;
14099         end_element(tag_name, stack)?;
14100 
14101         Ok(obj)
14102     }
14103 }
14104 
14105 pub struct ServerSideEncryptionSerializer;
14106 impl ServerSideEncryptionSerializer {
14107     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14108     pub fn serialize<W>(
14109         mut writer: &mut EventWriter<W>,
14110         name: &str,
14111         obj: &String,
14112     ) -> Result<(), xml::writer::Error>
14113     where
14114         W: Write,
14115     {
14116         writer.write(xml::writer::XmlEvent::start_element(name))?;
14117         writer.write(xml::writer::XmlEvent::characters(&format!(
14118             "{value}",
14119             value = obj.to_string()
14120         )))?;
14121         writer.write(xml::writer::XmlEvent::end_element())
14122     }
14123 }
14124 
14125 /// <p>Describes the default server-side encryption to apply to new objects in the bucket. If a PUT Object request doesn't specify any server-side encryption, this default encryption will be applied. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTencryption.html">PUT Bucket encryption</a> in the <i>Amazon Simple Storage Service API Reference</i>.</p>
14126 #[derive(Default, Debug, Clone, PartialEq)]
14127 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14128 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14129 pub struct ServerSideEncryptionByDefault {
14130     /// <p>KMS master key ID to use for the default encryption. This parameter is allowed if and only if <code>SSEAlgorithm</code> is set to <code>aws:kms</code>.</p>
14131     pub kms_master_key_id: Option<String>,
14132     /// <p>Server-side encryption algorithm to use for the default encryption.</p>
14133     pub sse_algorithm: String,
14134 }
14135 
14136 #[allow(dead_code)]
14137 struct ServerSideEncryptionByDefaultDeserializer;
14138 impl ServerSideEncryptionByDefaultDeserializer {
14139     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ServerSideEncryptionByDefault, XmlParseError>14140     fn deserialize<T: Peek + Next>(
14141         tag_name: &str,
14142         stack: &mut T,
14143     ) -> Result<ServerSideEncryptionByDefault, XmlParseError> {
14144         deserialize_elements::<_, ServerSideEncryptionByDefault, _>(
14145             tag_name,
14146             stack,
14147             |name, stack, obj| {
14148                 match name {
14149                     "KMSMasterKeyID" => {
14150                         obj.kms_master_key_id = Some(SSEKMSKeyIdDeserializer::deserialize(
14151                             "KMSMasterKeyID",
14152                             stack,
14153                         )?);
14154                     }
14155                     "SSEAlgorithm" => {
14156                         obj.sse_algorithm =
14157                             ServerSideEncryptionDeserializer::deserialize("SSEAlgorithm", stack)?;
14158                     }
14159                     _ => skip_tree(stack),
14160                 }
14161                 Ok(())
14162             },
14163         )
14164     }
14165 }
14166 
14167 pub struct ServerSideEncryptionByDefaultSerializer;
14168 impl ServerSideEncryptionByDefaultSerializer {
14169     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ServerSideEncryptionByDefault, ) -> Result<(), xml::writer::Error> where W: Write,14170     pub fn serialize<W>(
14171         mut writer: &mut EventWriter<W>,
14172         name: &str,
14173         obj: &ServerSideEncryptionByDefault,
14174     ) -> Result<(), xml::writer::Error>
14175     where
14176         W: Write,
14177     {
14178         writer.write(xml::writer::XmlEvent::start_element(name))?;
14179         if let Some(ref value) = obj.kms_master_key_id {
14180             writer.write(xml::writer::XmlEvent::start_element("KMSMasterKeyID"))?;
14181             writer.write(xml::writer::XmlEvent::characters(&format!(
14182                 "{value}",
14183                 value = value
14184             )));
14185             writer.write(xml::writer::XmlEvent::end_element())?;
14186         }
14187         writer.write(xml::writer::XmlEvent::start_element("SSEAlgorithm"))?;
14188         writer.write(xml::writer::XmlEvent::characters(&format!(
14189             "{value}",
14190             value = obj.sse_algorithm
14191         )))?;
14192         writer.write(xml::writer::XmlEvent::end_element())?;
14193         writer.write(xml::writer::XmlEvent::end_element())
14194     }
14195 }
14196 
14197 /// <p>Specifies the default server-side-encryption configuration.</p>
14198 #[derive(Default, Debug, Clone, PartialEq)]
14199 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14200 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14201 pub struct ServerSideEncryptionConfiguration {
14202     /// <p>Container for information about a particular server-side encryption configuration rule.</p>
14203     pub rules: Vec<ServerSideEncryptionRule>,
14204 }
14205 
14206 #[allow(dead_code)]
14207 struct ServerSideEncryptionConfigurationDeserializer;
14208 impl ServerSideEncryptionConfigurationDeserializer {
14209     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ServerSideEncryptionConfiguration, XmlParseError>14210     fn deserialize<T: Peek + Next>(
14211         tag_name: &str,
14212         stack: &mut T,
14213     ) -> Result<ServerSideEncryptionConfiguration, XmlParseError> {
14214         deserialize_elements::<_, ServerSideEncryptionConfiguration, _>(
14215             tag_name,
14216             stack,
14217             |name, stack, obj| {
14218                 match name {
14219                     "Rule" => {
14220                         obj.rules
14221                             .extend(ServerSideEncryptionRulesDeserializer::deserialize(
14222                                 "Rule", stack,
14223                             )?);
14224                     }
14225                     _ => skip_tree(stack),
14226                 }
14227                 Ok(())
14228             },
14229         )
14230     }
14231 }
14232 
14233 pub struct ServerSideEncryptionConfigurationSerializer;
14234 impl ServerSideEncryptionConfigurationSerializer {
14235     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ServerSideEncryptionConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,14236     pub fn serialize<W>(
14237         mut writer: &mut EventWriter<W>,
14238         name: &str,
14239         obj: &ServerSideEncryptionConfiguration,
14240     ) -> Result<(), xml::writer::Error>
14241     where
14242         W: Write,
14243     {
14244         writer.write(xml::writer::XmlEvent::start_element(name))?;
14245         ServerSideEncryptionRulesSerializer::serialize(&mut writer, "Rule", &obj.rules)?;
14246         writer.write(xml::writer::XmlEvent::end_element())
14247     }
14248 }
14249 
14250 /// <p>Specifies the default server-side encryption configuration.</p>
14251 #[derive(Default, Debug, Clone, PartialEq)]
14252 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14253 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14254 pub struct ServerSideEncryptionRule {
14255     /// <p>Specifies the default server-side encryption to apply to new objects in the bucket. If a PUT Object request doesn't specify any server-side encryption, this default encryption will be applied.</p>
14256     pub apply_server_side_encryption_by_default: Option<ServerSideEncryptionByDefault>,
14257 }
14258 
14259 #[allow(dead_code)]
14260 struct ServerSideEncryptionRuleDeserializer;
14261 impl ServerSideEncryptionRuleDeserializer {
14262     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ServerSideEncryptionRule, XmlParseError>14263     fn deserialize<T: Peek + Next>(
14264         tag_name: &str,
14265         stack: &mut T,
14266     ) -> Result<ServerSideEncryptionRule, XmlParseError> {
14267         deserialize_elements::<_, ServerSideEncryptionRule, _>(
14268             tag_name,
14269             stack,
14270             |name, stack, obj| {
14271                 match name {
14272                     "ApplyServerSideEncryptionByDefault" => {
14273                         obj.apply_server_side_encryption_by_default =
14274                             Some(ServerSideEncryptionByDefaultDeserializer::deserialize(
14275                                 "ApplyServerSideEncryptionByDefault",
14276                                 stack,
14277                             )?);
14278                     }
14279                     _ => skip_tree(stack),
14280                 }
14281                 Ok(())
14282             },
14283         )
14284     }
14285 }
14286 
14287 pub struct ServerSideEncryptionRuleSerializer;
14288 impl ServerSideEncryptionRuleSerializer {
14289     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ServerSideEncryptionRule, ) -> Result<(), xml::writer::Error> where W: Write,14290     pub fn serialize<W>(
14291         mut writer: &mut EventWriter<W>,
14292         name: &str,
14293         obj: &ServerSideEncryptionRule,
14294     ) -> Result<(), xml::writer::Error>
14295     where
14296         W: Write,
14297     {
14298         writer.write(xml::writer::XmlEvent::start_element(name))?;
14299         if let Some(ref value) = obj.apply_server_side_encryption_by_default {
14300             &ServerSideEncryptionByDefaultSerializer::serialize(
14301                 &mut writer,
14302                 "ApplyServerSideEncryptionByDefault",
14303                 value,
14304             )?;
14305         }
14306         writer.write(xml::writer::XmlEvent::end_element())
14307     }
14308 }
14309 
14310 #[allow(dead_code)]
14311 struct ServerSideEncryptionRulesDeserializer;
14312 impl ServerSideEncryptionRulesDeserializer {
14313     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<ServerSideEncryptionRule>, XmlParseError>14314     fn deserialize<T: Peek + Next>(
14315         tag_name: &str,
14316         stack: &mut T,
14317     ) -> Result<Vec<ServerSideEncryptionRule>, XmlParseError> {
14318         let mut obj = vec![];
14319 
14320         loop {
14321             let consume_next_tag = match stack.peek() {
14322                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
14323                     name.local_name == tag_name
14324                 }
14325                 _ => false,
14326             };
14327 
14328             if consume_next_tag {
14329                 obj.push(ServerSideEncryptionRuleDeserializer::deserialize(
14330                     tag_name, stack,
14331                 )?);
14332             } else {
14333                 break;
14334             }
14335         }
14336 
14337         Ok(obj)
14338     }
14339 }
14340 
14341 pub struct ServerSideEncryptionRulesSerializer;
14342 impl ServerSideEncryptionRulesSerializer {
14343     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<ServerSideEncryptionRule>, ) -> Result<(), xml::writer::Error> where W: Write,14344     pub fn serialize<W>(
14345         mut writer: &mut EventWriter<W>,
14346         name: &str,
14347         obj: &Vec<ServerSideEncryptionRule>,
14348     ) -> Result<(), xml::writer::Error>
14349     where
14350         W: Write,
14351     {
14352         for element in obj {
14353             ServerSideEncryptionRuleSerializer::serialize(writer, name, element)?;
14354         }
14355         Ok(())
14356     }
14357 }
14358 
14359 #[allow(dead_code)]
14360 struct SettingDeserializer;
14361 impl SettingDeserializer {
14362     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>14363     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
14364         start_element(tag_name, stack)?;
14365         let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
14366         end_element(tag_name, stack)?;
14367 
14368         Ok(obj)
14369     }
14370 }
14371 
14372 pub struct SettingSerializer;
14373 impl SettingSerializer {
14374     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,14375     pub fn serialize<W>(
14376         mut writer: &mut EventWriter<W>,
14377         name: &str,
14378         obj: &bool,
14379     ) -> Result<(), xml::writer::Error>
14380     where
14381         W: Write,
14382     {
14383         writer.write(xml::writer::XmlEvent::start_element(name))?;
14384         writer.write(xml::writer::XmlEvent::characters(&format!(
14385             "{value}",
14386             value = obj.to_string()
14387         )))?;
14388         writer.write(xml::writer::XmlEvent::end_element())
14389     }
14390 }
14391 
14392 #[allow(dead_code)]
14393 struct SizeDeserializer;
14394 impl SizeDeserializer {
14395     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>14396     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
14397         start_element(tag_name, stack)?;
14398         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
14399         end_element(tag_name, stack)?;
14400 
14401         Ok(obj)
14402     }
14403 }
14404 /// <p>A container that describes additional filters for identifying the source objects that you want to replicate. You can choose to enable or disable the replication of these objects. Currently, Amazon S3 supports only the filter that you can specify for objects created with server-side encryption using a customer master key (CMK) stored in AWS Key Management Service (SSE-KMS).</p>
14405 #[derive(Default, Debug, Clone, PartialEq)]
14406 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14407 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14408 pub struct SourceSelectionCriteria {
14409     /// <p> A container for filter information for the selection of Amazon S3 objects encrypted with AWS KMS. If you include <code>SourceSelectionCriteria</code> in the replication configuration, this element is required. </p>
14410     pub sse_kms_encrypted_objects: Option<SseKmsEncryptedObjects>,
14411 }
14412 
14413 #[allow(dead_code)]
14414 struct SourceSelectionCriteriaDeserializer;
14415 impl SourceSelectionCriteriaDeserializer {
14416     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<SourceSelectionCriteria, XmlParseError>14417     fn deserialize<T: Peek + Next>(
14418         tag_name: &str,
14419         stack: &mut T,
14420     ) -> Result<SourceSelectionCriteria, XmlParseError> {
14421         deserialize_elements::<_, SourceSelectionCriteria, _>(
14422             tag_name,
14423             stack,
14424             |name, stack, obj| {
14425                 match name {
14426                     "SseKmsEncryptedObjects" => {
14427                         obj.sse_kms_encrypted_objects =
14428                             Some(SseKmsEncryptedObjectsDeserializer::deserialize(
14429                                 "SseKmsEncryptedObjects",
14430                                 stack,
14431                             )?);
14432                     }
14433                     _ => skip_tree(stack),
14434                 }
14435                 Ok(())
14436             },
14437         )
14438     }
14439 }
14440 
14441 pub struct SourceSelectionCriteriaSerializer;
14442 impl SourceSelectionCriteriaSerializer {
14443     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &SourceSelectionCriteria, ) -> Result<(), xml::writer::Error> where W: Write,14444     pub fn serialize<W>(
14445         mut writer: &mut EventWriter<W>,
14446         name: &str,
14447         obj: &SourceSelectionCriteria,
14448     ) -> Result<(), xml::writer::Error>
14449     where
14450         W: Write,
14451     {
14452         writer.write(xml::writer::XmlEvent::start_element(name))?;
14453         if let Some(ref value) = obj.sse_kms_encrypted_objects {
14454             &SseKmsEncryptedObjectsSerializer::serialize(
14455                 &mut writer,
14456                 "SseKmsEncryptedObjects",
14457                 value,
14458             )?;
14459         }
14460         writer.write(xml::writer::XmlEvent::end_element())
14461     }
14462 }
14463 
14464 /// <p>A container for filter information for the selection of S3 objects encrypted with AWS KMS.</p>
14465 #[derive(Default, Debug, Clone, PartialEq)]
14466 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14467 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14468 pub struct SseKmsEncryptedObjects {
14469     /// <p>Specifies whether Amazon S3 replicates objects created with server-side encryption using a customer master key (CMK) stored in AWS Key Management Service.</p>
14470     pub status: String,
14471 }
14472 
14473 #[allow(dead_code)]
14474 struct SseKmsEncryptedObjectsDeserializer;
14475 impl SseKmsEncryptedObjectsDeserializer {
14476     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<SseKmsEncryptedObjects, XmlParseError>14477     fn deserialize<T: Peek + Next>(
14478         tag_name: &str,
14479         stack: &mut T,
14480     ) -> Result<SseKmsEncryptedObjects, XmlParseError> {
14481         deserialize_elements::<_, SseKmsEncryptedObjects, _>(tag_name, stack, |name, stack, obj| {
14482             match name {
14483                 "Status" => {
14484                     obj.status =
14485                         SseKmsEncryptedObjectsStatusDeserializer::deserialize("Status", stack)?;
14486                 }
14487                 _ => skip_tree(stack),
14488             }
14489             Ok(())
14490         })
14491     }
14492 }
14493 
14494 pub struct SseKmsEncryptedObjectsSerializer;
14495 impl SseKmsEncryptedObjectsSerializer {
14496     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &SseKmsEncryptedObjects, ) -> Result<(), xml::writer::Error> where W: Write,14497     pub fn serialize<W>(
14498         mut writer: &mut EventWriter<W>,
14499         name: &str,
14500         obj: &SseKmsEncryptedObjects,
14501     ) -> Result<(), xml::writer::Error>
14502     where
14503         W: Write,
14504     {
14505         writer.write(xml::writer::XmlEvent::start_element(name))?;
14506         writer.write(xml::writer::XmlEvent::start_element("Status"))?;
14507         writer.write(xml::writer::XmlEvent::characters(&format!(
14508             "{value}",
14509             value = obj.status
14510         )))?;
14511         writer.write(xml::writer::XmlEvent::end_element())?;
14512         writer.write(xml::writer::XmlEvent::end_element())
14513     }
14514 }
14515 
14516 #[allow(dead_code)]
14517 struct SseKmsEncryptedObjectsStatusDeserializer;
14518 impl SseKmsEncryptedObjectsStatusDeserializer {
14519     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14520     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14521         start_element(tag_name, stack)?;
14522         let obj = characters(stack)?;
14523         end_element(tag_name, stack)?;
14524 
14525         Ok(obj)
14526     }
14527 }
14528 
14529 pub struct SseKmsEncryptedObjectsStatusSerializer;
14530 impl SseKmsEncryptedObjectsStatusSerializer {
14531     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14532     pub fn serialize<W>(
14533         mut writer: &mut EventWriter<W>,
14534         name: &str,
14535         obj: &String,
14536     ) -> Result<(), xml::writer::Error>
14537     where
14538         W: Write,
14539     {
14540         writer.write(xml::writer::XmlEvent::start_element(name))?;
14541         writer.write(xml::writer::XmlEvent::characters(&format!(
14542             "{value}",
14543             value = obj.to_string()
14544         )))?;
14545         writer.write(xml::writer::XmlEvent::end_element())
14546     }
14547 }
14548 
14549 pub struct StartSerializer;
14550 impl StartSerializer {
14551     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,14552     pub fn serialize<W>(
14553         mut writer: &mut EventWriter<W>,
14554         name: &str,
14555         obj: &i64,
14556     ) -> Result<(), xml::writer::Error>
14557     where
14558         W: Write,
14559     {
14560         writer.write(xml::writer::XmlEvent::start_element(name))?;
14561         writer.write(xml::writer::XmlEvent::characters(&format!(
14562             "{value}",
14563             value = obj.to_string()
14564         )))?;
14565         writer.write(xml::writer::XmlEvent::end_element())
14566     }
14567 }
14568 
14569 #[allow(dead_code)]
14570 struct StartAfterDeserializer;
14571 impl StartAfterDeserializer {
14572     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14573     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14574         start_element(tag_name, stack)?;
14575         let obj = characters(stack)?;
14576         end_element(tag_name, stack)?;
14577 
14578         Ok(obj)
14579     }
14580 }
14581 
14582 pub struct StartAfterSerializer;
14583 impl StartAfterSerializer {
14584     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14585     pub fn serialize<W>(
14586         mut writer: &mut EventWriter<W>,
14587         name: &str,
14588         obj: &String,
14589     ) -> Result<(), xml::writer::Error>
14590     where
14591         W: Write,
14592     {
14593         writer.write(xml::writer::XmlEvent::start_element(name))?;
14594         writer.write(xml::writer::XmlEvent::characters(&format!(
14595             "{value}",
14596             value = obj.to_string()
14597         )))?;
14598         writer.write(xml::writer::XmlEvent::end_element())
14599     }
14600 }
14601 
14602 /// <p>Container for the stats details.</p>
14603 #[derive(Default, Debug, Clone, PartialEq)]
14604 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14605 pub struct Stats {
14606     /// <p>The total number of uncompressed object bytes processed.</p>
14607     pub bytes_processed: Option<i64>,
14608     /// <p>The total number of bytes of records payload data returned.</p>
14609     pub bytes_returned: Option<i64>,
14610     /// <p>The total number of object bytes scanned.</p>
14611     pub bytes_scanned: Option<i64>,
14612 }
14613 
14614 #[allow(dead_code)]
14615 struct StatsDeserializer;
14616 impl StatsDeserializer {
14617     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Stats, XmlParseError>14618     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Stats, XmlParseError> {
14619         deserialize_elements::<_, Stats, _>(tag_name, stack, |name, stack, obj| {
14620             match name {
14621                 "BytesProcessed" => {
14622                     obj.bytes_processed = Some(BytesProcessedDeserializer::deserialize(
14623                         "BytesProcessed",
14624                         stack,
14625                     )?);
14626                 }
14627                 "BytesReturned" => {
14628                     obj.bytes_returned = Some(BytesReturnedDeserializer::deserialize(
14629                         "BytesReturned",
14630                         stack,
14631                     )?);
14632                 }
14633                 "BytesScanned" => {
14634                     obj.bytes_scanned = Some(BytesScannedDeserializer::deserialize(
14635                         "BytesScanned",
14636                         stack,
14637                     )?);
14638                 }
14639                 _ => skip_tree(stack),
14640             }
14641             Ok(())
14642         })
14643     }
14644 }
14645 /// <p>Container for the Stats Event.</p>
14646 #[derive(Default, Debug, Clone, PartialEq)]
14647 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14648 pub struct StatsEvent {
14649     /// <p>The Stats event details.</p>
14650     pub details: Option<Stats>,
14651 }
14652 
14653 #[allow(dead_code)]
14654 struct StatsEventDeserializer;
14655 impl StatsEventDeserializer {
14656     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<StatsEvent, XmlParseError>14657     fn deserialize<T: Peek + Next>(
14658         tag_name: &str,
14659         stack: &mut T,
14660     ) -> Result<StatsEvent, XmlParseError> {
14661         deserialize_elements::<_, StatsEvent, _>(tag_name, stack, |name, stack, obj| {
14662             match name {
14663                 "Details" => {
14664                     obj.details = Some(StatsDeserializer::deserialize("Details", stack)?);
14665                 }
14666                 _ => skip_tree(stack),
14667             }
14668             Ok(())
14669         })
14670     }
14671 }
14672 #[allow(dead_code)]
14673 struct StorageClassDeserializer;
14674 impl StorageClassDeserializer {
14675     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14676     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14677         start_element(tag_name, stack)?;
14678         let obj = characters(stack)?;
14679         end_element(tag_name, stack)?;
14680 
14681         Ok(obj)
14682     }
14683 }
14684 
14685 pub struct StorageClassSerializer;
14686 impl StorageClassSerializer {
14687     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14688     pub fn serialize<W>(
14689         mut writer: &mut EventWriter<W>,
14690         name: &str,
14691         obj: &String,
14692     ) -> Result<(), xml::writer::Error>
14693     where
14694         W: Write,
14695     {
14696         writer.write(xml::writer::XmlEvent::start_element(name))?;
14697         writer.write(xml::writer::XmlEvent::characters(&format!(
14698             "{value}",
14699             value = obj.to_string()
14700         )))?;
14701         writer.write(xml::writer::XmlEvent::end_element())
14702     }
14703 }
14704 
14705 /// <p>Specifies data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes for an Amazon S3 bucket.</p>
14706 #[derive(Default, Debug, Clone, PartialEq)]
14707 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14708 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14709 pub struct StorageClassAnalysis {
14710     /// <p>Specifies how data related to the storage class analysis for an Amazon S3 bucket should be exported.</p>
14711     pub data_export: Option<StorageClassAnalysisDataExport>,
14712 }
14713 
14714 #[allow(dead_code)]
14715 struct StorageClassAnalysisDeserializer;
14716 impl StorageClassAnalysisDeserializer {
14717     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<StorageClassAnalysis, XmlParseError>14718     fn deserialize<T: Peek + Next>(
14719         tag_name: &str,
14720         stack: &mut T,
14721     ) -> Result<StorageClassAnalysis, XmlParseError> {
14722         deserialize_elements::<_, StorageClassAnalysis, _>(tag_name, stack, |name, stack, obj| {
14723             match name {
14724                 "DataExport" => {
14725                     obj.data_export =
14726                         Some(StorageClassAnalysisDataExportDeserializer::deserialize(
14727                             "DataExport",
14728                             stack,
14729                         )?);
14730                 }
14731                 _ => skip_tree(stack),
14732             }
14733             Ok(())
14734         })
14735     }
14736 }
14737 
14738 pub struct StorageClassAnalysisSerializer;
14739 impl StorageClassAnalysisSerializer {
14740     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &StorageClassAnalysis, ) -> Result<(), xml::writer::Error> where W: Write,14741     pub fn serialize<W>(
14742         mut writer: &mut EventWriter<W>,
14743         name: &str,
14744         obj: &StorageClassAnalysis,
14745     ) -> Result<(), xml::writer::Error>
14746     where
14747         W: Write,
14748     {
14749         writer.write(xml::writer::XmlEvent::start_element(name))?;
14750         if let Some(ref value) = obj.data_export {
14751             &StorageClassAnalysisDataExportSerializer::serialize(&mut writer, "DataExport", value)?;
14752         }
14753         writer.write(xml::writer::XmlEvent::end_element())
14754     }
14755 }
14756 
14757 /// <p>Container for data related to the storage class analysis for an Amazon S3 bucket for export.</p>
14758 #[derive(Default, Debug, Clone, PartialEq)]
14759 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14760 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14761 pub struct StorageClassAnalysisDataExport {
14762     /// <p>The place to store the data for an analysis.</p>
14763     pub destination: AnalyticsExportDestination,
14764     /// <p>The version of the output schema to use when exporting data. Must be <code>V_1</code>.</p>
14765     pub output_schema_version: String,
14766 }
14767 
14768 #[allow(dead_code)]
14769 struct StorageClassAnalysisDataExportDeserializer;
14770 impl StorageClassAnalysisDataExportDeserializer {
14771     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<StorageClassAnalysisDataExport, XmlParseError>14772     fn deserialize<T: Peek + Next>(
14773         tag_name: &str,
14774         stack: &mut T,
14775     ) -> Result<StorageClassAnalysisDataExport, XmlParseError> {
14776         deserialize_elements::<_, StorageClassAnalysisDataExport, _>(
14777             tag_name,
14778             stack,
14779             |name, stack, obj| {
14780                 match name {
14781                     "Destination" => {
14782                         obj.destination = AnalyticsExportDestinationDeserializer::deserialize(
14783                             "Destination",
14784                             stack,
14785                         )?;
14786                     }
14787                     "OutputSchemaVersion" => {
14788                         obj.output_schema_version =
14789                             StorageClassAnalysisSchemaVersionDeserializer::deserialize(
14790                                 "OutputSchemaVersion",
14791                                 stack,
14792                             )?;
14793                     }
14794                     _ => skip_tree(stack),
14795                 }
14796                 Ok(())
14797             },
14798         )
14799     }
14800 }
14801 
14802 pub struct StorageClassAnalysisDataExportSerializer;
14803 impl StorageClassAnalysisDataExportSerializer {
14804     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &StorageClassAnalysisDataExport, ) -> Result<(), xml::writer::Error> where W: Write,14805     pub fn serialize<W>(
14806         mut writer: &mut EventWriter<W>,
14807         name: &str,
14808         obj: &StorageClassAnalysisDataExport,
14809     ) -> Result<(), xml::writer::Error>
14810     where
14811         W: Write,
14812     {
14813         writer.write(xml::writer::XmlEvent::start_element(name))?;
14814         AnalyticsExportDestinationSerializer::serialize(
14815             &mut writer,
14816             "Destination",
14817             &obj.destination,
14818         )?;
14819         writer.write(xml::writer::XmlEvent::start_element("OutputSchemaVersion"))?;
14820         writer.write(xml::writer::XmlEvent::characters(&format!(
14821             "{value}",
14822             value = obj.output_schema_version
14823         )))?;
14824         writer.write(xml::writer::XmlEvent::end_element())?;
14825         writer.write(xml::writer::XmlEvent::end_element())
14826     }
14827 }
14828 
14829 #[allow(dead_code)]
14830 struct StorageClassAnalysisSchemaVersionDeserializer;
14831 impl StorageClassAnalysisSchemaVersionDeserializer {
14832     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14833     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14834         start_element(tag_name, stack)?;
14835         let obj = characters(stack)?;
14836         end_element(tag_name, stack)?;
14837 
14838         Ok(obj)
14839     }
14840 }
14841 
14842 pub struct StorageClassAnalysisSchemaVersionSerializer;
14843 impl StorageClassAnalysisSchemaVersionSerializer {
14844     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14845     pub fn serialize<W>(
14846         mut writer: &mut EventWriter<W>,
14847         name: &str,
14848         obj: &String,
14849     ) -> Result<(), xml::writer::Error>
14850     where
14851         W: Write,
14852     {
14853         writer.write(xml::writer::XmlEvent::start_element(name))?;
14854         writer.write(xml::writer::XmlEvent::characters(&format!(
14855             "{value}",
14856             value = obj.to_string()
14857         )))?;
14858         writer.write(xml::writer::XmlEvent::end_element())
14859     }
14860 }
14861 
14862 #[allow(dead_code)]
14863 struct SuffixDeserializer;
14864 impl SuffixDeserializer {
14865     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14866     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14867         start_element(tag_name, stack)?;
14868         let obj = characters(stack)?;
14869         end_element(tag_name, stack)?;
14870 
14871         Ok(obj)
14872     }
14873 }
14874 
14875 pub struct SuffixSerializer;
14876 impl SuffixSerializer {
14877     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14878     pub fn serialize<W>(
14879         mut writer: &mut EventWriter<W>,
14880         name: &str,
14881         obj: &String,
14882     ) -> Result<(), xml::writer::Error>
14883     where
14884         W: Write,
14885     {
14886         writer.write(xml::writer::XmlEvent::start_element(name))?;
14887         writer.write(xml::writer::XmlEvent::characters(&format!(
14888             "{value}",
14889             value = obj.to_string()
14890         )))?;
14891         writer.write(xml::writer::XmlEvent::end_element())
14892     }
14893 }
14894 
14895 /// <p>A container of a key value name pair.</p>
14896 #[derive(Default, Debug, Clone, PartialEq)]
14897 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14898 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14899 pub struct Tag {
14900     /// <p>Name of the tag.</p>
14901     pub key: String,
14902     /// <p>Value of the tag.</p>
14903     pub value: String,
14904 }
14905 
14906 #[allow(dead_code)]
14907 struct TagDeserializer;
14908 impl TagDeserializer {
14909     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Tag, XmlParseError>14910     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Tag, XmlParseError> {
14911         deserialize_elements::<_, Tag, _>(tag_name, stack, |name, stack, obj| {
14912             match name {
14913                 "Key" => {
14914                     obj.key = ObjectKeyDeserializer::deserialize("Key", stack)?;
14915                 }
14916                 "Value" => {
14917                     obj.value = ValueDeserializer::deserialize("Value", stack)?;
14918                 }
14919                 _ => skip_tree(stack),
14920             }
14921             Ok(())
14922         })
14923     }
14924 }
14925 
14926 pub struct TagSerializer;
14927 impl TagSerializer {
14928     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Tag, ) -> Result<(), xml::writer::Error> where W: Write,14929     pub fn serialize<W>(
14930         mut writer: &mut EventWriter<W>,
14931         name: &str,
14932         obj: &Tag,
14933     ) -> Result<(), xml::writer::Error>
14934     where
14935         W: Write,
14936     {
14937         writer.write(xml::writer::XmlEvent::start_element(name))?;
14938         writer.write(xml::writer::XmlEvent::start_element("Key"))?;
14939         writer.write(xml::writer::XmlEvent::characters(&format!(
14940             "{value}",
14941             value = obj.key
14942         )))?;
14943         writer.write(xml::writer::XmlEvent::end_element())?;
14944         writer.write(xml::writer::XmlEvent::start_element("Value"))?;
14945         writer.write(xml::writer::XmlEvent::characters(&format!(
14946             "{value}",
14947             value = obj.value
14948         )))?;
14949         writer.write(xml::writer::XmlEvent::end_element())?;
14950         writer.write(xml::writer::XmlEvent::end_element())
14951     }
14952 }
14953 
14954 #[allow(dead_code)]
14955 struct TagSetDeserializer;
14956 impl TagSetDeserializer {
14957     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Tag>, XmlParseError>14958     fn deserialize<T: Peek + Next>(
14959         tag_name: &str,
14960         stack: &mut T,
14961     ) -> Result<Vec<Tag>, XmlParseError> {
14962         deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
14963             if name == "Tag" {
14964                 obj.push(TagDeserializer::deserialize("Tag", stack)?);
14965             } else {
14966                 skip_tree(stack);
14967             }
14968             Ok(())
14969         })
14970     }
14971 }
14972 
14973 pub struct TagSetSerializer;
14974 impl TagSetSerializer {
14975     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<Tag>, ) -> Result<(), xml::writer::Error> where W: Write,14976     pub fn serialize<W>(
14977         mut writer: &mut EventWriter<W>,
14978         name: &str,
14979         obj: &Vec<Tag>,
14980     ) -> Result<(), xml::writer::Error>
14981     where
14982         W: Write,
14983     {
14984         writer.write(xml::writer::XmlEvent::start_element(name))?;
14985         for element in obj {
14986             TagSerializer::serialize(writer, "Tag", element)?;
14987         }
14988         writer.write(xml::writer::XmlEvent::end_element())?;
14989         Ok(())
14990     }
14991 }
14992 
14993 /// <p>Container for <code>TagSet</code> elements.</p>
14994 #[derive(Default, Debug, Clone, PartialEq)]
14995 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14996 pub struct Tagging {
14997     /// <p>A collection for a set of tags</p>
14998     pub tag_set: Vec<Tag>,
14999 }
15000 
15001 pub struct TaggingSerializer;
15002 impl TaggingSerializer {
15003     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Tagging, ) -> Result<(), xml::writer::Error> where W: Write,15004     pub fn serialize<W>(
15005         mut writer: &mut EventWriter<W>,
15006         name: &str,
15007         obj: &Tagging,
15008     ) -> Result<(), xml::writer::Error>
15009     where
15010         W: Write,
15011     {
15012         writer.write(xml::writer::XmlEvent::start_element(name))?;
15013         TagSetSerializer::serialize(&mut writer, "TagSet", &obj.tag_set)?;
15014         writer.write(xml::writer::XmlEvent::end_element())
15015     }
15016 }
15017 
15018 #[allow(dead_code)]
15019 struct TargetBucketDeserializer;
15020 impl TargetBucketDeserializer {
15021     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>15022     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
15023         start_element(tag_name, stack)?;
15024         let obj = characters(stack)?;
15025         end_element(tag_name, stack)?;
15026 
15027         Ok(obj)
15028     }
15029 }
15030 
15031 pub struct TargetBucketSerializer;
15032 impl TargetBucketSerializer {
15033     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,15034     pub fn serialize<W>(
15035         mut writer: &mut EventWriter<W>,
15036         name: &str,
15037         obj: &String,
15038     ) -> Result<(), xml::writer::Error>
15039     where
15040         W: Write,
15041     {
15042         writer.write(xml::writer::XmlEvent::start_element(name))?;
15043         writer.write(xml::writer::XmlEvent::characters(&format!(
15044             "{value}",
15045             value = obj.to_string()
15046         )))?;
15047         writer.write(xml::writer::XmlEvent::end_element())
15048     }
15049 }
15050 
15051 /// <p>Container for granting information.</p>
15052 #[derive(Default, Debug, Clone, PartialEq)]
15053 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
15054 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
15055 pub struct TargetGrant {
15056     /// <p>Container for the person being granted permissions.</p>
15057     pub grantee: Option<Grantee>,
15058     /// <p>Logging permissions assigned to the Grantee for the bucket.</p>
15059     pub permission: Option<String>,
15060 }
15061 
15062 #[allow(dead_code)]
15063 struct TargetGrantDeserializer;
15064 impl TargetGrantDeserializer {
15065     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<TargetGrant, XmlParseError>15066     fn deserialize<T: Peek + Next>(
15067         tag_name: &str,
15068         stack: &mut T,
15069     ) -> Result<TargetGrant, XmlParseError> {
15070         deserialize_elements::<_, TargetGrant, _>(tag_name, stack, |name, stack, obj| {
15071             match name {
15072                 "Grantee" => {
15073                     obj.grantee = Some(GranteeDeserializer::deserialize("Grantee", stack)?);
15074                 }
15075                 "Permission" => {
15076                     obj.permission = Some(BucketLogsPermissionDeserializer::deserialize(
15077                         "Permission",
15078                         stack,
15079                     )?);
15080                 }
15081                 _ => skip_tree(stack),
15082             }
15083             Ok(())
15084         })
15085     }
15086 }
15087 
15088 pub struct TargetGrantSerializer;
15089 impl TargetGrantSerializer {
15090     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &TargetGrant, ) -> Result<(), xml::writer::Error> where W: Write,15091     pub fn serialize<W>(
15092         mut writer: &mut EventWriter<W>,
15093         name: &str,
15094         obj: &TargetGrant,
15095     ) -> Result<(), xml::writer::Error>
15096     where
15097         W: Write,
15098     {
15099         writer.write(xml::writer::XmlEvent::start_element(name))?;
15100         if let Some(ref value) = obj.grantee {
15101             &GranteeSerializer::serialize(&mut writer, "Grantee", value)?;
15102         }
15103         if let Some(ref value) = obj.permission {
15104             writer.write(xml::writer::XmlEvent::start_element("Permission"))?;
15105             writer.write(xml::writer::XmlEvent::characters(&format!(
15106                 "{value}",
15107                 value = value
15108             )));
15109             writer.write(xml::writer::XmlEvent::end_element())?;
15110         }
15111         writer.write(xml::writer::XmlEvent::end_element())
15112     }
15113 }
15114 
15115 #[allow(dead_code)]
15116 struct TargetGrantsDeserializer;
15117 impl TargetGrantsDeserializer {
15118     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<TargetGrant>, XmlParseError>15119     fn deserialize<T: Peek + Next>(
15120         tag_name: &str,
15121         stack: &mut T,
15122     ) -> Result<Vec<TargetGrant>, XmlParseError> {
15123         deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
15124             if name == "Grant" {
15125                 obj.push(TargetGrantDeserializer::deserialize("Grant", stack)?);
15126             } else {
15127                 skip_tree(stack);
15128             }
15129             Ok(())
15130         })
15131     }
15132 }
15133 
15134 pub struct TargetGrantsSerializer;
15135 impl TargetGrantsSerializer {
15136     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<TargetGrant>, ) -> Result<(), xml::writer::Error> where W: Write,15137     pub fn serialize<W>(
15138         mut writer: &mut EventWriter<W>,
15139         name: &str,
15140         obj: &Vec<TargetGrant>,
15141     ) -> Result<(), xml::writer::Error>
15142     where
15143         W: Write,
15144     {
15145         writer.write(xml::writer::XmlEvent::start_element(name))?;
15146         for element in obj {
15147             TargetGrantSerializer::serialize(writer, "Grant", element)?;
15148         }
15149         writer.write(xml::writer::XmlEvent::end_element())?;
15150         Ok(())
15151     }
15152 }
15153 
15154 #[allow(dead_code)]
15155 struct TargetPrefixDeserializer;
15156 impl TargetPrefixDeserializer {
15157     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>15158     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
15159         start_element(tag_name, stack)?;
15160         let obj = characters(stack)?;
15161         end_element(tag_name, stack)?;
15162 
15163         Ok(obj)
15164     }
15165 }
15166 
15167 pub struct TargetPrefixSerializer;
15168 impl TargetPrefixSerializer {
15169     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,15170     pub fn serialize<W>(
15171         mut writer: &mut EventWriter<W>,
15172         name: &str,
15173         obj: &String,
15174     ) -> Result<(), xml::writer::Error>
15175     where
15176         W: Write,
15177     {
15178         writer.write(xml::writer::XmlEvent::start_element(name))?;
15179         writer.write(xml::writer::XmlEvent::characters(&format!(
15180             "{value}",
15181             value = obj.to_string()
15182         )))?;
15183         writer.write(xml::writer::XmlEvent::end_element())
15184     }
15185 }
15186 
15187 pub struct TierSerializer;
15188 impl TierSerializer {
15189     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,15190     pub fn serialize<W>(
15191         mut writer: &mut EventWriter<W>,
15192         name: &str,
15193         obj: &String,
15194     ) -> Result<(), xml::writer::Error>
15195     where
15196         W: Write,
15197     {
15198         writer.write(xml::writer::XmlEvent::start_element(name))?;
15199         writer.write(xml::writer::XmlEvent::characters(&format!(
15200             "{value}",
15201             value = obj.to_string()
15202         )))?;
15203         writer.write(xml::writer::XmlEvent::end_element())
15204     }
15205 }
15206 
15207 #[allow(dead_code)]
15208 struct TokenDeserializer;
15209 impl TokenDeserializer {
15210     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>15211     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
15212         start_element(tag_name, stack)?;
15213         let obj = characters(stack)?;
15214         end_element(tag_name, stack)?;
15215 
15216         Ok(obj)
15217     }
15218 }
15219 
15220 pub struct TokenSerializer;
15221 impl TokenSerializer {
15222     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,15223     pub fn serialize<W>(
15224         mut writer: &mut EventWriter<W>,
15225         name: &str,
15226         obj: &String,
15227     ) -> Result<(), xml::writer::Error>
15228     where
15229         W: Write,
15230     {
15231         writer.write(xml::writer::XmlEvent::start_element(name))?;
15232         writer.write(xml::writer::XmlEvent::characters(&format!(
15233             "{value}",
15234             value = obj.to_string()
15235         )))?;
15236         writer.write(xml::writer::XmlEvent::end_element())
15237     }
15238 }
15239 
15240 #[allow(dead_code)]
15241 struct TopicArnDeserializer;
15242 impl TopicArnDeserializer {
15243     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>15244     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
15245         start_element(tag_name, stack)?;
15246         let obj = characters(stack)?;
15247         end_element(tag_name, stack)?;
15248 
15249         Ok(obj)
15250     }
15251 }
15252 
15253 pub struct TopicArnSerializer;
15254 impl TopicArnSerializer {
15255     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,15256     pub fn serialize<W>(
15257         mut writer: &mut EventWriter<W>,
15258         name: &str,
15259         obj: &String,
15260     ) -> Result<(), xml::writer::Error>
15261     where
15262         W: Write,
15263     {
15264         writer.write(xml::writer::XmlEvent::start_element(name))?;
15265         writer.write(xml::writer::XmlEvent::characters(&format!(
15266             "{value}",
15267             value = obj.to_string()
15268         )))?;
15269         writer.write(xml::writer::XmlEvent::end_element())
15270     }
15271 }
15272 
15273 /// <p>A container for specifying the configuration for publication of messages to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.</p>
15274 #[derive(Default, Debug, Clone, PartialEq)]
15275 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
15276 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
15277 pub struct TopicConfiguration {
15278     /// <p>The Amazon S3 bucket event about which to send notifications. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html">Supported Event Types</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>
15279     pub events: Vec<String>,
15280     pub filter: Option<NotificationConfigurationFilter>,
15281     pub id: Option<String>,
15282     /// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message when it detects events of the specified type.</p>
15283     pub topic_arn: String,
15284 }
15285 
15286 #[allow(dead_code)]
15287 struct TopicConfigurationDeserializer;
15288 impl TopicConfigurationDeserializer {
15289     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<TopicConfiguration, XmlParseError>15290     fn deserialize<T: Peek + Next>(
15291         tag_name: &str,
15292         stack: &mut T,
15293     ) -> Result<TopicConfiguration, XmlParseError> {
15294         deserialize_elements::<_, TopicConfiguration, _>(tag_name, stack, |name, stack, obj| {
15295             match name {
15296                 "Event" => {
15297                     obj.events
15298                         .extend(EventListDeserializer::deserialize("Event", stack)?);
15299                 }
15300                 "Filter" => {
15301                     obj.filter = Some(NotificationConfigurationFilterDeserializer::deserialize(
15302                         "Filter", stack,
15303                     )?);
15304                 }
15305                 "Id" => {
15306                     obj.id = Some(NotificationIdDeserializer::deserialize("Id", stack)?);
15307                 }
15308                 "Topic" => {
15309                     obj.topic_arn = TopicArnDeserializer::deserialize("Topic", stack)?;
15310                 }
15311                 _ => skip_tree(stack),
15312             }
15313             Ok(())
15314         })
15315     }
15316 }
15317 
15318 pub struct TopicConfigurationSerializer;
15319 impl TopicConfigurationSerializer {
15320     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &TopicConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,15321     pub fn serialize<W>(
15322         mut writer: &mut EventWriter<W>,
15323         name: &str,
15324         obj: &TopicConfiguration,
15325     ) -> Result<(), xml::writer::Error>
15326     where
15327         W: Write,
15328     {
15329         writer.write(xml::writer::XmlEvent::start_element(name))?;
15330         EventListSerializer::serialize(&mut writer, "Event", &obj.events)?;
15331         if let Some(ref value) = obj.filter {
15332             &NotificationConfigurationFilterSerializer::serialize(&mut writer, "Filter", value)?;
15333         }
15334         if let Some(ref value) = obj.id {
15335             writer.write(xml::writer::XmlEvent::start_element("Id"))?;
15336             writer.write(xml::writer::XmlEvent::characters(&format!(
15337                 "{value}",
15338                 value = value
15339             )));
15340             writer.write(xml::writer::XmlEvent::end_element())?;
15341         }
15342         writer.write(xml::writer::XmlEvent::start_element("Topic"))?;
15343         writer.write(xml::writer::XmlEvent::characters(&format!(
15344             "{value}",
15345             value = obj.topic_arn
15346         )))?;
15347         writer.write(xml::writer::XmlEvent::end_element())?;
15348         writer.write(xml::writer::XmlEvent::end_element())
15349     }
15350 }
15351 
15352 /// <p>A container for specifying the configuration for publication of messages to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events. This data type is deprecated. Use <a>TopicConfiguration</a> instead.</p>
15353 #[derive(Default, Debug, Clone, PartialEq)]
15354 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
15355 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
15356 pub struct TopicConfigurationDeprecated {
15357     /// <p>A collection of events related to objects</p>
15358     pub events: Option<Vec<String>>,
15359     pub id: Option<String>,
15360     /// <p>Amazon SNS topic to which Amazon S3 will publish a message to report the specified events for the bucket.</p>
15361     pub topic: Option<String>,
15362 }
15363 
15364 #[allow(dead_code)]
15365 struct TopicConfigurationDeprecatedDeserializer;
15366 impl TopicConfigurationDeprecatedDeserializer {
15367     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<TopicConfigurationDeprecated, XmlParseError>15368     fn deserialize<T: Peek + Next>(
15369         tag_name: &str,
15370         stack: &mut T,
15371     ) -> Result<TopicConfigurationDeprecated, XmlParseError> {
15372         deserialize_elements::<_, TopicConfigurationDeprecated, _>(
15373             tag_name,
15374             stack,
15375             |name, stack, obj| {
15376                 match name {
15377                     "Event" => {
15378                         obj.events
15379                             .get_or_insert(vec![])
15380                             .extend(EventListDeserializer::deserialize("Event", stack)?);
15381                     }
15382                     "Id" => {
15383                         obj.id = Some(NotificationIdDeserializer::deserialize("Id", stack)?);
15384                     }
15385                     "Topic" => {
15386                         obj.topic = Some(TopicArnDeserializer::deserialize("Topic", stack)?);
15387                     }
15388                     _ => skip_tree(stack),
15389                 }
15390                 Ok(())
15391             },
15392         )
15393     }
15394 }
15395 
15396 pub struct TopicConfigurationDeprecatedSerializer;
15397 impl TopicConfigurationDeprecatedSerializer {
15398     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &TopicConfigurationDeprecated, ) -> Result<(), xml::writer::Error> where W: Write,15399     pub fn serialize<W>(
15400         mut writer: &mut EventWriter<W>,
15401         name: &str,
15402         obj: &TopicConfigurationDeprecated,
15403     ) -> Result<(), xml::writer::Error>
15404     where
15405         W: Write,
15406     {
15407         writer.write(xml::writer::XmlEvent::start_element(name))?;
15408         if let Some(ref value) = obj.events {
15409             &EventListSerializer::serialize(&mut writer, "Event", value)?;
15410         }
15411         if let Some(ref value) = obj.id {
15412             writer.write(xml::writer::XmlEvent::start_element("Id"))?;
15413             writer.write(xml::writer::XmlEvent::characters(&format!(
15414                 "{value}",
15415                 value = value
15416             )));
15417             writer.write(xml::writer::XmlEvent::end_element())?;
15418         }
15419         if let Some(ref value) = obj.topic {
15420             writer.write(xml::writer::XmlEvent::start_element("Topic"))?;
15421             writer.write(xml::writer::XmlEvent::characters(&format!(
15422                 "{value}",
15423                 value = value
15424             )));
15425             writer.write(xml::writer::XmlEvent::end_element())?;
15426         }
15427         writer.write(xml::writer::XmlEvent::end_element())
15428     }
15429 }
15430 
15431 #[allow(dead_code)]
15432 struct TopicConfigurationListDeserializer;
15433 impl TopicConfigurationListDeserializer {
15434     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<TopicConfiguration>, XmlParseError>15435     fn deserialize<T: Peek + Next>(
15436         tag_name: &str,
15437         stack: &mut T,
15438     ) -> Result<Vec<TopicConfiguration>, XmlParseError> {
15439         let mut obj = vec![];
15440 
15441         loop {
15442             let consume_next_tag = match stack.peek() {
15443                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
15444                     name.local_name == tag_name
15445                 }
15446                 _ => false,
15447             };
15448 
15449             if consume_next_tag {
15450                 obj.push(TopicConfigurationDeserializer::deserialize(
15451                     tag_name, stack,
15452                 )?);
15453             } else {
15454                 break;
15455             }
15456         }
15457 
15458         Ok(obj)
15459     }
15460 }
15461 
15462 pub struct TopicConfigurationListSerializer;
15463 impl TopicConfigurationListSerializer {
15464     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<TopicConfiguration>, ) -> Result<(), xml::writer::Error> where W: Write,15465     pub fn serialize<W>(
15466         mut writer: &mut EventWriter<W>,
15467         name: &str,
15468         obj: &Vec<TopicConfiguration>,
15469     ) -> Result<(), xml::writer::Error>
15470     where
15471         W: Write,
15472     {
15473         for element in obj {
15474             TopicConfigurationSerializer::serialize(writer, name, element)?;
15475         }
15476         Ok(())
15477     }
15478 }
15479 
15480 /// <p>Specifies when an object transitions to a specified storage class.</p>
15481 #[derive(Default, Debug, Clone, PartialEq)]
15482 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
15483 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
15484 pub struct Transition {
15485     /// <p>Indicates when objects are transitioned to the specified storage class. The date value must be in ISO 8601 format. The time is always midnight UTC.</p>
15486     pub date: Option<String>,
15487     /// <p>Indicates the number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer.</p>
15488     pub days: Option<i64>,
15489     /// <p>The storage class to which you want the object to transition.</p>
15490     pub storage_class: Option<String>,
15491 }
15492 
15493 #[allow(dead_code)]
15494 struct TransitionDeserializer;
15495 impl TransitionDeserializer {
15496     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Transition, XmlParseError>15497     fn deserialize<T: Peek + Next>(
15498         tag_name: &str,
15499         stack: &mut T,
15500     ) -> Result<Transition, XmlParseError> {
15501         deserialize_elements::<_, Transition, _>(tag_name, stack, |name, stack, obj| {
15502             match name {
15503                 "Date" => {
15504                     obj.date = Some(DateDeserializer::deserialize("Date", stack)?);
15505                 }
15506                 "Days" => {
15507                     obj.days = Some(DaysDeserializer::deserialize("Days", stack)?);
15508                 }
15509                 "StorageClass" => {
15510                     obj.storage_class = Some(TransitionStorageClassDeserializer::deserialize(
15511                         "StorageClass",
15512                         stack,
15513                     )?);
15514                 }
15515                 _ => skip_tree(stack),
15516             }
15517             Ok(())
15518         })
15519     }
15520 }
15521 
15522 pub struct TransitionSerializer;
15523 impl TransitionSerializer {
15524     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Transition, ) -> Result<(), xml::writer::Error> where W: Write,15525     pub fn serialize<W>(
15526         mut writer: &mut EventWriter<W>,
15527         name: &str,
15528         obj: &Transition,
15529     ) -> Result<(), xml::writer::Error>
15530     where
15531         W: Write,
15532     {
15533         writer.write(xml::writer::XmlEvent::start_element(name))?;
15534         if let Some(ref value) = obj.date {
15535             writer.write(xml::writer::XmlEvent::start_element("Date"))?;
15536             writer.write(xml::writer::XmlEvent::characters(&format!(
15537                 "{value}",
15538                 value = value
15539             )));
15540             writer.write(xml::writer::XmlEvent::end_element())?;
15541         }
15542         if let Some(ref value) = obj.days {
15543             writer.write(xml::writer::XmlEvent::start_element("Days"))?;
15544             writer.write(xml::writer::XmlEvent::characters(&format!(
15545                 "{value}",
15546                 value = value
15547             )));
15548             writer.write(xml::writer::XmlEvent::end_element())?;
15549         }
15550         if let Some(ref value) = obj.storage_class {
15551             writer.write(xml::writer::XmlEvent::start_element("StorageClass"))?;
15552             writer.write(xml::writer::XmlEvent::characters(&format!(
15553                 "{value}",
15554                 value = value
15555             )));
15556             writer.write(xml::writer::XmlEvent::end_element())?;
15557         }
15558         writer.write(xml::writer::XmlEvent::end_element())
15559     }
15560 }
15561 
15562 #[allow(dead_code)]
15563 struct TransitionListDeserializer;
15564 impl TransitionListDeserializer {
15565     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Transition>, XmlParseError>15566     fn deserialize<T: Peek + Next>(
15567         tag_name: &str,
15568         stack: &mut T,
15569     ) -> Result<Vec<Transition>, XmlParseError> {
15570         let mut obj = vec![];
15571 
15572         loop {
15573             let consume_next_tag = match stack.peek() {
15574                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
15575                     name.local_name == tag_name
15576                 }
15577                 _ => false,
15578             };
15579 
15580             if consume_next_tag {
15581                 obj.push(TransitionDeserializer::deserialize(tag_name, stack)?);
15582             } else {
15583                 break;
15584             }
15585         }
15586 
15587         Ok(obj)
15588     }
15589 }
15590 
15591 pub struct TransitionListSerializer;
15592 impl TransitionListSerializer {
15593     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<Transition>, ) -> Result<(), xml::writer::Error> where W: Write,15594     pub fn serialize<W>(
15595         mut writer: &mut EventWriter<W>,
15596         name: &str,
15597         obj: &Vec<Transition>,
15598     ) -> Result<(), xml::writer::Error>
15599     where
15600         W: Write,
15601     {
15602         for element in obj {
15603             TransitionSerializer::serialize(writer, name, element)?;
15604         }
15605         Ok(())
15606     }
15607 }
15608 
15609 #[allow(dead_code)]
15610 struct TransitionStorageClassDeserializer;
15611 impl TransitionStorageClassDeserializer {
15612     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>15613     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
15614         start_element(tag_name, stack)?;
15615         let obj = characters(stack)?;
15616         end_element(tag_name, stack)?;
15617 
15618         Ok(obj)
15619     }
15620 }
15621 
15622 pub struct TransitionStorageClassSerializer;
15623 impl TransitionStorageClassSerializer {
15624     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,15625     pub fn serialize<W>(
15626         mut writer: &mut EventWriter<W>,
15627         name: &str,
15628         obj: &String,
15629     ) -> Result<(), xml::writer::Error>
15630     where
15631         W: Write,
15632     {
15633         writer.write(xml::writer::XmlEvent::start_element(name))?;
15634         writer.write(xml::writer::XmlEvent::characters(&format!(
15635             "{value}",
15636             value = obj.to_string()
15637         )))?;
15638         writer.write(xml::writer::XmlEvent::end_element())
15639     }
15640 }
15641 
15642 #[allow(dead_code)]
15643 struct TypeDeserializer;
15644 impl TypeDeserializer {
15645     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>15646     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
15647         start_element(tag_name, stack)?;
15648         let obj = characters(stack)?;
15649         end_element(tag_name, stack)?;
15650 
15651         Ok(obj)
15652     }
15653 }
15654 
15655 pub struct TypeSerializer;
15656 impl TypeSerializer {
15657     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,15658     pub fn serialize<W>(
15659         mut writer: &mut EventWriter<W>,
15660         name: &str,
15661         obj: &String,
15662     ) -> Result<(), xml::writer::Error>
15663     where
15664         W: Write,
15665     {
15666         writer.write(xml::writer::XmlEvent::start_element(name))?;
15667         writer.write(xml::writer::XmlEvent::characters(&format!(
15668             "{value}",
15669             value = obj.to_string()
15670         )))?;
15671         writer.write(xml::writer::XmlEvent::end_element())
15672     }
15673 }
15674 
15675 #[allow(dead_code)]
15676 struct URIDeserializer;
15677 impl URIDeserializer {
15678     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>15679     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
15680         start_element(tag_name, stack)?;
15681         let obj = characters(stack)?;
15682         end_element(tag_name, stack)?;
15683 
15684         Ok(obj)
15685     }
15686 }
15687 
15688 pub struct URISerializer;
15689 impl URISerializer {
15690     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,15691     pub fn serialize<W>(
15692         mut writer: &mut EventWriter<W>,
15693         name: &str,
15694         obj: &String,
15695     ) -> Result<(), xml::writer::Error>
15696     where
15697         W: Write,
15698     {
15699         writer.write(xml::writer::XmlEvent::start_element(name))?;
15700         writer.write(xml::writer::XmlEvent::characters(&format!(
15701             "{value}",
15702             value = obj.to_string()
15703         )))?;
15704         writer.write(xml::writer::XmlEvent::end_element())
15705     }
15706 }
15707 
15708 #[allow(dead_code)]
15709 struct UploadIdMarkerDeserializer;
15710 impl UploadIdMarkerDeserializer {
15711     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>15712     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
15713         start_element(tag_name, stack)?;
15714         let obj = characters(stack)?;
15715         end_element(tag_name, stack)?;
15716 
15717         Ok(obj)
15718     }
15719 }
15720 
15721 pub struct UploadIdMarkerSerializer;
15722 impl UploadIdMarkerSerializer {
15723     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,15724     pub fn serialize<W>(
15725         mut writer: &mut EventWriter<W>,
15726         name: &str,
15727         obj: &String,
15728     ) -> Result<(), xml::writer::Error>
15729     where
15730         W: Write,
15731     {
15732         writer.write(xml::writer::XmlEvent::start_element(name))?;
15733         writer.write(xml::writer::XmlEvent::characters(&format!(
15734             "{value}",
15735             value = obj.to_string()
15736         )))?;
15737         writer.write(xml::writer::XmlEvent::end_element())
15738     }
15739 }
15740 
15741 #[derive(Default, Debug, Clone, PartialEq)]
15742 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
15743 pub struct UploadPartCopyOutput {
15744     /// <p>Container for all response elements.</p>
15745     pub copy_part_result: Option<CopyPartResult>,
15746     /// <p>The version of the source object that was copied, if you have enabled versioning on the source bucket.</p>
15747     pub copy_source_version_id: Option<String>,
15748     pub request_charged: Option<String>,
15749     /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.</p>
15750     pub sse_customer_algorithm: Option<String>,
15751     /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.</p>
15752     pub sse_customer_key_md5: Option<String>,
15753     /// <p>If present, specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) that was used for the object.</p>
15754     pub ssekms_key_id: Option<String>,
15755     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
15756     pub server_side_encryption: Option<String>,
15757 }
15758 
15759 #[allow(dead_code)]
15760 struct UploadPartCopyOutputDeserializer;
15761 impl UploadPartCopyOutputDeserializer {
15762     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<UploadPartCopyOutput, XmlParseError>15763     fn deserialize<T: Peek + Next>(
15764         tag_name: &str,
15765         stack: &mut T,
15766     ) -> Result<UploadPartCopyOutput, XmlParseError> {
15767         Ok(UploadPartCopyOutput {
15768             copy_part_result: Some(CopyPartResultDeserializer::deserialize(
15769                 "CopyPartResult",
15770                 stack,
15771             )?),
15772             ..UploadPartCopyOutput::default()
15773         })
15774     }
15775 }
15776 #[derive(Default, Debug, Clone, PartialEq)]
15777 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
15778 pub struct UploadPartCopyRequest {
15779     /// <p>The bucket name.</p>
15780     pub bucket: String,
15781     /// <p>The name of the source bucket and key name of the source object, separated by a slash (/). Must be URL-encoded.</p>
15782     pub copy_source: String,
15783     /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
15784     pub copy_source_if_match: Option<String>,
15785     /// <p>Copies the object if it has been modified since the specified time.</p>
15786     pub copy_source_if_modified_since: Option<String>,
15787     /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
15788     pub copy_source_if_none_match: Option<String>,
15789     /// <p>Copies the object if it hasn't been modified since the specified time.</p>
15790     pub copy_source_if_unmodified_since: Option<String>,
15791     /// <p>The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You can copy a range only if the source object is greater than 5 MB.</p>
15792     pub copy_source_range: Option<String>,
15793     /// <p>Specifies the algorithm to use when decrypting the source object (for example, AES256).</p>
15794     pub copy_source_sse_customer_algorithm: Option<String>,
15795     /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.</p>
15796     pub copy_source_sse_customer_key: Option<String>,
15797     /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
15798     pub copy_source_sse_customer_key_md5: Option<String>,
15799     /// <p>Object key for which the multipart upload was initiated.</p>
15800     pub key: String,
15801     /// <p>Part number of part being copied. This is a positive integer between 1 and 10,000.</p>
15802     pub part_number: i64,
15803     pub request_payer: Option<String>,
15804     /// <p>Specifies the algorithm to use to when encrypting the object (for example, AES256).</p>
15805     pub sse_customer_algorithm: Option<String>,
15806     /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side​-encryption​-customer-algorithm</code> header. This must be the same encryption key specified in the initiate multipart upload request.</p>
15807     pub sse_customer_key: Option<String>,
15808     /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
15809     pub sse_customer_key_md5: Option<String>,
15810     /// <p>Upload ID identifying the multipart upload whose part is being copied.</p>
15811     pub upload_id: String,
15812 }
15813 
15814 #[derive(Default, Debug, Clone, PartialEq)]
15815 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
15816 pub struct UploadPartOutput {
15817     /// <p>Entity tag for the uploaded object.</p>
15818     pub e_tag: Option<String>,
15819     pub request_charged: Option<String>,
15820     /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.</p>
15821     pub sse_customer_algorithm: Option<String>,
15822     /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.</p>
15823     pub sse_customer_key_md5: Option<String>,
15824     /// <p>If present, specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) was used for the object.</p>
15825     pub ssekms_key_id: Option<String>,
15826     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
15827     pub server_side_encryption: Option<String>,
15828 }
15829 
15830 #[allow(dead_code)]
15831 struct UploadPartOutputDeserializer;
15832 impl UploadPartOutputDeserializer {
15833     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<UploadPartOutput, XmlParseError>15834     fn deserialize<T: Peek + Next>(
15835         tag_name: &str,
15836         stack: &mut T,
15837     ) -> Result<UploadPartOutput, XmlParseError> {
15838         start_element(tag_name, stack)?;
15839 
15840         let obj = UploadPartOutput::default();
15841 
15842         end_element(tag_name, stack)?;
15843 
15844         Ok(obj)
15845     }
15846 }
15847 #[derive(Default, Debug)]
15848 pub struct UploadPartRequest {
15849     /// <p>Object data.</p>
15850     pub body: Option<StreamingBody>,
15851     /// <p>Name of the bucket to which the multipart upload was initiated.</p>
15852     pub bucket: String,
15853     /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.</p>
15854     pub content_length: Option<i64>,
15855     /// <p>The base64-encoded 128-bit MD5 digest of the part data. This parameter is auto-populated when using the command from the CLI. This parameter is required if object lock parameters are specified.</p>
15856     pub content_md5: Option<String>,
15857     /// <p>Object key for which the multipart upload was initiated.</p>
15858     pub key: String,
15859     /// <p>Part number of part being uploaded. This is a positive integer between 1 and 10,000.</p>
15860     pub part_number: i64,
15861     pub request_payer: Option<String>,
15862     /// <p>Specifies the algorithm to use to when encrypting the object (for example, AES256).</p>
15863     pub sse_customer_algorithm: Option<String>,
15864     /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side​-encryption​-customer-algorithm header</code>. This must be the same encryption key specified in the initiate multipart upload request.</p>
15865     pub sse_customer_key: Option<String>,
15866     /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
15867     pub sse_customer_key_md5: Option<String>,
15868     /// <p>Upload ID identifying the multipart upload whose part is being uploaded.</p>
15869     pub upload_id: String,
15870 }
15871 
15872 pub struct UserMetadataSerializer;
15873 impl UserMetadataSerializer {
15874     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<MetadataEntry>, ) -> Result<(), xml::writer::Error> where W: Write,15875     pub fn serialize<W>(
15876         mut writer: &mut EventWriter<W>,
15877         name: &str,
15878         obj: &Vec<MetadataEntry>,
15879     ) -> Result<(), xml::writer::Error>
15880     where
15881         W: Write,
15882     {
15883         writer.write(xml::writer::XmlEvent::start_element(name))?;
15884         for element in obj {
15885             MetadataEntrySerializer::serialize(writer, "MetadataEntry", element)?;
15886         }
15887         writer.write(xml::writer::XmlEvent::end_element())?;
15888         Ok(())
15889     }
15890 }
15891 
15892 #[allow(dead_code)]
15893 struct ValueDeserializer;
15894 impl ValueDeserializer {
15895     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>15896     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
15897         start_element(tag_name, stack)?;
15898         let obj = characters(stack)?;
15899         end_element(tag_name, stack)?;
15900 
15901         Ok(obj)
15902     }
15903 }
15904 
15905 pub struct ValueSerializer;
15906 impl ValueSerializer {
15907     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,15908     pub fn serialize<W>(
15909         mut writer: &mut EventWriter<W>,
15910         name: &str,
15911         obj: &String,
15912     ) -> Result<(), xml::writer::Error>
15913     where
15914         W: Write,
15915     {
15916         writer.write(xml::writer::XmlEvent::start_element(name))?;
15917         writer.write(xml::writer::XmlEvent::characters(&format!(
15918             "{value}",
15919             value = obj.to_string()
15920         )))?;
15921         writer.write(xml::writer::XmlEvent::end_element())
15922     }
15923 }
15924 
15925 #[allow(dead_code)]
15926 struct VersionIdMarkerDeserializer;
15927 impl VersionIdMarkerDeserializer {
15928     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>15929     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
15930         start_element(tag_name, stack)?;
15931         let obj = characters(stack)?;
15932         end_element(tag_name, stack)?;
15933 
15934         Ok(obj)
15935     }
15936 }
15937 
15938 pub struct VersionIdMarkerSerializer;
15939 impl VersionIdMarkerSerializer {
15940     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,15941     pub fn serialize<W>(
15942         mut writer: &mut EventWriter<W>,
15943         name: &str,
15944         obj: &String,
15945     ) -> Result<(), xml::writer::Error>
15946     where
15947         W: Write,
15948     {
15949         writer.write(xml::writer::XmlEvent::start_element(name))?;
15950         writer.write(xml::writer::XmlEvent::characters(&format!(
15951             "{value}",
15952             value = obj.to_string()
15953         )))?;
15954         writer.write(xml::writer::XmlEvent::end_element())
15955     }
15956 }
15957 
15958 /// <p>Describes the versioning state of an Amazon S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html">PUT Bucket versioning</a> in the <i>Amazon Simple Storage Service API Reference</i>.</p>
15959 #[derive(Default, Debug, Clone, PartialEq)]
15960 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
15961 pub struct VersioningConfiguration {
15962     /// <p>Specifies whether MFA delete is enabled in the bucket versioning configuration. This element is only returned if the bucket has been configured with MFA delete. If the bucket has never been so configured, this element is not returned.</p>
15963     pub mfa_delete: Option<String>,
15964     /// <p>The versioning state of the bucket.</p>
15965     pub status: Option<String>,
15966 }
15967 
15968 pub struct VersioningConfigurationSerializer;
15969 impl VersioningConfigurationSerializer {
15970     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &VersioningConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,15971     pub fn serialize<W>(
15972         mut writer: &mut EventWriter<W>,
15973         name: &str,
15974         obj: &VersioningConfiguration,
15975     ) -> Result<(), xml::writer::Error>
15976     where
15977         W: Write,
15978     {
15979         writer.write(xml::writer::XmlEvent::start_element(name))?;
15980         if let Some(ref value) = obj.mfa_delete {
15981             writer.write(xml::writer::XmlEvent::start_element("MfaDelete"))?;
15982             writer.write(xml::writer::XmlEvent::characters(&format!(
15983                 "{value}",
15984                 value = value
15985             )));
15986             writer.write(xml::writer::XmlEvent::end_element())?;
15987         }
15988         if let Some(ref value) = obj.status {
15989             writer.write(xml::writer::XmlEvent::start_element("Status"))?;
15990             writer.write(xml::writer::XmlEvent::characters(&format!(
15991                 "{value}",
15992                 value = value
15993             )));
15994             writer.write(xml::writer::XmlEvent::end_element())?;
15995         }
15996         writer.write(xml::writer::XmlEvent::end_element())
15997     }
15998 }
15999 
16000 /// <p>Specifies website configuration parameters for an Amazon S3 bucket.</p>
16001 #[derive(Default, Debug, Clone, PartialEq)]
16002 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
16003 pub struct WebsiteConfiguration {
16004     /// <p>The name of the error document for the website.</p>
16005     pub error_document: Option<ErrorDocument>,
16006     /// <p>The name of the index document for the website.</p>
16007     pub index_document: Option<IndexDocument>,
16008     /// <p><p>The redirect behavior for every request to this bucket&#39;s website endpoint.</p> <important> <p>If you specify this property, you can&#39;t specify any other property.</p> </important></p>
16009     pub redirect_all_requests_to: Option<RedirectAllRequestsTo>,
16010     /// <p>Rules that define when a redirect is applied and the redirect behavior.</p>
16011     pub routing_rules: Option<Vec<RoutingRule>>,
16012 }
16013 
16014 pub struct WebsiteConfigurationSerializer;
16015 impl WebsiteConfigurationSerializer {
16016     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &WebsiteConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,16017     pub fn serialize<W>(
16018         mut writer: &mut EventWriter<W>,
16019         name: &str,
16020         obj: &WebsiteConfiguration,
16021     ) -> Result<(), xml::writer::Error>
16022     where
16023         W: Write,
16024     {
16025         writer.write(xml::writer::XmlEvent::start_element(name))?;
16026         if let Some(ref value) = obj.error_document {
16027             &ErrorDocumentSerializer::serialize(&mut writer, "ErrorDocument", value)?;
16028         }
16029         if let Some(ref value) = obj.index_document {
16030             &IndexDocumentSerializer::serialize(&mut writer, "IndexDocument", value)?;
16031         }
16032         if let Some(ref value) = obj.redirect_all_requests_to {
16033             &RedirectAllRequestsToSerializer::serialize(
16034                 &mut writer,
16035                 "RedirectAllRequestsTo",
16036                 value,
16037             )?;
16038         }
16039         if let Some(ref value) = obj.routing_rules {
16040             &RoutingRulesSerializer::serialize(&mut writer, "RoutingRules", value)?;
16041         }
16042         writer.write(xml::writer::XmlEvent::end_element())
16043     }
16044 }
16045 
16046 #[allow(dead_code)]
16047 struct YearsDeserializer;
16048 impl YearsDeserializer {
16049     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>16050     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
16051         start_element(tag_name, stack)?;
16052         let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
16053         end_element(tag_name, stack)?;
16054 
16055         Ok(obj)
16056     }
16057 }
16058 
16059 pub struct YearsSerializer;
16060 impl YearsSerializer {
16061     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,16062     pub fn serialize<W>(
16063         mut writer: &mut EventWriter<W>,
16064         name: &str,
16065         obj: &i64,
16066     ) -> Result<(), xml::writer::Error>
16067     where
16068         W: Write,
16069     {
16070         writer.write(xml::writer::XmlEvent::start_element(name))?;
16071         writer.write(xml::writer::XmlEvent::characters(&format!(
16072             "{value}",
16073             value = obj.to_string()
16074         )))?;
16075         writer.write(xml::writer::XmlEvent::end_element())
16076     }
16077 }
16078 
16079 /// Errors returned by AbortMultipartUpload
16080 #[derive(Debug, PartialEq)]
16081 pub enum AbortMultipartUploadError {
16082     /// <p>The specified multipart upload does not exist.</p>
16083     NoSuchUpload(String),
16084 }
16085 
16086 impl AbortMultipartUploadError {
from_response(res: BufferedHttpResponse) -> RusotoError<AbortMultipartUploadError>16087     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AbortMultipartUploadError> {
16088         {
16089             let reader = EventReader::new(res.body.as_ref());
16090             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16091             find_start_element(&mut stack);
16092             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16093                 match &parsed_error.code[..] {
16094                     "NoSuchUpload" => {
16095                         return RusotoError::Service(AbortMultipartUploadError::NoSuchUpload(
16096                             parsed_error.message,
16097                         ))
16098                     }
16099                     _ => {}
16100                 }
16101             }
16102         }
16103         RusotoError::Unknown(res)
16104     }
16105 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16106     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16107     where
16108         T: Peek + Next,
16109     {
16110         XmlErrorDeserializer::deserialize("Error", stack)
16111     }
16112 }
16113 impl fmt::Display for AbortMultipartUploadError {
16114     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16115     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16116         match *self {
16117             AbortMultipartUploadError::NoSuchUpload(ref cause) => write!(f, "{}", cause),
16118         }
16119     }
16120 }
16121 impl Error for AbortMultipartUploadError {}
16122 /// Errors returned by CompleteMultipartUpload
16123 #[derive(Debug, PartialEq)]
16124 pub enum CompleteMultipartUploadError {}
16125 
16126 impl CompleteMultipartUploadError {
from_response(res: BufferedHttpResponse) -> RusotoError<CompleteMultipartUploadError>16127     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CompleteMultipartUploadError> {
16128         {
16129             let reader = EventReader::new(res.body.as_ref());
16130             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16131             find_start_element(&mut stack);
16132             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16133                 match &parsed_error.code[..] {
16134                     _ => {}
16135                 }
16136             }
16137         }
16138         RusotoError::Unknown(res)
16139     }
16140 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16141     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16142     where
16143         T: Peek + Next,
16144     {
16145         XmlErrorDeserializer::deserialize("Error", stack)
16146     }
16147 }
16148 impl fmt::Display for CompleteMultipartUploadError {
16149     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16150     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16151         match *self {}
16152     }
16153 }
16154 impl Error for CompleteMultipartUploadError {}
16155 /// Errors returned by CopyObject
16156 #[derive(Debug, PartialEq)]
16157 pub enum CopyObjectError {
16158     /// <p>The source object of the COPY operation is not in the active tier and is only stored in Amazon S3 Glacier.</p>
16159     ObjectNotInActiveTierError(String),
16160 }
16161 
16162 impl CopyObjectError {
from_response(res: BufferedHttpResponse) -> RusotoError<CopyObjectError>16163     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CopyObjectError> {
16164         {
16165             let reader = EventReader::new(res.body.as_ref());
16166             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16167             find_start_element(&mut stack);
16168             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16169                 match &parsed_error.code[..] {
16170                     "ObjectNotInActiveTierError" => {
16171                         return RusotoError::Service(CopyObjectError::ObjectNotInActiveTierError(
16172                             parsed_error.message,
16173                         ))
16174                     }
16175                     _ => {}
16176                 }
16177             }
16178         }
16179         RusotoError::Unknown(res)
16180     }
16181 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16182     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16183     where
16184         T: Peek + Next,
16185     {
16186         XmlErrorDeserializer::deserialize("Error", stack)
16187     }
16188 }
16189 impl fmt::Display for CopyObjectError {
16190     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16191     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16192         match *self {
16193             CopyObjectError::ObjectNotInActiveTierError(ref cause) => write!(f, "{}", cause),
16194         }
16195     }
16196 }
16197 impl Error for CopyObjectError {}
16198 /// Errors returned by CreateBucket
16199 #[derive(Debug, PartialEq)]
16200 pub enum CreateBucketError {
16201     /// <p>The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.</p>
16202     BucketAlreadyExists(String),
16203     /// <p>The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all AWS Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs).</p>
16204     BucketAlreadyOwnedByYou(String),
16205 }
16206 
16207 impl CreateBucketError {
from_response(res: BufferedHttpResponse) -> RusotoError<CreateBucketError>16208     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBucketError> {
16209         {
16210             let reader = EventReader::new(res.body.as_ref());
16211             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16212             find_start_element(&mut stack);
16213             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16214                 match &parsed_error.code[..] {
16215                     "BucketAlreadyExists" => {
16216                         return RusotoError::Service(CreateBucketError::BucketAlreadyExists(
16217                             parsed_error.message,
16218                         ))
16219                     }
16220                     "BucketAlreadyOwnedByYou" => {
16221                         return RusotoError::Service(CreateBucketError::BucketAlreadyOwnedByYou(
16222                             parsed_error.message,
16223                         ))
16224                     }
16225                     _ => {}
16226                 }
16227             }
16228         }
16229         RusotoError::Unknown(res)
16230     }
16231 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16232     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16233     where
16234         T: Peek + Next,
16235     {
16236         XmlErrorDeserializer::deserialize("Error", stack)
16237     }
16238 }
16239 impl fmt::Display for CreateBucketError {
16240     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16241     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16242         match *self {
16243             CreateBucketError::BucketAlreadyExists(ref cause) => write!(f, "{}", cause),
16244             CreateBucketError::BucketAlreadyOwnedByYou(ref cause) => write!(f, "{}", cause),
16245         }
16246     }
16247 }
16248 impl Error for CreateBucketError {}
16249 /// Errors returned by CreateMultipartUpload
16250 #[derive(Debug, PartialEq)]
16251 pub enum CreateMultipartUploadError {}
16252 
16253 impl CreateMultipartUploadError {
from_response(res: BufferedHttpResponse) -> RusotoError<CreateMultipartUploadError>16254     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateMultipartUploadError> {
16255         {
16256             let reader = EventReader::new(res.body.as_ref());
16257             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16258             find_start_element(&mut stack);
16259             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16260                 match &parsed_error.code[..] {
16261                     _ => {}
16262                 }
16263             }
16264         }
16265         RusotoError::Unknown(res)
16266     }
16267 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16268     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16269     where
16270         T: Peek + Next,
16271     {
16272         XmlErrorDeserializer::deserialize("Error", stack)
16273     }
16274 }
16275 impl fmt::Display for CreateMultipartUploadError {
16276     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16277     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16278         match *self {}
16279     }
16280 }
16281 impl Error for CreateMultipartUploadError {}
16282 /// Errors returned by DeleteBucket
16283 #[derive(Debug, PartialEq)]
16284 pub enum DeleteBucketError {}
16285 
16286 impl DeleteBucketError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketError>16287     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketError> {
16288         {
16289             let reader = EventReader::new(res.body.as_ref());
16290             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16291             find_start_element(&mut stack);
16292             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16293                 match &parsed_error.code[..] {
16294                     _ => {}
16295                 }
16296             }
16297         }
16298         RusotoError::Unknown(res)
16299     }
16300 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16301     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16302     where
16303         T: Peek + Next,
16304     {
16305         XmlErrorDeserializer::deserialize("Error", stack)
16306     }
16307 }
16308 impl fmt::Display for DeleteBucketError {
16309     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16310     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16311         match *self {}
16312     }
16313 }
16314 impl Error for DeleteBucketError {}
16315 /// Errors returned by DeleteBucketAnalyticsConfiguration
16316 #[derive(Debug, PartialEq)]
16317 pub enum DeleteBucketAnalyticsConfigurationError {}
16318 
16319 impl DeleteBucketAnalyticsConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<DeleteBucketAnalyticsConfigurationError>16320     pub fn from_response(
16321         res: BufferedHttpResponse,
16322     ) -> RusotoError<DeleteBucketAnalyticsConfigurationError> {
16323         {
16324             let reader = EventReader::new(res.body.as_ref());
16325             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16326             find_start_element(&mut stack);
16327             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16328                 match &parsed_error.code[..] {
16329                     _ => {}
16330                 }
16331             }
16332         }
16333         RusotoError::Unknown(res)
16334     }
16335 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16336     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16337     where
16338         T: Peek + Next,
16339     {
16340         XmlErrorDeserializer::deserialize("Error", stack)
16341     }
16342 }
16343 impl fmt::Display for DeleteBucketAnalyticsConfigurationError {
16344     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16345     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16346         match *self {}
16347     }
16348 }
16349 impl Error for DeleteBucketAnalyticsConfigurationError {}
16350 /// Errors returned by DeleteBucketCors
16351 #[derive(Debug, PartialEq)]
16352 pub enum DeleteBucketCorsError {}
16353 
16354 impl DeleteBucketCorsError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketCorsError>16355     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketCorsError> {
16356         {
16357             let reader = EventReader::new(res.body.as_ref());
16358             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16359             find_start_element(&mut stack);
16360             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16361                 match &parsed_error.code[..] {
16362                     _ => {}
16363                 }
16364             }
16365         }
16366         RusotoError::Unknown(res)
16367     }
16368 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16369     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16370     where
16371         T: Peek + Next,
16372     {
16373         XmlErrorDeserializer::deserialize("Error", stack)
16374     }
16375 }
16376 impl fmt::Display for DeleteBucketCorsError {
16377     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16378     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16379         match *self {}
16380     }
16381 }
16382 impl Error for DeleteBucketCorsError {}
16383 /// Errors returned by DeleteBucketEncryption
16384 #[derive(Debug, PartialEq)]
16385 pub enum DeleteBucketEncryptionError {}
16386 
16387 impl DeleteBucketEncryptionError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketEncryptionError>16388     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketEncryptionError> {
16389         {
16390             let reader = EventReader::new(res.body.as_ref());
16391             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16392             find_start_element(&mut stack);
16393             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16394                 match &parsed_error.code[..] {
16395                     _ => {}
16396                 }
16397             }
16398         }
16399         RusotoError::Unknown(res)
16400     }
16401 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16402     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16403     where
16404         T: Peek + Next,
16405     {
16406         XmlErrorDeserializer::deserialize("Error", stack)
16407     }
16408 }
16409 impl fmt::Display for DeleteBucketEncryptionError {
16410     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16411     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16412         match *self {}
16413     }
16414 }
16415 impl Error for DeleteBucketEncryptionError {}
16416 /// Errors returned by DeleteBucketInventoryConfiguration
16417 #[derive(Debug, PartialEq)]
16418 pub enum DeleteBucketInventoryConfigurationError {}
16419 
16420 impl DeleteBucketInventoryConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<DeleteBucketInventoryConfigurationError>16421     pub fn from_response(
16422         res: BufferedHttpResponse,
16423     ) -> RusotoError<DeleteBucketInventoryConfigurationError> {
16424         {
16425             let reader = EventReader::new(res.body.as_ref());
16426             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16427             find_start_element(&mut stack);
16428             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16429                 match &parsed_error.code[..] {
16430                     _ => {}
16431                 }
16432             }
16433         }
16434         RusotoError::Unknown(res)
16435     }
16436 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16437     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16438     where
16439         T: Peek + Next,
16440     {
16441         XmlErrorDeserializer::deserialize("Error", stack)
16442     }
16443 }
16444 impl fmt::Display for DeleteBucketInventoryConfigurationError {
16445     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16446     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16447         match *self {}
16448     }
16449 }
16450 impl Error for DeleteBucketInventoryConfigurationError {}
16451 /// Errors returned by DeleteBucketLifecycle
16452 #[derive(Debug, PartialEq)]
16453 pub enum DeleteBucketLifecycleError {}
16454 
16455 impl DeleteBucketLifecycleError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketLifecycleError>16456     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketLifecycleError> {
16457         {
16458             let reader = EventReader::new(res.body.as_ref());
16459             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16460             find_start_element(&mut stack);
16461             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16462                 match &parsed_error.code[..] {
16463                     _ => {}
16464                 }
16465             }
16466         }
16467         RusotoError::Unknown(res)
16468     }
16469 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16470     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16471     where
16472         T: Peek + Next,
16473     {
16474         XmlErrorDeserializer::deserialize("Error", stack)
16475     }
16476 }
16477 impl fmt::Display for DeleteBucketLifecycleError {
16478     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16479     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16480         match *self {}
16481     }
16482 }
16483 impl Error for DeleteBucketLifecycleError {}
16484 /// Errors returned by DeleteBucketMetricsConfiguration
16485 #[derive(Debug, PartialEq)]
16486 pub enum DeleteBucketMetricsConfigurationError {}
16487 
16488 impl DeleteBucketMetricsConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<DeleteBucketMetricsConfigurationError>16489     pub fn from_response(
16490         res: BufferedHttpResponse,
16491     ) -> RusotoError<DeleteBucketMetricsConfigurationError> {
16492         {
16493             let reader = EventReader::new(res.body.as_ref());
16494             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16495             find_start_element(&mut stack);
16496             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16497                 match &parsed_error.code[..] {
16498                     _ => {}
16499                 }
16500             }
16501         }
16502         RusotoError::Unknown(res)
16503     }
16504 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16505     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16506     where
16507         T: Peek + Next,
16508     {
16509         XmlErrorDeserializer::deserialize("Error", stack)
16510     }
16511 }
16512 impl fmt::Display for DeleteBucketMetricsConfigurationError {
16513     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16514     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16515         match *self {}
16516     }
16517 }
16518 impl Error for DeleteBucketMetricsConfigurationError {}
16519 /// Errors returned by DeleteBucketPolicy
16520 #[derive(Debug, PartialEq)]
16521 pub enum DeleteBucketPolicyError {}
16522 
16523 impl DeleteBucketPolicyError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketPolicyError>16524     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketPolicyError> {
16525         {
16526             let reader = EventReader::new(res.body.as_ref());
16527             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16528             find_start_element(&mut stack);
16529             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16530                 match &parsed_error.code[..] {
16531                     _ => {}
16532                 }
16533             }
16534         }
16535         RusotoError::Unknown(res)
16536     }
16537 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16538     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16539     where
16540         T: Peek + Next,
16541     {
16542         XmlErrorDeserializer::deserialize("Error", stack)
16543     }
16544 }
16545 impl fmt::Display for DeleteBucketPolicyError {
16546     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16547     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16548         match *self {}
16549     }
16550 }
16551 impl Error for DeleteBucketPolicyError {}
16552 /// Errors returned by DeleteBucketReplication
16553 #[derive(Debug, PartialEq)]
16554 pub enum DeleteBucketReplicationError {}
16555 
16556 impl DeleteBucketReplicationError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketReplicationError>16557     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketReplicationError> {
16558         {
16559             let reader = EventReader::new(res.body.as_ref());
16560             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16561             find_start_element(&mut stack);
16562             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16563                 match &parsed_error.code[..] {
16564                     _ => {}
16565                 }
16566             }
16567         }
16568         RusotoError::Unknown(res)
16569     }
16570 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16571     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16572     where
16573         T: Peek + Next,
16574     {
16575         XmlErrorDeserializer::deserialize("Error", stack)
16576     }
16577 }
16578 impl fmt::Display for DeleteBucketReplicationError {
16579     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16580     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16581         match *self {}
16582     }
16583 }
16584 impl Error for DeleteBucketReplicationError {}
16585 /// Errors returned by DeleteBucketTagging
16586 #[derive(Debug, PartialEq)]
16587 pub enum DeleteBucketTaggingError {}
16588 
16589 impl DeleteBucketTaggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketTaggingError>16590     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketTaggingError> {
16591         {
16592             let reader = EventReader::new(res.body.as_ref());
16593             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16594             find_start_element(&mut stack);
16595             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16596                 match &parsed_error.code[..] {
16597                     _ => {}
16598                 }
16599             }
16600         }
16601         RusotoError::Unknown(res)
16602     }
16603 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16604     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16605     where
16606         T: Peek + Next,
16607     {
16608         XmlErrorDeserializer::deserialize("Error", stack)
16609     }
16610 }
16611 impl fmt::Display for DeleteBucketTaggingError {
16612     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16613     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16614         match *self {}
16615     }
16616 }
16617 impl Error for DeleteBucketTaggingError {}
16618 /// Errors returned by DeleteBucketWebsite
16619 #[derive(Debug, PartialEq)]
16620 pub enum DeleteBucketWebsiteError {}
16621 
16622 impl DeleteBucketWebsiteError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketWebsiteError>16623     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketWebsiteError> {
16624         {
16625             let reader = EventReader::new(res.body.as_ref());
16626             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16627             find_start_element(&mut stack);
16628             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16629                 match &parsed_error.code[..] {
16630                     _ => {}
16631                 }
16632             }
16633         }
16634         RusotoError::Unknown(res)
16635     }
16636 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16637     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16638     where
16639         T: Peek + Next,
16640     {
16641         XmlErrorDeserializer::deserialize("Error", stack)
16642     }
16643 }
16644 impl fmt::Display for DeleteBucketWebsiteError {
16645     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16646     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16647         match *self {}
16648     }
16649 }
16650 impl Error for DeleteBucketWebsiteError {}
16651 /// Errors returned by DeleteObject
16652 #[derive(Debug, PartialEq)]
16653 pub enum DeleteObjectError {}
16654 
16655 impl DeleteObjectError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteObjectError>16656     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteObjectError> {
16657         {
16658             let reader = EventReader::new(res.body.as_ref());
16659             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16660             find_start_element(&mut stack);
16661             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16662                 match &parsed_error.code[..] {
16663                     _ => {}
16664                 }
16665             }
16666         }
16667         RusotoError::Unknown(res)
16668     }
16669 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16670     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16671     where
16672         T: Peek + Next,
16673     {
16674         XmlErrorDeserializer::deserialize("Error", stack)
16675     }
16676 }
16677 impl fmt::Display for DeleteObjectError {
16678     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16679     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16680         match *self {}
16681     }
16682 }
16683 impl Error for DeleteObjectError {}
16684 /// Errors returned by DeleteObjectTagging
16685 #[derive(Debug, PartialEq)]
16686 pub enum DeleteObjectTaggingError {}
16687 
16688 impl DeleteObjectTaggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteObjectTaggingError>16689     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteObjectTaggingError> {
16690         {
16691             let reader = EventReader::new(res.body.as_ref());
16692             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16693             find_start_element(&mut stack);
16694             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16695                 match &parsed_error.code[..] {
16696                     _ => {}
16697                 }
16698             }
16699         }
16700         RusotoError::Unknown(res)
16701     }
16702 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16703     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16704     where
16705         T: Peek + Next,
16706     {
16707         XmlErrorDeserializer::deserialize("Error", stack)
16708     }
16709 }
16710 impl fmt::Display for DeleteObjectTaggingError {
16711     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16712     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16713         match *self {}
16714     }
16715 }
16716 impl Error for DeleteObjectTaggingError {}
16717 /// Errors returned by DeleteObjects
16718 #[derive(Debug, PartialEq)]
16719 pub enum DeleteObjectsError {}
16720 
16721 impl DeleteObjectsError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteObjectsError>16722     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteObjectsError> {
16723         {
16724             let reader = EventReader::new(res.body.as_ref());
16725             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16726             find_start_element(&mut stack);
16727             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16728                 match &parsed_error.code[..] {
16729                     _ => {}
16730                 }
16731             }
16732         }
16733         RusotoError::Unknown(res)
16734     }
16735 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16736     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16737     where
16738         T: Peek + Next,
16739     {
16740         XmlErrorDeserializer::deserialize("Error", stack)
16741     }
16742 }
16743 impl fmt::Display for DeleteObjectsError {
16744     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16745     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16746         match *self {}
16747     }
16748 }
16749 impl Error for DeleteObjectsError {}
16750 /// Errors returned by DeletePublicAccessBlock
16751 #[derive(Debug, PartialEq)]
16752 pub enum DeletePublicAccessBlockError {}
16753 
16754 impl DeletePublicAccessBlockError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeletePublicAccessBlockError>16755     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePublicAccessBlockError> {
16756         {
16757             let reader = EventReader::new(res.body.as_ref());
16758             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16759             find_start_element(&mut stack);
16760             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16761                 match &parsed_error.code[..] {
16762                     _ => {}
16763                 }
16764             }
16765         }
16766         RusotoError::Unknown(res)
16767     }
16768 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16769     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16770     where
16771         T: Peek + Next,
16772     {
16773         XmlErrorDeserializer::deserialize("Error", stack)
16774     }
16775 }
16776 impl fmt::Display for DeletePublicAccessBlockError {
16777     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16778     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16779         match *self {}
16780     }
16781 }
16782 impl Error for DeletePublicAccessBlockError {}
16783 /// Errors returned by GetBucketAccelerateConfiguration
16784 #[derive(Debug, PartialEq)]
16785 pub enum GetBucketAccelerateConfigurationError {}
16786 
16787 impl GetBucketAccelerateConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBucketAccelerateConfigurationError>16788     pub fn from_response(
16789         res: BufferedHttpResponse,
16790     ) -> RusotoError<GetBucketAccelerateConfigurationError> {
16791         {
16792             let reader = EventReader::new(res.body.as_ref());
16793             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16794             find_start_element(&mut stack);
16795             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16796                 match &parsed_error.code[..] {
16797                     _ => {}
16798                 }
16799             }
16800         }
16801         RusotoError::Unknown(res)
16802     }
16803 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16804     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16805     where
16806         T: Peek + Next,
16807     {
16808         XmlErrorDeserializer::deserialize("Error", stack)
16809     }
16810 }
16811 impl fmt::Display for GetBucketAccelerateConfigurationError {
16812     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16813     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16814         match *self {}
16815     }
16816 }
16817 impl Error for GetBucketAccelerateConfigurationError {}
16818 /// Errors returned by GetBucketAcl
16819 #[derive(Debug, PartialEq)]
16820 pub enum GetBucketAclError {}
16821 
16822 impl GetBucketAclError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketAclError>16823     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketAclError> {
16824         {
16825             let reader = EventReader::new(res.body.as_ref());
16826             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16827             find_start_element(&mut stack);
16828             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16829                 match &parsed_error.code[..] {
16830                     _ => {}
16831                 }
16832             }
16833         }
16834         RusotoError::Unknown(res)
16835     }
16836 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16837     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16838     where
16839         T: Peek + Next,
16840     {
16841         XmlErrorDeserializer::deserialize("Error", stack)
16842     }
16843 }
16844 impl fmt::Display for GetBucketAclError {
16845     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16846     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16847         match *self {}
16848     }
16849 }
16850 impl Error for GetBucketAclError {}
16851 /// Errors returned by GetBucketAnalyticsConfiguration
16852 #[derive(Debug, PartialEq)]
16853 pub enum GetBucketAnalyticsConfigurationError {}
16854 
16855 impl GetBucketAnalyticsConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBucketAnalyticsConfigurationError>16856     pub fn from_response(
16857         res: BufferedHttpResponse,
16858     ) -> RusotoError<GetBucketAnalyticsConfigurationError> {
16859         {
16860             let reader = EventReader::new(res.body.as_ref());
16861             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16862             find_start_element(&mut stack);
16863             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16864                 match &parsed_error.code[..] {
16865                     _ => {}
16866                 }
16867             }
16868         }
16869         RusotoError::Unknown(res)
16870     }
16871 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16872     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16873     where
16874         T: Peek + Next,
16875     {
16876         XmlErrorDeserializer::deserialize("Error", stack)
16877     }
16878 }
16879 impl fmt::Display for GetBucketAnalyticsConfigurationError {
16880     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16881     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16882         match *self {}
16883     }
16884 }
16885 impl Error for GetBucketAnalyticsConfigurationError {}
16886 /// Errors returned by GetBucketCors
16887 #[derive(Debug, PartialEq)]
16888 pub enum GetBucketCorsError {}
16889 
16890 impl GetBucketCorsError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketCorsError>16891     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketCorsError> {
16892         {
16893             let reader = EventReader::new(res.body.as_ref());
16894             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16895             find_start_element(&mut stack);
16896             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16897                 match &parsed_error.code[..] {
16898                     _ => {}
16899                 }
16900             }
16901         }
16902         RusotoError::Unknown(res)
16903     }
16904 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16905     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16906     where
16907         T: Peek + Next,
16908     {
16909         XmlErrorDeserializer::deserialize("Error", stack)
16910     }
16911 }
16912 impl fmt::Display for GetBucketCorsError {
16913     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16914     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16915         match *self {}
16916     }
16917 }
16918 impl Error for GetBucketCorsError {}
16919 /// Errors returned by GetBucketEncryption
16920 #[derive(Debug, PartialEq)]
16921 pub enum GetBucketEncryptionError {}
16922 
16923 impl GetBucketEncryptionError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketEncryptionError>16924     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketEncryptionError> {
16925         {
16926             let reader = EventReader::new(res.body.as_ref());
16927             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16928             find_start_element(&mut stack);
16929             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16930                 match &parsed_error.code[..] {
16931                     _ => {}
16932                 }
16933             }
16934         }
16935         RusotoError::Unknown(res)
16936     }
16937 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16938     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16939     where
16940         T: Peek + Next,
16941     {
16942         XmlErrorDeserializer::deserialize("Error", stack)
16943     }
16944 }
16945 impl fmt::Display for GetBucketEncryptionError {
16946     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16947     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16948         match *self {}
16949     }
16950 }
16951 impl Error for GetBucketEncryptionError {}
16952 /// Errors returned by GetBucketInventoryConfiguration
16953 #[derive(Debug, PartialEq)]
16954 pub enum GetBucketInventoryConfigurationError {}
16955 
16956 impl GetBucketInventoryConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBucketInventoryConfigurationError>16957     pub fn from_response(
16958         res: BufferedHttpResponse,
16959     ) -> RusotoError<GetBucketInventoryConfigurationError> {
16960         {
16961             let reader = EventReader::new(res.body.as_ref());
16962             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16963             find_start_element(&mut stack);
16964             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16965                 match &parsed_error.code[..] {
16966                     _ => {}
16967                 }
16968             }
16969         }
16970         RusotoError::Unknown(res)
16971     }
16972 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16973     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16974     where
16975         T: Peek + Next,
16976     {
16977         XmlErrorDeserializer::deserialize("Error", stack)
16978     }
16979 }
16980 impl fmt::Display for GetBucketInventoryConfigurationError {
16981     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16982     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16983         match *self {}
16984     }
16985 }
16986 impl Error for GetBucketInventoryConfigurationError {}
16987 /// Errors returned by GetBucketLifecycle
16988 #[derive(Debug, PartialEq)]
16989 pub enum GetBucketLifecycleError {}
16990 
16991 impl GetBucketLifecycleError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketLifecycleError>16992     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketLifecycleError> {
16993         {
16994             let reader = EventReader::new(res.body.as_ref());
16995             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16996             find_start_element(&mut stack);
16997             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16998                 match &parsed_error.code[..] {
16999                     _ => {}
17000                 }
17001             }
17002         }
17003         RusotoError::Unknown(res)
17004     }
17005 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17006     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17007     where
17008         T: Peek + Next,
17009     {
17010         XmlErrorDeserializer::deserialize("Error", stack)
17011     }
17012 }
17013 impl fmt::Display for GetBucketLifecycleError {
17014     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17015     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17016         match *self {}
17017     }
17018 }
17019 impl Error for GetBucketLifecycleError {}
17020 /// Errors returned by GetBucketLifecycleConfiguration
17021 #[derive(Debug, PartialEq)]
17022 pub enum GetBucketLifecycleConfigurationError {}
17023 
17024 impl GetBucketLifecycleConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBucketLifecycleConfigurationError>17025     pub fn from_response(
17026         res: BufferedHttpResponse,
17027     ) -> RusotoError<GetBucketLifecycleConfigurationError> {
17028         {
17029             let reader = EventReader::new(res.body.as_ref());
17030             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17031             find_start_element(&mut stack);
17032             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17033                 match &parsed_error.code[..] {
17034                     _ => {}
17035                 }
17036             }
17037         }
17038         RusotoError::Unknown(res)
17039     }
17040 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17041     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17042     where
17043         T: Peek + Next,
17044     {
17045         XmlErrorDeserializer::deserialize("Error", stack)
17046     }
17047 }
17048 impl fmt::Display for GetBucketLifecycleConfigurationError {
17049     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17050     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17051         match *self {}
17052     }
17053 }
17054 impl Error for GetBucketLifecycleConfigurationError {}
17055 /// Errors returned by GetBucketLocation
17056 #[derive(Debug, PartialEq)]
17057 pub enum GetBucketLocationError {}
17058 
17059 impl GetBucketLocationError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketLocationError>17060     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketLocationError> {
17061         {
17062             let reader = EventReader::new(res.body.as_ref());
17063             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17064             find_start_element(&mut stack);
17065             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17066                 match &parsed_error.code[..] {
17067                     _ => {}
17068                 }
17069             }
17070         }
17071         RusotoError::Unknown(res)
17072     }
17073 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17074     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17075     where
17076         T: Peek + Next,
17077     {
17078         XmlErrorDeserializer::deserialize("Error", stack)
17079     }
17080 }
17081 impl fmt::Display for GetBucketLocationError {
17082     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17083     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17084         match *self {}
17085     }
17086 }
17087 impl Error for GetBucketLocationError {}
17088 /// Errors returned by GetBucketLogging
17089 #[derive(Debug, PartialEq)]
17090 pub enum GetBucketLoggingError {}
17091 
17092 impl GetBucketLoggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketLoggingError>17093     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketLoggingError> {
17094         {
17095             let reader = EventReader::new(res.body.as_ref());
17096             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17097             find_start_element(&mut stack);
17098             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17099                 match &parsed_error.code[..] {
17100                     _ => {}
17101                 }
17102             }
17103         }
17104         RusotoError::Unknown(res)
17105     }
17106 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17107     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17108     where
17109         T: Peek + Next,
17110     {
17111         XmlErrorDeserializer::deserialize("Error", stack)
17112     }
17113 }
17114 impl fmt::Display for GetBucketLoggingError {
17115     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17116     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17117         match *self {}
17118     }
17119 }
17120 impl Error for GetBucketLoggingError {}
17121 /// Errors returned by GetBucketMetricsConfiguration
17122 #[derive(Debug, PartialEq)]
17123 pub enum GetBucketMetricsConfigurationError {}
17124 
17125 impl GetBucketMetricsConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBucketMetricsConfigurationError>17126     pub fn from_response(
17127         res: BufferedHttpResponse,
17128     ) -> RusotoError<GetBucketMetricsConfigurationError> {
17129         {
17130             let reader = EventReader::new(res.body.as_ref());
17131             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17132             find_start_element(&mut stack);
17133             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17134                 match &parsed_error.code[..] {
17135                     _ => {}
17136                 }
17137             }
17138         }
17139         RusotoError::Unknown(res)
17140     }
17141 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17142     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17143     where
17144         T: Peek + Next,
17145     {
17146         XmlErrorDeserializer::deserialize("Error", stack)
17147     }
17148 }
17149 impl fmt::Display for GetBucketMetricsConfigurationError {
17150     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17151     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17152         match *self {}
17153     }
17154 }
17155 impl Error for GetBucketMetricsConfigurationError {}
17156 /// Errors returned by GetBucketNotification
17157 #[derive(Debug, PartialEq)]
17158 pub enum GetBucketNotificationError {}
17159 
17160 impl GetBucketNotificationError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketNotificationError>17161     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketNotificationError> {
17162         {
17163             let reader = EventReader::new(res.body.as_ref());
17164             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17165             find_start_element(&mut stack);
17166             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17167                 match &parsed_error.code[..] {
17168                     _ => {}
17169                 }
17170             }
17171         }
17172         RusotoError::Unknown(res)
17173     }
17174 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17175     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17176     where
17177         T: Peek + Next,
17178     {
17179         XmlErrorDeserializer::deserialize("Error", stack)
17180     }
17181 }
17182 impl fmt::Display for GetBucketNotificationError {
17183     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17184     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17185         match *self {}
17186     }
17187 }
17188 impl Error for GetBucketNotificationError {}
17189 /// Errors returned by GetBucketNotificationConfiguration
17190 #[derive(Debug, PartialEq)]
17191 pub enum GetBucketNotificationConfigurationError {}
17192 
17193 impl GetBucketNotificationConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBucketNotificationConfigurationError>17194     pub fn from_response(
17195         res: BufferedHttpResponse,
17196     ) -> RusotoError<GetBucketNotificationConfigurationError> {
17197         {
17198             let reader = EventReader::new(res.body.as_ref());
17199             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17200             find_start_element(&mut stack);
17201             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17202                 match &parsed_error.code[..] {
17203                     _ => {}
17204                 }
17205             }
17206         }
17207         RusotoError::Unknown(res)
17208     }
17209 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17210     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17211     where
17212         T: Peek + Next,
17213     {
17214         XmlErrorDeserializer::deserialize("Error", stack)
17215     }
17216 }
17217 impl fmt::Display for GetBucketNotificationConfigurationError {
17218     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17219     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17220         match *self {}
17221     }
17222 }
17223 impl Error for GetBucketNotificationConfigurationError {}
17224 /// Errors returned by GetBucketPolicy
17225 #[derive(Debug, PartialEq)]
17226 pub enum GetBucketPolicyError {}
17227 
17228 impl GetBucketPolicyError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketPolicyError>17229     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketPolicyError> {
17230         {
17231             let reader = EventReader::new(res.body.as_ref());
17232             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17233             find_start_element(&mut stack);
17234             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17235                 match &parsed_error.code[..] {
17236                     _ => {}
17237                 }
17238             }
17239         }
17240         RusotoError::Unknown(res)
17241     }
17242 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17243     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17244     where
17245         T: Peek + Next,
17246     {
17247         XmlErrorDeserializer::deserialize("Error", stack)
17248     }
17249 }
17250 impl fmt::Display for GetBucketPolicyError {
17251     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17252     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17253         match *self {}
17254     }
17255 }
17256 impl Error for GetBucketPolicyError {}
17257 /// Errors returned by GetBucketPolicyStatus
17258 #[derive(Debug, PartialEq)]
17259 pub enum GetBucketPolicyStatusError {}
17260 
17261 impl GetBucketPolicyStatusError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketPolicyStatusError>17262     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketPolicyStatusError> {
17263         {
17264             let reader = EventReader::new(res.body.as_ref());
17265             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17266             find_start_element(&mut stack);
17267             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17268                 match &parsed_error.code[..] {
17269                     _ => {}
17270                 }
17271             }
17272         }
17273         RusotoError::Unknown(res)
17274     }
17275 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17276     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17277     where
17278         T: Peek + Next,
17279     {
17280         XmlErrorDeserializer::deserialize("Error", stack)
17281     }
17282 }
17283 impl fmt::Display for GetBucketPolicyStatusError {
17284     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17285     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17286         match *self {}
17287     }
17288 }
17289 impl Error for GetBucketPolicyStatusError {}
17290 /// Errors returned by GetBucketReplication
17291 #[derive(Debug, PartialEq)]
17292 pub enum GetBucketReplicationError {}
17293 
17294 impl GetBucketReplicationError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketReplicationError>17295     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketReplicationError> {
17296         {
17297             let reader = EventReader::new(res.body.as_ref());
17298             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17299             find_start_element(&mut stack);
17300             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17301                 match &parsed_error.code[..] {
17302                     _ => {}
17303                 }
17304             }
17305         }
17306         RusotoError::Unknown(res)
17307     }
17308 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17309     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17310     where
17311         T: Peek + Next,
17312     {
17313         XmlErrorDeserializer::deserialize("Error", stack)
17314     }
17315 }
17316 impl fmt::Display for GetBucketReplicationError {
17317     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17318     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17319         match *self {}
17320     }
17321 }
17322 impl Error for GetBucketReplicationError {}
17323 /// Errors returned by GetBucketRequestPayment
17324 #[derive(Debug, PartialEq)]
17325 pub enum GetBucketRequestPaymentError {}
17326 
17327 impl GetBucketRequestPaymentError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketRequestPaymentError>17328     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketRequestPaymentError> {
17329         {
17330             let reader = EventReader::new(res.body.as_ref());
17331             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17332             find_start_element(&mut stack);
17333             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17334                 match &parsed_error.code[..] {
17335                     _ => {}
17336                 }
17337             }
17338         }
17339         RusotoError::Unknown(res)
17340     }
17341 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17342     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17343     where
17344         T: Peek + Next,
17345     {
17346         XmlErrorDeserializer::deserialize("Error", stack)
17347     }
17348 }
17349 impl fmt::Display for GetBucketRequestPaymentError {
17350     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17351     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17352         match *self {}
17353     }
17354 }
17355 impl Error for GetBucketRequestPaymentError {}
17356 /// Errors returned by GetBucketTagging
17357 #[derive(Debug, PartialEq)]
17358 pub enum GetBucketTaggingError {}
17359 
17360 impl GetBucketTaggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketTaggingError>17361     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketTaggingError> {
17362         {
17363             let reader = EventReader::new(res.body.as_ref());
17364             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17365             find_start_element(&mut stack);
17366             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17367                 match &parsed_error.code[..] {
17368                     _ => {}
17369                 }
17370             }
17371         }
17372         RusotoError::Unknown(res)
17373     }
17374 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17375     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17376     where
17377         T: Peek + Next,
17378     {
17379         XmlErrorDeserializer::deserialize("Error", stack)
17380     }
17381 }
17382 impl fmt::Display for GetBucketTaggingError {
17383     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17384     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17385         match *self {}
17386     }
17387 }
17388 impl Error for GetBucketTaggingError {}
17389 /// Errors returned by GetBucketVersioning
17390 #[derive(Debug, PartialEq)]
17391 pub enum GetBucketVersioningError {}
17392 
17393 impl GetBucketVersioningError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketVersioningError>17394     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketVersioningError> {
17395         {
17396             let reader = EventReader::new(res.body.as_ref());
17397             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17398             find_start_element(&mut stack);
17399             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17400                 match &parsed_error.code[..] {
17401                     _ => {}
17402                 }
17403             }
17404         }
17405         RusotoError::Unknown(res)
17406     }
17407 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17408     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17409     where
17410         T: Peek + Next,
17411     {
17412         XmlErrorDeserializer::deserialize("Error", stack)
17413     }
17414 }
17415 impl fmt::Display for GetBucketVersioningError {
17416     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17417     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17418         match *self {}
17419     }
17420 }
17421 impl Error for GetBucketVersioningError {}
17422 /// Errors returned by GetBucketWebsite
17423 #[derive(Debug, PartialEq)]
17424 pub enum GetBucketWebsiteError {}
17425 
17426 impl GetBucketWebsiteError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketWebsiteError>17427     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketWebsiteError> {
17428         {
17429             let reader = EventReader::new(res.body.as_ref());
17430             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17431             find_start_element(&mut stack);
17432             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17433                 match &parsed_error.code[..] {
17434                     _ => {}
17435                 }
17436             }
17437         }
17438         RusotoError::Unknown(res)
17439     }
17440 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17441     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17442     where
17443         T: Peek + Next,
17444     {
17445         XmlErrorDeserializer::deserialize("Error", stack)
17446     }
17447 }
17448 impl fmt::Display for GetBucketWebsiteError {
17449     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17450     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17451         match *self {}
17452     }
17453 }
17454 impl Error for GetBucketWebsiteError {}
17455 /// Errors returned by GetObject
17456 #[derive(Debug, PartialEq)]
17457 pub enum GetObjectError {
17458     /// <p>The specified key does not exist.</p>
17459     NoSuchKey(String),
17460 }
17461 
17462 impl GetObjectError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectError>17463     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectError> {
17464         {
17465             let reader = EventReader::new(res.body.as_ref());
17466             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17467             find_start_element(&mut stack);
17468             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17469                 match &parsed_error.code[..] {
17470                     "NoSuchKey" => {
17471                         return RusotoError::Service(GetObjectError::NoSuchKey(
17472                             parsed_error.message,
17473                         ))
17474                     }
17475                     _ => {}
17476                 }
17477             }
17478         }
17479         RusotoError::Unknown(res)
17480     }
17481 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17482     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17483     where
17484         T: Peek + Next,
17485     {
17486         XmlErrorDeserializer::deserialize("Error", stack)
17487     }
17488 }
17489 impl fmt::Display for GetObjectError {
17490     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17491     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17492         match *self {
17493             GetObjectError::NoSuchKey(ref cause) => write!(f, "{}", cause),
17494         }
17495     }
17496 }
17497 impl Error for GetObjectError {}
17498 /// Errors returned by GetObjectAcl
17499 #[derive(Debug, PartialEq)]
17500 pub enum GetObjectAclError {
17501     /// <p>The specified key does not exist.</p>
17502     NoSuchKey(String),
17503 }
17504 
17505 impl GetObjectAclError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectAclError>17506     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectAclError> {
17507         {
17508             let reader = EventReader::new(res.body.as_ref());
17509             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17510             find_start_element(&mut stack);
17511             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17512                 match &parsed_error.code[..] {
17513                     "NoSuchKey" => {
17514                         return RusotoError::Service(GetObjectAclError::NoSuchKey(
17515                             parsed_error.message,
17516                         ))
17517                     }
17518                     _ => {}
17519                 }
17520             }
17521         }
17522         RusotoError::Unknown(res)
17523     }
17524 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17525     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17526     where
17527         T: Peek + Next,
17528     {
17529         XmlErrorDeserializer::deserialize("Error", stack)
17530     }
17531 }
17532 impl fmt::Display for GetObjectAclError {
17533     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17534     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17535         match *self {
17536             GetObjectAclError::NoSuchKey(ref cause) => write!(f, "{}", cause),
17537         }
17538     }
17539 }
17540 impl Error for GetObjectAclError {}
17541 /// Errors returned by GetObjectLegalHold
17542 #[derive(Debug, PartialEq)]
17543 pub enum GetObjectLegalHoldError {}
17544 
17545 impl GetObjectLegalHoldError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectLegalHoldError>17546     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectLegalHoldError> {
17547         {
17548             let reader = EventReader::new(res.body.as_ref());
17549             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17550             find_start_element(&mut stack);
17551             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17552                 match &parsed_error.code[..] {
17553                     _ => {}
17554                 }
17555             }
17556         }
17557         RusotoError::Unknown(res)
17558     }
17559 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17560     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17561     where
17562         T: Peek + Next,
17563     {
17564         XmlErrorDeserializer::deserialize("Error", stack)
17565     }
17566 }
17567 impl fmt::Display for GetObjectLegalHoldError {
17568     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17569     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17570         match *self {}
17571     }
17572 }
17573 impl Error for GetObjectLegalHoldError {}
17574 /// Errors returned by GetObjectLockConfiguration
17575 #[derive(Debug, PartialEq)]
17576 pub enum GetObjectLockConfigurationError {}
17577 
17578 impl GetObjectLockConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetObjectLockConfigurationError>17579     pub fn from_response(
17580         res: BufferedHttpResponse,
17581     ) -> RusotoError<GetObjectLockConfigurationError> {
17582         {
17583             let reader = EventReader::new(res.body.as_ref());
17584             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17585             find_start_element(&mut stack);
17586             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17587                 match &parsed_error.code[..] {
17588                     _ => {}
17589                 }
17590             }
17591         }
17592         RusotoError::Unknown(res)
17593     }
17594 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17595     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17596     where
17597         T: Peek + Next,
17598     {
17599         XmlErrorDeserializer::deserialize("Error", stack)
17600     }
17601 }
17602 impl fmt::Display for GetObjectLockConfigurationError {
17603     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17604     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17605         match *self {}
17606     }
17607 }
17608 impl Error for GetObjectLockConfigurationError {}
17609 /// Errors returned by GetObjectRetention
17610 #[derive(Debug, PartialEq)]
17611 pub enum GetObjectRetentionError {}
17612 
17613 impl GetObjectRetentionError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectRetentionError>17614     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectRetentionError> {
17615         {
17616             let reader = EventReader::new(res.body.as_ref());
17617             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17618             find_start_element(&mut stack);
17619             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17620                 match &parsed_error.code[..] {
17621                     _ => {}
17622                 }
17623             }
17624         }
17625         RusotoError::Unknown(res)
17626     }
17627 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17628     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17629     where
17630         T: Peek + Next,
17631     {
17632         XmlErrorDeserializer::deserialize("Error", stack)
17633     }
17634 }
17635 impl fmt::Display for GetObjectRetentionError {
17636     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17637     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17638         match *self {}
17639     }
17640 }
17641 impl Error for GetObjectRetentionError {}
17642 /// Errors returned by GetObjectTagging
17643 #[derive(Debug, PartialEq)]
17644 pub enum GetObjectTaggingError {}
17645 
17646 impl GetObjectTaggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectTaggingError>17647     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectTaggingError> {
17648         {
17649             let reader = EventReader::new(res.body.as_ref());
17650             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17651             find_start_element(&mut stack);
17652             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17653                 match &parsed_error.code[..] {
17654                     _ => {}
17655                 }
17656             }
17657         }
17658         RusotoError::Unknown(res)
17659     }
17660 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17661     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17662     where
17663         T: Peek + Next,
17664     {
17665         XmlErrorDeserializer::deserialize("Error", stack)
17666     }
17667 }
17668 impl fmt::Display for GetObjectTaggingError {
17669     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17670     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17671         match *self {}
17672     }
17673 }
17674 impl Error for GetObjectTaggingError {}
17675 /// Errors returned by GetObjectTorrent
17676 #[derive(Debug, PartialEq)]
17677 pub enum GetObjectTorrentError {}
17678 
17679 impl GetObjectTorrentError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectTorrentError>17680     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectTorrentError> {
17681         {
17682             let reader = EventReader::new(res.body.as_ref());
17683             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17684             find_start_element(&mut stack);
17685             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17686                 match &parsed_error.code[..] {
17687                     _ => {}
17688                 }
17689             }
17690         }
17691         RusotoError::Unknown(res)
17692     }
17693 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17694     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17695     where
17696         T: Peek + Next,
17697     {
17698         XmlErrorDeserializer::deserialize("Error", stack)
17699     }
17700 }
17701 impl fmt::Display for GetObjectTorrentError {
17702     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17703     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17704         match *self {}
17705     }
17706 }
17707 impl Error for GetObjectTorrentError {}
17708 /// Errors returned by GetPublicAccessBlock
17709 #[derive(Debug, PartialEq)]
17710 pub enum GetPublicAccessBlockError {}
17711 
17712 impl GetPublicAccessBlockError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetPublicAccessBlockError>17713     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPublicAccessBlockError> {
17714         {
17715             let reader = EventReader::new(res.body.as_ref());
17716             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17717             find_start_element(&mut stack);
17718             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17719                 match &parsed_error.code[..] {
17720                     _ => {}
17721                 }
17722             }
17723         }
17724         RusotoError::Unknown(res)
17725     }
17726 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17727     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17728     where
17729         T: Peek + Next,
17730     {
17731         XmlErrorDeserializer::deserialize("Error", stack)
17732     }
17733 }
17734 impl fmt::Display for GetPublicAccessBlockError {
17735     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17736     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17737         match *self {}
17738     }
17739 }
17740 impl Error for GetPublicAccessBlockError {}
17741 /// Errors returned by HeadBucket
17742 #[derive(Debug, PartialEq)]
17743 pub enum HeadBucketError {
17744     /// <p>The specified bucket does not exist.</p>
17745     NoSuchBucket(String),
17746 }
17747 
17748 impl HeadBucketError {
from_response(res: BufferedHttpResponse) -> RusotoError<HeadBucketError>17749     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<HeadBucketError> {
17750         {
17751             let reader = EventReader::new(res.body.as_ref());
17752             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17753             find_start_element(&mut stack);
17754             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17755                 match &parsed_error.code[..] {
17756                     "NoSuchBucket" => {
17757                         return RusotoError::Service(HeadBucketError::NoSuchBucket(
17758                             parsed_error.message,
17759                         ))
17760                     }
17761                     _ => {}
17762                 }
17763             }
17764         }
17765         RusotoError::Unknown(res)
17766     }
17767 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17768     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17769     where
17770         T: Peek + Next,
17771     {
17772         XmlErrorDeserializer::deserialize("Error", stack)
17773     }
17774 }
17775 impl fmt::Display for HeadBucketError {
17776     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17777     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17778         match *self {
17779             HeadBucketError::NoSuchBucket(ref cause) => write!(f, "{}", cause),
17780         }
17781     }
17782 }
17783 impl Error for HeadBucketError {}
17784 /// Errors returned by HeadObject
17785 #[derive(Debug, PartialEq)]
17786 pub enum HeadObjectError {
17787     /// <p>The specified key does not exist.</p>
17788     NoSuchKey(String),
17789 }
17790 
17791 impl HeadObjectError {
from_response(res: BufferedHttpResponse) -> RusotoError<HeadObjectError>17792     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<HeadObjectError> {
17793         {
17794             let reader = EventReader::new(res.body.as_ref());
17795             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17796             find_start_element(&mut stack);
17797             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17798                 match &parsed_error.code[..] {
17799                     "NoSuchKey" => {
17800                         return RusotoError::Service(HeadObjectError::NoSuchKey(
17801                             parsed_error.message,
17802                         ))
17803                     }
17804                     _ => {}
17805                 }
17806             }
17807         }
17808         RusotoError::Unknown(res)
17809     }
17810 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17811     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17812     where
17813         T: Peek + Next,
17814     {
17815         XmlErrorDeserializer::deserialize("Error", stack)
17816     }
17817 }
17818 impl fmt::Display for HeadObjectError {
17819     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17820     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17821         match *self {
17822             HeadObjectError::NoSuchKey(ref cause) => write!(f, "{}", cause),
17823         }
17824     }
17825 }
17826 impl Error for HeadObjectError {}
17827 /// Errors returned by ListBucketAnalyticsConfigurations
17828 #[derive(Debug, PartialEq)]
17829 pub enum ListBucketAnalyticsConfigurationsError {}
17830 
17831 impl ListBucketAnalyticsConfigurationsError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<ListBucketAnalyticsConfigurationsError>17832     pub fn from_response(
17833         res: BufferedHttpResponse,
17834     ) -> RusotoError<ListBucketAnalyticsConfigurationsError> {
17835         {
17836             let reader = EventReader::new(res.body.as_ref());
17837             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17838             find_start_element(&mut stack);
17839             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17840                 match &parsed_error.code[..] {
17841                     _ => {}
17842                 }
17843             }
17844         }
17845         RusotoError::Unknown(res)
17846     }
17847 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17848     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17849     where
17850         T: Peek + Next,
17851     {
17852         XmlErrorDeserializer::deserialize("Error", stack)
17853     }
17854 }
17855 impl fmt::Display for ListBucketAnalyticsConfigurationsError {
17856     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17857     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17858         match *self {}
17859     }
17860 }
17861 impl Error for ListBucketAnalyticsConfigurationsError {}
17862 /// Errors returned by ListBucketInventoryConfigurations
17863 #[derive(Debug, PartialEq)]
17864 pub enum ListBucketInventoryConfigurationsError {}
17865 
17866 impl ListBucketInventoryConfigurationsError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<ListBucketInventoryConfigurationsError>17867     pub fn from_response(
17868         res: BufferedHttpResponse,
17869     ) -> RusotoError<ListBucketInventoryConfigurationsError> {
17870         {
17871             let reader = EventReader::new(res.body.as_ref());
17872             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17873             find_start_element(&mut stack);
17874             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17875                 match &parsed_error.code[..] {
17876                     _ => {}
17877                 }
17878             }
17879         }
17880         RusotoError::Unknown(res)
17881     }
17882 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17883     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17884     where
17885         T: Peek + Next,
17886     {
17887         XmlErrorDeserializer::deserialize("Error", stack)
17888     }
17889 }
17890 impl fmt::Display for ListBucketInventoryConfigurationsError {
17891     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17892     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17893         match *self {}
17894     }
17895 }
17896 impl Error for ListBucketInventoryConfigurationsError {}
17897 /// Errors returned by ListBucketMetricsConfigurations
17898 #[derive(Debug, PartialEq)]
17899 pub enum ListBucketMetricsConfigurationsError {}
17900 
17901 impl ListBucketMetricsConfigurationsError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<ListBucketMetricsConfigurationsError>17902     pub fn from_response(
17903         res: BufferedHttpResponse,
17904     ) -> RusotoError<ListBucketMetricsConfigurationsError> {
17905         {
17906             let reader = EventReader::new(res.body.as_ref());
17907             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17908             find_start_element(&mut stack);
17909             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17910                 match &parsed_error.code[..] {
17911                     _ => {}
17912                 }
17913             }
17914         }
17915         RusotoError::Unknown(res)
17916     }
17917 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17918     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17919     where
17920         T: Peek + Next,
17921     {
17922         XmlErrorDeserializer::deserialize("Error", stack)
17923     }
17924 }
17925 impl fmt::Display for ListBucketMetricsConfigurationsError {
17926     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17927     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17928         match *self {}
17929     }
17930 }
17931 impl Error for ListBucketMetricsConfigurationsError {}
17932 /// Errors returned by ListBuckets
17933 #[derive(Debug, PartialEq)]
17934 pub enum ListBucketsError {}
17935 
17936 impl ListBucketsError {
from_response(res: BufferedHttpResponse) -> RusotoError<ListBucketsError>17937     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBucketsError> {
17938         {
17939             let reader = EventReader::new(res.body.as_ref());
17940             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17941             find_start_element(&mut stack);
17942             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17943                 match &parsed_error.code[..] {
17944                     _ => {}
17945                 }
17946             }
17947         }
17948         RusotoError::Unknown(res)
17949     }
17950 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17951     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17952     where
17953         T: Peek + Next,
17954     {
17955         XmlErrorDeserializer::deserialize("Error", stack)
17956     }
17957 }
17958 impl fmt::Display for ListBucketsError {
17959     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17960     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17961         match *self {}
17962     }
17963 }
17964 impl Error for ListBucketsError {}
17965 /// Errors returned by ListMultipartUploads
17966 #[derive(Debug, PartialEq)]
17967 pub enum ListMultipartUploadsError {}
17968 
17969 impl ListMultipartUploadsError {
from_response(res: BufferedHttpResponse) -> RusotoError<ListMultipartUploadsError>17970     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListMultipartUploadsError> {
17971         {
17972             let reader = EventReader::new(res.body.as_ref());
17973             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17974             find_start_element(&mut stack);
17975             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17976                 match &parsed_error.code[..] {
17977                     _ => {}
17978                 }
17979             }
17980         }
17981         RusotoError::Unknown(res)
17982     }
17983 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17984     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17985     where
17986         T: Peek + Next,
17987     {
17988         XmlErrorDeserializer::deserialize("Error", stack)
17989     }
17990 }
17991 impl fmt::Display for ListMultipartUploadsError {
17992     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17993     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17994         match *self {}
17995     }
17996 }
17997 impl Error for ListMultipartUploadsError {}
17998 /// Errors returned by ListObjectVersions
17999 #[derive(Debug, PartialEq)]
18000 pub enum ListObjectVersionsError {}
18001 
18002 impl ListObjectVersionsError {
from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectVersionsError>18003     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectVersionsError> {
18004         {
18005             let reader = EventReader::new(res.body.as_ref());
18006             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18007             find_start_element(&mut stack);
18008             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18009                 match &parsed_error.code[..] {
18010                     _ => {}
18011                 }
18012             }
18013         }
18014         RusotoError::Unknown(res)
18015     }
18016 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18017     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18018     where
18019         T: Peek + Next,
18020     {
18021         XmlErrorDeserializer::deserialize("Error", stack)
18022     }
18023 }
18024 impl fmt::Display for ListObjectVersionsError {
18025     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18026     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18027         match *self {}
18028     }
18029 }
18030 impl Error for ListObjectVersionsError {}
18031 /// Errors returned by ListObjects
18032 #[derive(Debug, PartialEq)]
18033 pub enum ListObjectsError {
18034     /// <p>The specified bucket does not exist.</p>
18035     NoSuchBucket(String),
18036 }
18037 
18038 impl ListObjectsError {
from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectsError>18039     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectsError> {
18040         {
18041             let reader = EventReader::new(res.body.as_ref());
18042             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18043             find_start_element(&mut stack);
18044             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18045                 match &parsed_error.code[..] {
18046                     "NoSuchBucket" => {
18047                         return RusotoError::Service(ListObjectsError::NoSuchBucket(
18048                             parsed_error.message,
18049                         ))
18050                     }
18051                     _ => {}
18052                 }
18053             }
18054         }
18055         RusotoError::Unknown(res)
18056     }
18057 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18058     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18059     where
18060         T: Peek + Next,
18061     {
18062         XmlErrorDeserializer::deserialize("Error", stack)
18063     }
18064 }
18065 impl fmt::Display for ListObjectsError {
18066     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18067     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18068         match *self {
18069             ListObjectsError::NoSuchBucket(ref cause) => write!(f, "{}", cause),
18070         }
18071     }
18072 }
18073 impl Error for ListObjectsError {}
18074 /// Errors returned by ListObjectsV2
18075 #[derive(Debug, PartialEq)]
18076 pub enum ListObjectsV2Error {
18077     /// <p>The specified bucket does not exist.</p>
18078     NoSuchBucket(String),
18079 }
18080 
18081 impl ListObjectsV2Error {
from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectsV2Error>18082     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectsV2Error> {
18083         {
18084             let reader = EventReader::new(res.body.as_ref());
18085             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18086             find_start_element(&mut stack);
18087             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18088                 match &parsed_error.code[..] {
18089                     "NoSuchBucket" => {
18090                         return RusotoError::Service(ListObjectsV2Error::NoSuchBucket(
18091                             parsed_error.message,
18092                         ))
18093                     }
18094                     _ => {}
18095                 }
18096             }
18097         }
18098         RusotoError::Unknown(res)
18099     }
18100 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18101     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18102     where
18103         T: Peek + Next,
18104     {
18105         XmlErrorDeserializer::deserialize("Error", stack)
18106     }
18107 }
18108 impl fmt::Display for ListObjectsV2Error {
18109     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18110     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18111         match *self {
18112             ListObjectsV2Error::NoSuchBucket(ref cause) => write!(f, "{}", cause),
18113         }
18114     }
18115 }
18116 impl Error for ListObjectsV2Error {}
18117 /// Errors returned by ListParts
18118 #[derive(Debug, PartialEq)]
18119 pub enum ListPartsError {}
18120 
18121 impl ListPartsError {
from_response(res: BufferedHttpResponse) -> RusotoError<ListPartsError>18122     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPartsError> {
18123         {
18124             let reader = EventReader::new(res.body.as_ref());
18125             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18126             find_start_element(&mut stack);
18127             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18128                 match &parsed_error.code[..] {
18129                     _ => {}
18130                 }
18131             }
18132         }
18133         RusotoError::Unknown(res)
18134     }
18135 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18136     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18137     where
18138         T: Peek + Next,
18139     {
18140         XmlErrorDeserializer::deserialize("Error", stack)
18141     }
18142 }
18143 impl fmt::Display for ListPartsError {
18144     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18145     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18146         match *self {}
18147     }
18148 }
18149 impl Error for ListPartsError {}
18150 /// Errors returned by PutBucketAccelerateConfiguration
18151 #[derive(Debug, PartialEq)]
18152 pub enum PutBucketAccelerateConfigurationError {}
18153 
18154 impl PutBucketAccelerateConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBucketAccelerateConfigurationError>18155     pub fn from_response(
18156         res: BufferedHttpResponse,
18157     ) -> RusotoError<PutBucketAccelerateConfigurationError> {
18158         {
18159             let reader = EventReader::new(res.body.as_ref());
18160             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18161             find_start_element(&mut stack);
18162             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18163                 match &parsed_error.code[..] {
18164                     _ => {}
18165                 }
18166             }
18167         }
18168         RusotoError::Unknown(res)
18169     }
18170 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18171     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18172     where
18173         T: Peek + Next,
18174     {
18175         XmlErrorDeserializer::deserialize("Error", stack)
18176     }
18177 }
18178 impl fmt::Display for PutBucketAccelerateConfigurationError {
18179     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18180     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18181         match *self {}
18182     }
18183 }
18184 impl Error for PutBucketAccelerateConfigurationError {}
18185 /// Errors returned by PutBucketAcl
18186 #[derive(Debug, PartialEq)]
18187 pub enum PutBucketAclError {}
18188 
18189 impl PutBucketAclError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketAclError>18190     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketAclError> {
18191         {
18192             let reader = EventReader::new(res.body.as_ref());
18193             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18194             find_start_element(&mut stack);
18195             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18196                 match &parsed_error.code[..] {
18197                     _ => {}
18198                 }
18199             }
18200         }
18201         RusotoError::Unknown(res)
18202     }
18203 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18204     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18205     where
18206         T: Peek + Next,
18207     {
18208         XmlErrorDeserializer::deserialize("Error", stack)
18209     }
18210 }
18211 impl fmt::Display for PutBucketAclError {
18212     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18213     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18214         match *self {}
18215     }
18216 }
18217 impl Error for PutBucketAclError {}
18218 /// Errors returned by PutBucketAnalyticsConfiguration
18219 #[derive(Debug, PartialEq)]
18220 pub enum PutBucketAnalyticsConfigurationError {}
18221 
18222 impl PutBucketAnalyticsConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBucketAnalyticsConfigurationError>18223     pub fn from_response(
18224         res: BufferedHttpResponse,
18225     ) -> RusotoError<PutBucketAnalyticsConfigurationError> {
18226         {
18227             let reader = EventReader::new(res.body.as_ref());
18228             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18229             find_start_element(&mut stack);
18230             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18231                 match &parsed_error.code[..] {
18232                     _ => {}
18233                 }
18234             }
18235         }
18236         RusotoError::Unknown(res)
18237     }
18238 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18239     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18240     where
18241         T: Peek + Next,
18242     {
18243         XmlErrorDeserializer::deserialize("Error", stack)
18244     }
18245 }
18246 impl fmt::Display for PutBucketAnalyticsConfigurationError {
18247     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18248     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18249         match *self {}
18250     }
18251 }
18252 impl Error for PutBucketAnalyticsConfigurationError {}
18253 /// Errors returned by PutBucketCors
18254 #[derive(Debug, PartialEq)]
18255 pub enum PutBucketCorsError {}
18256 
18257 impl PutBucketCorsError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketCorsError>18258     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketCorsError> {
18259         {
18260             let reader = EventReader::new(res.body.as_ref());
18261             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18262             find_start_element(&mut stack);
18263             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18264                 match &parsed_error.code[..] {
18265                     _ => {}
18266                 }
18267             }
18268         }
18269         RusotoError::Unknown(res)
18270     }
18271 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18272     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18273     where
18274         T: Peek + Next,
18275     {
18276         XmlErrorDeserializer::deserialize("Error", stack)
18277     }
18278 }
18279 impl fmt::Display for PutBucketCorsError {
18280     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18281     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18282         match *self {}
18283     }
18284 }
18285 impl Error for PutBucketCorsError {}
18286 /// Errors returned by PutBucketEncryption
18287 #[derive(Debug, PartialEq)]
18288 pub enum PutBucketEncryptionError {}
18289 
18290 impl PutBucketEncryptionError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketEncryptionError>18291     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketEncryptionError> {
18292         {
18293             let reader = EventReader::new(res.body.as_ref());
18294             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18295             find_start_element(&mut stack);
18296             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18297                 match &parsed_error.code[..] {
18298                     _ => {}
18299                 }
18300             }
18301         }
18302         RusotoError::Unknown(res)
18303     }
18304 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18305     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18306     where
18307         T: Peek + Next,
18308     {
18309         XmlErrorDeserializer::deserialize("Error", stack)
18310     }
18311 }
18312 impl fmt::Display for PutBucketEncryptionError {
18313     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18314     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18315         match *self {}
18316     }
18317 }
18318 impl Error for PutBucketEncryptionError {}
18319 /// Errors returned by PutBucketInventoryConfiguration
18320 #[derive(Debug, PartialEq)]
18321 pub enum PutBucketInventoryConfigurationError {}
18322 
18323 impl PutBucketInventoryConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBucketInventoryConfigurationError>18324     pub fn from_response(
18325         res: BufferedHttpResponse,
18326     ) -> RusotoError<PutBucketInventoryConfigurationError> {
18327         {
18328             let reader = EventReader::new(res.body.as_ref());
18329             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18330             find_start_element(&mut stack);
18331             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18332                 match &parsed_error.code[..] {
18333                     _ => {}
18334                 }
18335             }
18336         }
18337         RusotoError::Unknown(res)
18338     }
18339 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18340     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18341     where
18342         T: Peek + Next,
18343     {
18344         XmlErrorDeserializer::deserialize("Error", stack)
18345     }
18346 }
18347 impl fmt::Display for PutBucketInventoryConfigurationError {
18348     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18349     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18350         match *self {}
18351     }
18352 }
18353 impl Error for PutBucketInventoryConfigurationError {}
18354 /// Errors returned by PutBucketLifecycle
18355 #[derive(Debug, PartialEq)]
18356 pub enum PutBucketLifecycleError {}
18357 
18358 impl PutBucketLifecycleError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketLifecycleError>18359     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketLifecycleError> {
18360         {
18361             let reader = EventReader::new(res.body.as_ref());
18362             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18363             find_start_element(&mut stack);
18364             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18365                 match &parsed_error.code[..] {
18366                     _ => {}
18367                 }
18368             }
18369         }
18370         RusotoError::Unknown(res)
18371     }
18372 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18373     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18374     where
18375         T: Peek + Next,
18376     {
18377         XmlErrorDeserializer::deserialize("Error", stack)
18378     }
18379 }
18380 impl fmt::Display for PutBucketLifecycleError {
18381     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18382     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18383         match *self {}
18384     }
18385 }
18386 impl Error for PutBucketLifecycleError {}
18387 /// Errors returned by PutBucketLifecycleConfiguration
18388 #[derive(Debug, PartialEq)]
18389 pub enum PutBucketLifecycleConfigurationError {}
18390 
18391 impl PutBucketLifecycleConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBucketLifecycleConfigurationError>18392     pub fn from_response(
18393         res: BufferedHttpResponse,
18394     ) -> RusotoError<PutBucketLifecycleConfigurationError> {
18395         {
18396             let reader = EventReader::new(res.body.as_ref());
18397             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18398             find_start_element(&mut stack);
18399             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18400                 match &parsed_error.code[..] {
18401                     _ => {}
18402                 }
18403             }
18404         }
18405         RusotoError::Unknown(res)
18406     }
18407 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18408     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18409     where
18410         T: Peek + Next,
18411     {
18412         XmlErrorDeserializer::deserialize("Error", stack)
18413     }
18414 }
18415 impl fmt::Display for PutBucketLifecycleConfigurationError {
18416     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18417     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18418         match *self {}
18419     }
18420 }
18421 impl Error for PutBucketLifecycleConfigurationError {}
18422 /// Errors returned by PutBucketLogging
18423 #[derive(Debug, PartialEq)]
18424 pub enum PutBucketLoggingError {}
18425 
18426 impl PutBucketLoggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketLoggingError>18427     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketLoggingError> {
18428         {
18429             let reader = EventReader::new(res.body.as_ref());
18430             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18431             find_start_element(&mut stack);
18432             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18433                 match &parsed_error.code[..] {
18434                     _ => {}
18435                 }
18436             }
18437         }
18438         RusotoError::Unknown(res)
18439     }
18440 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18441     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18442     where
18443         T: Peek + Next,
18444     {
18445         XmlErrorDeserializer::deserialize("Error", stack)
18446     }
18447 }
18448 impl fmt::Display for PutBucketLoggingError {
18449     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18450     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18451         match *self {}
18452     }
18453 }
18454 impl Error for PutBucketLoggingError {}
18455 /// Errors returned by PutBucketMetricsConfiguration
18456 #[derive(Debug, PartialEq)]
18457 pub enum PutBucketMetricsConfigurationError {}
18458 
18459 impl PutBucketMetricsConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBucketMetricsConfigurationError>18460     pub fn from_response(
18461         res: BufferedHttpResponse,
18462     ) -> RusotoError<PutBucketMetricsConfigurationError> {
18463         {
18464             let reader = EventReader::new(res.body.as_ref());
18465             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18466             find_start_element(&mut stack);
18467             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18468                 match &parsed_error.code[..] {
18469                     _ => {}
18470                 }
18471             }
18472         }
18473         RusotoError::Unknown(res)
18474     }
18475 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18476     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18477     where
18478         T: Peek + Next,
18479     {
18480         XmlErrorDeserializer::deserialize("Error", stack)
18481     }
18482 }
18483 impl fmt::Display for PutBucketMetricsConfigurationError {
18484     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18485     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18486         match *self {}
18487     }
18488 }
18489 impl Error for PutBucketMetricsConfigurationError {}
18490 /// Errors returned by PutBucketNotification
18491 #[derive(Debug, PartialEq)]
18492 pub enum PutBucketNotificationError {}
18493 
18494 impl PutBucketNotificationError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketNotificationError>18495     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketNotificationError> {
18496         {
18497             let reader = EventReader::new(res.body.as_ref());
18498             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18499             find_start_element(&mut stack);
18500             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18501                 match &parsed_error.code[..] {
18502                     _ => {}
18503                 }
18504             }
18505         }
18506         RusotoError::Unknown(res)
18507     }
18508 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18509     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18510     where
18511         T: Peek + Next,
18512     {
18513         XmlErrorDeserializer::deserialize("Error", stack)
18514     }
18515 }
18516 impl fmt::Display for PutBucketNotificationError {
18517     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18518     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18519         match *self {}
18520     }
18521 }
18522 impl Error for PutBucketNotificationError {}
18523 /// Errors returned by PutBucketNotificationConfiguration
18524 #[derive(Debug, PartialEq)]
18525 pub enum PutBucketNotificationConfigurationError {}
18526 
18527 impl PutBucketNotificationConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBucketNotificationConfigurationError>18528     pub fn from_response(
18529         res: BufferedHttpResponse,
18530     ) -> RusotoError<PutBucketNotificationConfigurationError> {
18531         {
18532             let reader = EventReader::new(res.body.as_ref());
18533             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18534             find_start_element(&mut stack);
18535             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18536                 match &parsed_error.code[..] {
18537                     _ => {}
18538                 }
18539             }
18540         }
18541         RusotoError::Unknown(res)
18542     }
18543 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18544     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18545     where
18546         T: Peek + Next,
18547     {
18548         XmlErrorDeserializer::deserialize("Error", stack)
18549     }
18550 }
18551 impl fmt::Display for PutBucketNotificationConfigurationError {
18552     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18553     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18554         match *self {}
18555     }
18556 }
18557 impl Error for PutBucketNotificationConfigurationError {}
18558 /// Errors returned by PutBucketPolicy
18559 #[derive(Debug, PartialEq)]
18560 pub enum PutBucketPolicyError {}
18561 
18562 impl PutBucketPolicyError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketPolicyError>18563     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketPolicyError> {
18564         {
18565             let reader = EventReader::new(res.body.as_ref());
18566             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18567             find_start_element(&mut stack);
18568             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18569                 match &parsed_error.code[..] {
18570                     _ => {}
18571                 }
18572             }
18573         }
18574         RusotoError::Unknown(res)
18575     }
18576 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18577     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18578     where
18579         T: Peek + Next,
18580     {
18581         XmlErrorDeserializer::deserialize("Error", stack)
18582     }
18583 }
18584 impl fmt::Display for PutBucketPolicyError {
18585     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18586     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18587         match *self {}
18588     }
18589 }
18590 impl Error for PutBucketPolicyError {}
18591 /// Errors returned by PutBucketReplication
18592 #[derive(Debug, PartialEq)]
18593 pub enum PutBucketReplicationError {}
18594 
18595 impl PutBucketReplicationError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketReplicationError>18596     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketReplicationError> {
18597         {
18598             let reader = EventReader::new(res.body.as_ref());
18599             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18600             find_start_element(&mut stack);
18601             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18602                 match &parsed_error.code[..] {
18603                     _ => {}
18604                 }
18605             }
18606         }
18607         RusotoError::Unknown(res)
18608     }
18609 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18610     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18611     where
18612         T: Peek + Next,
18613     {
18614         XmlErrorDeserializer::deserialize("Error", stack)
18615     }
18616 }
18617 impl fmt::Display for PutBucketReplicationError {
18618     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18619     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18620         match *self {}
18621     }
18622 }
18623 impl Error for PutBucketReplicationError {}
18624 /// Errors returned by PutBucketRequestPayment
18625 #[derive(Debug, PartialEq)]
18626 pub enum PutBucketRequestPaymentError {}
18627 
18628 impl PutBucketRequestPaymentError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketRequestPaymentError>18629     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketRequestPaymentError> {
18630         {
18631             let reader = EventReader::new(res.body.as_ref());
18632             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18633             find_start_element(&mut stack);
18634             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18635                 match &parsed_error.code[..] {
18636                     _ => {}
18637                 }
18638             }
18639         }
18640         RusotoError::Unknown(res)
18641     }
18642 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18643     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18644     where
18645         T: Peek + Next,
18646     {
18647         XmlErrorDeserializer::deserialize("Error", stack)
18648     }
18649 }
18650 impl fmt::Display for PutBucketRequestPaymentError {
18651     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18652     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18653         match *self {}
18654     }
18655 }
18656 impl Error for PutBucketRequestPaymentError {}
18657 /// Errors returned by PutBucketTagging
18658 #[derive(Debug, PartialEq)]
18659 pub enum PutBucketTaggingError {}
18660 
18661 impl PutBucketTaggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketTaggingError>18662     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketTaggingError> {
18663         {
18664             let reader = EventReader::new(res.body.as_ref());
18665             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18666             find_start_element(&mut stack);
18667             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18668                 match &parsed_error.code[..] {
18669                     _ => {}
18670                 }
18671             }
18672         }
18673         RusotoError::Unknown(res)
18674     }
18675 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18676     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18677     where
18678         T: Peek + Next,
18679     {
18680         XmlErrorDeserializer::deserialize("Error", stack)
18681     }
18682 }
18683 impl fmt::Display for PutBucketTaggingError {
18684     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18685     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18686         match *self {}
18687     }
18688 }
18689 impl Error for PutBucketTaggingError {}
18690 /// Errors returned by PutBucketVersioning
18691 #[derive(Debug, PartialEq)]
18692 pub enum PutBucketVersioningError {}
18693 
18694 impl PutBucketVersioningError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketVersioningError>18695     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketVersioningError> {
18696         {
18697             let reader = EventReader::new(res.body.as_ref());
18698             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18699             find_start_element(&mut stack);
18700             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18701                 match &parsed_error.code[..] {
18702                     _ => {}
18703                 }
18704             }
18705         }
18706         RusotoError::Unknown(res)
18707     }
18708 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18709     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18710     where
18711         T: Peek + Next,
18712     {
18713         XmlErrorDeserializer::deserialize("Error", stack)
18714     }
18715 }
18716 impl fmt::Display for PutBucketVersioningError {
18717     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18718     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18719         match *self {}
18720     }
18721 }
18722 impl Error for PutBucketVersioningError {}
18723 /// Errors returned by PutBucketWebsite
18724 #[derive(Debug, PartialEq)]
18725 pub enum PutBucketWebsiteError {}
18726 
18727 impl PutBucketWebsiteError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketWebsiteError>18728     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketWebsiteError> {
18729         {
18730             let reader = EventReader::new(res.body.as_ref());
18731             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18732             find_start_element(&mut stack);
18733             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18734                 match &parsed_error.code[..] {
18735                     _ => {}
18736                 }
18737             }
18738         }
18739         RusotoError::Unknown(res)
18740     }
18741 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18742     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18743     where
18744         T: Peek + Next,
18745     {
18746         XmlErrorDeserializer::deserialize("Error", stack)
18747     }
18748 }
18749 impl fmt::Display for PutBucketWebsiteError {
18750     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18751     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18752         match *self {}
18753     }
18754 }
18755 impl Error for PutBucketWebsiteError {}
18756 /// Errors returned by PutObject
18757 #[derive(Debug, PartialEq)]
18758 pub enum PutObjectError {}
18759 
18760 impl PutObjectError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectError>18761     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectError> {
18762         {
18763             let reader = EventReader::new(res.body.as_ref());
18764             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18765             find_start_element(&mut stack);
18766             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18767                 match &parsed_error.code[..] {
18768                     _ => {}
18769                 }
18770             }
18771         }
18772         RusotoError::Unknown(res)
18773     }
18774 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18775     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18776     where
18777         T: Peek + Next,
18778     {
18779         XmlErrorDeserializer::deserialize("Error", stack)
18780     }
18781 }
18782 impl fmt::Display for PutObjectError {
18783     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18784     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18785         match *self {}
18786     }
18787 }
18788 impl Error for PutObjectError {}
18789 /// Errors returned by PutObjectAcl
18790 #[derive(Debug, PartialEq)]
18791 pub enum PutObjectAclError {
18792     /// <p>The specified key does not exist.</p>
18793     NoSuchKey(String),
18794 }
18795 
18796 impl PutObjectAclError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectAclError>18797     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectAclError> {
18798         {
18799             let reader = EventReader::new(res.body.as_ref());
18800             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18801             find_start_element(&mut stack);
18802             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18803                 match &parsed_error.code[..] {
18804                     "NoSuchKey" => {
18805                         return RusotoError::Service(PutObjectAclError::NoSuchKey(
18806                             parsed_error.message,
18807                         ))
18808                     }
18809                     _ => {}
18810                 }
18811             }
18812         }
18813         RusotoError::Unknown(res)
18814     }
18815 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18816     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18817     where
18818         T: Peek + Next,
18819     {
18820         XmlErrorDeserializer::deserialize("Error", stack)
18821     }
18822 }
18823 impl fmt::Display for PutObjectAclError {
18824     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18825     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18826         match *self {
18827             PutObjectAclError::NoSuchKey(ref cause) => write!(f, "{}", cause),
18828         }
18829     }
18830 }
18831 impl Error for PutObjectAclError {}
18832 /// Errors returned by PutObjectLegalHold
18833 #[derive(Debug, PartialEq)]
18834 pub enum PutObjectLegalHoldError {}
18835 
18836 impl PutObjectLegalHoldError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectLegalHoldError>18837     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectLegalHoldError> {
18838         {
18839             let reader = EventReader::new(res.body.as_ref());
18840             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18841             find_start_element(&mut stack);
18842             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18843                 match &parsed_error.code[..] {
18844                     _ => {}
18845                 }
18846             }
18847         }
18848         RusotoError::Unknown(res)
18849     }
18850 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18851     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18852     where
18853         T: Peek + Next,
18854     {
18855         XmlErrorDeserializer::deserialize("Error", stack)
18856     }
18857 }
18858 impl fmt::Display for PutObjectLegalHoldError {
18859     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18860     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18861         match *self {}
18862     }
18863 }
18864 impl Error for PutObjectLegalHoldError {}
18865 /// Errors returned by PutObjectLockConfiguration
18866 #[derive(Debug, PartialEq)]
18867 pub enum PutObjectLockConfigurationError {}
18868 
18869 impl PutObjectLockConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutObjectLockConfigurationError>18870     pub fn from_response(
18871         res: BufferedHttpResponse,
18872     ) -> RusotoError<PutObjectLockConfigurationError> {
18873         {
18874             let reader = EventReader::new(res.body.as_ref());
18875             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18876             find_start_element(&mut stack);
18877             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18878                 match &parsed_error.code[..] {
18879                     _ => {}
18880                 }
18881             }
18882         }
18883         RusotoError::Unknown(res)
18884     }
18885 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18886     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18887     where
18888         T: Peek + Next,
18889     {
18890         XmlErrorDeserializer::deserialize("Error", stack)
18891     }
18892 }
18893 impl fmt::Display for PutObjectLockConfigurationError {
18894     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18895     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18896         match *self {}
18897     }
18898 }
18899 impl Error for PutObjectLockConfigurationError {}
18900 /// Errors returned by PutObjectRetention
18901 #[derive(Debug, PartialEq)]
18902 pub enum PutObjectRetentionError {}
18903 
18904 impl PutObjectRetentionError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectRetentionError>18905     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectRetentionError> {
18906         {
18907             let reader = EventReader::new(res.body.as_ref());
18908             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18909             find_start_element(&mut stack);
18910             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18911                 match &parsed_error.code[..] {
18912                     _ => {}
18913                 }
18914             }
18915         }
18916         RusotoError::Unknown(res)
18917     }
18918 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18919     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18920     where
18921         T: Peek + Next,
18922     {
18923         XmlErrorDeserializer::deserialize("Error", stack)
18924     }
18925 }
18926 impl fmt::Display for PutObjectRetentionError {
18927     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18928     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18929         match *self {}
18930     }
18931 }
18932 impl Error for PutObjectRetentionError {}
18933 /// Errors returned by PutObjectTagging
18934 #[derive(Debug, PartialEq)]
18935 pub enum PutObjectTaggingError {}
18936 
18937 impl PutObjectTaggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectTaggingError>18938     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectTaggingError> {
18939         {
18940             let reader = EventReader::new(res.body.as_ref());
18941             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18942             find_start_element(&mut stack);
18943             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18944                 match &parsed_error.code[..] {
18945                     _ => {}
18946                 }
18947             }
18948         }
18949         RusotoError::Unknown(res)
18950     }
18951 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18952     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18953     where
18954         T: Peek + Next,
18955     {
18956         XmlErrorDeserializer::deserialize("Error", stack)
18957     }
18958 }
18959 impl fmt::Display for PutObjectTaggingError {
18960     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18961     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18962         match *self {}
18963     }
18964 }
18965 impl Error for PutObjectTaggingError {}
18966 /// Errors returned by PutPublicAccessBlock
18967 #[derive(Debug, PartialEq)]
18968 pub enum PutPublicAccessBlockError {}
18969 
18970 impl PutPublicAccessBlockError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutPublicAccessBlockError>18971     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutPublicAccessBlockError> {
18972         {
18973             let reader = EventReader::new(res.body.as_ref());
18974             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18975             find_start_element(&mut stack);
18976             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18977                 match &parsed_error.code[..] {
18978                     _ => {}
18979                 }
18980             }
18981         }
18982         RusotoError::Unknown(res)
18983     }
18984 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18985     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18986     where
18987         T: Peek + Next,
18988     {
18989         XmlErrorDeserializer::deserialize("Error", stack)
18990     }
18991 }
18992 impl fmt::Display for PutPublicAccessBlockError {
18993     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18994     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18995         match *self {}
18996     }
18997 }
18998 impl Error for PutPublicAccessBlockError {}
18999 /// Errors returned by RestoreObject
19000 #[derive(Debug, PartialEq)]
19001 pub enum RestoreObjectError {
19002     /// <p>This operation is not allowed against this storage tier.</p>
19003     ObjectAlreadyInActiveTierError(String),
19004 }
19005 
19006 impl RestoreObjectError {
from_response(res: BufferedHttpResponse) -> RusotoError<RestoreObjectError>19007     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RestoreObjectError> {
19008         {
19009             let reader = EventReader::new(res.body.as_ref());
19010             let mut stack = XmlResponse::new(reader.into_iter().peekable());
19011             find_start_element(&mut stack);
19012             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
19013                 match &parsed_error.code[..] {
19014                     "ObjectAlreadyInActiveTierError" => {
19015                         return RusotoError::Service(
19016                             RestoreObjectError::ObjectAlreadyInActiveTierError(
19017                                 parsed_error.message,
19018                             ),
19019                         )
19020                     }
19021                     _ => {}
19022                 }
19023             }
19024         }
19025         RusotoError::Unknown(res)
19026     }
19027 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,19028     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
19029     where
19030         T: Peek + Next,
19031     {
19032         XmlErrorDeserializer::deserialize("Error", stack)
19033     }
19034 }
19035 impl fmt::Display for RestoreObjectError {
19036     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result19037     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
19038         match *self {
19039             RestoreObjectError::ObjectAlreadyInActiveTierError(ref cause) => write!(f, "{}", cause),
19040         }
19041     }
19042 }
19043 impl Error for RestoreObjectError {}
19044 /// Errors returned by SelectObjectContent
19045 #[derive(Debug, PartialEq)]
19046 pub enum SelectObjectContentError {}
19047 
19048 impl SelectObjectContentError {
from_response(res: BufferedHttpResponse) -> RusotoError<SelectObjectContentError>19049     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SelectObjectContentError> {
19050         {
19051             let reader = EventReader::new(res.body.as_ref());
19052             let mut stack = XmlResponse::new(reader.into_iter().peekable());
19053             find_start_element(&mut stack);
19054             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
19055                 match &parsed_error.code[..] {
19056                     _ => {}
19057                 }
19058             }
19059         }
19060         RusotoError::Unknown(res)
19061     }
19062 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,19063     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
19064     where
19065         T: Peek + Next,
19066     {
19067         XmlErrorDeserializer::deserialize("Error", stack)
19068     }
19069 }
19070 impl fmt::Display for SelectObjectContentError {
19071     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result19072     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
19073         match *self {}
19074     }
19075 }
19076 impl Error for SelectObjectContentError {}
19077 /// Errors returned by UploadPart
19078 #[derive(Debug, PartialEq)]
19079 pub enum UploadPartError {}
19080 
19081 impl UploadPartError {
from_response(res: BufferedHttpResponse) -> RusotoError<UploadPartError>19082     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UploadPartError> {
19083         {
19084             let reader = EventReader::new(res.body.as_ref());
19085             let mut stack = XmlResponse::new(reader.into_iter().peekable());
19086             find_start_element(&mut stack);
19087             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
19088                 match &parsed_error.code[..] {
19089                     _ => {}
19090                 }
19091             }
19092         }
19093         RusotoError::Unknown(res)
19094     }
19095 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,19096     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
19097     where
19098         T: Peek + Next,
19099     {
19100         XmlErrorDeserializer::deserialize("Error", stack)
19101     }
19102 }
19103 impl fmt::Display for UploadPartError {
19104     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result19105     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
19106         match *self {}
19107     }
19108 }
19109 impl Error for UploadPartError {}
19110 /// Errors returned by UploadPartCopy
19111 #[derive(Debug, PartialEq)]
19112 pub enum UploadPartCopyError {}
19113 
19114 impl UploadPartCopyError {
from_response(res: BufferedHttpResponse) -> RusotoError<UploadPartCopyError>19115     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UploadPartCopyError> {
19116         {
19117             let reader = EventReader::new(res.body.as_ref());
19118             let mut stack = XmlResponse::new(reader.into_iter().peekable());
19119             find_start_element(&mut stack);
19120             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
19121                 match &parsed_error.code[..] {
19122                     _ => {}
19123                 }
19124             }
19125         }
19126         RusotoError::Unknown(res)
19127     }
19128 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,19129     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
19130     where
19131         T: Peek + Next,
19132     {
19133         XmlErrorDeserializer::deserialize("Error", stack)
19134     }
19135 }
19136 impl fmt::Display for UploadPartCopyError {
19137     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result19138     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
19139         match *self {}
19140     }
19141 }
19142 impl Error for UploadPartCopyError {}
19143 /// Trait representing the capabilities of the Amazon S3 API. Amazon S3 clients implement this trait.
19144 #[async_trait]
19145 pub trait S3 {
19146     /// <p><p>This operation aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads might or might not succeed. As a result, it might be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts. </p> <p>To verify that all parts have been removed, so you don&#39;t get charged for the part storage, you should call the <a>ListParts</a> operation and ensure that the parts list is empty.</p> <p>For information about permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and Permissions</a>.</p> <p>The following operations are related to <code>AbortMultipartUpload</code>:</p> <ul> <li> <p> <a>CreateMultipartUpload</a> </p> </li> <li> <p> <a>UploadPart</a> </p> </li> <li> <p> <a>CompleteMultipartUpload</a> </p> </li> <li> <p> <a>ListParts</a> </p> </li> <li> <p> <a>ListMultipartUploads</a> </p> </li> </ul></p>
abort_multipart_upload( &self, input: AbortMultipartUploadRequest, ) -> Result<AbortMultipartUploadOutput, RusotoError<AbortMultipartUploadError>>19147     async fn abort_multipart_upload(
19148         &self,
19149         input: AbortMultipartUploadRequest,
19150     ) -> Result<AbortMultipartUploadOutput, RusotoError<AbortMultipartUploadError>>;
19151 
19152     /// <p><p>Completes a multipart upload by assembling previously uploaded parts.</p> <p>You first initiate the multipart upload and then upload all parts using the <a>UploadPart</a> operation. After successfully uploading all relevant parts of an upload, you call this operation to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts in ascending order by part number to create a new object. In the Complete Multipart Upload request, you must provide the parts list. You must ensure that the parts list is complete. This operation concatenates the parts that you provide in the list. For each part in the list, you must provide the part number and the <code>ETag</code> value, returned after that part was uploaded.</p> <p>Processing of a Complete Multipart Upload request could take several minutes to complete. After Amazon S3 begins processing the request, it sends an HTTP response header that specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white space characters to keep the connection from timing out. Because a request could fail after the initial 200 OK response has been sent, it is important that you check the response body to determine whether the request succeeded.</p> <p>Note that if <code>CompleteMultipartUpload</code> fails, applications should be prepared to retry the failed requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html">Amazon S3 Error Best Practices</a>.</p> <p>For more information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html">Uploading Objects Using Multipart Upload</a>.</p> <p>For information about permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and Permissions</a>.</p> <p> <code>GetBucketLifecycle</code> has the following special errors:</p> <ul> <li> <p>Error code: <code>EntityTooSmall</code> </p> <ul> <li> <p>Description: Your proposed upload is smaller than the minimum allowed object size. Each part must be at least 5 MB in size, except the last part.</p> </li> <li> <p>400 Bad Request</p> </li> </ul> </li> <li> <p>Error code: <code>InvalidPart</code> </p> <ul> <li> <p>Description: One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part&#39;s entity tag.</p> </li> <li> <p>400 Bad Request</p> </li> </ul> </li> <li> <p>Error code: <code>InvalidPartOrder</code> </p> <ul> <li> <p>Description: The list of parts was not in ascending order. The parts list must be specified in order by part number.</p> </li> <li> <p>400 Bad Request</p> </li> </ul> </li> <li> <p>Error code: <code>NoSuchUpload</code> </p> <ul> <li> <p>Description: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.</p> </li> <li> <p>404 Not Found</p> </li> </ul> </li> </ul> <p>The following operations are related to <code>DeleteBucketMetricsConfiguration</code>:</p> <ul> <li> <p> <a>CreateMultipartUpload</a> </p> </li> <li> <p> <a>UploadPart</a> </p> </li> <li> <p> <a>AbortMultipartUpload</a> </p> </li> <li> <p> <a>ListParts</a> </p> </li> <li> <p> <a>ListMultipartUploads</a> </p> </li> </ul></p>
complete_multipart_upload( &self, input: CompleteMultipartUploadRequest, ) -> Result<CompleteMultipartUploadOutput, RusotoError<CompleteMultipartUploadError>>19153     async fn complete_multipart_upload(
19154         &self,
19155         input: CompleteMultipartUploadRequest,
19156     ) -> Result<CompleteMultipartUploadOutput, RusotoError<CompleteMultipartUploadError>>;
19157 
19158     /// <p>Creates a copy of an object that is already stored in Amazon S3.</p> <note> <p>You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your object up to 5 GB in size in a single atomic operation using this API. However, for copying an object greater than 5 GB, you must use the multipart upload Upload Part - Copy API. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html">Copy Object Using the REST Multipart Upload API</a>.</p> </note> <p>When copying an object, you can preserve all metadata (default) or specify new metadata. However, the ACL is not preserved and is set to private for the user making the request. To override the default ACL setting, specify a new ACL when generating a copy request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>.</p> <important> <p>Amazon S3 transfer acceleration does not support cross-region copies. If you request a cross-region copy using a transfer acceleration endpoint, you get a 400 <code>Bad Request</code> error. For more information about transfer acceleration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html">Transfer Acceleration</a>.</p> </important> <p>All copy requests must be authenticated. Additionally, you must have <i>read</i> access to the source object and <i>write</i> access to the destination bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>. Both the Region that you want to copy the object from and the Region that you want to copy the object to must be enabled for your account.</p> <p>To only copy an object under certain conditions, such as whether the <code>Etag</code> matches or whether the object was modified before or after a specified date, use the request parameters <code>x-amz-copy-source-if-match</code>, <code>x-amz-copy-source-if-none-match</code>, <code>x-amz-copy-source-if-unmodified-since</code>, or <code> x-amz-copy-source-if-modified-since</code>.</p> <note> <p>All headers with the <code>x-amz-</code> prefix, including <code>x-amz-copy-source</code>, must be signed.</p> </note> <p>You can use this operation to change the storage class of an object that is already stored in Amazon S3 using the <code>StorageClass</code> parameter. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a>.</p> <p>The source object that you are copying can be encrypted or unencrypted. If the source object is encrypted, it can be encrypted by server-side encryption using AWS managed encryption keys or by using a customer-provided encryption key. When copying an object, you can request that Amazon S3 encrypt the target object by using either the AWS managed encryption keys or by using your own encryption key. You can do this regardless of the form of server-side encryption that was used to encrypt the source, or even if the source object was not encrypted. For more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using Server-Side Encryption</a>.</p> <p>A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3 is copying the files. If the error occurs before the copy operation starts, you receive a standard Amazon S3 error. If the error occurs during the copy operation, the error response is embedded in the <code>200 OK</code> response. This means that a <code>200 OK</code> response can contain either a success or an error. Design your application to parse the contents of the response and handle it appropriately.</p> <p>If the copy is successful, you receive a response with information about the copied object.</p> <note> <p>If the request is an HTTP 1.1 request, the response is chunk encoded. If it were not, it would not contain the content-length, and you would need to read the entire body.</p> </note> <p>Consider the following when using request headers:</p> <ul> <li> <p> Consideration 1 – If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns 200 OK and copies the data:</p> <ul> <li> <p> <code>x-amz-copy-source-if-match</code> condition evaluates to true</p> </li> <li> <p> <code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p> </li> </ul> </li> <li> <p> Consideration 2 – If both of the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p> <ul> <li> <p> <code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p> </li> <li> <p> <code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p> </li> </ul> </li> </ul> <p>The copy request charge is based on the storage class and Region you specify for the destination object. For pricing information, see <a href="https://aws.amazon.com/s3/pricing/">Amazon S3 Pricing</a>.</p> <p>Following are other considerations when using <code>CopyObject</code>:</p> <dl> <dt>Versioning</dt> <dd> <p>By default, <code>x-amz-copy-source</code> identifies the current version of an object to copy. (If the current version is a delete marker, Amazon S3 behaves as if the object was deleted.) To copy a different version, use the <code>versionId</code> subresource.</p> <p>If you enable versioning on the target bucket, Amazon S3 generates a unique version ID for the object being copied. This version ID is different from the version ID of the source object. Amazon S3 returns the version ID of the copied object in the <code>x-amz-version-id</code> response header in the response.</p> <p>If you do not enable versioning or suspend it on the target bucket, the version ID that Amazon S3 generates is always null.</p> <p>If the source object's storage class is GLACIER, you must restore a copy of this object before you can use it as a source object for the copy operation. For more information, see .</p> </dd> <dt>Access Permissions</dt> <dd> <p>When copying an object, you can optionally specify the accounts or groups that should be granted specific permissions on the new object. There are two ways to grant the permissions using the request headers:</p> <ul> <li> <p>Specify a canned ACL with the <code>x-amz-acl</code> request header. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly with the <code>x-amz-grant-read</code>, <code>x-amz-grant-read-acp</code>, <code>x-amz-grant-write-acp</code>, and <code>x-amz-grant-full-control</code> headers. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>.</p> </li> </ul> <p>You can use either a canned ACL or specify access permissions explicitly. You cannot do both.</p> </dd> <dt>Server-Side- Encryption-Specific Request Headers</dt> <dd> <p>To encrypt the target object, you must provide the appropriate encryption-related request headers. The one you use depends on whether you want to use AWS managed encryption keys or provide your own encryption key. </p> <ul> <li> <p>To encrypt the target object using server-side encryption with an AWS managed encryption key, provide the following request headers, as appropriate.</p> <ul> <li> <p> <code>x-amz-server-side​-encryption</code> </p> </li> <li> <p> <code>x-amz-server-side-encryption-aws-kms-key-id</code> </p> </li> <li> <p> <code>x-amz-server-side-encryption-context</code> </p> </li> </ul> <note> <p>If you specify <code>x-amz-server-side-encryption:aws:kms</code>, but don't provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the AWS managed CMK in AWS KMS to protect the data. If you want to use a customer managed AWS KMS CMK, you must provide the <code>x-amz-server-side-encryption-aws-kms-key-id</code> of the symmetric customer managed CMK. Amazon S3 only supports symmetric CMKs and not asymmetric CMKs. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric Keys</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> </note> <important> <p>All GET and PUT requests for an object protected by AWS KMS fail if you don't make them with SSL or by using SigV4.</p> </important> <p>For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in KMS</a>.</p> </li> <li> <p>To encrypt the target object using server-side encryption with an encryption key that you provide, use the following headers.</p> <ul> <li> <p>x-amz-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key-MD5</p> </li> </ul> </li> <li> <p>If the source object is encrypted using server-side encryption with customer-provided encryption keys, you must use the following headers.</p> <ul> <li> <p>x-amz-copy-source​-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-copy-source​-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-copy-source-​server-side​-encryption​-customer-key-MD5</p> </li> </ul> <p>For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in Amazon KMS</a>.</p> </li> </ul> </dd> <dt>Access-Control-List (ACL)-Specific Request Headers</dt> <dd> <p>You also can use the following access control–related headers with this operation. By default, all objects are private. Only the owner has full access control. When adding a new object, you can grant permissions to individual AWS accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. With this operation, you can grant access permissions using one of the following two methods:</p> <ul> <li> <p>Specify a canned ACL (<code>x-amz-acl</code>) — Amazon S3 supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each canned ACL has a predefined set of grantees and permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly — To explicitly grant access permissions to specific AWS accounts or groups, use the following headers. Each header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>. In the header, you specify a list of grantees who get the specific permission. To grant permissions explicitly, use:</p> <ul> <li> <p>x-amz-grant-read</p> </li> <li> <p>x-amz-grant-write</p> </li> <li> <p>x-amz-grant-read-acp</p> </li> <li> <p>x-amz-grant-write-acp</p> </li> <li> <p>x-amz-grant-full-control</p> </li> </ul> <p>You specify each grantee as a type=value pair, where the type is one of the following:</p> <ul> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> </li> <li> <p> <code>id</code> – if the value specified is the canonical user ID of an AWS account</p> </li> <li> <p> <code>uri</code> – if you are granting permissions to a predefined group</p> </li> </ul> <p>For example, the following <code>x-amz-grant-read</code> header grants the AWS accounts identified by email addresses permissions to read object data and its metadata:</p> <p> <code>x-amz-grant-read: emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com" </code> </p> </li> </ul> </dd> </dl> <p>The following operations are related to <code>CopyObject</code>:</p> <ul> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a>GetObject</a> </p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html">Copying Objects</a>.</p>
copy_object( &self, input: CopyObjectRequest, ) -> Result<CopyObjectOutput, RusotoError<CopyObjectError>>19159     async fn copy_object(
19160         &self,
19161         input: CopyObjectRequest,
19162     ) -> Result<CopyObjectOutput, RusotoError<CopyObjectError>>;
19163 
19164     /// <p><p>Creates a new bucket. To create a bucket, you must register with Amazon S3 and have a valid AWS Access Key ID to authenticate requests. Anonymous requests are never allowed to create buckets. By creating the bucket, you become the bucket owner.</p> <p>Not every string is an acceptable bucket name. For information on bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html">Working with Amazon S3 Buckets</a>.</p> <p>By default, the bucket is created in the US East (N. Virginia) Region. You can optionally specify a Region in the request body. You might choose a Region to optimize latency, minimize costs, or address regulatory requirements. For example, if you reside in Europe, you will probably find it advantageous to create buckets in the EU (Ireland) Region. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro">How to Select a Region for Your Buckets</a>.</p> <note> <p>If you send your create bucket request to the <code>s3.amazonaws.com</code> endpoint, the request goes to the us-east-1 Region. Accordingly, the signature calculations in Signature Version 4 must use us-east-1 as the Region, even if the location constraint in the request specifies another Region where the bucket is to be created. If you create a bucket in a Region other than US East (N. Virginia), your application must be able to handle 307 redirect. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html">Virtual Hosting of Buckets</a>.</p> </note> <p>When creating a bucket using this operation, you can optionally specify the accounts or groups that should be granted specific permissions on the bucket. There are two ways to grant the appropriate permissions using the request headers.</p> <ul> <li> <p>Specify a canned ACL using the <code>x-amz-acl</code> request header. Amazon S3 supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each canned ACL has a predefined set of grantees and permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly using the <code>x-amz-grant-read</code>, <code>x-amz-grant-write</code>, <code>x-amz-grant-read-acp</code>, <code>x-amz-grant-write-acp</code>, and <code>x-amz-grant-full-control</code> headers. These headers map to the set of permissions Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>.</p> <p>You specify each grantee as a type=value pair, where the type is one of the following:</p> <ul> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> </li> <li> <p> <code>id</code> – if the value specified is the canonical user ID of an AWS account</p> </li> <li> <p> <code>uri</code> – if you are granting permissions to a predefined group</p> </li> </ul> <p>For example, the following <code>x-amz-grant-read</code> header grants the AWS accounts identified by email addresses permissions to read object data and its metadata:</p> <p> <code>x-amz-grant-read: emailAddress=&quot;xyz@amazon.com&quot;, emailAddress=&quot;abc@amazon.com&quot; </code> </p> </li> </ul> <note> <p>You can use either a canned ACL or specify access permissions explicitly. You cannot do both.</p> </note> <p>The following operations are related to <code>CreateBucket</code>:</p> <ul> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a>DeleteBucket</a> </p> </li> </ul></p>
create_bucket( &self, input: CreateBucketRequest, ) -> Result<CreateBucketOutput, RusotoError<CreateBucketError>>19165     async fn create_bucket(
19166         &self,
19167         input: CreateBucketRequest,
19168     ) -> Result<CreateBucketOutput, RusotoError<CreateBucketError>>;
19169 
19170     /// <p><p>This operation initiates a multipart upload and returns an upload ID. This upload ID is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests (see <a>UploadPart</a>). You also include this upload ID in the final request to either complete or abort the multipart upload request.</p> <p>For more information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html">Multipart Upload Overview</a>.</p> <p>If you have configured a lifecycle rule to abort incomplete multipart uploads, the upload must complete within the number of days specified in the bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort operation and Amazon S3 aborts the multipart upload. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config">Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy</a>.</p> <p>For information about the permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and Permissions</a>.</p> <p>For request signing, multipart upload is just a series of regular requests. You initiate a multipart upload, send one or more requests to upload parts, and then complete the multipart upload process. You sign each request individually. There is nothing special about signing multipart upload requests. For more information about signing, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating Requests (AWS Signature Version 4)</a>.</p> <note> <p> After you initiate a multipart upload and upload one or more parts, to stop being charged for storing the uploaded parts, you must either complete or abort the multipart upload. Amazon S3 frees up the space used to store the parts and stop charging you for storing them only after you either complete or abort a multipart upload. </p> </note> <p>You can optionally request server-side encryption. For server-side encryption, Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. You can provide your own encryption key, or use AWS Key Management Service (AWS KMS) customer master keys (CMKs) or Amazon S3-managed encryption keys. If you choose to provide your own encryption key, the request headers you provide in <a>UploadPart</a>) and <a>UploadPartCopy</a>) requests must match the headers you used in the request to initiate the upload by using <code>CreateMultipartUpload</code>. </p> <p>To perform a multipart upload with encryption using an AWS KMS CMK, the requester must have permission to the <code>kms:Encrypt</code>, <code>kms:Decrypt</code>, <code>kms:ReEncrypt<em></code>, <code>kms:GenerateDataKey</em></code>, and <code>kms:DescribeKey</code> actions on the key. These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload.</p> <p>If your AWS Identity and Access Management (IAM) user or role is in the same AWS account as the AWS KMS CMK, then you must have these permissions on the key policy. If your IAM user or role belongs to a different account than the key, then you must have the permissions on both the key policy and your IAM user or role.</p> <p> For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Protecting Data Using Server-Side Encryption</a>.</p> <dl> <dt>Access Permissions</dt> <dd> <p>When copying an object, you can optionally specify the accounts or groups that should be granted specific permissions on the new object. There are two ways to grant the permissions using the request headers:</p> <ul> <li> <p>Specify a canned ACL with the <code>x-amz-acl</code> request header. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly with the <code>x-amz-grant-read</code>, <code>x-amz-grant-read-acp</code>, <code>x-amz-grant-write-acp</code>, and <code>x-amz-grant-full-control</code> headers. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>.</p> </li> </ul> <p>You can use either a canned ACL or specify access permissions explicitly. You cannot do both.</p> </dd> <dt>Server-Side- Encryption-Specific Request Headers</dt> <dd> <p>You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption. Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. The option you use depends on whether you want to use AWS managed encryption keys or provide your own encryption key. </p> <ul> <li> <p>Use encryption keys managed by Amazon S3 or customer master keys (CMKs) stored in AWS Key Management Service (AWS KMS) – If you want AWS to manage the keys used to encrypt data, specify the following headers in the request.</p> <ul> <li> <p>x-amz-server-side​-encryption</p> </li> <li> <p>x-amz-server-side-encryption-aws-kms-key-id</p> </li> <li> <p>x-amz-server-side-encryption-context</p> </li> </ul> <note> <p>If you specify <code>x-amz-server-side-encryption:aws:kms</code>, but don&#39;t provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the AWS managed CMK in AWS KMS to protect the data.</p> </note> <important> <p>All GET and PUT requests for an object protected by AWS KMS fail if you don&#39;t make them with SSL or by using SigV4.</p> </important> <p>For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS</a>.</p> </li> <li> <p>Use customer-provided encryption keys – If you want to manage your own encryption keys, provide all the following headers in the request.</p> <ul> <li> <p>x-amz-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key-MD5</p> </li> </ul> <p>For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS</a>.</p> </li> </ul> </dd> <dt>Access-Control-List (ACL)-Specific Request Headers</dt> <dd> <p>You also can use the following access control–related headers with this operation. By default, all objects are private. Only the owner has full access control. When adding a new object, you can grant permissions to individual AWS accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. With this operation, you can grant access permissions using one of the following two methods:</p> <ul> <li> <p>Specify a canned ACL (<code>x-amz-acl</code>) — Amazon S3 supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each canned ACL has a predefined set of grantees and permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly — To explicitly grant access permissions to specific AWS accounts or groups, use the following headers. Each header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>. In the header, you specify a list of grantees who get the specific permission. To grant permissions explicitly, use:</p> <ul> <li> <p>x-amz-grant-read</p> </li> <li> <p>x-amz-grant-write</p> </li> <li> <p>x-amz-grant-read-acp</p> </li> <li> <p>x-amz-grant-write-acp</p> </li> <li> <p>x-amz-grant-full-control</p> </li> </ul> <p>You specify each grantee as a type=value pair, where the type is one of the following:</p> <ul> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> </li> <li> <p> <code>id</code> – if the value specified is the canonical user ID of an AWS account</p> </li> <li> <p> <code>uri</code> – if you are granting permissions to a predefined group</p> </li> </ul> <p>For example, the following <code>x-amz-grant-read</code> header grants the AWS accounts identified by email addresses permissions to read object data and its metadata:</p> <p> <code>x-amz-grant-read: emailAddress=&quot;xyz@amazon.com&quot;, emailAddress=&quot;abc@amazon.com&quot; </code> </p> </li> </ul> </dd> </dl> <p>The following operations are related to <code>CreateMultipartUpload</code>:</p> <ul> <li> <p> <a>UploadPart</a> </p> </li> <li> <p> <a>CompleteMultipartUpload</a> </p> </li> <li> <p> <a>AbortMultipartUpload</a> </p> </li> <li> <p> <a>ListParts</a> </p> </li> <li> <p> <a>ListMultipartUploads</a> </p> </li> </ul></p>
create_multipart_upload( &self, input: CreateMultipartUploadRequest, ) -> Result<CreateMultipartUploadOutput, RusotoError<CreateMultipartUploadError>>19171     async fn create_multipart_upload(
19172         &self,
19173         input: CreateMultipartUploadRequest,
19174     ) -> Result<CreateMultipartUploadOutput, RusotoError<CreateMultipartUploadError>>;
19175 
19176     /// <p><p>Deletes the bucket. All objects (including all object versions and delete markers) in the bucket must be deleted before the bucket itself can be deleted.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> </p> </li> <li> <p> </p> </li> </ul></p>
delete_bucket( &self, input: DeleteBucketRequest, ) -> Result<(), RusotoError<DeleteBucketError>>19177     async fn delete_bucket(
19178         &self,
19179         input: DeleteBucketRequest,
19180     ) -> Result<(), RusotoError<DeleteBucketError>>;
19181 
19182     /// <p><p>Deletes an analytics configuration for the bucket (specified by the analytics configuration ID).</p> <p>To use this operation, you must have permissions to perform the <code>s3:PutAnalyticsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For information about the Amazon S3 analytics feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html">Amazon S3 Analytics – Storage Class Analysis</a>. </p> <p>The following operations are related to <code>DeleteBucketAnalyticsConfiguration</code>:</p> <ul> <li> <p> </p> </li> <li> <p> </p> </li> <li> <p> </p> </li> </ul></p>
delete_bucket_analytics_configuration( &self, input: DeleteBucketAnalyticsConfigurationRequest, ) -> Result<(), RusotoError<DeleteBucketAnalyticsConfigurationError>>19183     async fn delete_bucket_analytics_configuration(
19184         &self,
19185         input: DeleteBucketAnalyticsConfigurationRequest,
19186     ) -> Result<(), RusotoError<DeleteBucketAnalyticsConfigurationError>>;
19187 
19188     /// <p><p>Deletes the <code>cors</code> configuration information set for the bucket.</p> <p>To use this operation, you must have permission to perform the <code>s3:PutBucketCORS</code> action. The bucket owner has this permission by default and can grant this permission to others. </p> <p>For information about <code>cors</code>, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html">Enabling Cross-Origin Resource Sharing</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p class="title"> <b>Related Resources:</b> </p> <ul> <li> <p> </p> </li> <li> <p> <a>RESTOPTIONSobject</a> </p> </li> </ul></p>
delete_bucket_cors( &self, input: DeleteBucketCorsRequest, ) -> Result<(), RusotoError<DeleteBucketCorsError>>19189     async fn delete_bucket_cors(
19190         &self,
19191         input: DeleteBucketCorsRequest,
19192     ) -> Result<(), RusotoError<DeleteBucketCorsError>>;
19193 
19194     /// <p><p>This implementation of the DELETE operation removes default encryption from the bucket. For information about the Amazon S3 default encryption feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//bucket-encryption.html">Amazon S3 Default Bucket Encryption</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>To use this operation, you must have permissions to perform the <code>s3:PutEncryptionConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>PutBucketEncryption</a> </p> </li> <li> <p> <a>GetBucketEncryption</a> </p> </li> </ul></p>
delete_bucket_encryption( &self, input: DeleteBucketEncryptionRequest, ) -> Result<(), RusotoError<DeleteBucketEncryptionError>>19195     async fn delete_bucket_encryption(
19196         &self,
19197         input: DeleteBucketEncryptionRequest,
19198     ) -> Result<(), RusotoError<DeleteBucketEncryptionError>>;
19199 
19200     /// <p><p>Deletes an inventory configuration (identified by the inventory ID) from the bucket.</p> <p>To use this operation, you must have permissions to perform the <code>s3:PutInventoryConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For information about the Amazon S3 inventory feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html">Amazon S3 Inventory</a>.</p> <p>Operations related to <code>DeleteBucketInventoryConfiguration</code> include: </p> <ul> <li> <p> <a>GetBucketInventoryConfiguration</a> </p> </li> <li> <p> <a>PutBucketInventoryConfiguration</a> </p> </li> <li> <p> <a>ListBucketInventoryConfigurations</a> </p> </li> </ul></p>
delete_bucket_inventory_configuration( &self, input: DeleteBucketInventoryConfigurationRequest, ) -> Result<(), RusotoError<DeleteBucketInventoryConfigurationError>>19201     async fn delete_bucket_inventory_configuration(
19202         &self,
19203         input: DeleteBucketInventoryConfigurationRequest,
19204     ) -> Result<(), RusotoError<DeleteBucketInventoryConfigurationError>>;
19205 
19206     /// <p><p>Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of rules contained in the deleted lifecycle configuration.</p> <p>To use this operation, you must have permission to perform the <code>s3:PutLifecycleConfiguration</code> action. By default, the bucket owner has this permission and the bucket owner can grant this permission to others.</p> <p>There is usually some time lag before lifecycle configuration deletion is fully propagated to all the Amazon S3 systems.</p> <p>For more information about the object expiration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions">Elements to Describe Lifecycle Actions</a>.</p> <p>Related actions include:</p> <ul> <li> <p> <a>PutBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a>GetBucketLifecycleConfiguration</a> </p> </li> </ul></p>
delete_bucket_lifecycle( &self, input: DeleteBucketLifecycleRequest, ) -> Result<(), RusotoError<DeleteBucketLifecycleError>>19207     async fn delete_bucket_lifecycle(
19208         &self,
19209         input: DeleteBucketLifecycleRequest,
19210     ) -> Result<(), RusotoError<DeleteBucketLifecycleError>>;
19211 
19212     /// <p><p>Deletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the metrics configuration ID) from the bucket. Note that this doesn&#39;t include the daily storage metrics.</p> <p> To use this operation, you must have permissions to perform the <code>s3:PutMetricsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For information about CloudWatch request metrics for Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html">Monitoring Metrics with Amazon CloudWatch</a>. </p> <p>The following operations are related to <code>DeleteBucketMetricsConfiguration</code>:</p> <ul> <li> <p> <a>GetBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>ListBucketMetricsConfigurations</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html">Monitoring Metrics with Amazon CloudWatch</a> </p> </li> </ul></p>
delete_bucket_metrics_configuration( &self, input: DeleteBucketMetricsConfigurationRequest, ) -> Result<(), RusotoError<DeleteBucketMetricsConfigurationError>>19213     async fn delete_bucket_metrics_configuration(
19214         &self,
19215         input: DeleteBucketMetricsConfigurationRequest,
19216     ) -> Result<(), RusotoError<DeleteBucketMetricsConfigurationError>>;
19217 
19218     /// <p><p>This implementation of the DELETE operation uses the policy subresource to delete the policy of a specified bucket. If you are using an identity other than the root user of the AWS account that owns the bucket, the calling identity must have the <code>DeleteBucketPolicy</code> permissions on the specified bucket and belong to the bucket owner&#39;s account to use this operation. </p> <p>If you don&#39;t have <code>DeleteBucketPolicy</code> permissions, Amazon S3 returns a <code>403 Access Denied</code> error. If you have the correct permissions, but you&#39;re not using an identity that belongs to the bucket owner&#39;s account, Amazon S3 returns a <code>405 Method Not Allowed</code> error. </p> <important> <p>As a security precaution, the root user of the AWS account that owns a bucket can always use this operation, even if the policy explicitly denies the root user the ability to perform this action.</p> </important> <p>For more information about bucket policies, see <a href=" https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html">Using Bucket Policies and UserPolicies</a>. </p> <p>The following operations are related to <code>DeleteBucketPolicy</code> </p> <ul> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>DeleteObject</a> </p> </li> </ul></p>
delete_bucket_policy( &self, input: DeleteBucketPolicyRequest, ) -> Result<(), RusotoError<DeleteBucketPolicyError>>19219     async fn delete_bucket_policy(
19220         &self,
19221         input: DeleteBucketPolicyRequest,
19222     ) -> Result<(), RusotoError<DeleteBucketPolicyError>>;
19223 
19224     /// <p><p> Deletes the replication configuration from the bucket.</p> <p>To use this operation, you must have permissions to perform the <code>s3:PutReplicationConfiguration</code> action. The bucket owner has these permissions by default and can grant it to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>. </p> <note> <p>It can take a while for the deletion of a replication configuration to fully propagate.</p> </note> <p> For information about replication configuration, see <a href=" https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html">Replication</a> in the <i>Amazon S3 Developer Guide</i>. </p> <p>The following operations are related to <code>DeleteBucketReplication</code>:</p> <ul> <li> <p> <a>PutBucketReplication</a> </p> </li> <li> <p> <a>GetBucketReplication</a> </p> </li> </ul></p>
delete_bucket_replication( &self, input: DeleteBucketReplicationRequest, ) -> Result<(), RusotoError<DeleteBucketReplicationError>>19225     async fn delete_bucket_replication(
19226         &self,
19227         input: DeleteBucketReplicationRequest,
19228     ) -> Result<(), RusotoError<DeleteBucketReplicationError>>;
19229 
19230     /// <p><p>Deletes the tags from the bucket.</p> <p>To use this operation, you must have permission to perform the <code>s3:PutBucketTagging</code> action. By default, the bucket owner has this permission and can grant this permission to others. </p> <p>The following operations are related to <code>DeleteBucketTagging</code>:</p> <ul> <li> <p> <a>GetBucketTagging</a> </p> </li> <li> <p> <a>PutBucketTagging</a> </p> </li> </ul></p>
delete_bucket_tagging( &self, input: DeleteBucketTaggingRequest, ) -> Result<(), RusotoError<DeleteBucketTaggingError>>19231     async fn delete_bucket_tagging(
19232         &self,
19233         input: DeleteBucketTaggingRequest,
19234     ) -> Result<(), RusotoError<DeleteBucketTaggingError>>;
19235 
19236     /// <p><p>This operation removes the website configuration for a bucket. Amazon S3 returns a <code>200 OK</code> response upon successfully deleting a website configuration on the specified bucket. You will get a <code>200 OK</code> response if the website configuration you are trying to delete does not exist on the bucket. Amazon S3 returns a <code>404</code> response if the bucket specified in the request does not exist.</p> <p>This DELETE operation requires the <code>S3:DeleteBucketWebsite</code> permission. By default, only the bucket owner can delete the website configuration attached to a bucket. However, bucket owners can grant other users permission to delete the website configuration by writing a bucket policy granting them the <code>S3:DeleteBucketWebsite</code> permission. </p> <p>For more information about hosting websites, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a>. </p> <p>The following operations are related to <code>DeleteBucketWebsite</code>:</p> <ul> <li> <p> <a>GetBucketWebsite</a> </p> </li> <li> <p> <a>PutBucketWebsite</a> </p> </li> </ul></p>
delete_bucket_website( &self, input: DeleteBucketWebsiteRequest, ) -> Result<(), RusotoError<DeleteBucketWebsiteError>>19237     async fn delete_bucket_website(
19238         &self,
19239         input: DeleteBucketWebsiteRequest,
19240     ) -> Result<(), RusotoError<DeleteBucketWebsiteError>>;
19241 
19242     /// <p><p>Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. If there isn&#39;t a null version, Amazon S3 does not remove any objects.</p> <p>To remove a specific version, you must be the bucket owner and you must use the version Id subresource. Using this subresource permanently deletes the version. If the object deleted is a delete marker, Amazon S3 sets the response header, <code>x-amz-delete-marker</code>, to true. </p> <p>If the object you want to delete is in a bucket where the bucket versioning configuration is MFA Delete enabled, you must include the <code>x-amz-mfa</code> request header in the DELETE <code>versionId</code> request. Requests that include <code>x-amz-mfa</code> must use HTTPS. </p> <p> For more information about MFA Delete, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html">Using MFA Delete</a>. To see sample requests that use versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete">Sample Request</a>. </p> <p>You can delete objects by explicitly calling the DELETE Object API or configure its lifecycle (<a>PutBucketLifecycle</a>) to enable Amazon S3 to remove them for you. If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them the <code>s3:DeleteObject</code>, <code>s3:DeleteObjectVersion</code>, and <code>s3:PutLifeCycleConfiguration</code> actions. </p> <p>The following operation is related to <code>DeleteObject</code>:</p> <ul> <li> <p> <a>PutObject</a> </p> </li> </ul></p>
delete_object( &self, input: DeleteObjectRequest, ) -> Result<DeleteObjectOutput, RusotoError<DeleteObjectError>>19243     async fn delete_object(
19244         &self,
19245         input: DeleteObjectRequest,
19246     ) -> Result<DeleteObjectOutput, RusotoError<DeleteObjectError>>;
19247 
19248     /// <p><p>Removes the entire tag set from the specified object. For more information about managing object tags, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html"> Object Tagging</a>.</p> <p>To use this operation, you must have permission to perform the <code>s3:DeleteObjectTagging</code> action.</p> <p>To delete tags of a specific object version, add the <code>versionId</code> query parameter in the request. You will need permission for the <code>s3:DeleteObjectVersionTagging</code> action.</p> <p>The following operations are related to <code>DeleteBucketMetricsConfiguration</code>:</p> <ul> <li> <p> <a>PutObjectTagging</a> </p> </li> <li> <p> <a>GetObjectTagging</a> </p> </li> </ul></p>
delete_object_tagging( &self, input: DeleteObjectTaggingRequest, ) -> Result<DeleteObjectTaggingOutput, RusotoError<DeleteObjectTaggingError>>19249     async fn delete_object_tagging(
19250         &self,
19251         input: DeleteObjectTaggingRequest,
19252     ) -> Result<DeleteObjectTaggingOutput, RusotoError<DeleteObjectTaggingError>>;
19253 
19254     /// <p><p>This operation enables you to delete multiple objects from a bucket using a single HTTP request. If you know the object keys that you want to delete, then this operation provides a suitable alternative to sending individual delete requests, reducing per-request overhead.</p> <p>The request contains a list of up to 1000 keys that you want to delete. In the XML, you provide the object key names, and optionally, version IDs if you want to delete a specific version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a delete operation and returns the result of that delete, success, or failure, in the response. Note that if the object specified in the request is not found, Amazon S3 returns the result as deleted.</p> <p> The operation supports two modes for the response: verbose and quiet. By default, the operation uses verbose mode in which the response includes the result of deletion of each key in your request. In quiet mode the response includes only keys where the delete operation encountered an error. For a successful deletion, the operation does not return any information about the delete in the response body.</p> <p>When performing this operation on an MFA Delete enabled bucket, that attempts to delete any versioned objects, you must include an MFA token. If you do not provide one, the entire request will fail, even if there are non-versioned objects you are trying to delete. If you provide an invalid token, whether there are versioned keys in the request or not, the entire Multi-Object Delete request will fail. For information about MFA Delete, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete"> MFA Delete</a>.</p> <p>Finally, the Content-MD5 header is required for all Multi-Object Delete requests. Amazon S3 uses the header value to ensure that your request body has not been altered in transit.</p> <p>The following operations are related to <code>DeleteObjects</code>:</p> <ul> <li> <p> <a>CreateMultipartUpload</a> </p> </li> <li> <p> <a>UploadPart</a> </p> </li> <li> <p> <a>CompleteMultipartUpload</a> </p> </li> <li> <p> <a>ListParts</a> </p> </li> <li> <p> <a>AbortMultipartUpload</a> </p> </li> </ul></p>
delete_objects( &self, input: DeleteObjectsRequest, ) -> Result<DeleteObjectsOutput, RusotoError<DeleteObjectsError>>19255     async fn delete_objects(
19256         &self,
19257         input: DeleteObjectsRequest,
19258     ) -> Result<DeleteObjectsOutput, RusotoError<DeleteObjectsError>>;
19259 
19260     /// <p><p>Removes the <code>PublicAccessBlock</code> configuration for an Amazon S3 bucket. To use this operation, you must have the <code>s3:PutBucketPublicAccessBlock</code> permission. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>The following operations are related to <code>DeleteBucketMetricsConfiguration</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html">Using Amazon S3 Block Public Access</a> </p> </li> <li> <p> <a>GetPublicAccessBlock</a> </p> </li> <li> <p> <a>PutPublicAccessBlock</a> </p> </li> <li> <p> <a>GetBucketPolicyStatus</a> </p> </li> </ul></p>
delete_public_access_block( &self, input: DeletePublicAccessBlockRequest, ) -> Result<(), RusotoError<DeletePublicAccessBlockError>>19261     async fn delete_public_access_block(
19262         &self,
19263         input: DeletePublicAccessBlockRequest,
19264     ) -> Result<(), RusotoError<DeletePublicAccessBlockError>>;
19265 
19266     /// <p><p>This implementation of the GET operation uses the <code>accelerate</code> subresource to return the Transfer Acceleration state of a bucket, which is either <code>Enabled</code> or <code>Suspended</code>. Amazon S3 Transfer Acceleration is a bucket-level feature that enables you to perform faster data transfers to and from Amazon S3.</p> <p>To use this operation, you must have permission to perform the <code>s3:GetAccelerateConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>You set the Transfer Acceleration state of an existing bucket to <code>Enabled</code> or <code>Suspended</code> by using the <a>PutBucketAccelerateConfiguration</a> operation. </p> <p>A GET <code>accelerate</code> request does not return a state value for a bucket that has no transfer acceleration state. A bucket has no Transfer Acceleration state if a state has never been set on the bucket. </p> <p>For more information about transfer acceleration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//transfer-acceleration.html">Transfer Acceleration</a> in the Amazon Simple Storage Service Developer Guide.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>PutBucketAccelerateConfiguration</a> </p> </li> </ul></p>
get_bucket_accelerate_configuration( &self, input: GetBucketAccelerateConfigurationRequest, ) -> Result< GetBucketAccelerateConfigurationOutput, RusotoError<GetBucketAccelerateConfigurationError>, >19267     async fn get_bucket_accelerate_configuration(
19268         &self,
19269         input: GetBucketAccelerateConfigurationRequest,
19270     ) -> Result<
19271         GetBucketAccelerateConfigurationOutput,
19272         RusotoError<GetBucketAccelerateConfigurationError>,
19273     >;
19274 
19275     /// <p><p>This implementation of the <code>GET</code> operation uses the <code>acl</code> subresource to return the access control list (ACL) of a bucket. To use <code>GET</code> to return the ACL of the bucket, you must have <code>READ<em>ACP</code> access to the bucket. If <code>READ</em>ACP</code> permission is granted to the anonymous user, you can return the ACL of the bucket without using an authorization header.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> </p> </li> </ul></p>
get_bucket_acl( &self, input: GetBucketAclRequest, ) -> Result<GetBucketAclOutput, RusotoError<GetBucketAclError>>19276     async fn get_bucket_acl(
19277         &self,
19278         input: GetBucketAclRequest,
19279     ) -> Result<GetBucketAclOutput, RusotoError<GetBucketAclError>>;
19280 
19281     /// <p><p>This implementation of the GET operation returns an analytics configuration (identified by the analytics configuration ID) from the bucket.</p> <p>To use this operation, you must have permissions to perform the <code>s3:GetAnalyticsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources"> Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. </p> <p>For information about Amazon S3 analytics feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html">Amazon S3 Analytics – Storage Class Analysis</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> </p> </li> <li> <p> </p> </li> <li> <p> </p> </li> </ul></p>
get_bucket_analytics_configuration( &self, input: GetBucketAnalyticsConfigurationRequest, ) -> Result< GetBucketAnalyticsConfigurationOutput, RusotoError<GetBucketAnalyticsConfigurationError>, >19282     async fn get_bucket_analytics_configuration(
19283         &self,
19284         input: GetBucketAnalyticsConfigurationRequest,
19285     ) -> Result<
19286         GetBucketAnalyticsConfigurationOutput,
19287         RusotoError<GetBucketAnalyticsConfigurationError>,
19288     >;
19289 
19290     /// <p><p>Returns the cors configuration information set for the bucket.</p> <p> To use this operation, you must have permission to perform the s3:GetBucketCORS action. By default, the bucket owner has this permission and can grant it to others.</p> <p> For more information about cors, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html"> Enabling Cross-Origin Resource Sharing</a>.</p> <p>The following operations are related to <code>GetBucketCors</code>:</p> <ul> <li> <p> <a>PutBucketCors</a> </p> </li> <li> <p> <a>DeleteBucketCors</a> </p> </li> </ul></p>
get_bucket_cors( &self, input: GetBucketCorsRequest, ) -> Result<GetBucketCorsOutput, RusotoError<GetBucketCorsError>>19291     async fn get_bucket_cors(
19292         &self,
19293         input: GetBucketCorsRequest,
19294     ) -> Result<GetBucketCorsOutput, RusotoError<GetBucketCorsError>>;
19295 
19296     /// <p><p>Returns the default encryption configuration for an Amazon S3 bucket. For information about the Amazon S3 default encryption feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html">Amazon S3 Default Bucket Encryption</a>.</p> <p> To use this operation, you must have permission to perform the <code>s3:GetEncryptionConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>The following operations are related to <code>GetBucketEncryption</code>:</p> <ul> <li> <p> <a>PutBucketEncryption</a> </p> </li> <li> <p> <a>DeleteBucketEncryption</a> </p> </li> </ul></p>
get_bucket_encryption( &self, input: GetBucketEncryptionRequest, ) -> Result<GetBucketEncryptionOutput, RusotoError<GetBucketEncryptionError>>19297     async fn get_bucket_encryption(
19298         &self,
19299         input: GetBucketEncryptionRequest,
19300     ) -> Result<GetBucketEncryptionOutput, RusotoError<GetBucketEncryptionError>>;
19301 
19302     /// <p><p>Returns an inventory configuration (identified by the inventory configuration ID) from the bucket.</p> <p>To use this operation, you must have permissions to perform the <code>s3:GetInventoryConfiguration</code> action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For information about the Amazon S3 inventory feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html">Amazon S3 Inventory</a>.</p> <p>The following operations are related to <code>GetBucketInventoryConfiguration</code>:</p> <ul> <li> <p> <a>DeleteBucketInventoryConfiguration</a> </p> </li> <li> <p> <a>ListBucketInventoryConfigurations</a> </p> </li> <li> <p> <a>PutBucketInventoryConfiguration</a> </p> </li> </ul></p>
get_bucket_inventory_configuration( &self, input: GetBucketInventoryConfigurationRequest, ) -> Result< GetBucketInventoryConfigurationOutput, RusotoError<GetBucketInventoryConfigurationError>, >19303     async fn get_bucket_inventory_configuration(
19304         &self,
19305         input: GetBucketInventoryConfigurationRequest,
19306     ) -> Result<
19307         GetBucketInventoryConfigurationOutput,
19308         RusotoError<GetBucketInventoryConfigurationError>,
19309     >;
19310 
19311     /// <p><important> <p>For an updated version of this API, see <a>GetBucketLifecycleConfiguration</a>. If you configured a bucket lifecycle using the <code>filter</code> element, you should see the updated version of this topic. This topic is provided for backward compatibility.</p> </important> <p>Returns the lifecycle configuration information set on the bucket. For information about lifecycle configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html">Object Lifecycle Management</a>.</p> <p> To use this operation, you must have permission to perform the <code>s3:GetLifecycleConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p> <code>GetBucketLifecycle</code> has the following special error:</p> <ul> <li> <p>Error code: <code>NoSuchLifecycleConfiguration</code> </p> <ul> <li> <p>Description: The lifecycle configuration does not exist.</p> </li> <li> <p>HTTP Status Code: 404 Not Found</p> </li> <li> <p>SOAP Fault Code Prefix: Client</p> </li> </ul> </li> </ul> <p>The following operations are related to <code>GetBucketLifecycle</code>:</p> <ul> <li> <p> <a>GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a>PutBucketLifecycle</a> </p> </li> <li> <p> <a>DeleteBucketLifecycle</a> </p> </li> </ul></p>
get_bucket_lifecycle( &self, input: GetBucketLifecycleRequest, ) -> Result<GetBucketLifecycleOutput, RusotoError<GetBucketLifecycleError>>19312     async fn get_bucket_lifecycle(
19313         &self,
19314         input: GetBucketLifecycleRequest,
19315     ) -> Result<GetBucketLifecycleOutput, RusotoError<GetBucketLifecycleError>>;
19316 
19317     /// <p><note> <p>Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, or a combination of both. Accordingly, this section describes the latest API. The response describes the new filter element that you can use to specify a filter to select a subset of objects to which the rule applies. If you are still using previous version of the lifecycle configuration, it works. For the earlier API description, see <a>GetBucketLifecycle</a>.</p> </note> <p>Returns the lifecycle configuration information set on the bucket. For information about lifecycle configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html">Object Lifecycle Management</a>.</p> <p>To use this operation, you must have permission to perform the <code>s3:GetLifecycleConfiguration</code> action. The bucket owner has this permission, by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p> <code>GetBucketLifecycleConfiguration</code> has the following special error:</p> <ul> <li> <p>Error code: <code>NoSuchLifecycleConfiguration</code> </p> <ul> <li> <p>Description: The lifecycle configuration does not exist.</p> </li> <li> <p>HTTP Status Code: 404 Not Found</p> </li> <li> <p>SOAP Fault Code Prefix: Client</p> </li> </ul> </li> </ul> <p>The following operations are related to <code>DeleteBucketMetricsConfiguration</code>:</p> <ul> <li> <p> <a>GetBucketLifecycle</a> </p> </li> <li> <p> <a>PutBucketLifecycle</a> </p> </li> <li> <p> <a>DeleteBucketLifecycle</a> </p> </li> </ul></p>
get_bucket_lifecycle_configuration( &self, input: GetBucketLifecycleConfigurationRequest, ) -> Result< GetBucketLifecycleConfigurationOutput, RusotoError<GetBucketLifecycleConfigurationError>, >19318     async fn get_bucket_lifecycle_configuration(
19319         &self,
19320         input: GetBucketLifecycleConfigurationRequest,
19321     ) -> Result<
19322         GetBucketLifecycleConfigurationOutput,
19323         RusotoError<GetBucketLifecycleConfigurationError>,
19324     >;
19325 
19326     /// <p><p>Returns the Region the bucket resides in. You set the bucket&#39;s Region using the <code>LocationConstraint</code> request parameter in a <code>CreateBucket</code> request. For more information, see <a>CreateBucket</a>.</p> <p> To use this implementation of the operation, you must be the bucket owner.</p> <p>The following operations are related to <code>GetBucketLocation</code>:</p> <ul> <li> <p> <a>GetObject</a> </p> </li> <li> <p> <a>CreateBucket</a> </p> </li> </ul></p>
get_bucket_location( &self, input: GetBucketLocationRequest, ) -> Result<GetBucketLocationOutput, RusotoError<GetBucketLocationError>>19327     async fn get_bucket_location(
19328         &self,
19329         input: GetBucketLocationRequest,
19330     ) -> Result<GetBucketLocationOutput, RusotoError<GetBucketLocationError>>;
19331 
19332     /// <p><p>Returns the logging status of a bucket and the permissions users have to view and modify that status. To use GET, you must be the bucket owner.</p> <p>The following operations are related to <code>GetBucketLogging</code>:</p> <ul> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>PutBucketLogging</a> </p> </li> </ul></p>
get_bucket_logging( &self, input: GetBucketLoggingRequest, ) -> Result<GetBucketLoggingOutput, RusotoError<GetBucketLoggingError>>19333     async fn get_bucket_logging(
19334         &self,
19335         input: GetBucketLoggingRequest,
19336     ) -> Result<GetBucketLoggingOutput, RusotoError<GetBucketLoggingError>>;
19337 
19338     /// <p><p>Gets a metrics configuration (specified by the metrics configuration ID) from the bucket. Note that this doesn&#39;t include the daily storage metrics.</p> <p> To use this operation, you must have permissions to perform the <code>s3:GetMetricsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p> For information about CloudWatch request metrics for Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html">Monitoring Metrics with Amazon CloudWatch</a>.</p> <p>The following operations are related to <code>GetBucketMetricsConfiguration</code>:</p> <ul> <li> <p> <a>PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>DeleteBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>ListBucketMetricsConfigurations</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html">Monitoring Metrics with Amazon CloudWatch</a> </p> </li> </ul></p>
get_bucket_metrics_configuration( &self, input: GetBucketMetricsConfigurationRequest, ) -> Result<GetBucketMetricsConfigurationOutput, RusotoError<GetBucketMetricsConfigurationError>>19339     async fn get_bucket_metrics_configuration(
19340         &self,
19341         input: GetBucketMetricsConfigurationRequest,
19342     ) -> Result<GetBucketMetricsConfigurationOutput, RusotoError<GetBucketMetricsConfigurationError>>;
19343 
19344     /// <p> No longer used, see <a>GetBucketNotificationConfiguration</a>.</p>
get_bucket_notification( &self, input: GetBucketNotificationConfigurationRequest, ) -> Result<NotificationConfigurationDeprecated, RusotoError<GetBucketNotificationError>>19345     async fn get_bucket_notification(
19346         &self,
19347         input: GetBucketNotificationConfigurationRequest,
19348     ) -> Result<NotificationConfigurationDeprecated, RusotoError<GetBucketNotificationError>>;
19349 
19350     /// <p><p>Returns the notification configuration of a bucket.</p> <p>If notifications are not enabled on the bucket, the operation returns an empty <code>NotificationConfiguration</code> element.</p> <p>By default, you must be the bucket owner to read the notification configuration of a bucket. However, the bucket owner can use a bucket policy to grant permission to other users to read this configuration with the <code>s3:GetBucketNotification</code> permission.</p> <p>For more information about setting and reading the notification configuration on a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html">Setting Up Notification of Bucket Events</a>. For more information about bucket policies, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html">Using Bucket Policies</a>.</p> <p>The following operation is related to <code>GetBucketNotification</code>:</p> <ul> <li> <p> <a>PutBucketNotification</a> </p> </li> </ul></p>
get_bucket_notification_configuration( &self, input: GetBucketNotificationConfigurationRequest, ) -> Result<NotificationConfiguration, RusotoError<GetBucketNotificationConfigurationError>>19351     async fn get_bucket_notification_configuration(
19352         &self,
19353         input: GetBucketNotificationConfigurationRequest,
19354     ) -> Result<NotificationConfiguration, RusotoError<GetBucketNotificationConfigurationError>>;
19355 
19356     /// <p><p>Returns the policy of a specified bucket. If you are using an identity other than the root user of the AWS account that owns the bucket, the calling identity must have the <code>GetBucketPolicy</code> permissions on the specified bucket and belong to the bucket owner&#39;s account in order to use this operation.</p> <p>If you don&#39;t have <code>GetBucketPolicy</code> permissions, Amazon S3 returns a <code>403 Access Denied</code> error. If you have the correct permissions, but you&#39;re not using an identity that belongs to the bucket owner&#39;s account, Amazon S3 returns a <code>405 Method Not Allowed</code> error.</p> <important> <p>As a security precaution, the root user of the AWS account that owns a bucket can always use this operation, even if the policy explicitly denies the root user the ability to perform this action.</p> </important> <p>For more information about bucket policies, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html">Using Bucket Policies and User Policies</a>.</p> <p>The following operation is related to <code>GetBucketPolicy</code>:</p> <ul> <li> <p> <a>GetObject</a> </p> </li> </ul></p>
get_bucket_policy( &self, input: GetBucketPolicyRequest, ) -> Result<GetBucketPolicyOutput, RusotoError<GetBucketPolicyError>>19357     async fn get_bucket_policy(
19358         &self,
19359         input: GetBucketPolicyRequest,
19360     ) -> Result<GetBucketPolicyOutput, RusotoError<GetBucketPolicyError>>;
19361 
19362     /// <p><p>Retrieves the policy status for an Amazon S3 bucket, indicating whether the bucket is public. In order to use this operation, you must have the <code>s3:GetBucketPolicyStatus</code> permission. For more information about Amazon S3 permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a>.</p> <p> For more information about when Amazon S3 considers a bucket public, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status">The Meaning of &quot;Public&quot;</a>. </p> <p>The following operations are related to <code>GetBucketPolicyStatus</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html">Using Amazon S3 Block Public Access</a> </p> </li> <li> <p> <a>GetPublicAccessBlock</a> </p> </li> <li> <p> <a>PutPublicAccessBlock</a> </p> </li> <li> <p> <a>DeletePublicAccessBlock</a> </p> </li> </ul></p>
get_bucket_policy_status( &self, input: GetBucketPolicyStatusRequest, ) -> Result<GetBucketPolicyStatusOutput, RusotoError<GetBucketPolicyStatusError>>19363     async fn get_bucket_policy_status(
19364         &self,
19365         input: GetBucketPolicyStatusRequest,
19366     ) -> Result<GetBucketPolicyStatusOutput, RusotoError<GetBucketPolicyStatusError>>;
19367 
19368     /// <p><p>Returns the replication configuration of a bucket.</p> <note> <p> It can take a while to propagate the put or delete a replication configuration to all Amazon S3 systems. Therefore, a get request soon after put or delete can return a wrong result. </p> </note> <p> For information about replication configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html">Replication</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>This operation requires permissions for the <code>s3:GetReplicationConfiguration</code> action. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html">Using Bucket Policies and User Policies</a>.</p> <p>If you include the <code>Filter</code> element in a replication configuration, you must also include the <code>DeleteMarkerReplication</code> and <code>Priority</code> elements. The response also returns those elements.</p> <p>For information about <code>GetBucketReplication</code> errors, see <a>ReplicationErrorCodeList</a> </p> <p>The following operations are related to <code>GetBucketReplication</code>:</p> <ul> <li> <p> <a>PutBucketReplication</a> </p> </li> <li> <p> <a>DeleteBucketReplication</a> </p> </li> </ul></p>
get_bucket_replication( &self, input: GetBucketReplicationRequest, ) -> Result<GetBucketReplicationOutput, RusotoError<GetBucketReplicationError>>19369     async fn get_bucket_replication(
19370         &self,
19371         input: GetBucketReplicationRequest,
19372     ) -> Result<GetBucketReplicationOutput, RusotoError<GetBucketReplicationError>>;
19373 
19374     /// <p><p>Returns the request payment configuration of a bucket. To use this version of the operation, you must be the bucket owner. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html">Requester Pays Buckets</a>.</p> <p>The following operations are related to <code>GetBucketRequestPayment</code>:</p> <ul> <li> <p> <a>ListObjects</a> </p> </li> </ul></p>
get_bucket_request_payment( &self, input: GetBucketRequestPaymentRequest, ) -> Result<GetBucketRequestPaymentOutput, RusotoError<GetBucketRequestPaymentError>>19375     async fn get_bucket_request_payment(
19376         &self,
19377         input: GetBucketRequestPaymentRequest,
19378     ) -> Result<GetBucketRequestPaymentOutput, RusotoError<GetBucketRequestPaymentError>>;
19379 
19380     /// <p><p>Returns the tag set associated with the bucket.</p> <p>To use this operation, you must have permission to perform the <code>s3:GetBucketTagging</code> action. By default, the bucket owner has this permission and can grant this permission to others.</p> <p> <code>GetBucketTagging</code> has the following special error:</p> <ul> <li> <p>Error code: <code>NoSuchTagSetError</code> </p> <ul> <li> <p>Description: There is no tag set associated with the bucket.</p> </li> </ul> </li> </ul> <p>The following operations are related to <code>GetBucketTagging</code>:</p> <ul> <li> <p> <a>PutBucketTagging</a> </p> </li> <li> <p> <a>DeleteBucketTagging</a> </p> </li> </ul></p>
get_bucket_tagging( &self, input: GetBucketTaggingRequest, ) -> Result<GetBucketTaggingOutput, RusotoError<GetBucketTaggingError>>19381     async fn get_bucket_tagging(
19382         &self,
19383         input: GetBucketTaggingRequest,
19384     ) -> Result<GetBucketTaggingOutput, RusotoError<GetBucketTaggingError>>;
19385 
19386     /// <p><p>Returns the versioning state of a bucket.</p> <p>To retrieve the versioning state of a bucket, you must be the bucket owner.</p> <p>This implementation also returns the MFA Delete status of the versioning state. If the MFA Delete status is <code>enabled</code>, the bucket owner must use an authentication device to change the versioning state of the bucket.</p> <p>The following operations are related to <code>GetBucketVersioning</code>:</p> <ul> <li> <p> <a>GetObject</a> </p> </li> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a>DeleteObject</a> </p> </li> </ul></p>
get_bucket_versioning( &self, input: GetBucketVersioningRequest, ) -> Result<GetBucketVersioningOutput, RusotoError<GetBucketVersioningError>>19387     async fn get_bucket_versioning(
19388         &self,
19389         input: GetBucketVersioningRequest,
19390     ) -> Result<GetBucketVersioningOutput, RusotoError<GetBucketVersioningError>>;
19391 
19392     /// <p><p>Returns the website configuration for a bucket. To host website on Amazon S3, you can configure a bucket as website by adding a website configuration. For more information about hosting websites, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a>. </p> <p>This GET operation requires the <code>S3:GetBucketWebsite</code> permission. By default, only the bucket owner can read the bucket website configuration. However, bucket owners can allow other users to read the website configuration by writing a bucket policy granting them the <code>S3:GetBucketWebsite</code> permission.</p> <p>The following operations are related to <code>DeleteBucketWebsite</code>:</p> <ul> <li> <p> <a>DeleteBucketWebsite</a> </p> </li> <li> <p> <a>PutBucketWebsite</a> </p> </li> </ul></p>
get_bucket_website( &self, input: GetBucketWebsiteRequest, ) -> Result<GetBucketWebsiteOutput, RusotoError<GetBucketWebsiteError>>19393     async fn get_bucket_website(
19394         &self,
19395         input: GetBucketWebsiteRequest,
19396     ) -> Result<GetBucketWebsiteOutput, RusotoError<GetBucketWebsiteError>>;
19397 
19398     /// <p><p>Retrieves objects from Amazon S3. To use <code>GET</code>, you must have <code>READ</code> access to the object. If you grant <code>READ</code> access to the anonymous user, you can return the object without using an authorization header.</p> <p>An Amazon S3 bucket has no directory hierarchy such as you would find in a typical computer file system. You can, however, create a logical hierarchy by using object key names that imply a folder structure. For example, instead of naming an object <code>sample.jpg</code>, you can name it <code>photos/2006/February/sample.jpg</code>.</p> <p>To get an object from such a logical hierarchy, specify the full key name for the object in the <code>GET</code> operation. For a virtual hosted-style request example, if you have the object <code>photos/2006/February/sample.jpg</code>, specify the resource as <code>/photos/2006/February/sample.jpg</code>. For a path-style request example, if you have the object <code>photos/2006/February/sample.jpg</code> in the bucket named <code>examplebucket</code>, specify the resource as <code>/examplebucket/photos/2006/February/sample.jpg</code>. For more information about request types, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket">HTTP Host Header Bucket Specification</a>.</p> <p>To distribute large files to many people, you can save bandwidth costs by using BitTorrent. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.html">Amazon S3 Torrent</a>. For more information about returning the ACL of an object, see <a>GetObjectAcl</a>.</p> <p>If the object you are retrieving is stored in the GLACIER or DEEP_ARCHIVE storage classes, before you can retrieve the object you must first restore a copy using . Otherwise, this operation returns an <code>InvalidObjectStateError</code> error. For information about restoring archived objects, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html">Restoring Archived Objects</a>.</p> <p>Encryption request headers, like <code>x-amz-server-side-encryption</code>, should not be sent for GET requests if your object uses server-side encryption with CMKs stored in AWS KMS (SSE-KMS) or server-side encryption with Amazon S3–managed encryption keys (SSE-S3). If your object does use these types of keys, you’ll get an HTTP 400 BadRequest error.</p> <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p> <ul> <li> <p>x-amz-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key-MD5</p> </li> </ul> <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a>.</p> <p>Assuming you have permission to read object tags (permission for the <code>s3:GetObjectVersionTagging</code> action), the response also returns the <code>x-amz-tagging-count</code> header that provides the count of number of tags associated with the object. You can use <a>GetObjectTagging</a> to retrieve the tag set associated with an object.</p> <p> <b>Permissions</b> </p> <p>You need the <code>s3:GetObject</code> permission for this operation. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a>. If the object you request does not exist, the error Amazon S3 returns depends on whether you also have the <code>s3:ListBucket</code> permission.</p> <ul> <li> <p>If you have the <code>s3:ListBucket</code> permission on the bucket, Amazon S3 will return an HTTP status code 404 (&quot;no such key&quot;) error.</p> </li> <li> <p>If you don’t have the <code>s3:ListBucket</code> permission, Amazon S3 will return an HTTP status code 403 (&quot;access denied&quot;) error.</p> </li> </ul> <p> <b>Versioning</b> </p> <p>By default, the GET operation returns the current version of an object. To return a different version, use the <code>versionId</code> subresource.</p> <note> <p>If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes <code>x-amz-delete-marker: true</code> in the response.</p> </note> <p>For more information about versioning, see <a>PutBucketVersioning</a>. </p> <p> <b>Overriding Response Header Values</b> </p> <p>There are times when you want to override certain response header values in a GET response. For example, you might override the Content-Disposition response header value in your GET request.</p> <p>You can override values for a set of response headers using the following query parameters. These response header values are sent only on a successful request, that is, when status code 200 OK is returned. The set of headers you can override using these parameters is a subset of the headers that Amazon S3 accepts when you create an object. The response headers that you can override for the GET response are <code>Content-Type</code>, <code>Content-Language</code>, <code>Expires</code>, <code>Cache-Control</code>, <code>Content-Disposition</code>, and <code>Content-Encoding</code>. To override these header values in the GET response, you use the following request parameters.</p> <note> <p>You must sign the request, either using an Authorization header or a presigned URL, when using these parameters. They cannot be used with an unsigned (anonymous) request.</p> </note> <ul> <li> <p> <code>response-content-type</code> </p> </li> <li> <p> <code>response-content-language</code> </p> </li> <li> <p> <code>response-expires</code> </p> </li> <li> <p> <code>response-cache-control</code> </p> </li> <li> <p> <code>response-content-disposition</code> </p> </li> <li> <p> <code>response-content-encoding</code> </p> </li> </ul> <p> <b>Additional Considerations about Request Headers</b> </p> <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns 200 OK and the data requested. </p> <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns 304 Not Modified response code.</p> <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p> <p>The following operations are related to <code>GetObject</code>:</p> <ul> <li> <p> <a>ListBuckets</a> </p> </li> <li> <p> <a>GetObjectAcl</a> </p> </li> </ul></p>
get_object( &self, input: GetObjectRequest, ) -> Result<GetObjectOutput, RusotoError<GetObjectError>>19399     async fn get_object(
19400         &self,
19401         input: GetObjectRequest,
19402     ) -> Result<GetObjectOutput, RusotoError<GetObjectError>>;
19403 
19404     /// <p><p>Returns the access control list (ACL) of an object. To use this operation, you must have READ_ACP access to the object.</p> <p> <b>Versioning</b> </p> <p>By default, GET returns ACL information about the current version of an object. To return ACL information about a different version, use the versionId subresource.</p> <p>The following operations are related to <code>GetObjectAcl</code>:</p> <ul> <li> <p> <a>GetObject</a> </p> </li> <li> <p> <a>DeleteObject</a> </p> </li> <li> <p> <a>PutObject</a> </p> </li> </ul></p>
get_object_acl( &self, input: GetObjectAclRequest, ) -> Result<GetObjectAclOutput, RusotoError<GetObjectAclError>>19405     async fn get_object_acl(
19406         &self,
19407         input: GetObjectAclRequest,
19408     ) -> Result<GetObjectAclOutput, RusotoError<GetObjectAclError>>;
19409 
19410     /// <p>Gets an object's current Legal Hold status. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a>.</p>
get_object_legal_hold( &self, input: GetObjectLegalHoldRequest, ) -> Result<GetObjectLegalHoldOutput, RusotoError<GetObjectLegalHoldError>>19411     async fn get_object_legal_hold(
19412         &self,
19413         input: GetObjectLegalHoldRequest,
19414     ) -> Result<GetObjectLegalHoldOutput, RusotoError<GetObjectLegalHoldError>>;
19415 
19416     /// <p>Gets the Object Lock configuration for a bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a>.</p>
get_object_lock_configuration( &self, input: GetObjectLockConfigurationRequest, ) -> Result<GetObjectLockConfigurationOutput, RusotoError<GetObjectLockConfigurationError>>19417     async fn get_object_lock_configuration(
19418         &self,
19419         input: GetObjectLockConfigurationRequest,
19420     ) -> Result<GetObjectLockConfigurationOutput, RusotoError<GetObjectLockConfigurationError>>;
19421 
19422     /// <p>Retrieves an object's retention settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a>.</p>
get_object_retention( &self, input: GetObjectRetentionRequest, ) -> Result<GetObjectRetentionOutput, RusotoError<GetObjectRetentionError>>19423     async fn get_object_retention(
19424         &self,
19425         input: GetObjectRetentionRequest,
19426     ) -> Result<GetObjectRetentionOutput, RusotoError<GetObjectRetentionError>>;
19427 
19428     /// <p><p>Returns the tag-set of an object. You send the GET request against the tagging subresource associated with the object.</p> <p>To use this operation, you must have permission to perform the <code>s3:GetObjectTagging</code> action. By default, the GET operation returns information about current version of an object. For a versioned bucket, you can have multiple versions of an object in your bucket. To retrieve tags of any other version, use the versionId query parameter. You also need permission for the <code>s3:GetObjectVersionTagging</code> action.</p> <p> By default, the bucket owner has this permission and can grant this permission to others.</p> <p> For information about the Amazon S3 object tagging feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html">Object Tagging</a>.</p> <p>The following operation is related to <code>GetObjectTagging</code>:</p> <ul> <li> <p> <a>PutObjectTagging</a> </p> </li> </ul></p>
get_object_tagging( &self, input: GetObjectTaggingRequest, ) -> Result<GetObjectTaggingOutput, RusotoError<GetObjectTaggingError>>19429     async fn get_object_tagging(
19430         &self,
19431         input: GetObjectTaggingRequest,
19432     ) -> Result<GetObjectTaggingOutput, RusotoError<GetObjectTaggingError>>;
19433 
19434     /// <p><p>Return torrent files from a bucket. BitTorrent can save you bandwidth when you&#39;re distributing large files. For more information about BitTorrent, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.html">Amazon S3 Torrent</a>.</p> <note> <p>You can get torrent only for objects that are less than 5 GB in size and that are not encrypted using server-side encryption with customer-provided encryption key.</p> </note> <p>To use GET, you must have READ access to the object.</p> <p>The following operation is related to <code>GetObjectTorrent</code>:</p> <ul> <li> <p> <a>GetObject</a> </p> </li> </ul></p>
get_object_torrent( &self, input: GetObjectTorrentRequest, ) -> Result<GetObjectTorrentOutput, RusotoError<GetObjectTorrentError>>19435     async fn get_object_torrent(
19436         &self,
19437         input: GetObjectTorrentRequest,
19438     ) -> Result<GetObjectTorrentOutput, RusotoError<GetObjectTorrentError>>;
19439 
19440     /// <p><p>Retrieves the <code>PublicAccessBlock</code> configuration for an Amazon S3 bucket. To use this operation, you must have the <code>s3:GetBucketPublicAccessBlock</code> permission. For more information about Amazon S3 permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a>.</p> <important> <p>When Amazon S3 evaluates the <code>PublicAccessBlock</code> configuration for a bucket or an object, it checks the <code>PublicAccessBlock</code> configuration for both the bucket (or the bucket that contains the object) and the bucket owner&#39;s account. If the <code>PublicAccessBlock</code> settings are different between the bucket and the account, Amazon S3 uses the most restrictive combination of the bucket-level and account-level settings.</p> </important> <p>For more information about when Amazon S3 considers a bucket or an object public, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status">The Meaning of &quot;Public&quot;</a>.</p> <p>The following operations are related to <code>GetPublicAccessBlock</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html">Using Amazon S3 Block Public Access</a> </p> </li> <li> <p> <a>PutPublicAccessBlock</a> </p> </li> <li> <p> <a>GetPublicAccessBlock</a> </p> </li> <li> <p> <a>DeletePublicAccessBlock</a> </p> </li> </ul></p>
get_public_access_block( &self, input: GetPublicAccessBlockRequest, ) -> Result<GetPublicAccessBlockOutput, RusotoError<GetPublicAccessBlockError>>19441     async fn get_public_access_block(
19442         &self,
19443         input: GetPublicAccessBlockRequest,
19444     ) -> Result<GetPublicAccessBlockOutput, RusotoError<GetPublicAccessBlockError>>;
19445 
19446     /// <p>This operation is useful to determine if a bucket exists and you have permission to access it. The operation returns a <code>200 OK</code> if the bucket exists and you have permission to access it. Otherwise, the operation might return responses such as <code>404 Not Found</code> and <code>403 Forbidden</code>. </p> <p>To use this operation, you must have permissions to perform the <code>s3:ListBucket</code> action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p>
head_bucket( &self, input: HeadBucketRequest, ) -> Result<(), RusotoError<HeadBucketError>>19447     async fn head_bucket(
19448         &self,
19449         input: HeadBucketRequest,
19450     ) -> Result<(), RusotoError<HeadBucketError>>;
19451 
19452     /// <p><p>The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you&#39;re only interested in an object&#39;s metadata. To use HEAD, you must have READ access to the object.</p> <p>A <code>HEAD</code> request has the same options as a <code>GET</code> operation on an object. The response is identical to the <code>GET</code> response except that there is no response body.</p> <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the metadata from the object, you must use the following headers:</p> <ul> <li> <p>x-amz-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key-MD5</p> </li> </ul> <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a>.</p> <note> <p>Encryption request headers, like <code>x-amz-server-side-encryption</code>, should not be sent for GET requests if your object uses server-side encryption with CMKs stored in AWS KMS (SSE-KMS) or server-side encryption with Amazon S3–managed encryption keys (SSE-S3). If your object does use these types of keys, you’ll get an HTTP 400 BadRequest error.</p> </note> <p>Request headers are limited to 8 KB in size. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html">Common Request Headers</a>.</p> <p>Consider the following when using request headers:</p> <ul> <li> <p> Consideration 1 – If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p> <ul> <li> <p> <code>If-Match</code> condition evaluates to <code>true</code>, and;</p> </li> <li> <p> <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p> </li> </ul> <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p> </li> <li> <p> Consideration 2 – If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p> <ul> <li> <p> <code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p> </li> <li> <p> <code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p> </li> </ul> <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p> </li> </ul> <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p> <p> <b>Permissions</b> </p> <p>You need the <code>s3:GetObject</code> permission for this operation. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a>. If the object you request does not exist, the error Amazon S3 returns depends on whether you also have the s3:ListBucket permission.</p> <ul> <li> <p>If you have the <code>s3:ListBucket</code> permission on the bucket, Amazon S3 returns an HTTP status code 404 (&quot;no such key&quot;) error.</p> </li> <li> <p>If you don’t have the <code>s3:ListBucket</code> permission, Amazon S3 returns an HTTP status code 403 (&quot;access denied&quot;) error.</p> </li> </ul> <p>The following operation is related to <code>HeadObject</code>:</p> <ul> <li> <p> <a>GetObject</a> </p> </li> </ul></p>
head_object( &self, input: HeadObjectRequest, ) -> Result<HeadObjectOutput, RusotoError<HeadObjectError>>19453     async fn head_object(
19454         &self,
19455         input: HeadObjectRequest,
19456     ) -> Result<HeadObjectOutput, RusotoError<HeadObjectError>>;
19457 
19458     /// <p><p>Lists the analytics configurations for the bucket. You can have up to 1,000 analytics configurations per bucket.</p> <p>This operation supports list pagination and does not return more than 100 configurations at a time. You should always check the <code>IsTruncated</code> element in the response. If there are no more configurations to list, <code>IsTruncated</code> is set to false. If there are more configurations to list, <code>IsTruncated</code> is set to true, and there will be a value in <code>NextContinuationToken</code>. You use the <code>NextContinuationToken</code> value to continue the pagination of the list by passing the value in continuation-token in the request to <code>GET</code> the next page.</p> <p>To use this operation, you must have permissions to perform the <code>s3:GetAnalyticsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For information about Amazon S3 analytics feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html">Amazon S3 Analytics – Storage Class Analysis</a>. </p> <p>The following operations are related to <code>ListBucketAnalyticsConfigurations</code>:</p> <ul> <li> <p> <a>GetBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a>DeleteBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a>PutBucketAnalyticsConfiguration</a> </p> </li> </ul></p>
list_bucket_analytics_configurations( &self, input: ListBucketAnalyticsConfigurationsRequest, ) -> Result< ListBucketAnalyticsConfigurationsOutput, RusotoError<ListBucketAnalyticsConfigurationsError>, >19459     async fn list_bucket_analytics_configurations(
19460         &self,
19461         input: ListBucketAnalyticsConfigurationsRequest,
19462     ) -> Result<
19463         ListBucketAnalyticsConfigurationsOutput,
19464         RusotoError<ListBucketAnalyticsConfigurationsError>,
19465     >;
19466 
19467     /// <p><p>Returns a list of inventory configurations for the bucket. You can have up to 1,000 analytics configurations per bucket.</p> <p>This operation supports list pagination and does not return more than 100 configurations at a time. Always check the <code>IsTruncated</code> element in the response. If there are no more configurations to list, <code>IsTruncated</code> is set to false. If there are more configurations to list, <code>IsTruncated</code> is set to true, and there is a value in <code>NextContinuationToken</code>. You use the <code>NextContinuationToken</code> value to continue the pagination of the list by passing the value in continuation-token in the request to <code>GET</code> the next page.</p> <p> To use this operation, you must have permissions to perform the <code>s3:GetInventoryConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For information about the Amazon S3 inventory feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html">Amazon S3 Inventory</a> </p> <p>The following operations are related to <code>ListBucketInventoryConfigurations</code>:</p> <ul> <li> <p> <a>GetBucketInventoryConfiguration</a> </p> </li> <li> <p> <a>DeleteBucketInventoryConfiguration</a> </p> </li> <li> <p> <a>PutBucketInventoryConfiguration</a> </p> </li> </ul></p>
list_bucket_inventory_configurations( &self, input: ListBucketInventoryConfigurationsRequest, ) -> Result< ListBucketInventoryConfigurationsOutput, RusotoError<ListBucketInventoryConfigurationsError>, >19468     async fn list_bucket_inventory_configurations(
19469         &self,
19470         input: ListBucketInventoryConfigurationsRequest,
19471     ) -> Result<
19472         ListBucketInventoryConfigurationsOutput,
19473         RusotoError<ListBucketInventoryConfigurationsError>,
19474     >;
19475 
19476     /// <p><p>Lists the metrics configurations for the bucket. The metrics configurations are only for the request metrics of the bucket and do not provide information on daily storage metrics. You can have up to 1,000 configurations per bucket.</p> <p>This operation supports list pagination and does not return more than 100 configurations at a time. Always check the <code>IsTruncated</code> element in the response. If there are no more configurations to list, <code>IsTruncated</code> is set to false. If there are more configurations to list, <code>IsTruncated</code> is set to true, and there is a value in <code>NextContinuationToken</code>. You use the <code>NextContinuationToken</code> value to continue the pagination of the list by passing the value in <code>continuation-token</code> in the request to <code>GET</code> the next page.</p> <p>To use this operation, you must have permissions to perform the <code>s3:GetMetricsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For more information about metrics configurations and CloudWatch request metrics, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html">Monitoring Metrics with Amazon CloudWatch</a>.</p> <p>The following operations are related to <code>ListBucketMetricsConfigurations</code>:</p> <ul> <li> <p> <a>PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>GetBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>DeleteBucketMetricsConfiguration</a> </p> </li> </ul></p>
list_bucket_metrics_configurations( &self, input: ListBucketMetricsConfigurationsRequest, ) -> Result< ListBucketMetricsConfigurationsOutput, RusotoError<ListBucketMetricsConfigurationsError>, >19477     async fn list_bucket_metrics_configurations(
19478         &self,
19479         input: ListBucketMetricsConfigurationsRequest,
19480     ) -> Result<
19481         ListBucketMetricsConfigurationsOutput,
19482         RusotoError<ListBucketMetricsConfigurationsError>,
19483     >;
19484 
19485     /// <p>Returns a list of all buckets owned by the authenticated sender of the request.</p>
list_buckets(&self) -> Result<ListBucketsOutput, RusotoError<ListBucketsError>>19486     async fn list_buckets(&self) -> Result<ListBucketsOutput, RusotoError<ListBucketsError>>;
19487 
19488     /// <p><p>This operation lists in-progress multipart uploads. An in-progress multipart upload is a multipart upload that has been initiated using the Initiate Multipart Upload request, but has not yet been completed or aborted.</p> <p>This operation returns at most 1,000 multipart uploads in the response. 1,000 multipart uploads is the maximum number of uploads a response can include, which is also the default value. You can further limit the number of uploads in a response by specifying the <code>max-uploads</code> parameter in the response. If additional multipart uploads satisfy the list criteria, the response will contain an <code>IsTruncated</code> element with the value true. To list the additional multipart uploads, use the <code>key-marker</code> and <code>upload-id-marker</code> request parameters.</p> <p>In the response, the uploads are sorted by key. If your application has initiated more than one multipart upload using the same object key, then uploads in the response are first sorted by key. Additionally, uploads are sorted in ascending order within each key by the upload initiation time.</p> <p>For more information on multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html">Uploading Objects Using Multipart Upload</a>.</p> <p>For information on permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and Permissions</a>.</p> <p>The following operations are related to <code>ListMultipartUploads</code>:</p> <ul> <li> <p> <a>CreateMultipartUpload</a> </p> </li> <li> <p> <a>UploadPart</a> </p> </li> <li> <p> <a>CompleteMultipartUpload</a> </p> </li> <li> <p> <a>ListParts</a> </p> </li> <li> <p> <a>AbortMultipartUpload</a> </p> </li> </ul></p>
list_multipart_uploads( &self, input: ListMultipartUploadsRequest, ) -> Result<ListMultipartUploadsOutput, RusotoError<ListMultipartUploadsError>>19489     async fn list_multipart_uploads(
19490         &self,
19491         input: ListMultipartUploadsRequest,
19492     ) -> Result<ListMultipartUploadsOutput, RusotoError<ListMultipartUploadsError>>;
19493 
19494     /// <p><p>Returns metadata about all of the versions of objects in a bucket. You can also use request parameters as selection criteria to return metadata about a subset of all the object versions. </p> <note> <p> A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately.</p> </note> <p>To use this operation, you must have READ access to the bucket.</p> <p>The following operations are related to <code>ListObjectVersions</code>:</p> <ul> <li> <p> <a>ListObjectsV2</a> </p> </li> <li> <p> <a>GetObject</a> </p> </li> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a>DeleteObject</a> </p> </li> </ul></p>
list_object_versions( &self, input: ListObjectVersionsRequest, ) -> Result<ListObjectVersionsOutput, RusotoError<ListObjectVersionsError>>19495     async fn list_object_versions(
19496         &self,
19497         input: ListObjectVersionsRequest,
19498     ) -> Result<ListObjectVersionsOutput, RusotoError<ListObjectVersionsError>>;
19499 
19500     /// <p><p>Returns some or all (up to 1,000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK response can contain valid or invalid XML. Be sure to design your application to parse the contents of the response and handle it appropriately.</p> <important> <p>This API has been revised. We recommend that you use the newer version, <a>ListObjectsV2</a>, when developing applications. For backward compatibility, Amazon S3 continues to support <code>ListObjects</code>.</p> </important> <p>The following operations are related to <code>ListObjects</code>:</p> <ul> <li> <p> <a>ListObjectsV2</a> </p> </li> <li> <p> <a>GetObject</a> </p> </li> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>ListBuckets</a> </p> </li> </ul></p>
list_objects( &self, input: ListObjectsRequest, ) -> Result<ListObjectsOutput, RusotoError<ListObjectsError>>19501     async fn list_objects(
19502         &self,
19503         input: ListObjectsRequest,
19504     ) -> Result<ListObjectsOutput, RusotoError<ListObjectsError>>;
19505 
19506     /// <p><p>Returns some or all (up to 1,000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A <code>200 OK</code> response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately.</p> <p>To use this operation, you must have READ access to the bucket.</p> <p>To use this operation in an AWS Identity and Access Management (IAM) policy, you must have permissions to perform the <code>s3:ListBucket</code> action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <important> <p>This section describes the latest revision of the API. We recommend that you use this revised API for application development. For backward compatibility, Amazon S3 continues to support the prior version of this API, <a>ListObjects</a>.</p> </important> <p>To get a list of your buckets, see <a>ListBuckets</a>.</p> <p>The following operations are related to <code>ListObjectsV2</code>:</p> <ul> <li> <p> <a>GetObject</a> </p> </li> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a>CreateBucket</a> </p> </li> </ul></p>
list_objects_v2( &self, input: ListObjectsV2Request, ) -> Result<ListObjectsV2Output, RusotoError<ListObjectsV2Error>>19507     async fn list_objects_v2(
19508         &self,
19509         input: ListObjectsV2Request,
19510     ) -> Result<ListObjectsV2Output, RusotoError<ListObjectsV2Error>>;
19511 
19512     /// <p><p>Lists the parts that have been uploaded for a specific multipart upload. This operation must include the upload ID, which you obtain by sending the initiate multipart upload request (see <a>CreateMultipartUpload</a>). This request returns a maximum of 1,000 uploaded parts. The default number of parts returned is 1,000 parts. You can restrict the number of parts returned by specifying the <code>max-parts</code> request parameter. If your multipart upload consists of more than 1,000 parts, the response returns an <code>IsTruncated</code> field with the value of true, and a <code>NextPartNumberMarker</code> element. In subsequent <code>ListParts</code> requests you can include the part-number-marker query string parameter and set its value to the <code>NextPartNumberMarker</code> field value from the previous response.</p> <p>For more information on multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html">Uploading Objects Using Multipart Upload</a>.</p> <p>For information on permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and Permissions</a>.</p> <p>The following operations are related to <code>ListParts</code>:</p> <ul> <li> <p> <a>CreateMultipartUpload</a> </p> </li> <li> <p> <a>UploadPart</a> </p> </li> <li> <p> <a>CompleteMultipartUpload</a> </p> </li> <li> <p> <a>AbortMultipartUpload</a> </p> </li> <li> <p> <a>ListMultipartUploads</a> </p> </li> </ul></p>
list_parts( &self, input: ListPartsRequest, ) -> Result<ListPartsOutput, RusotoError<ListPartsError>>19513     async fn list_parts(
19514         &self,
19515         input: ListPartsRequest,
19516     ) -> Result<ListPartsOutput, RusotoError<ListPartsError>>;
19517 
19518     /// <p><p>Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration is a bucket-level feature that enables you to perform faster data transfers to Amazon S3.</p> <p> To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p> The Transfer Acceleration state of a bucket can be set to one of the following two values:</p> <ul> <li> <p> Enabled – Enables accelerated data transfers to the bucket.</p> </li> <li> <p> Suspended – Disables accelerated data transfers to the bucket.</p> </li> </ul> <p>The <a>GetBucketAccelerateConfiguration</a> operation returns the transfer acceleration state of a bucket.</p> <p>After setting the Transfer Acceleration state of a bucket to Enabled, it might take up to thirty minutes before the data transfer rates to the bucket increase.</p> <p> The name of the bucket used for Transfer Acceleration must be DNS-compliant and must not contain periods (&quot;.&quot;).</p> <p> For more information about transfer acceleration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html">Transfer Acceleration</a>.</p> <p>The following operations are related to <code>PutBucketAccelerateConfiguration</code>:</p> <ul> <li> <p> <a>GetBucketAccelerateConfiguration</a> </p> </li> <li> <p> <a>CreateBucket</a> </p> </li> </ul></p>
put_bucket_accelerate_configuration( &self, input: PutBucketAccelerateConfigurationRequest, ) -> Result<(), RusotoError<PutBucketAccelerateConfigurationError>>19519     async fn put_bucket_accelerate_configuration(
19520         &self,
19521         input: PutBucketAccelerateConfigurationRequest,
19522     ) -> Result<(), RusotoError<PutBucketAccelerateConfigurationError>>;
19523 
19524     /// <p><p>Sets the permissions on an existing bucket using access control lists (ACL). For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. To set the ACL of a bucket, you must have <code>WRITE_ACP</code> permission.</p> <p>You can use one of the following two ways to set a bucket&#39;s permissions:</p> <ul> <li> <p>Specify the ACL in the request body</p> </li> <li> <p>Specify permissions using request headers</p> </li> </ul> <note> <p>You cannot specify access permission using both the body and the request headers.</p> </note> <p>Depending on your application needs, you may choose to set the ACL on a bucket using either the request body or the headers. For example, if you have an existing application that updates a bucket ACL using the request body, then you can continue to use that approach.</p> <p> <b>Access Permissions</b> </p> <p>You can set access permissions using one of the following methods:</p> <ul> <li> <p>Specify a canned ACL with the <code>x-amz-acl</code> request header. Amazon S3 supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each canned ACL has a predefined set of grantees and permissions. Specify the canned ACL name as the value of <code>x-amz-acl</code>. If you use this header, you cannot use other access control-specific headers in your request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly with the <code>x-amz-grant-read</code>, <code>x-amz-grant-read-acp</code>, <code>x-amz-grant-write-acp</code>, and <code>x-amz-grant-full-control</code> headers. When using these headers, you specify explicit access permissions and grantees (AWS accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific headers, you cannot use the <code>x-amz-acl</code> header to set a canned ACL. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>.</p> <p>You specify each grantee as a type=value pair, where the type is one of the following:</p> <ul> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> </li> <li> <p> <code>id</code> – if the value specified is the canonical user ID of an AWS account</p> </li> <li> <p> <code>uri</code> – if you are granting permissions to a predefined group</p> </li> </ul> <p>For example, the following <code>x-amz-grant-write</code> header grants create, overwrite, and delete objects permission to LogDelivery group predefined by Amazon S3 and two AWS accounts identified by their email addresses.</p> <p> <code>x-amz-grant-write: uri=&quot;http://acs.amazonaws.com/groups/s3/LogDelivery&quot;, emailAddress=&quot;xyz@amazon.com&quot;, emailAddress=&quot;abc@amazon.com&quot; </code> </p> </li> </ul> <p>You can use either a canned ACL or specify access permissions explicitly. You cannot do both.</p> <p> <b>Grantee Values</b> </p> <p>You can specify the person (grantee) to whom you&#39;re assigning access rights (using request elements) in the following ways:</p> <ul> <li> <p>By Email address:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;AmazonCustomerByEmail&quot;&gt;&lt;EmailAddress&gt;&lt;&gt;Grantees@email.com&lt;&gt;&lt;/EmailAddress&gt;lt;/Grantee&gt;</code> </p> <p>The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl request, appears as the CanonicalUser.</p> </li> <li> <p>By the person&#39;s ID:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;CanonicalUser&quot;&gt;&lt;ID&gt;&lt;&gt;ID&lt;&gt;&lt;/ID&gt;&lt;DisplayName&gt;&lt;&gt;GranteesEmail&lt;&gt;&lt;/DisplayName&gt; &lt;/Grantee&gt;</code> </p> <p>DisplayName is optional and ignored in the request</p> </li> <li> <p>By URI:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;Group&quot;&gt;&lt;URI&gt;&lt;&gt;http://acs.amazonaws.com/groups/global/AuthenticatedUsers&lt;&gt;&lt;/URI&gt;&lt;/Grantee&gt;</code> </p> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>DeleteBucket</a> </p> </li> <li> <p> <a>GetObjectAcl</a> </p> </li> </ul></p>
put_bucket_acl( &self, input: PutBucketAclRequest, ) -> Result<(), RusotoError<PutBucketAclError>>19525     async fn put_bucket_acl(
19526         &self,
19527         input: PutBucketAclRequest,
19528     ) -> Result<(), RusotoError<PutBucketAclError>>;
19529 
19530     /// <p><p>Sets an analytics configuration for the bucket (specified by the analytics configuration ID). You can have up to 1,000 analytics configurations per bucket.</p> <p>You can choose to have storage class analysis export analysis reports sent to a comma-separated values (CSV) flat file. See the <code>DataExport</code> request element. Reports are updated daily and are based on the object filters that you configure. When selecting data export, you specify a destination bucket and an optional destination prefix where the file is written. You can export the data to a destination bucket in a different account. However, the destination bucket must be in the same Region as the bucket that you are making the PUT analytics configuration to. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html">Amazon S3 Analytics – Storage Class Analysis</a>. </p> <important> <p>You must create a bucket policy on the destination bucket where the exported file is written to grant permissions to Amazon S3 to write objects to the bucket. For an example policy, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9">Granting Permissions for Amazon S3 Inventory and Storage Class Analysis</a>.</p> </important> <p>To use this operation, you must have permissions to perform the <code>s3:PutAnalyticsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p class="title"> <b>Special Errors</b> </p> <ul> <li> <ul> <li> <p> <i>HTTP Error: HTTP 400 Bad Request</i> </p> </li> <li> <p> <i>Code: InvalidArgument</i> </p> </li> <li> <p> <i>Cause: Invalid argument.</i> </p> </li> </ul> </li> <li> <ul> <li> <p> <i>HTTP Error: HTTP 400 Bad Request</i> </p> </li> <li> <p> <i>Code: TooManyConfigurations</i> </p> </li> <li> <p> <i>Cause: You are attempting to create a new configuration but have already reached the 1,000-configuration limit.</i> </p> </li> </ul> </li> <li> <ul> <li> <p> <i>HTTP Error: HTTP 403 Forbidden</i> </p> </li> <li> <p> <i>Code: AccessDenied</i> </p> </li> <li> <p> <i>Cause: You are not the owner of the specified bucket, or you do not have the s3:PutAnalyticsConfiguration bucket permission to set the configuration on the bucket.</i> </p> </li> </ul> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> </p> </li> <li> <p> </p> </li> <li> <p> </p> </li> </ul></p>
put_bucket_analytics_configuration( &self, input: PutBucketAnalyticsConfigurationRequest, ) -> Result<(), RusotoError<PutBucketAnalyticsConfigurationError>>19531     async fn put_bucket_analytics_configuration(
19532         &self,
19533         input: PutBucketAnalyticsConfigurationRequest,
19534     ) -> Result<(), RusotoError<PutBucketAnalyticsConfigurationError>>;
19535 
19536     /// <p><p>Sets the <code>cors</code> configuration for your bucket. If the configuration exists, Amazon S3 replaces it.</p> <p>To use this operation, you must be allowed to perform the <code>s3:PutBucketCORS</code> action. By default, the bucket owner has this permission and can grant it to others.</p> <p>You set this configuration on a bucket so that the bucket can service cross-origin requests. For example, you might want to enable a request whose origin is <code>http://www.example.com</code> to access your Amazon S3 bucket at <code>my.example.bucket.com</code> by using the browser&#39;s <code>XMLHttpRequest</code> capability.</p> <p>To enable cross-origin resource sharing (CORS) on a bucket, you add the <code>cors</code> subresource to the bucket. The <code>cors</code> subresource is an XML document in which you configure rules that identify origins and the HTTP methods that can be executed on your bucket. The document is limited to 64 KB in size. </p> <p>When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against a bucket, it evaluates the <code>cors</code> configuration on the bucket and uses the first <code>CORSRule</code> rule that matches the incoming browser request to enable a cross-origin request. For a rule to match, the following conditions must be met:</p> <ul> <li> <p>The request&#39;s <code>Origin</code> header must match <code>AllowedOrigin</code> elements.</p> </li> <li> <p>The request method (for example, GET, PUT, HEAD, and so on) or the <code>Access-Control-Request-Method</code> header in case of a pre-flight <code>OPTIONS</code> request must be one of the <code>AllowedMethod</code> elements. </p> </li> <li> <p>Every header specified in the <code>Access-Control-Request-Headers</code> request header of a pre-flight request must match an <code>AllowedHeader</code> element. </p> </li> </ul> <p> For more information about CORS, go to <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html">Enabling Cross-Origin Resource Sharing</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>GetBucketCors</a> </p> </li> <li> <p> <a>DeleteBucketCors</a> </p> </li> <li> <p> <a>RESTOPTIONSobject</a> </p> </li> </ul></p>
put_bucket_cors( &self, input: PutBucketCorsRequest, ) -> Result<(), RusotoError<PutBucketCorsError>>19537     async fn put_bucket_cors(
19538         &self,
19539         input: PutBucketCorsRequest,
19540     ) -> Result<(), RusotoError<PutBucketCorsError>>;
19541 
19542     /// <p><p>This implementation of the <code>PUT</code> operation uses the <code>encryption</code> subresource to set the default encryption state of an existing bucket.</p> <p>This implementation of the <code>PUT</code> operation sets default encryption for a bucket using server-side encryption with Amazon S3-managed keys SSE-S3 or AWS KMS customer master keys (CMKs) (SSE-KMS).</p> <important> <p>This operation requires AWS Signature Version 4. For more information, see <a href="sig-v4-authenticating-requests.html"> Authenticating Requests (AWS Signature Version 4)</a>. </p> </important> <p>To use this operation, you must have permissions to perform the <code>s3:PutEncryptionConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the Amazon Simple Storage Service Developer Guide. </p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>GetBucketEncryption</a> </p> </li> <li> <p> <a>DeleteBucketEncryption</a> </p> </li> </ul></p>
put_bucket_encryption( &self, input: PutBucketEncryptionRequest, ) -> Result<(), RusotoError<PutBucketEncryptionError>>19543     async fn put_bucket_encryption(
19544         &self,
19545         input: PutBucketEncryptionRequest,
19546     ) -> Result<(), RusotoError<PutBucketEncryptionError>>;
19547 
19548     /// <p><p>This implementation of the <code>PUT</code> operation adds an inventory configuration (identified by the inventory ID) to the bucket. You can have up to 1,000 inventory configurations per bucket. </p> <p>Amazon S3 inventory generates inventories of the objects in the bucket on a daily or weekly basis, and the results are published to a flat file. The bucket that is inventoried is called the <i>source</i> bucket, and the bucket where the inventory flat file is stored is called the <i>destination</i> bucket. The <i>destination</i> bucket must be in the same AWS Region as the <i>source</i> bucket. </p> <p>When you configure an inventory for a <i>source</i> bucket, you specify the <i>destination</i> bucket where you want the inventory to be stored, and whether to generate the inventory daily or weekly. You can also configure what object metadata to include and whether to inventory all object versions or only current versions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//storage-inventory.html">Amazon S3 Inventory</a> in the Amazon Simple Storage Service Developer Guide.</p> <important> <p>You must create a bucket policy on the <i>destination</i> bucket to grant permissions to Amazon S3 to write objects to the bucket in the defined location. For an example policy, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9"> Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.</a> </p> </important> <p>To use this operation, you must have permissions to perform the <code>s3:PutInventoryConfiguration</code> action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the Amazon Simple Storage Service Developer Guide.</p> <p class="title"> <b>Special Errors</b> </p> <ul> <li> <p class="title"> <b>HTTP 400 Bad Request Error</b> </p> <ul> <li> <p> <i>Code:</i> InvalidArgument</p> </li> <li> <p> <i>Cause:</i> Invalid Argument</p> </li> </ul> </li> <li> <p class="title"> <b>HTTP 400 Bad Request Error</b> </p> <ul> <li> <p> <i>Code:</i> TooManyConfigurations</p> </li> <li> <p> <i>Cause:</i> You are attempting to create a new configuration but have already reached the 1,000-configuration limit. </p> </li> </ul> </li> <li> <p class="title"> <b>HTTP 403 Forbidden Error</b> </p> <ul> <li> <p> <i>Code:</i> AccessDenied</p> </li> <li> <p> <i>Cause:</i> You are not the owner of the specified bucket, or you do not have the <code>s3:PutInventoryConfiguration</code> bucket permission to set the configuration on the bucket </p> </li> </ul> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>GetBucketInventoryConfiguration</a> </p> </li> <li> <p> <a>DeleteBucketInventoryConfiguration</a> </p> </li> <li> <p> <a>ListBucketInventoryConfigurations</a> </p> </li> </ul></p>
put_bucket_inventory_configuration( &self, input: PutBucketInventoryConfigurationRequest, ) -> Result<(), RusotoError<PutBucketInventoryConfigurationError>>19549     async fn put_bucket_inventory_configuration(
19550         &self,
19551         input: PutBucketInventoryConfigurationRequest,
19552     ) -> Result<(), RusotoError<PutBucketInventoryConfigurationError>>;
19553 
19554     /// <p><important> <p>For an updated version of this API, see <a>PutBucketLifecycleConfiguration</a>. This version has been deprecated. Existing lifecycle configurations will work. For new lifecycle configurations, use the updated API. </p> </important> <p>Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. For information about lifecycle configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//object-lifecycle-mgmt.html">Object Lifecycle Management</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. </p> <p>By default, all Amazon S3 resources, including buckets, objects, and related subresources (for example, lifecycle configuration and website configuration) are private. Only the resource owner, the AWS account that created the resource, can access it. The resource owner can optionally grant access permissions to others by writing an access policy. For this operation, users must get the <code>s3:PutLifecycleConfiguration</code> permission.</p> <p>You can also explicitly deny permissions. Explicit denial also supersedes any other permissions. If you want to prevent users or accounts from removing or deleting objects from your bucket, you must deny them permissions for the following actions: </p> <ul> <li> <p> <code>s3:DeleteObject</code> </p> </li> <li> <p> <code>s3:DeleteObjectVersion</code> </p> </li> <li> <p> <code>s3:PutLifecycleConfiguration</code> </p> </li> </ul> <p>For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>For more examples of transitioning objects to storage classes such as STANDARD<em>IA or ONEZONE</em>IA, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//intro-lifecycle-rules.html#lifecycle-configuration-examples">Examples of Lifecycle Configuration</a>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>GetBucketLifecycle</a>(Deprecated)</p> </li> <li> <p> <a>GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> </p> </li> <li> <p>By default, a resource owner—in this case, a bucket owner, which is the AWS account that created the bucket—can perform any of the operations. A resource owner can also grant others permission to perform the operation. For more information, see the following topics in the Amazon Simple Storage Service Developer Guide: </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//using-with-s3-actions.html">Specifying Permissions in a Policy</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> </p> </li> </ul> </li> </ul></p>
put_bucket_lifecycle( &self, input: PutBucketLifecycleRequest, ) -> Result<(), RusotoError<PutBucketLifecycleError>>19555     async fn put_bucket_lifecycle(
19556         &self,
19557         input: PutBucketLifecycleRequest,
19558     ) -> Result<(), RusotoError<PutBucketLifecycleError>>;
19559 
19560     /// <p><p>Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. For information about lifecycle configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <note> <p>Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, or a combination of both. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility. For the related API description, see <a>PutBucketLifecycle</a>.</p> </note> <p> <b>Rules</b> </p> <p>You specify the lifecycle configuration in your request body. The lifecycle configuration is specified as XML consisting of one or more rules. Each rule consists of the following:</p> <ul> <li> <p>Filter identifying a subset of objects to which the rule applies. The filter can be based on a key name prefix, object tags, or a combination of both.</p> </li> <li> <p>Status whether the rule is in effect.</p> </li> <li> <p>One or more lifecycle transition and expiration actions that you want Amazon S3 to perform on the objects identified by the filter. If the state of your bucket is versioning-enabled or versioning-suspended, you can have many versions of the same object (one current version and zero or more noncurrent versions). Amazon S3 provides predefined actions that you can specify for current and noncurrent object versions.</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html">Object Lifecycle Management</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html">Lifecycle Configuration Elements</a>.</p> <p> <b>Permissions</b> </p> <p>By default, all Amazon S3 resources are private, including buckets, objects, and related subresources (for example, lifecycle configuration and website configuration). Only the resource owner (that is, the AWS account that created it) can access the resource. The resource owner can optionally grant access permissions to others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration permission.</p> <p>You can also explicitly deny permissions. Explicit deny also supersedes any other permissions. If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them permissions for the following actions:</p> <ul> <li> <p>s3:DeleteObject</p> </li> <li> <p>s3:DeleteObjectVersion</p> </li> <li> <p>s3:PutLifecycleConfiguration</p> </li> </ul> <p>For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>The following are related to <code>PutBucketLifecycleConfiguration</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-configuration-examples.html">Examples of Lifecycle Configuration</a> </p> </li> <li> <p> <a>GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a>DeleteBucketLifecycle</a> </p> </li> </ul></p>
put_bucket_lifecycle_configuration( &self, input: PutBucketLifecycleConfigurationRequest, ) -> Result<(), RusotoError<PutBucketLifecycleConfigurationError>>19561     async fn put_bucket_lifecycle_configuration(
19562         &self,
19563         input: PutBucketLifecycleConfigurationRequest,
19564     ) -> Result<(), RusotoError<PutBucketLifecycleConfigurationError>>;
19565 
19566     /// <p><p>Set the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters. All logs are saved to buckets in the same AWS Region as the source bucket. To set the logging status of a bucket, you must be the bucket owner.</p> <p>The bucket owner is automatically granted FULL_CONTROL to all logs. You use the <code>Grantee</code> request element to grant access to other people. The <code>Permissions</code> request element specifies the kind of access the grantee has to the logs.</p> <p> <b>Grantee Values</b> </p> <p>You can specify the person (grantee) to whom you&#39;re assigning access rights (using request elements) in the following ways:</p> <ul> <li> <p>By the person&#39;s ID:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;CanonicalUser&quot;&gt;&lt;ID&gt;&lt;&gt;ID&lt;&gt;&lt;/ID&gt;&lt;DisplayName&gt;&lt;&gt;GranteesEmail&lt;&gt;&lt;/DisplayName&gt; &lt;/Grantee&gt;</code> </p> <p>DisplayName is optional and ignored in the request.</p> </li> <li> <p>By Email address:</p> <p> <code> &lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;AmazonCustomerByEmail&quot;&gt;&lt;EmailAddress&gt;&lt;&gt;Grantees@email.com&lt;&gt;&lt;/EmailAddress&gt;&lt;/Grantee&gt;</code> </p> <p>The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl request, appears as the CanonicalUser.</p> </li> <li> <p>By URI:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;Group&quot;&gt;&lt;URI&gt;&lt;&gt;http://acs.amazonaws.com/groups/global/AuthenticatedUsers&lt;&gt;&lt;/URI&gt;&lt;/Grantee&gt;</code> </p> </li> </ul> <p>To enable logging, you use LoggingEnabled and its children request elements. To disable logging, you use an empty BucketLoggingStatus request element:</p> <p> <code>&lt;BucketLoggingStatus xmlns=&quot;http://doc.s3.amazonaws.com/2006-03-01&quot; /&gt;</code> </p> <p>For more information about server access logging, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerLogs.html">Server Access Logging</a>. </p> <p>For more information about creating a bucket, see <a>CreateBucket</a>. For more information about returning the logging status of a bucket, see <a>GetBucketLogging</a>.</p> <p>The following operations are related to <code>PutBucketLogging</code>:</p> <ul> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a>DeleteBucket</a> </p> </li> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>GetBucketLogging</a> </p> </li> </ul></p>
put_bucket_logging( &self, input: PutBucketLoggingRequest, ) -> Result<(), RusotoError<PutBucketLoggingError>>19567     async fn put_bucket_logging(
19568         &self,
19569         input: PutBucketLoggingRequest,
19570     ) -> Result<(), RusotoError<PutBucketLoggingError>>;
19571 
19572     /// <p><p>Sets a metrics configuration (specified by the metrics configuration ID) for the bucket. You can have up to 1,000 metrics configurations per bucket. If you&#39;re updating an existing metrics configuration, note that this is a full replacement of the existing metrics configuration. If you don&#39;t include the elements you want to keep, they are erased.</p> <p>To use this operation, you must have permissions to perform the <code>s3:PutMetricsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For information about CloudWatch request metrics for Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html">Monitoring Metrics with Amazon CloudWatch</a>.</p> <p>The following operations are related to <code>PutBucketMetricsConfiguration</code>:</p> <ul> <li> <p> <a>DeleteBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>ListBucketMetricsConfigurations</a> </p> </li> </ul> <p> <code>GetBucketLifecycle</code> has the following special error:</p> <ul> <li> <p>Error code: <code>TooManyConfigurations</code> </p> <ul> <li> <p>Description: You are attempting to create a new configuration but have already reached the 1,000-configuration limit.</p> </li> <li> <p>HTTP Status Code: HTTP 400 Bad Request</p> </li> </ul> </li> </ul></p>
put_bucket_metrics_configuration( &self, input: PutBucketMetricsConfigurationRequest, ) -> Result<(), RusotoError<PutBucketMetricsConfigurationError>>19573     async fn put_bucket_metrics_configuration(
19574         &self,
19575         input: PutBucketMetricsConfigurationRequest,
19576     ) -> Result<(), RusotoError<PutBucketMetricsConfigurationError>>;
19577 
19578     /// <p> No longer used, see the <a>PutBucketNotificationConfiguration</a> operation.</p>
put_bucket_notification( &self, input: PutBucketNotificationRequest, ) -> Result<(), RusotoError<PutBucketNotificationError>>19579     async fn put_bucket_notification(
19580         &self,
19581         input: PutBucketNotificationRequest,
19582     ) -> Result<(), RusotoError<PutBucketNotificationError>>;
19583 
19584     /// <p><p>Enables notifications of specified events for a bucket. For more information about event notifications, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html">Configuring Event Notifications</a>.</p> <p>Using this API, you can replace an existing notification configuration. The configuration is an XML file that defines the event types that you want Amazon S3 to publish and the destination where you want Amazon S3 to publish an event notification when it detects an event of the specified type.</p> <p>By default, your bucket has no event notifications configured. That is, the notification configuration will be an empty <code>NotificationConfiguration</code>.</p> <p> <code>&lt;NotificationConfiguration&gt;</code> </p> <p> <code>&lt;/NotificationConfiguration&gt;</code> </p> <p>This operation replaces the existing notification configuration with the configuration you include in the request body.</p> <p>After Amazon S3 receives this request, it first verifies that any Amazon Simple Notification Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS) destination exists, and that the bucket owner has permission to publish to it by sending a test notification. In the case of AWS Lambda destinations, Amazon S3 verifies that the Lambda function permissions grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html">Configuring Notifications for Amazon S3 Events</a>.</p> <p>You can disable notifications by adding the empty NotificationConfiguration element.</p> <p>By default, only the bucket owner can configure notifications on a bucket. However, bucket owners can use a bucket policy to grant permission to other users to set this configuration with <code>s3:PutBucketNotification</code> permission.</p> <note> <p>The PUT notification is an atomic operation. For example, suppose your notification configuration includes SNS topic, SQS queue, and Lambda function configurations. When you send a PUT request with this configuration, Amazon S3 sends test messages to your SNS topic. If the message fails, the entire PUT operation will fail, and Amazon S3 will not add the configuration to your bucket.</p> </note> <p> <b>Responses</b> </p> <p>If the configuration in the request body includes only one <code>TopicConfiguration</code> specifying only the <code>s3:ReducedRedundancyLostObject</code> event type, the response will also include the <code>x-amz-sns-test-message-id</code> header containing the message ID of the test notification sent to the topic.</p> <p>The following operation is related to <code>PutBucketNotificationConfiguration</code>:</p> <ul> <li> <p> <a>GetBucketNotificationConfiguration</a> </p> </li> </ul></p>
put_bucket_notification_configuration( &self, input: PutBucketNotificationConfigurationRequest, ) -> Result<(), RusotoError<PutBucketNotificationConfigurationError>>19585     async fn put_bucket_notification_configuration(
19586         &self,
19587         input: PutBucketNotificationConfigurationRequest,
19588     ) -> Result<(), RusotoError<PutBucketNotificationConfigurationError>>;
19589 
19590     /// <p><p>Applies an Amazon S3 bucket policy to an Amazon S3 bucket. If you are using an identity other than the root user of the AWS account that owns the bucket, the calling identity must have the <code>PutBucketPolicy</code> permissions on the specified bucket and belong to the bucket owner&#39;s account in order to use this operation.</p> <p>If you don&#39;t have <code>PutBucketPolic</code>y permissions, Amazon S3 returns a <code>403 Access Denied</code> error. If you have the correct permissions, but you&#39;re not using an identity that belongs to the bucket owner&#39;s account, Amazon S3 returns a <code>405 Method Not Allowed</code> error.</p> <important> <p> As a security precaution, the root user of the AWS account that owns a bucket can always use this operation, even if the policy explicitly denies the root user the ability to perform this action. </p> </important> <p>For more information about bucket policies, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html">Using Bucket Policies and User Policies</a>.</p> <p>The following operations are related to <code>PutBucketPolicy</code>:</p> <ul> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>DeleteBucket</a> </p> </li> </ul></p>
put_bucket_policy( &self, input: PutBucketPolicyRequest, ) -> Result<(), RusotoError<PutBucketPolicyError>>19591     async fn put_bucket_policy(
19592         &self,
19593         input: PutBucketPolicyRequest,
19594     ) -> Result<(), RusotoError<PutBucketPolicyError>>;
19595 
19596     /// <p><p> Creates a replication configuration or replaces an existing one. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html">Replication</a> in the <i>Amazon S3 Developer Guide</i>. </p> <note> <p>To perform this operation, the user or role performing the operation must have the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html">iam:PassRole</a> permission.</p> </note> <p>Specify the replication configuration in the request body. In the replication configuration, you provide the name of the destination bucket where you want Amazon S3 to replicate objects, the IAM role that Amazon S3 can assume to replicate objects on your behalf, and other relevant information.</p> <p>A replication configuration must include at least one rule, and can contain a maximum of 1,000. Each rule identifies a subset of objects to replicate by filtering the objects in the source bucket. To choose additional subsets of objects to replicate, add a rule for each subset. All rules must specify the same destination bucket.</p> <p>To specify a subset of the objects in the source bucket to apply a replication rule to, add the Filter element as a child of the Rule element. You can filter objects based on an object key prefix, one or more object tags, or both. When you add the Filter element in the configuration, you must also add the following elements: <code>DeleteMarkerReplication</code>, <code>Status</code>, and <code>Priority</code>.</p> <p>For information about enabling versioning on a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html">Using Versioning</a>.</p> <p>By default, a resource owner, in this case the AWS account that created the bucket, can perform this operation. The resource owner can also grant others permissions to perform the operation. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p> <b>Handling Replication of Encrypted Objects</b> </p> <p>By default, Amazon S3 doesn&#39;t replicate objects that are stored at rest using server-side encryption with CMKs stored in AWS KMS. To replicate AWS KMS-encrypted objects, add the following: <code>SourceSelectionCriteria</code>, <code>SseKmsEncryptedObjects</code>, <code>Status</code>, <code>EncryptionConfiguration</code>, and <code>ReplicaKmsKeyID</code>. For information about replication configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-config-for-kms-objects.html">Replicating Objects Created with SSE Using CMKs stored in AWS KMS</a>.</p> <p>For information on <code>PutBucketReplication</code> errors, see <a>ReplicationErrorCodeList</a> </p> <p>The following operations are related to <code>PutBucketReplication</code>:</p> <ul> <li> <p> <a>GetBucketReplication</a> </p> </li> <li> <p> <a>DeleteBucketReplication</a> </p> </li> </ul></p>
put_bucket_replication( &self, input: PutBucketReplicationRequest, ) -> Result<(), RusotoError<PutBucketReplicationError>>19597     async fn put_bucket_replication(
19598         &self,
19599         input: PutBucketReplicationRequest,
19600     ) -> Result<(), RusotoError<PutBucketReplicationError>>;
19601 
19602     /// <p><p>Sets the request payment configuration for a bucket. By default, the bucket owner pays for downloads from the bucket. This configuration parameter enables the bucket owner (only) to specify that the person requesting the download will be charged for the download. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html">Requester Pays Buckets</a>.</p> <p>The following operations are related to <code>PutBucketRequestPayment</code>:</p> <ul> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>GetBucketRequestPayment</a> </p> </li> </ul></p>
put_bucket_request_payment( &self, input: PutBucketRequestPaymentRequest, ) -> Result<(), RusotoError<PutBucketRequestPaymentError>>19603     async fn put_bucket_request_payment(
19604         &self,
19605         input: PutBucketRequestPaymentRequest,
19606     ) -> Result<(), RusotoError<PutBucketRequestPaymentError>>;
19607 
19608     /// <p><p>Sets the tags for a bucket.</p> <p>Use tags to organize your AWS bill to reflect your own cost structure. To do this, sign up to get your AWS account bill with tag key values included. Then, to see the cost of combined resources, organize your billing information according to resources with the same tag key values. For example, you can tag several resources with a specific application name, and then organize your billing information to see the total cost of that application across several services. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Cost Allocation and Tagging</a>.</p> <note> <p>Within a bucket, if you add a tag that has the same key as an existing tag, the new value overwrites the old value. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CostAllocTagging.html">Using Cost Allocation in Amazon S3 Bucket Tags</a>.</p> </note> <p>To use this operation, you must have permissions to perform the <code>s3:PutBucketTagging</code> action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p> <code>PutBucketTagging</code> has the following special errors:</p> <ul> <li> <p>Error code: <code>InvalidTagError</code> </p> <ul> <li> <p>Description: The tag provided was not a valid tag. This error can occur if the tag did not pass input validation. For information about tag restrictions, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2//allocation-tag-restrictions.html">User-Defined Tag Restrictions</a> and <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2//aws-tag-restrictions.html">AWS-Generated Cost Allocation Tag Restrictions</a>.</p> </li> </ul> </li> <li> <p>Error code: <code>MalformedXMLError</code> </p> <ul> <li> <p>Description: The XML provided does not match the schema.</p> </li> </ul> </li> <li> <p>Error code: <code>OperationAbortedError </code> </p> <ul> <li> <p>Description: A conflicting conditional operation is currently in progress against this resource. Please try again.</p> </li> </ul> </li> <li> <p>Error code: <code>InternalError</code> </p> <ul> <li> <p>Description: The service was unable to apply the provided tag to the bucket.</p> </li> </ul> </li> </ul> <p>The following operations are related to <code>PutBucketTagging</code>:</p> <ul> <li> <p> <a>GetBucketTagging</a> </p> </li> <li> <p> <a>DeleteBucketTagging</a> </p> </li> </ul></p>
put_bucket_tagging( &self, input: PutBucketTaggingRequest, ) -> Result<(), RusotoError<PutBucketTaggingError>>19609     async fn put_bucket_tagging(
19610         &self,
19611         input: PutBucketTaggingRequest,
19612     ) -> Result<(), RusotoError<PutBucketTaggingError>>;
19613 
19614     /// <p><p>Sets the versioning state of an existing bucket. To set the versioning state, you must be the bucket owner.</p> <p>You can set the versioning state with one of the following values:</p> <p> <b>Enabled</b>—Enables versioning for the objects in the bucket. All objects added to the bucket receive a unique version ID.</p> <p> <b>Suspended</b>—Disables versioning for the objects in the bucket. All objects added to the bucket receive the version ID null.</p> <p>If the versioning state has never been set on a bucket, it has no versioning state; a <a>GetBucketVersioning</a> request does not return a versioning state value.</p> <p>If the bucket owner enables MFA Delete in the bucket versioning configuration, the bucket owner must include the <code>x-amz-mfa request</code> header and the <code>Status</code> and the <code>MfaDelete</code> request elements in a request to set the versioning state of the bucket.</p> <important> <p>If you have an object expiration lifecycle policy in your non-versioned bucket and you want to maintain the same permanent delete behavior when you enable versioning, you must add a noncurrent expiration policy. The noncurrent expiration lifecycle policy will manage the deletes of the noncurrent object versions in the version-enabled bucket. (A version-enabled bucket maintains one current and zero or more noncurrent object versions.) For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-and-other-bucket-config">Lifecycle and Versioning</a>.</p> </important> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>DeleteBucket</a> </p> </li> <li> <p> <a>GetBucketVersioning</a> </p> </li> </ul></p>
put_bucket_versioning( &self, input: PutBucketVersioningRequest, ) -> Result<(), RusotoError<PutBucketVersioningError>>19615     async fn put_bucket_versioning(
19616         &self,
19617         input: PutBucketVersioningRequest,
19618     ) -> Result<(), RusotoError<PutBucketVersioningError>>;
19619 
19620     /// <p><p>Sets the configuration of the website that is specified in the <code>website</code> subresource. To configure a bucket as a website, you can add this subresource on the bucket with website configuration information such as the file name of the index document and any redirect rules. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a>.</p> <p>This PUT operation requires the <code>S3:PutBucketWebsite</code> permission. By default, only the bucket owner can configure the website attached to a bucket; however, bucket owners can allow other users to set the website configuration by writing a bucket policy that grants them the <code>S3:PutBucketWebsite</code> permission.</p> <p>To redirect all website requests sent to the bucket&#39;s website endpoint, you add a website configuration with the following elements. Because all requests are sent to another website, you don&#39;t need to provide index document name for the bucket.</p> <ul> <li> <p> <code>WebsiteConfiguration</code> </p> </li> <li> <p> <code>RedirectAllRequestsTo</code> </p> </li> <li> <p> <code>HostName</code> </p> </li> <li> <p> <code>Protocol</code> </p> </li> </ul> <p>If you want granular control over redirects, you can use the following elements to add routing rules that describe conditions for redirecting requests and information about the redirect destination. In this case, the website configuration must provide an index document for the bucket, because some requests might not be redirected. </p> <ul> <li> <p> <code>WebsiteConfiguration</code> </p> </li> <li> <p> <code>IndexDocument</code> </p> </li> <li> <p> <code>Suffix</code> </p> </li> <li> <p> <code>ErrorDocument</code> </p> </li> <li> <p> <code>Key</code> </p> </li> <li> <p> <code>RoutingRules</code> </p> </li> <li> <p> <code>RoutingRule</code> </p> </li> <li> <p> <code>Condition</code> </p> </li> <li> <p> <code>HttpErrorCodeReturnedEquals</code> </p> </li> <li> <p> <code>KeyPrefixEquals</code> </p> </li> <li> <p> <code>Redirect</code> </p> </li> <li> <p> <code>Protocol</code> </p> </li> <li> <p> <code>HostName</code> </p> </li> <li> <p> <code>ReplaceKeyPrefixWith</code> </p> </li> <li> <p> <code>ReplaceKeyWith</code> </p> </li> <li> <p> <code>HttpRedirectCode</code> </p> </li> </ul></p>
put_bucket_website( &self, input: PutBucketWebsiteRequest, ) -> Result<(), RusotoError<PutBucketWebsiteError>>19621     async fn put_bucket_website(
19622         &self,
19623         input: PutBucketWebsiteRequest,
19624     ) -> Result<(), RusotoError<PutBucketWebsiteError>>;
19625 
19626     /// <p><p>Adds an object to a bucket. You must have WRITE permissions on a bucket to add an object to it.</p> <p>Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added the entire object to the bucket.</p> <p>Amazon S3 is a distributed system. If it receives multiple write requests for the same object simultaneously, it overwrites all but the last object written. Amazon S3 does not provide object locking; if you need this, make sure to build it into your application layer or use versioning instead.</p> <p>To ensure that data is not corrupted traversing the network, use the <code>Content-MD5</code> header. When you use this header, Amazon S3 checks the object against the provided MD5 value and, if they do not match, returns an error. Additionally, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.</p> <note> <p>To configure your application to send the request headers before sending the request body, use the <code>100-continue</code> HTTP status code. For PUT operations, this helps you avoid sending the message body if the message is rejected based on the headers (for example, because authentication fails or a redirect occurs). For more information on the <code>100-continue</code> HTTP status code, see Section 8.2.3 of <a href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a>.</p> </note> <p>You can optionally request server-side encryption. With server-side encryption, Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts the data when you access it. You have the option to provide your own encryption key or use AWS managed encryption keys. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a>.</p> <dl> <dt>Access Permissions</dt> <dd> <p>You can optionally specify the accounts or groups that should be granted specific permissions on the new object. There are two ways to grant the permissions using the request headers:</p> <ul> <li> <p>Specify a canned ACL with the <code>x-amz-acl</code> request header. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly with the <code>x-amz-grant-read</code>, <code>x-amz-grant-read-acp</code>, <code>x-amz-grant-write-acp</code>, and <code>x-amz-grant-full-control</code> headers. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>.</p> </li> </ul> <p>You can use either a canned ACL or specify access permissions explicitly. You cannot do both.</p> </dd> <dt>Server-Side- Encryption-Specific Request Headers</dt> <dd> <p>You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption. Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. The option you use depends on whether you want to use AWS managed encryption keys or provide your own encryption key. </p> <ul> <li> <p>Use encryption keys managed by Amazon S3 or customer master keys (CMKs) stored in AWS Key Management Service (AWS KMS) – If you want AWS to manage the keys used to encrypt data, specify the following headers in the request.</p> <ul> <li> <p>x-amz-server-side​-encryption</p> </li> <li> <p>x-amz-server-side-encryption-aws-kms-key-id</p> </li> <li> <p>x-amz-server-side-encryption-context</p> </li> </ul> <note> <p>If you specify <code>x-amz-server-side-encryption:aws:kms</code>, but don&#39;t provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the AWS managed CMK in AWS KMS to protect the data. If you want to use a customer managed AWS KMS CMK, you must provide the <code>x-amz-server-side-encryption-aws-kms-key-id</code> of the symmetric customer managed CMK. Amazon S3 only supports symmetric CMKs and not asymmetric CMKs. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric Keys</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> </note> <important> <p>All GET and PUT requests for an object protected by AWS KMS fail if you don&#39;t make them with SSL or by using SigV4.</p> </important> <p>For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in AWS</a>.</p> </li> <li> <p>Use customer-provided encryption keys – If you want to manage your own encryption keys, provide all the following headers in the request.</p> <ul> <li> <p>x-amz-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key-MD5</p> </li> </ul> <p>For more information about server-side encryption with CMKs stored in KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in AWS</a>.</p> </li> </ul> </dd> <dt>Access-Control-List (ACL)-Specific Request Headers</dt> <dd> <p>You also can use the following access control–related headers with this operation. By default, all objects are private. Only the owner has full access control. When adding a new object, you can grant permissions to individual AWS accounts or to predefined groups defined by Amazon S3. These permissions are then added to the Access Control List (ACL) on the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. With this operation, you can grant access permissions using one of the following two methods:</p> <ul> <li> <p>Specify a canned ACL (<code>x-amz-acl</code>) — Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly — To explicitly grant access permissions to specific AWS accounts or groups, use the following headers. Each header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>. In the header, you specify a list of grantees who get the specific permission. To grant permissions explicitly use:</p> <ul> <li> <p>x-amz-grant-read</p> </li> <li> <p>x-amz-grant-write</p> </li> <li> <p>x-amz-grant-read-acp</p> </li> <li> <p>x-amz-grant-write-acp</p> </li> <li> <p>x-amz-grant-full-control</p> </li> </ul> <p>You specify each grantee as a type=value pair, where the type is one of the following:</p> <ul> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> <important> <p>Using email addresses to specify a grantee is only supported in the following AWS Regions: </p> <ul> <li> <p>US East (N. Virginia)</p> </li> <li> <p>US West (N. California)</p> </li> <li> <p> US West (Oregon)</p> </li> <li> <p> Asia Pacific (Singapore)</p> </li> <li> <p>Asia Pacific (Sydney)</p> </li> <li> <p>Asia Pacific (Tokyo)</p> </li> <li> <p>EU (Ireland)</p> </li> <li> <p>South America (São Paulo)</p> </li> </ul> <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the AWS General Reference</p> </important> </li> <li> <p> <code>id</code> – if the value specified is the canonical user ID of an AWS account</p> </li> <li> <p> <code>uri</code> – if you are granting permissions to a predefined group</p> </li> </ul> <p>For example, the following <code>x-amz-grant-read</code> header grants the AWS accounts identified by email addresses permissions to read object data and its metadata:</p> <p> <code>x-amz-grant-read: emailAddress=&quot;xyz@amazon.com&quot;, emailAddress=&quot;abc@amazon.com&quot; </code> </p> </li> </ul> </dd> <dt>Server-Side- Encryption-Specific Request Headers</dt> <dd> <p>You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption. Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. The option you use depends on whether you want to use AWS-managed encryption keys or provide your own encryption key. </p> <ul> <li> <p>Use encryption keys managed by Amazon S3 or customer master keys (CMKs) stored in AWS Key Management Service (AWS KMS) – If you want AWS to manage the keys used to encrypt data, specify the following headers in the request.</p> <ul> <li> <p>x-amz-server-side​-encryption</p> </li> <li> <p>x-amz-server-side-encryption-aws-kms-key-id</p> </li> <li> <p>x-amz-server-side-encryption-context</p> </li> </ul> <note> <p>If you specify <code>x-amz-server-side-encryption:aws:kms</code>, but don&#39;t provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the AWS managed CMK in AWS KMS to protect the data. If you want to use a customer managed AWS KMS CMK, you must provide the <code>x-amz-server-side-encryption-aws-kms-key-id</code> of the symmetric customer managed CMK. Amazon S3 only supports symmetric CMKs and not asymmetric CMKs. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric Keys</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> </note> <important> <p>All GET and PUT requests for an object protected by AWS KMS fail if you don&#39;t make them with SSL or by using SigV4.</p> </important> <p>For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS</a>.</p> </li> <li> <p>Use customer-provided encryption keys – If you want to manage your own encryption keys, provide all the following headers in the request.</p> <note> <p>If you use this feature, the ETag value that Amazon S3 returns in the response is not the MD5 of the object.</p> </note> <ul> <li> <p>x-amz-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key-MD5</p> </li> </ul> <p>For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS</a>.</p> </li> </ul> </dd> </dl> <p> <b>Storage Class Options</b> </p> <p>By default, Amazon S3 uses the Standard storage class to store newly created objects. The Standard storage class provides high durability and high availability. You can specify other storage classes depending on the performance needs. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the Amazon Simple Storage Service Developer Guide.</p> <p> <b>Versioning</b> </p> <p>If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response using the <code>x-amz-version-id response</code> header. If versioning is suspended, Amazon S3 always uses null as the version ID for the object stored. For more information about returning the versioning state of a bucket, see <a>GetBucketVersioning</a>. If you enable versioning for a bucket, when Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>CopyObject</a> </p> </li> <li> <p> <a>DeleteObject</a> </p> </li> </ul></p>
put_object( &self, input: PutObjectRequest, ) -> Result<PutObjectOutput, RusotoError<PutObjectError>>19627     async fn put_object(
19628         &self,
19629         input: PutObjectRequest,
19630     ) -> Result<PutObjectOutput, RusotoError<PutObjectError>>;
19631 
19632     /// <p><p>Uses the <code>acl</code> subresource to set the access control list (ACL) permissions for an object that already exists in a bucket. You must have <code>WRITE_ACP</code> permission to set the ACL of an object.</p> <p>Depending on your application needs, you can choose to set the ACL on an object using either the request body or the headers. For example, if you have an existing application that updates a bucket ACL using the request body, you can continue to use that approach.</p> <p> <b>Access Permissions</b> </p> <p>You can set access permissions using one of the following methods:</p> <ul> <li> <p>Specify a canned ACL with the <code>x-amz-acl</code> request header. Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. Specify the canned ACL name as the value of <code>x-amz-ac</code>l. If you use this header, you cannot use other access control-specific headers in your request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly with the <code>x-amz-grant-read</code>, <code>x-amz-grant-read-acp</code>, <code>x-amz-grant-write-acp</code>, and <code>x-amz-grant-full-control</code> headers. When using these headers, you specify explicit access permissions and grantees (AWS accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific headers, you cannot use <code>x-amz-acl</code> header to set a canned ACL. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>.</p> <p>You specify each grantee as a type=value pair, where the type is one of the following:</p> <ul> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> </li> <li> <p> <code>id</code> – if the value specified is the canonical user ID of an AWS account</p> </li> <li> <p> <code>uri</code> – if you are granting permissions to a predefined group</p> </li> </ul> <p>For example, the following <code>x-amz-grant-read</code> header grants list objects permission to the two AWS accounts identified by their email addresses.</p> <p> <code>x-amz-grant-read: emailAddress=&quot;xyz@amazon.com&quot;, emailAddress=&quot;abc@amazon.com&quot; </code> </p> </li> </ul> <p>You can use either a canned ACL or specify access permissions explicitly. You cannot do both.</p> <p> <b>Grantee Values</b> </p> <p>You can specify the person (grantee) to whom you&#39;re assigning access rights (using request elements) in the following ways:</p> <ul> <li> <p>By Email address:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;AmazonCustomerByEmail&quot;&gt;&lt;EmailAddress&gt;&lt;&gt;Grantees@email.com&lt;&gt;&lt;/EmailAddress&gt;lt;/Grantee&gt;</code> </p> <p>The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl request, appears as the CanonicalUser.</p> </li> <li> <p>By the person&#39;s ID:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;CanonicalUser&quot;&gt;&lt;ID&gt;&lt;&gt;ID&lt;&gt;&lt;/ID&gt;&lt;DisplayName&gt;&lt;&gt;GranteesEmail&lt;&gt;&lt;/DisplayName&gt; &lt;/Grantee&gt;</code> </p> <p>DisplayName is optional and ignored in the request.</p> </li> <li> <p>By URI:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;Group&quot;&gt;&lt;URI&gt;&lt;&gt;http://acs.amazonaws.com/groups/global/AuthenticatedUsers&lt;&gt;&lt;/URI&gt;&lt;/Grantee&gt;</code> </p> </li> </ul> <p> <b>Versioning</b> </p> <p>The ACL of an object is set at the object version level. By default, PUT sets the ACL of the current version of an object. To set the ACL of a different version, use the <code>versionId</code> subresource.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>CopyObject</a> </p> </li> <li> <p> <a>GetObject</a> </p> </li> </ul></p>
put_object_acl( &self, input: PutObjectAclRequest, ) -> Result<PutObjectAclOutput, RusotoError<PutObjectAclError>>19633     async fn put_object_acl(
19634         &self,
19635         input: PutObjectAclRequest,
19636     ) -> Result<PutObjectAclOutput, RusotoError<PutObjectAclError>>;
19637 
19638     /// <p><p>Applies a Legal Hold configuration to the specified object.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a> </p> </li> </ul></p>
put_object_legal_hold( &self, input: PutObjectLegalHoldRequest, ) -> Result<PutObjectLegalHoldOutput, RusotoError<PutObjectLegalHoldError>>19639     async fn put_object_legal_hold(
19640         &self,
19641         input: PutObjectLegalHoldRequest,
19642     ) -> Result<PutObjectLegalHoldOutput, RusotoError<PutObjectLegalHoldError>>;
19643 
19644     /// <p><p>Places an Object Lock configuration on the specified bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket.</p> <note> <p> <code>DefaultRetention</code> requires either Days or Years. You can&#39;t specify both at the same time.</p> </note> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a> </p> </li> </ul></p>
put_object_lock_configuration( &self, input: PutObjectLockConfigurationRequest, ) -> Result<PutObjectLockConfigurationOutput, RusotoError<PutObjectLockConfigurationError>>19645     async fn put_object_lock_configuration(
19646         &self,
19647         input: PutObjectLockConfigurationRequest,
19648     ) -> Result<PutObjectLockConfigurationOutput, RusotoError<PutObjectLockConfigurationError>>;
19649 
19650     /// <p><p>Places an Object Retention configuration on an object.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a> </p> </li> </ul></p>
put_object_retention( &self, input: PutObjectRetentionRequest, ) -> Result<PutObjectRetentionOutput, RusotoError<PutObjectRetentionError>>19651     async fn put_object_retention(
19652         &self,
19653         input: PutObjectRetentionRequest,
19654     ) -> Result<PutObjectRetentionOutput, RusotoError<PutObjectRetentionError>>;
19655 
19656     /// <p><p>Sets the supplied tag-set to an object that already exists in a bucket</p> <p>A tag is a key-value pair. You can associate tags with an object by sending a PUT request against the tagging subresource that is associated with the object. You can retrieve tags by sending a GET request. For more information, see <a>GetObjectTagging</a>.</p> <p>For tagging-related restrictions related to characters and encodings, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html">Tag Restrictions</a>. Note that Amazon S3 limits the maximum number of tags to 10 tags per object.</p> <p>To use this operation, you must have permission to perform the <code>s3:PutObjectTagging</code> action. By default, the bucket owner has this permission and can grant this permission to others.</p> <p>To put tags of any other version, use the <code>versionId</code> query parameter. You also need permission for the <code>s3:PutObjectVersionTagging</code> action.</p> <p>For information about the Amazon S3 object tagging feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html">Object Tagging</a>.</p> <p class="title"> <b>Special Errors</b> </p> <ul> <li> <p class="title"> <b/> </p> <ul> <li> <p> <i>Code: InvalidTagError </i> </p> </li> <li> <p> <i>Cause: The tag provided was not a valid tag. This error can occur if the tag did not pass input validation. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html">Object Tagging</a>.</i> </p> </li> </ul> </li> <li> <p class="title"> <b/> </p> <ul> <li> <p> <i>Code: MalformedXMLError </i> </p> </li> <li> <p> <i>Cause: The XML provided does not match the schema.</i> </p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code: OperationAbortedError </i> </p> </li> <li> <p> <i>Cause: A conflicting conditional operation is currently in progress against this resource. Please try again.</i> </p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code: InternalError</i> </p> </li> <li> <p> <i>Cause: The service was unable to apply the provided tag to the object.</i> </p> </li> </ul> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>GetObjectTagging</a> </p> </li> </ul></p>
put_object_tagging( &self, input: PutObjectTaggingRequest, ) -> Result<PutObjectTaggingOutput, RusotoError<PutObjectTaggingError>>19657     async fn put_object_tagging(
19658         &self,
19659         input: PutObjectTaggingRequest,
19660     ) -> Result<PutObjectTaggingOutput, RusotoError<PutObjectTaggingError>>;
19661 
19662     /// <p><p>Creates or modifies the <code>PublicAccessBlock</code> configuration for an Amazon S3 bucket. To use this operation, you must have the <code>s3:PutBucketPublicAccessBlock</code> permission. For more information about Amazon S3 permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a>.</p> <important> <p>When Amazon S3 evaluates the <code>PublicAccessBlock</code> configuration for a bucket or an object, it checks the <code>PublicAccessBlock</code> configuration for both the bucket (or the bucket that contains the object) and the bucket owner&#39;s account. If the <code>PublicAccessBlock</code> configurations are different between the bucket and the account, Amazon S3 uses the most restrictive combination of the bucket-level and account-level settings.</p> </important> <p>For more information about when Amazon S3 considers a bucket or an object public, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status">The Meaning of &quot;Public&quot;</a>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>GetPublicAccessBlock</a> </p> </li> <li> <p> <a>DeletePublicAccessBlock</a> </p> </li> <li> <p> <a>GetBucketPolicyStatus</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html">Using Amazon S3 Block Public Access</a> </p> </li> </ul></p>
put_public_access_block( &self, input: PutPublicAccessBlockRequest, ) -> Result<(), RusotoError<PutPublicAccessBlockError>>19663     async fn put_public_access_block(
19664         &self,
19665         input: PutPublicAccessBlockRequest,
19666     ) -> Result<(), RusotoError<PutPublicAccessBlockError>>;
19667 
19668     /// <p><p>Restores an archived copy of an object back into Amazon S3</p> <p>This operation performs the following types of requests: </p> <ul> <li> <p> <code>select</code> - Perform a select query on an archived object</p> </li> <li> <p> <code>restore an archive</code> - Restore an archived object</p> </li> </ul> <p>To use this operation, you must have permissions to perform the <code>s3:RestoreObject</code> and <code>s3:GetObject</code> actions. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p> <b>Querying Archives with Select Requests</b> </p> <p>You use a select type of request to perform SQL queries on archived objects. The archived objects that are being queried by the select request must be formatted as uncompressed comma-separated values (CSV) files. You can run queries and custom analytics on your archived data without having to restore your data to a hotter Amazon S3 tier. For an overview about select requests, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html">Querying Archived Objects</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>When making a select request, do the following:</p> <ul> <li> <p>Define an output location for the select query&#39;s output. This must be an Amazon S3 bucket in the same AWS Region as the bucket that contains the archive object that is being queried. The AWS account that initiates the job must have permissions to write to the S3 bucket. You can specify the storage class and encryption for the output objects stored in the bucket. For more information about output, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html">Querying Archived Objects</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>For more information about the <code>S3</code> structure in the request body, see the following:</p> <ul> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Managing Access with ACLs</a> in the <i>Amazon Simple Storage Service Developer Guide</i> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Protecting Data Using Server-Side Encryption</a> in the <i>Amazon Simple Storage Service Developer Guide</i> </p> </li> </ul> </li> <li> <p>Define the SQL expression for the <code>SELECT</code> type of restoration for your query in the request body&#39;s <code>SelectParameters</code> structure. You can use expressions like the following examples.</p> <ul> <li> <p>The following expression returns all records from the specified object.</p> <p> <code>SELECT * FROM Object</code> </p> </li> <li> <p>Assuming that you are not using any headers for data stored in the object, you can specify columns with positional headers.</p> <p> <code>SELECT s.<em>1, s.</em>2 FROM Object s WHERE s.<em>3 &gt; 100</code> </p> </li> <li> <p>If you have headers and you set the <code>fileHeaderInfo</code> in the <code>CSV</code> structure in the request body to <code>USE</code>, you can specify headers in the query. (If you set the <code>fileHeaderInfo</code> field to <code>IGNORE</code>, the first row is skipped for the query.) You cannot mix ordinal positions with header column names. </p> <p> <code>SELECT s.Id, s.FirstName, s.SSN FROM S3Object s</code> </p> </li> </ul> </li> </ul> <p>For more information about using SQL with Glacier Select restore, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html">SQL Reference for Amazon S3 Select and Glacier Select</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. </p> <p>When making a select request, you can also do the following:</p> <ul> <li> <p>To expedite your queries, specify the <code>Expedited</code> tier. For more information about tiers, see &quot;Restoring Archives,&quot; later in this topic.</p> </li> <li> <p>Specify details about the data serialization format of both the input object that is being queried and the serialization of the CSV-encoded query results.</p> </li> </ul> <p>The following are additional important facts about the select feature:</p> <ul> <li> <p>The output results are new Amazon S3 objects. Unlike archive retrievals, they are stored until explicitly deleted-manually or through a lifecycle policy.</p> </li> <li> <p>You can issue more than one select request on the same Amazon S3 object. Amazon S3 doesn&#39;t deduplicate requests, so avoid issuing duplicate requests.</p> </li> <li> <p> Amazon S3 accepts a select request even if the object has already been restored. A select request doesn’t return error response <code>409</code>.</p> </li> </ul> <p> <b>Restoring Archives</b> </p> <p>Objects in the GLACIER and DEEP</em>ARCHIVE storage classes are archived. To access an archived object, you must first initiate a restore request. This restores a temporary copy of the archived object. In a restore request, you specify the number of days that you want the restored copy to exist. After the specified period, Amazon S3 deletes the temporary copy but the object remains archived in the GLACIER or DEEP<em>ARCHIVE storage class that object was restored from. </p> <p>To restore a specific object version, you can provide a version ID. If you don&#39;t provide a version ID, Amazon S3 restores the current version.</p> <p>The time it takes restore jobs to finish depends on which storage class the object is being restored from and which data access tier you specify. </p> <p>When restoring an archived object (or using a select request), you can specify one of the following data access tier options in the <code>Tier</code> element of the request body: </p> <ul> <li> <p> <b> <code>Expedited</code> </b> - Expedited retrievals allow you to quickly access your data stored in the GLACIER storage class when occasional urgent requests for a subset of archives are required. For all but the largest archived objects (250 MB+), data accessed using Expedited retrievals are typically made available within 1–5 minutes. Provisioned capacity ensures that retrieval capacity for Expedited retrievals is available when you need it. Expedited retrievals and provisioned capacity are not available for the DEEP</em>ARCHIVE storage class.</p> </li> <li> <p> <b> <code>Standard</code> </b> - Standard retrievals allow you to access any of your archived objects within several hours. This is the default option for the GLACIER and DEEP<em>ARCHIVE retrieval requests that do not specify the retrieval option. Standard retrievals typically complete within 3-5 hours from the GLACIER storage class and typically complete within 12 hours from the DEEP</em>ARCHIVE storage class. </p> </li> <li> <p> <b> <code>Bulk</code> </b> - Bulk retrievals are Amazon S3 Glacier’s lowest-cost retrieval option, enabling you to retrieve large amounts, even petabytes, of data inexpensively in a day. Bulk retrievals typically complete within 5-12 hours from the GLACIER storage class and typically complete within 48 hours from the DEEP_ARCHIVE storage class.</p> </li> </ul> <p>For more information about archive retrieval options and provisioned capacity for <code>Expedited</code> data access, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html">Restoring Archived Objects</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. </p> <p>You can use Amazon S3 restore speed upgrade to change the restore speed to a faster speed while it is in progress. You upgrade the speed of an in-progress restoration by issuing another restore request to the same object, setting a new <code>Tier</code> request element. When issuing a request to upgrade the restore tier, you must choose a tier that is faster than the tier that the in-progress restore is using. You must not change any other parameters, such as the <code>Days</code> request element. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html#restoring-objects-upgrade-tier.title.html"> Upgrading the Speed of an In-Progress Restore</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. </p> <p>To get the status of object restoration, you can send a <code>HEAD</code> request. Operations return the <code>x-amz-restore</code> header, which provides information about the restoration status, in the response. You can use Amazon S3 event notifications to notify you when a restore is initiated or completed. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html">Configuring Amazon S3 Event Notifications</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>After restoring an archived object, you can update the restoration period by reissuing the request with a new period. Amazon S3 updates the restoration period relative to the current time and charges only for the request-there are no data transfer charges. You cannot update the restoration period when Amazon S3 is actively processing your current restore request for the object.</p> <p>If your bucket has a lifecycle configuration with a rule that includes an expiration action, the object expiration overrides the life span that you specify in a restore request. For example, if you restore an object copy for 10 days, but the object is scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days. For more information about lifecycle configuration, see <a>PutBucketLifecycleConfiguration</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html">Object Lifecycle Management</a> in <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p> <b>Responses</b> </p> <p>A successful operation returns either the <code>200 OK</code> or <code>202 Accepted</code> status code. </p> <ul> <li> <p>If the object copy is not previously restored, then Amazon S3 returns <code>202 Accepted</code> in the response. </p> </li> <li> <p>If the object copy is previously restored, Amazon S3 returns <code>200 OK</code> in the response. </p> </li> </ul> <p class="title"> <b>Special Errors</b> </p> <ul> <li> <p class="title"> <b/> </p> <ul> <li> <p> <i>Code: RestoreAlreadyInProgress</i> </p> </li> <li> <p> <i>Cause: Object restore is already in progress. (This error does not apply to SELECT type requests.)</i> </p> </li> <li> <p> <i>HTTP Status Code: 409 Conflict</i> </p> </li> <li> <p> <i>SOAP Fault Code Prefix: Client</i> </p> </li> </ul> </li> <li> <p class="title"> <b/> </p> <ul> <li> <p> <i>Code: GlacierExpeditedRetrievalNotAvailable</i> </p> </li> <li> <p> <i>Cause: Glacier expedited retrievals are currently not available. Try again later. (Returned if there is insufficient capacity to process the Expedited request. This error applies only to Expedited retrievals and not to Standard or Bulk retrievals.)</i> </p> </li> <li> <p> <i>HTTP Status Code: 503</i> </p> </li> <li> <p> <i>SOAP Fault Code Prefix: N/A</i> </p> </li> </ul> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>PutBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a>GetBucketNotificationConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html">SQL Reference for Amazon S3 Select and Glacier Select </a> in the <i>Amazon Simple Storage Service Developer Guide</i> </p> </li> </ul></p>
restore_object( &self, input: RestoreObjectRequest, ) -> Result<RestoreObjectOutput, RusotoError<RestoreObjectError>>19669     async fn restore_object(
19670         &self,
19671         input: RestoreObjectRequest,
19672     ) -> Result<RestoreObjectOutput, RusotoError<RestoreObjectError>>;
19673 
19674     /// <p><p>This operation filters the contents of an Amazon S3 object based on a simple structured query language (SQL) statement. In the request, along with the SQL expression, you must also specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses this format to parse object data into records, and returns only records that match the specified SQL expression. You must also specify the data serialization format for the response.</p> <p>For more information about Amazon S3 Select, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/selecting-content-from-objects.html">Selecting Content from Objects</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>For more information about using SQL with Amazon S3 Select, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html"> SQL Reference for Amazon S3 Select and Glacier Select</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p/> <p> <b>Permissions</b> </p> <p>You must have <code>s3:GetObject</code> permission for this operation. Amazon S3 Select does not support anonymous access. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p/> <p> <i>Object Data Formats</i> </p> <p>You can use Amazon S3 Select to query objects that have the following format properties:</p> <ul> <li> <p> <i>CSV, JSON, and Parquet</i> - Objects must be in CSV, JSON, or Parquet format.</p> </li> <li> <p> <i>UTF-8</i> - UTF-8 is the only encoding type Amazon S3 Select supports.</p> </li> <li> <p> <i>GZIP or BZIP2</i> - CSV and JSON files can be compressed using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support whole-object compression for Parquet objects.</p> </li> <li> <p> <i>Server-side encryption</i> - Amazon S3 Select supports querying objects that are protected with server-side encryption.</p> <p>For objects that are encrypted with customer-provided encryption keys (SSE-C), you must use HTTPS, and you must use the headers that are documented in the <a>GetObject</a>. For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>For objects that are encrypted with Amazon S3 managed encryption keys (SSE-S3) and customer master keys (CMKs) stored in AWS Key Management Service (SSE-KMS), server-side encryption is handled transparently, so you don&#39;t need to specify anything. For more information about server-side encryption, including SSE-S3 and SSE-KMS, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Protecting Data Using Server-Side Encryption</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> </li> </ul> <p> <b>Working with the Response Body</b> </p> <p>Given the response size is unknown, Amazon S3 Select streams the response as a series of messages and includes a <code>Transfer-Encoding</code> header with <code>chunked</code> as its value in the response. For more information, see <a>RESTSelectObjectAppendix</a> .</p> <p/> <p> <b>GetObject Support</b> </p> <p>The <code>SelectObjectContent</code> operation does not support the following <code>GetObject</code> functionality. For more information, see <a>GetObject</a>.</p> <ul> <li> <p> <code>Range</code>: While you can specify a scan range for a Amazon S3 Select request, see <a>SelectObjectContentRequest$ScanRange</a> in the request parameters below, you cannot specify the range of bytes of an object to return. </p> </li> <li> <p>GLACIER, DEEP<em>ARCHIVE and REDUCED</em>REDUNDANCY storage classes: You cannot specify the GLACIER, DEEP<em>ARCHIVE, or <code>REDUCED</em>REDUNDANCY</code> storage classes. For more information, about storage classes see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#storage-class-intro">Storage Classes</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> </li> </ul> <p/> <p> <b>Special Errors</b> </p> <p>For a list of special errors for this operation and for general information about Amazon S3 errors and a list of error codes, see <a>ErrorResponses</a> </p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>GetObject</a> </p> </li> <li> <p> <a>GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a>PutBucketLifecycleConfiguration</a> </p> </li> </ul></p>
select_object_content( &self, input: SelectObjectContentRequest, ) -> Result<SelectObjectContentOutput, RusotoError<SelectObjectContentError>>19675     async fn select_object_content(
19676         &self,
19677         input: SelectObjectContentRequest,
19678     ) -> Result<SelectObjectContentOutput, RusotoError<SelectObjectContentError>>;
19679 
19680     /// <p><p>Uploads a part in a multipart upload.</p> <note> <p>In this operation, you provide part data in your request. However, you have an option to specify your existing Amazon S3 object as a data source for the part you are uploading. To upload a part from an existing object, you use the <a>UploadPartCopy</a> operation. </p> </note> <p>You must initiate a multipart upload (see <a>CreateMultipartUpload</a>) before you can upload any part. In response to your initiate request, Amazon S3 returns an upload ID, a unique identifier, that you must include in your upload part request.</p> <p>Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely identifies a part and also defines its position within the object being created. If you upload a new part using the same part number that was used with a previous part, the previously uploaded part is overwritten. Each part must be at least 5 MB in size, except the last part. There is no size limit on the last part of your multipart upload.</p> <p>To ensure that data is not corrupted when traversing the network, specify the <code>Content-MD5</code> header in the upload part request. Amazon S3 checks the part data against the provided MD5 value. If they do not match, Amazon S3 returns an error. </p> <p> <b>Note:</b> After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.</p> <p>For more information on multipart uploads, go to <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html">Multipart Upload Overview</a> in the <i>Amazon Simple Storage Service Developer Guide </i>.</p> <p>For information on the permissions required to use the multipart upload API, go to <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and Permissions</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>You can optionally request server-side encryption where Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it for you when you access it. You have the option of providing your own encryption key, or you can use the AWS managed encryption keys. If you choose to provide your own encryption key, the request headers you provide in the request must match the headers you used in the request to initiate the upload by using <a>CreateMultipartUpload</a>. For more information, go to <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>Server-side encryption is supported by the S3 Multipart Upload actions. Unless you are using a customer-provided encryption key, you don&#39;t need to specify the encryption parameters in each UploadPart request. Instead, you only need to specify the server-side encryption parameters in the initial Initiate Multipart request. For more information, see <a>CreateMultipartUpload</a>.</p> <p>If you requested server-side encryption using a customer-provided encryption key in your initiate multipart upload request, you must provide identical encryption information in each part upload using the following headers.</p> <ul> <li> <p>x-amz-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key-MD5</p> </li> </ul> <p class="title"> <b>Special Errors</b> </p> <ul> <li> <p class="title"> <b/> </p> <ul> <li> <p> <i>Code: NoSuchUpload</i> </p> </li> <li> <p> <i>Cause: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.</i> </p> </li> <li> <p> <i> HTTP Status Code: 404 Not Found </i> </p> </li> <li> <p> <i>SOAP Fault Code Prefix: Client</i> </p> </li> </ul> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>CreateMultipartUpload</a> </p> </li> <li> <p> <a>CompleteMultipartUpload</a> </p> </li> <li> <p> <a>AbortMultipartUpload</a> </p> </li> <li> <p> <a>ListParts</a> </p> </li> <li> <p> <a>ListMultipartUploads</a> </p> </li> </ul></p>
upload_part( &self, input: UploadPartRequest, ) -> Result<UploadPartOutput, RusotoError<UploadPartError>>19681     async fn upload_part(
19682         &self,
19683         input: UploadPartRequest,
19684     ) -> Result<UploadPartOutput, RusotoError<UploadPartError>>;
19685 
19686     /// <p><p>Uploads a part by copying data from an existing object as data source. You specify the data source by adding the request header <code>x-amz-copy-source</code> in your request and a byte range by adding the request header <code>x-amz-copy-source-range</code> in your request. </p> <p>The minimum allowable part size for a multipart upload is 5 MB. For more information about multipart upload limits, go to <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/qfacts.html">Quick Facts</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. </p> <note> <p>Instead of using an existing object as part data, you might use the <a>UploadPart</a> operation and provide data in your request.</p> </note> <p>You must initiate a multipart upload before you can upload any part. In response to your initiate request. Amazon S3 returns a unique identifier, the upload ID, that you must include in your upload part request.</p> <p>For more information about using the <code>UploadPartCopy</code> operation, see the following:</p> <ul> <li> <p>For conceptual information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html">Uploading Objects Using Multipart Upload</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> </li> <li> <p>For information about permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and Permissions</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> </li> <li> <p>For information about copying objects using a single atomic operation vs. the multipart upload, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html">Operations on Objects</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> </li> <li> <p>For information about using server-side encryption with customer-provided encryption keys with the UploadPartCopy operation, see <a>CopyObject</a> and <a>UploadPart</a>.</p> </li> </ul> <p>Note the following additional considerations about the request headers <code>x-amz-copy-source-if-match</code>, <code>x-amz-copy-source-if-none-match</code>, <code>x-amz-copy-source-if-unmodified-since</code>, and <code>x-amz-copy-source-if-modified-since</code>:</p> <p> </p> <ul> <li> <p> <b>Consideration 1</b> - If both of the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request as follows:</p> <p> <code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p> <p> <code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p> <p>Amazon S3 returns <code>200 OK</code> and copies the data. </p> </li> <li> <p> <b>Consideration 2</b> - If both of the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request as follows:</p> <p> <code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p> <p> <code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p> <p>Amazon S3 returns <code>412 Precondition Failed</code> response code. </p> </li> </ul> <p> <b>Versioning</b> </p> <p>If your bucket has versioning enabled, you could have multiple versions of the same object. By default, <code>x-amz-copy-source</code> identifies the current version of the object to copy. If the current version is a delete marker and you don&#39;t specify a versionId in the <code>x-amz-copy-source</code>, Amazon S3 returns a 404 error, because the object does not exist. If you specify versionId in the <code>x-amz-copy-source</code> and the versionId is a delete marker, Amazon S3 returns an HTTP 400 error, because you are not allowed to specify a delete marker as a version for the <code>x-amz-copy-source</code>. </p> <p>You can optionally specify a specific version of the source object to copy by adding the <code>versionId</code> subresource as shown in the following example:</p> <p> <code>x-amz-copy-source: /bucket/object?versionId=version id</code> </p> <p class="title"> <b>Special Errors</b> </p> <ul> <li> <p class="title"> <b/> </p> <ul> <li> <p> <i>Code: NoSuchUpload</i> </p> </li> <li> <p> <i>Cause: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.</i> </p> </li> <li> <p> <i>HTTP Status Code: 404 Not Found</i> </p> </li> </ul> </li> <li> <p class="title"> <b/> </p> <ul> <li> <p> <i>Code: InvalidRequest</i> </p> </li> <li> <p> <i>Cause: The specified copy source is not supported as a byte-range copy source.</i> </p> </li> <li> <p> <i>HTTP Status Code: 400 Bad Request</i> </p> </li> </ul> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>CreateMultipartUpload</a> </p> </li> <li> <p> <a>UploadPart</a> </p> </li> <li> <p> <a>CompleteMultipartUpload</a> </p> </li> <li> <p> <a>AbortMultipartUpload</a> </p> </li> <li> <p> <a>ListParts</a> </p> </li> <li> <p> <a>ListMultipartUploads</a> </p> </li> </ul></p>
upload_part_copy( &self, input: UploadPartCopyRequest, ) -> Result<UploadPartCopyOutput, RusotoError<UploadPartCopyError>>19687     async fn upload_part_copy(
19688         &self,
19689         input: UploadPartCopyRequest,
19690     ) -> Result<UploadPartCopyOutput, RusotoError<UploadPartCopyError>>;
19691 }
19692 /// A client for the Amazon S3 API.
19693 #[derive(Clone)]
19694 pub struct S3Client {
19695     client: Client,
19696     region: region::Region,
19697 }
19698 
19699 impl S3Client {
19700     /// Creates a client backed by the default tokio event loop.
19701     ///
19702     /// The client will use the default credentials provider and tls client.
new(region: region::Region) -> S3Client19703     pub fn new(region: region::Region) -> S3Client {
19704         S3Client {
19705             client: Client::shared(),
19706             region,
19707         }
19708     }
19709 
new_with<P, D>( request_dispatcher: D, credentials_provider: P, region: region::Region, ) -> S3Client where P: ProvideAwsCredentials + Send + Sync + 'static, D: DispatchSignedRequest + Send + Sync + 'static,19710     pub fn new_with<P, D>(
19711         request_dispatcher: D,
19712         credentials_provider: P,
19713         region: region::Region,
19714     ) -> S3Client
19715     where
19716         P: ProvideAwsCredentials + Send + Sync + 'static,
19717         D: DispatchSignedRequest + Send + Sync + 'static,
19718     {
19719         S3Client {
19720             client: Client::new_with(credentials_provider, request_dispatcher),
19721             region,
19722         }
19723     }
19724 
new_with_client(client: Client, region: region::Region) -> S3Client19725     pub fn new_with_client(client: Client, region: region::Region) -> S3Client {
19726         S3Client { client, region }
19727     }
19728 }
19729 
19730 #[async_trait]
19731 impl S3 for S3Client {
19732     /// <p><p>This operation aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads might or might not succeed. As a result, it might be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts. </p> <p>To verify that all parts have been removed, so you don&#39;t get charged for the part storage, you should call the <a>ListParts</a> operation and ensure that the parts list is empty.</p> <p>For information about permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and Permissions</a>.</p> <p>The following operations are related to <code>AbortMultipartUpload</code>:</p> <ul> <li> <p> <a>CreateMultipartUpload</a> </p> </li> <li> <p> <a>UploadPart</a> </p> </li> <li> <p> <a>CompleteMultipartUpload</a> </p> </li> <li> <p> <a>ListParts</a> </p> </li> <li> <p> <a>ListMultipartUploads</a> </p> </li> </ul></p>
19733     #[allow(unused_variables, warnings)]
abort_multipart_upload( &self, input: AbortMultipartUploadRequest, ) -> Result<AbortMultipartUploadOutput, RusotoError<AbortMultipartUploadError>>19734     async fn abort_multipart_upload(
19735         &self,
19736         input: AbortMultipartUploadRequest,
19737     ) -> Result<AbortMultipartUploadOutput, RusotoError<AbortMultipartUploadError>> {
19738         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
19739 
19740         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
19741 
19742         if let Some(ref request_payer) = input.request_payer {
19743             request.add_header("x-amz-request-payer", &request_payer.to_string());
19744         }
19745         let mut params = Params::new();
19746         params.put("uploadId", &input.upload_id);
19747         request.set_params(params);
19748 
19749         let mut response = self
19750             .client
19751             .sign_and_dispatch(request)
19752             .await
19753             .map_err(RusotoError::from)?;
19754         if !response.status.is_success() {
19755             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
19756             return Err(AbortMultipartUploadError::from_response(response));
19757         }
19758 
19759         let mut result;
19760         result = AbortMultipartUploadOutput::default();
19761         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
19762             let value = request_charged.to_owned();
19763             result.request_charged = Some(value)
19764         }; // parse non-payload
19765         Ok(result)
19766     }
19767 
19768     /// <p><p>Completes a multipart upload by assembling previously uploaded parts.</p> <p>You first initiate the multipart upload and then upload all parts using the <a>UploadPart</a> operation. After successfully uploading all relevant parts of an upload, you call this operation to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts in ascending order by part number to create a new object. In the Complete Multipart Upload request, you must provide the parts list. You must ensure that the parts list is complete. This operation concatenates the parts that you provide in the list. For each part in the list, you must provide the part number and the <code>ETag</code> value, returned after that part was uploaded.</p> <p>Processing of a Complete Multipart Upload request could take several minutes to complete. After Amazon S3 begins processing the request, it sends an HTTP response header that specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white space characters to keep the connection from timing out. Because a request could fail after the initial 200 OK response has been sent, it is important that you check the response body to determine whether the request succeeded.</p> <p>Note that if <code>CompleteMultipartUpload</code> fails, applications should be prepared to retry the failed requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html">Amazon S3 Error Best Practices</a>.</p> <p>For more information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html">Uploading Objects Using Multipart Upload</a>.</p> <p>For information about permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and Permissions</a>.</p> <p> <code>GetBucketLifecycle</code> has the following special errors:</p> <ul> <li> <p>Error code: <code>EntityTooSmall</code> </p> <ul> <li> <p>Description: Your proposed upload is smaller than the minimum allowed object size. Each part must be at least 5 MB in size, except the last part.</p> </li> <li> <p>400 Bad Request</p> </li> </ul> </li> <li> <p>Error code: <code>InvalidPart</code> </p> <ul> <li> <p>Description: One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part&#39;s entity tag.</p> </li> <li> <p>400 Bad Request</p> </li> </ul> </li> <li> <p>Error code: <code>InvalidPartOrder</code> </p> <ul> <li> <p>Description: The list of parts was not in ascending order. The parts list must be specified in order by part number.</p> </li> <li> <p>400 Bad Request</p> </li> </ul> </li> <li> <p>Error code: <code>NoSuchUpload</code> </p> <ul> <li> <p>Description: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.</p> </li> <li> <p>404 Not Found</p> </li> </ul> </li> </ul> <p>The following operations are related to <code>DeleteBucketMetricsConfiguration</code>:</p> <ul> <li> <p> <a>CreateMultipartUpload</a> </p> </li> <li> <p> <a>UploadPart</a> </p> </li> <li> <p> <a>AbortMultipartUpload</a> </p> </li> <li> <p> <a>ListParts</a> </p> </li> <li> <p> <a>ListMultipartUploads</a> </p> </li> </ul></p>
19769     #[allow(unused_variables, warnings)]
complete_multipart_upload( &self, input: CompleteMultipartUploadRequest, ) -> Result<CompleteMultipartUploadOutput, RusotoError<CompleteMultipartUploadError>>19770     async fn complete_multipart_upload(
19771         &self,
19772         input: CompleteMultipartUploadRequest,
19773     ) -> Result<CompleteMultipartUploadOutput, RusotoError<CompleteMultipartUploadError>> {
19774         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
19775 
19776         let mut request = SignedRequest::new("POST", "s3", &self.region, &request_uri);
19777 
19778         if let Some(ref request_payer) = input.request_payer {
19779             request.add_header("x-amz-request-payer", &request_payer.to_string());
19780         }
19781         let mut params = Params::new();
19782         params.put("uploadId", &input.upload_id);
19783         request.set_params(params);
19784         if input.multipart_upload.is_some() {
19785             let mut writer = EventWriter::new(Vec::new());
19786             CompletedMultipartUploadSerializer::serialize(
19787                 &mut writer,
19788                 "CompleteMultipartUpload",
19789                 input.multipart_upload.as_ref().unwrap(),
19790             );
19791             request.set_payload(Some(writer.into_inner()));
19792         } else {
19793             request.set_payload(Some(Vec::new()));
19794         }
19795 
19796         let mut response = self
19797             .client
19798             .sign_and_dispatch(request)
19799             .await
19800             .map_err(RusotoError::from)?;
19801         if !response.status.is_success() {
19802             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
19803             return Err(CompleteMultipartUploadError::from_response(response));
19804         }
19805 
19806         let mut result;
19807         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
19808         if xml_response.body.is_empty() {
19809             result = CompleteMultipartUploadOutput::default();
19810         } else {
19811             let reader = EventReader::new_with_config(
19812                 xml_response.body.as_ref(),
19813                 ParserConfig::new().trim_whitespace(false),
19814             );
19815             let mut stack = XmlResponse::new(reader.into_iter().peekable());
19816             let _start_document = stack.next();
19817             let actual_tag_name = peek_at_name(&mut stack)?;
19818             result = CompleteMultipartUploadOutputDeserializer::deserialize(
19819                 &actual_tag_name,
19820                 &mut stack,
19821             )?;
19822         }
19823         if let Some(expiration) = response.headers.get("x-amz-expiration") {
19824             let value = expiration.to_owned();
19825             result.expiration = Some(value)
19826         };
19827         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
19828             let value = request_charged.to_owned();
19829             result.request_charged = Some(value)
19830         };
19831         if let Some(ssekms_key_id) = response
19832             .headers
19833             .get("x-amz-server-side-encryption-aws-kms-key-id")
19834         {
19835             let value = ssekms_key_id.to_owned();
19836             result.ssekms_key_id = Some(value)
19837         };
19838         if let Some(server_side_encryption) = response.headers.get("x-amz-server-side-encryption") {
19839             let value = server_side_encryption.to_owned();
19840             result.server_side_encryption = Some(value)
19841         };
19842         if let Some(version_id) = response.headers.get("x-amz-version-id") {
19843             let value = version_id.to_owned();
19844             result.version_id = Some(value)
19845         }; // parse non-payload
19846         Ok(result)
19847     }
19848 
19849     /// <p>Creates a copy of an object that is already stored in Amazon S3.</p> <note> <p>You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your object up to 5 GB in size in a single atomic operation using this API. However, for copying an object greater than 5 GB, you must use the multipart upload Upload Part - Copy API. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html">Copy Object Using the REST Multipart Upload API</a>.</p> </note> <p>When copying an object, you can preserve all metadata (default) or specify new metadata. However, the ACL is not preserved and is set to private for the user making the request. To override the default ACL setting, specify a new ACL when generating a copy request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>.</p> <important> <p>Amazon S3 transfer acceleration does not support cross-region copies. If you request a cross-region copy using a transfer acceleration endpoint, you get a 400 <code>Bad Request</code> error. For more information about transfer acceleration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html">Transfer Acceleration</a>.</p> </important> <p>All copy requests must be authenticated. Additionally, you must have <i>read</i> access to the source object and <i>write</i> access to the destination bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>. Both the Region that you want to copy the object from and the Region that you want to copy the object to must be enabled for your account.</p> <p>To only copy an object under certain conditions, such as whether the <code>Etag</code> matches or whether the object was modified before or after a specified date, use the request parameters <code>x-amz-copy-source-if-match</code>, <code>x-amz-copy-source-if-none-match</code>, <code>x-amz-copy-source-if-unmodified-since</code>, or <code> x-amz-copy-source-if-modified-since</code>.</p> <note> <p>All headers with the <code>x-amz-</code> prefix, including <code>x-amz-copy-source</code>, must be signed.</p> </note> <p>You can use this operation to change the storage class of an object that is already stored in Amazon S3 using the <code>StorageClass</code> parameter. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a>.</p> <p>The source object that you are copying can be encrypted or unencrypted. If the source object is encrypted, it can be encrypted by server-side encryption using AWS managed encryption keys or by using a customer-provided encryption key. When copying an object, you can request that Amazon S3 encrypt the target object by using either the AWS managed encryption keys or by using your own encryption key. You can do this regardless of the form of server-side encryption that was used to encrypt the source, or even if the source object was not encrypted. For more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using Server-Side Encryption</a>.</p> <p>A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3 is copying the files. If the error occurs before the copy operation starts, you receive a standard Amazon S3 error. If the error occurs during the copy operation, the error response is embedded in the <code>200 OK</code> response. This means that a <code>200 OK</code> response can contain either a success or an error. Design your application to parse the contents of the response and handle it appropriately.</p> <p>If the copy is successful, you receive a response with information about the copied object.</p> <note> <p>If the request is an HTTP 1.1 request, the response is chunk encoded. If it were not, it would not contain the content-length, and you would need to read the entire body.</p> </note> <p>Consider the following when using request headers:</p> <ul> <li> <p> Consideration 1 – If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns 200 OK and copies the data:</p> <ul> <li> <p> <code>x-amz-copy-source-if-match</code> condition evaluates to true</p> </li> <li> <p> <code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p> </li> </ul> </li> <li> <p> Consideration 2 – If both of the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p> <ul> <li> <p> <code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p> </li> <li> <p> <code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p> </li> </ul> </li> </ul> <p>The copy request charge is based on the storage class and Region you specify for the destination object. For pricing information, see <a href="https://aws.amazon.com/s3/pricing/">Amazon S3 Pricing</a>.</p> <p>Following are other considerations when using <code>CopyObject</code>:</p> <dl> <dt>Versioning</dt> <dd> <p>By default, <code>x-amz-copy-source</code> identifies the current version of an object to copy. (If the current version is a delete marker, Amazon S3 behaves as if the object was deleted.) To copy a different version, use the <code>versionId</code> subresource.</p> <p>If you enable versioning on the target bucket, Amazon S3 generates a unique version ID for the object being copied. This version ID is different from the version ID of the source object. Amazon S3 returns the version ID of the copied object in the <code>x-amz-version-id</code> response header in the response.</p> <p>If you do not enable versioning or suspend it on the target bucket, the version ID that Amazon S3 generates is always null.</p> <p>If the source object's storage class is GLACIER, you must restore a copy of this object before you can use it as a source object for the copy operation. For more information, see .</p> </dd> <dt>Access Permissions</dt> <dd> <p>When copying an object, you can optionally specify the accounts or groups that should be granted specific permissions on the new object. There are two ways to grant the permissions using the request headers:</p> <ul> <li> <p>Specify a canned ACL with the <code>x-amz-acl</code> request header. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly with the <code>x-amz-grant-read</code>, <code>x-amz-grant-read-acp</code>, <code>x-amz-grant-write-acp</code>, and <code>x-amz-grant-full-control</code> headers. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>.</p> </li> </ul> <p>You can use either a canned ACL or specify access permissions explicitly. You cannot do both.</p> </dd> <dt>Server-Side- Encryption-Specific Request Headers</dt> <dd> <p>To encrypt the target object, you must provide the appropriate encryption-related request headers. The one you use depends on whether you want to use AWS managed encryption keys or provide your own encryption key. </p> <ul> <li> <p>To encrypt the target object using server-side encryption with an AWS managed encryption key, provide the following request headers, as appropriate.</p> <ul> <li> <p> <code>x-amz-server-side​-encryption</code> </p> </li> <li> <p> <code>x-amz-server-side-encryption-aws-kms-key-id</code> </p> </li> <li> <p> <code>x-amz-server-side-encryption-context</code> </p> </li> </ul> <note> <p>If you specify <code>x-amz-server-side-encryption:aws:kms</code>, but don't provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the AWS managed CMK in AWS KMS to protect the data. If you want to use a customer managed AWS KMS CMK, you must provide the <code>x-amz-server-side-encryption-aws-kms-key-id</code> of the symmetric customer managed CMK. Amazon S3 only supports symmetric CMKs and not asymmetric CMKs. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric Keys</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> </note> <important> <p>All GET and PUT requests for an object protected by AWS KMS fail if you don't make them with SSL or by using SigV4.</p> </important> <p>For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in KMS</a>.</p> </li> <li> <p>To encrypt the target object using server-side encryption with an encryption key that you provide, use the following headers.</p> <ul> <li> <p>x-amz-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key-MD5</p> </li> </ul> </li> <li> <p>If the source object is encrypted using server-side encryption with customer-provided encryption keys, you must use the following headers.</p> <ul> <li> <p>x-amz-copy-source​-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-copy-source​-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-copy-source-​server-side​-encryption​-customer-key-MD5</p> </li> </ul> <p>For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in Amazon KMS</a>.</p> </li> </ul> </dd> <dt>Access-Control-List (ACL)-Specific Request Headers</dt> <dd> <p>You also can use the following access control–related headers with this operation. By default, all objects are private. Only the owner has full access control. When adding a new object, you can grant permissions to individual AWS accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. With this operation, you can grant access permissions using one of the following two methods:</p> <ul> <li> <p>Specify a canned ACL (<code>x-amz-acl</code>) — Amazon S3 supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each canned ACL has a predefined set of grantees and permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly — To explicitly grant access permissions to specific AWS accounts or groups, use the following headers. Each header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>. In the header, you specify a list of grantees who get the specific permission. To grant permissions explicitly, use:</p> <ul> <li> <p>x-amz-grant-read</p> </li> <li> <p>x-amz-grant-write</p> </li> <li> <p>x-amz-grant-read-acp</p> </li> <li> <p>x-amz-grant-write-acp</p> </li> <li> <p>x-amz-grant-full-control</p> </li> </ul> <p>You specify each grantee as a type=value pair, where the type is one of the following:</p> <ul> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> </li> <li> <p> <code>id</code> – if the value specified is the canonical user ID of an AWS account</p> </li> <li> <p> <code>uri</code> – if you are granting permissions to a predefined group</p> </li> </ul> <p>For example, the following <code>x-amz-grant-read</code> header grants the AWS accounts identified by email addresses permissions to read object data and its metadata:</p> <p> <code>x-amz-grant-read: emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com" </code> </p> </li> </ul> </dd> </dl> <p>The following operations are related to <code>CopyObject</code>:</p> <ul> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a>GetObject</a> </p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html">Copying Objects</a>.</p>
19850     #[allow(unused_variables, warnings)]
copy_object( &self, input: CopyObjectRequest, ) -> Result<CopyObjectOutput, RusotoError<CopyObjectError>>19851     async fn copy_object(
19852         &self,
19853         input: CopyObjectRequest,
19854     ) -> Result<CopyObjectOutput, RusotoError<CopyObjectError>> {
19855         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
19856 
19857         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
19858 
19859         if let Some(ref acl) = input.acl {
19860             request.add_header("x-amz-acl", &acl.to_string());
19861         }
19862 
19863         if let Some(ref cache_control) = input.cache_control {
19864             request.add_header("Cache-Control", &cache_control.to_string());
19865         }
19866 
19867         if let Some(ref content_disposition) = input.content_disposition {
19868             request.add_header("Content-Disposition", &content_disposition.to_string());
19869         }
19870 
19871         if let Some(ref content_encoding) = input.content_encoding {
19872             request.add_header("Content-Encoding", &content_encoding.to_string());
19873         }
19874 
19875         if let Some(ref content_language) = input.content_language {
19876             request.add_header("Content-Language", &content_language.to_string());
19877         }
19878 
19879         if let Some(ref content_type) = input.content_type {
19880             request.add_header("Content-Type", &content_type.to_string());
19881         }
19882         request.add_header("x-amz-copy-source", &input.copy_source);
19883 
19884         if let Some(ref copy_source_if_match) = input.copy_source_if_match {
19885             request.add_header(
19886                 "x-amz-copy-source-if-match",
19887                 &copy_source_if_match.to_string(),
19888             );
19889         }
19890 
19891         if let Some(ref copy_source_if_modified_since) = input.copy_source_if_modified_since {
19892             request.add_header(
19893                 "x-amz-copy-source-if-modified-since",
19894                 &copy_source_if_modified_since.to_string(),
19895             );
19896         }
19897 
19898         if let Some(ref copy_source_if_none_match) = input.copy_source_if_none_match {
19899             request.add_header(
19900                 "x-amz-copy-source-if-none-match",
19901                 &copy_source_if_none_match.to_string(),
19902             );
19903         }
19904 
19905         if let Some(ref copy_source_if_unmodified_since) = input.copy_source_if_unmodified_since {
19906             request.add_header(
19907                 "x-amz-copy-source-if-unmodified-since",
19908                 &copy_source_if_unmodified_since.to_string(),
19909             );
19910         }
19911 
19912         if let Some(ref copy_source_sse_customer_algorithm) =
19913             input.copy_source_sse_customer_algorithm
19914         {
19915             request.add_header(
19916                 "x-amz-copy-source-server-side-encryption-customer-algorithm",
19917                 &copy_source_sse_customer_algorithm.to_string(),
19918             );
19919         }
19920 
19921         if let Some(ref copy_source_sse_customer_key) = input.copy_source_sse_customer_key {
19922             request.add_header(
19923                 "x-amz-copy-source-server-side-encryption-customer-key",
19924                 &copy_source_sse_customer_key.to_string(),
19925             );
19926         }
19927 
19928         if let Some(ref copy_source_sse_customer_key_md5) = input.copy_source_sse_customer_key_md5 {
19929             request.add_header(
19930                 "x-amz-copy-source-server-side-encryption-customer-key-MD5",
19931                 &copy_source_sse_customer_key_md5.to_string(),
19932             );
19933         }
19934 
19935         if let Some(ref expires) = input.expires {
19936             request.add_header("Expires", &expires.to_string());
19937         }
19938 
19939         if let Some(ref grant_full_control) = input.grant_full_control {
19940             request.add_header("x-amz-grant-full-control", &grant_full_control.to_string());
19941         }
19942 
19943         if let Some(ref grant_read) = input.grant_read {
19944             request.add_header("x-amz-grant-read", &grant_read.to_string());
19945         }
19946 
19947         if let Some(ref grant_read_acp) = input.grant_read_acp {
19948             request.add_header("x-amz-grant-read-acp", &grant_read_acp.to_string());
19949         }
19950 
19951         if let Some(ref grant_write_acp) = input.grant_write_acp {
19952             request.add_header("x-amz-grant-write-acp", &grant_write_acp.to_string());
19953         }
19954 
19955         if let Some(ref metadata) = input.metadata {
19956             for (header_name, header_value) in metadata.iter() {
19957                 let header = format!("x-amz-meta-{}", header_name);
19958                 request.add_header(header, header_value);
19959             }
19960         }
19961 
19962         if let Some(ref metadata_directive) = input.metadata_directive {
19963             request.add_header("x-amz-metadata-directive", &metadata_directive.to_string());
19964         }
19965 
19966         if let Some(ref object_lock_legal_hold_status) = input.object_lock_legal_hold_status {
19967             request.add_header(
19968                 "x-amz-object-lock-legal-hold",
19969                 &object_lock_legal_hold_status.to_string(),
19970             );
19971         }
19972 
19973         if let Some(ref object_lock_mode) = input.object_lock_mode {
19974             request.add_header("x-amz-object-lock-mode", &object_lock_mode.to_string());
19975         }
19976 
19977         if let Some(ref object_lock_retain_until_date) = input.object_lock_retain_until_date {
19978             request.add_header(
19979                 "x-amz-object-lock-retain-until-date",
19980                 &object_lock_retain_until_date.to_string(),
19981             );
19982         }
19983 
19984         if let Some(ref request_payer) = input.request_payer {
19985             request.add_header("x-amz-request-payer", &request_payer.to_string());
19986         }
19987 
19988         if let Some(ref sse_customer_algorithm) = input.sse_customer_algorithm {
19989             request.add_header(
19990                 "x-amz-server-side-encryption-customer-algorithm",
19991                 &sse_customer_algorithm.to_string(),
19992             );
19993         }
19994 
19995         if let Some(ref sse_customer_key) = input.sse_customer_key {
19996             request.add_header(
19997                 "x-amz-server-side-encryption-customer-key",
19998                 &sse_customer_key.to_string(),
19999             );
20000         }
20001 
20002         if let Some(ref sse_customer_key_md5) = input.sse_customer_key_md5 {
20003             request.add_header(
20004                 "x-amz-server-side-encryption-customer-key-MD5",
20005                 &sse_customer_key_md5.to_string(),
20006             );
20007         }
20008 
20009         if let Some(ref ssekms_encryption_context) = input.ssekms_encryption_context {
20010             request.add_header(
20011                 "x-amz-server-side-encryption-context",
20012                 &ssekms_encryption_context.to_string(),
20013             );
20014         }
20015 
20016         if let Some(ref ssekms_key_id) = input.ssekms_key_id {
20017             request.add_header(
20018                 "x-amz-server-side-encryption-aws-kms-key-id",
20019                 &ssekms_key_id.to_string(),
20020             );
20021         }
20022 
20023         if let Some(ref server_side_encryption) = input.server_side_encryption {
20024             request.add_header(
20025                 "x-amz-server-side-encryption",
20026                 &server_side_encryption.to_string(),
20027             );
20028         }
20029 
20030         if let Some(ref storage_class) = input.storage_class {
20031             request.add_header("x-amz-storage-class", &storage_class.to_string());
20032         }
20033 
20034         if let Some(ref tagging) = input.tagging {
20035             request.add_header("x-amz-tagging", &tagging.to_string());
20036         }
20037 
20038         if let Some(ref tagging_directive) = input.tagging_directive {
20039             request.add_header("x-amz-tagging-directive", &tagging_directive.to_string());
20040         }
20041 
20042         if let Some(ref website_redirect_location) = input.website_redirect_location {
20043             request.add_header(
20044                 "x-amz-website-redirect-location",
20045                 &website_redirect_location.to_string(),
20046             );
20047         }
20048 
20049         let mut response = self
20050             .client
20051             .sign_and_dispatch(request)
20052             .await
20053             .map_err(RusotoError::from)?;
20054         if !response.status.is_success() {
20055             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20056             return Err(CopyObjectError::from_response(response));
20057         }
20058 
20059         let mut result;
20060         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20061         if xml_response.body.is_empty() {
20062             result = CopyObjectOutput::default();
20063         } else {
20064             let reader = EventReader::new_with_config(
20065                 xml_response.body.as_ref(),
20066                 ParserConfig::new().trim_whitespace(false),
20067             );
20068             let mut stack = XmlResponse::new(reader.into_iter().peekable());
20069             let _start_document = stack.next();
20070             let actual_tag_name = peek_at_name(&mut stack)?;
20071             result = CopyObjectOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
20072         }
20073         if let Some(copy_source_version_id) = response.headers.get("x-amz-copy-source-version-id") {
20074             let value = copy_source_version_id.to_owned();
20075             result.copy_source_version_id = Some(value)
20076         };
20077         if let Some(expiration) = response.headers.get("x-amz-expiration") {
20078             let value = expiration.to_owned();
20079             result.expiration = Some(value)
20080         };
20081         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
20082             let value = request_charged.to_owned();
20083             result.request_charged = Some(value)
20084         };
20085         if let Some(sse_customer_algorithm) = response
20086             .headers
20087             .get("x-amz-server-side-encryption-customer-algorithm")
20088         {
20089             let value = sse_customer_algorithm.to_owned();
20090             result.sse_customer_algorithm = Some(value)
20091         };
20092         if let Some(sse_customer_key_md5) = response
20093             .headers
20094             .get("x-amz-server-side-encryption-customer-key-MD5")
20095         {
20096             let value = sse_customer_key_md5.to_owned();
20097             result.sse_customer_key_md5 = Some(value)
20098         };
20099         if let Some(ssekms_encryption_context) =
20100             response.headers.get("x-amz-server-side-encryption-context")
20101         {
20102             let value = ssekms_encryption_context.to_owned();
20103             result.ssekms_encryption_context = Some(value)
20104         };
20105         if let Some(ssekms_key_id) = response
20106             .headers
20107             .get("x-amz-server-side-encryption-aws-kms-key-id")
20108         {
20109             let value = ssekms_key_id.to_owned();
20110             result.ssekms_key_id = Some(value)
20111         };
20112         if let Some(server_side_encryption) = response.headers.get("x-amz-server-side-encryption") {
20113             let value = server_side_encryption.to_owned();
20114             result.server_side_encryption = Some(value)
20115         };
20116         if let Some(version_id) = response.headers.get("x-amz-version-id") {
20117             let value = version_id.to_owned();
20118             result.version_id = Some(value)
20119         }; // parse non-payload
20120         Ok(result)
20121     }
20122 
20123     /// <p><p>Creates a new bucket. To create a bucket, you must register with Amazon S3 and have a valid AWS Access Key ID to authenticate requests. Anonymous requests are never allowed to create buckets. By creating the bucket, you become the bucket owner.</p> <p>Not every string is an acceptable bucket name. For information on bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html">Working with Amazon S3 Buckets</a>.</p> <p>By default, the bucket is created in the US East (N. Virginia) Region. You can optionally specify a Region in the request body. You might choose a Region to optimize latency, minimize costs, or address regulatory requirements. For example, if you reside in Europe, you will probably find it advantageous to create buckets in the EU (Ireland) Region. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro">How to Select a Region for Your Buckets</a>.</p> <note> <p>If you send your create bucket request to the <code>s3.amazonaws.com</code> endpoint, the request goes to the us-east-1 Region. Accordingly, the signature calculations in Signature Version 4 must use us-east-1 as the Region, even if the location constraint in the request specifies another Region where the bucket is to be created. If you create a bucket in a Region other than US East (N. Virginia), your application must be able to handle 307 redirect. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html">Virtual Hosting of Buckets</a>.</p> </note> <p>When creating a bucket using this operation, you can optionally specify the accounts or groups that should be granted specific permissions on the bucket. There are two ways to grant the appropriate permissions using the request headers.</p> <ul> <li> <p>Specify a canned ACL using the <code>x-amz-acl</code> request header. Amazon S3 supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each canned ACL has a predefined set of grantees and permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly using the <code>x-amz-grant-read</code>, <code>x-amz-grant-write</code>, <code>x-amz-grant-read-acp</code>, <code>x-amz-grant-write-acp</code>, and <code>x-amz-grant-full-control</code> headers. These headers map to the set of permissions Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>.</p> <p>You specify each grantee as a type=value pair, where the type is one of the following:</p> <ul> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> </li> <li> <p> <code>id</code> – if the value specified is the canonical user ID of an AWS account</p> </li> <li> <p> <code>uri</code> – if you are granting permissions to a predefined group</p> </li> </ul> <p>For example, the following <code>x-amz-grant-read</code> header grants the AWS accounts identified by email addresses permissions to read object data and its metadata:</p> <p> <code>x-amz-grant-read: emailAddress=&quot;xyz@amazon.com&quot;, emailAddress=&quot;abc@amazon.com&quot; </code> </p> </li> </ul> <note> <p>You can use either a canned ACL or specify access permissions explicitly. You cannot do both.</p> </note> <p>The following operations are related to <code>CreateBucket</code>:</p> <ul> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a>DeleteBucket</a> </p> </li> </ul></p>
20124     #[allow(unused_variables, warnings)]
create_bucket( &self, input: CreateBucketRequest, ) -> Result<CreateBucketOutput, RusotoError<CreateBucketError>>20125     async fn create_bucket(
20126         &self,
20127         input: CreateBucketRequest,
20128     ) -> Result<CreateBucketOutput, RusotoError<CreateBucketError>> {
20129         let request_uri = format!("/{bucket}", bucket = input.bucket);
20130 
20131         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
20132 
20133         if let Some(ref acl) = input.acl {
20134             request.add_header("x-amz-acl", &acl.to_string());
20135         }
20136 
20137         if let Some(ref grant_full_control) = input.grant_full_control {
20138             request.add_header("x-amz-grant-full-control", &grant_full_control.to_string());
20139         }
20140 
20141         if let Some(ref grant_read) = input.grant_read {
20142             request.add_header("x-amz-grant-read", &grant_read.to_string());
20143         }
20144 
20145         if let Some(ref grant_read_acp) = input.grant_read_acp {
20146             request.add_header("x-amz-grant-read-acp", &grant_read_acp.to_string());
20147         }
20148 
20149         if let Some(ref grant_write) = input.grant_write {
20150             request.add_header("x-amz-grant-write", &grant_write.to_string());
20151         }
20152 
20153         if let Some(ref grant_write_acp) = input.grant_write_acp {
20154             request.add_header("x-amz-grant-write-acp", &grant_write_acp.to_string());
20155         }
20156 
20157         if let Some(ref object_lock_enabled_for_bucket) = input.object_lock_enabled_for_bucket {
20158             request.add_header(
20159                 "x-amz-bucket-object-lock-enabled",
20160                 &object_lock_enabled_for_bucket.to_string(),
20161             );
20162         }
20163 
20164         if input.create_bucket_configuration.is_some() {
20165             let mut writer = EventWriter::new(Vec::new());
20166             CreateBucketConfigurationSerializer::serialize(
20167                 &mut writer,
20168                 "CreateBucketConfiguration",
20169                 input.create_bucket_configuration.as_ref().unwrap(),
20170             );
20171             request.set_payload(Some(writer.into_inner()));
20172         } else {
20173             request.set_payload(Some(Vec::new()));
20174         }
20175 
20176         let mut response = self
20177             .client
20178             .sign_and_dispatch(request)
20179             .await
20180             .map_err(RusotoError::from)?;
20181         if !response.status.is_success() {
20182             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20183             return Err(CreateBucketError::from_response(response));
20184         }
20185 
20186         let mut result;
20187         result = CreateBucketOutput::default();
20188         if let Some(location) = response.headers.get("Location") {
20189             let value = location.to_owned();
20190             result.location = Some(value)
20191         }; // parse non-payload
20192         Ok(result)
20193     }
20194 
20195     /// <p><p>This operation initiates a multipart upload and returns an upload ID. This upload ID is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests (see <a>UploadPart</a>). You also include this upload ID in the final request to either complete or abort the multipart upload request.</p> <p>For more information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html">Multipart Upload Overview</a>.</p> <p>If you have configured a lifecycle rule to abort incomplete multipart uploads, the upload must complete within the number of days specified in the bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort operation and Amazon S3 aborts the multipart upload. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config">Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy</a>.</p> <p>For information about the permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and Permissions</a>.</p> <p>For request signing, multipart upload is just a series of regular requests. You initiate a multipart upload, send one or more requests to upload parts, and then complete the multipart upload process. You sign each request individually. There is nothing special about signing multipart upload requests. For more information about signing, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating Requests (AWS Signature Version 4)</a>.</p> <note> <p> After you initiate a multipart upload and upload one or more parts, to stop being charged for storing the uploaded parts, you must either complete or abort the multipart upload. Amazon S3 frees up the space used to store the parts and stop charging you for storing them only after you either complete or abort a multipart upload. </p> </note> <p>You can optionally request server-side encryption. For server-side encryption, Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. You can provide your own encryption key, or use AWS Key Management Service (AWS KMS) customer master keys (CMKs) or Amazon S3-managed encryption keys. If you choose to provide your own encryption key, the request headers you provide in <a>UploadPart</a>) and <a>UploadPartCopy</a>) requests must match the headers you used in the request to initiate the upload by using <code>CreateMultipartUpload</code>. </p> <p>To perform a multipart upload with encryption using an AWS KMS CMK, the requester must have permission to the <code>kms:Encrypt</code>, <code>kms:Decrypt</code>, <code>kms:ReEncrypt<em></code>, <code>kms:GenerateDataKey</em></code>, and <code>kms:DescribeKey</code> actions on the key. These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload.</p> <p>If your AWS Identity and Access Management (IAM) user or role is in the same AWS account as the AWS KMS CMK, then you must have these permissions on the key policy. If your IAM user or role belongs to a different account than the key, then you must have the permissions on both the key policy and your IAM user or role.</p> <p> For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Protecting Data Using Server-Side Encryption</a>.</p> <dl> <dt>Access Permissions</dt> <dd> <p>When copying an object, you can optionally specify the accounts or groups that should be granted specific permissions on the new object. There are two ways to grant the permissions using the request headers:</p> <ul> <li> <p>Specify a canned ACL with the <code>x-amz-acl</code> request header. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly with the <code>x-amz-grant-read</code>, <code>x-amz-grant-read-acp</code>, <code>x-amz-grant-write-acp</code>, and <code>x-amz-grant-full-control</code> headers. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>.</p> </li> </ul> <p>You can use either a canned ACL or specify access permissions explicitly. You cannot do both.</p> </dd> <dt>Server-Side- Encryption-Specific Request Headers</dt> <dd> <p>You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption. Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. The option you use depends on whether you want to use AWS managed encryption keys or provide your own encryption key. </p> <ul> <li> <p>Use encryption keys managed by Amazon S3 or customer master keys (CMKs) stored in AWS Key Management Service (AWS KMS) – If you want AWS to manage the keys used to encrypt data, specify the following headers in the request.</p> <ul> <li> <p>x-amz-server-side​-encryption</p> </li> <li> <p>x-amz-server-side-encryption-aws-kms-key-id</p> </li> <li> <p>x-amz-server-side-encryption-context</p> </li> </ul> <note> <p>If you specify <code>x-amz-server-side-encryption:aws:kms</code>, but don&#39;t provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the AWS managed CMK in AWS KMS to protect the data.</p> </note> <important> <p>All GET and PUT requests for an object protected by AWS KMS fail if you don&#39;t make them with SSL or by using SigV4.</p> </important> <p>For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS</a>.</p> </li> <li> <p>Use customer-provided encryption keys – If you want to manage your own encryption keys, provide all the following headers in the request.</p> <ul> <li> <p>x-amz-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key-MD5</p> </li> </ul> <p>For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS</a>.</p> </li> </ul> </dd> <dt>Access-Control-List (ACL)-Specific Request Headers</dt> <dd> <p>You also can use the following access control–related headers with this operation. By default, all objects are private. Only the owner has full access control. When adding a new object, you can grant permissions to individual AWS accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. With this operation, you can grant access permissions using one of the following two methods:</p> <ul> <li> <p>Specify a canned ACL (<code>x-amz-acl</code>) — Amazon S3 supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each canned ACL has a predefined set of grantees and permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly — To explicitly grant access permissions to specific AWS accounts or groups, use the following headers. Each header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>. In the header, you specify a list of grantees who get the specific permission. To grant permissions explicitly, use:</p> <ul> <li> <p>x-amz-grant-read</p> </li> <li> <p>x-amz-grant-write</p> </li> <li> <p>x-amz-grant-read-acp</p> </li> <li> <p>x-amz-grant-write-acp</p> </li> <li> <p>x-amz-grant-full-control</p> </li> </ul> <p>You specify each grantee as a type=value pair, where the type is one of the following:</p> <ul> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> </li> <li> <p> <code>id</code> – if the value specified is the canonical user ID of an AWS account</p> </li> <li> <p> <code>uri</code> – if you are granting permissions to a predefined group</p> </li> </ul> <p>For example, the following <code>x-amz-grant-read</code> header grants the AWS accounts identified by email addresses permissions to read object data and its metadata:</p> <p> <code>x-amz-grant-read: emailAddress=&quot;xyz@amazon.com&quot;, emailAddress=&quot;abc@amazon.com&quot; </code> </p> </li> </ul> </dd> </dl> <p>The following operations are related to <code>CreateMultipartUpload</code>:</p> <ul> <li> <p> <a>UploadPart</a> </p> </li> <li> <p> <a>CompleteMultipartUpload</a> </p> </li> <li> <p> <a>AbortMultipartUpload</a> </p> </li> <li> <p> <a>ListParts</a> </p> </li> <li> <p> <a>ListMultipartUploads</a> </p> </li> </ul></p>
20196     #[allow(unused_variables, warnings)]
create_multipart_upload( &self, input: CreateMultipartUploadRequest, ) -> Result<CreateMultipartUploadOutput, RusotoError<CreateMultipartUploadError>>20197     async fn create_multipart_upload(
20198         &self,
20199         input: CreateMultipartUploadRequest,
20200     ) -> Result<CreateMultipartUploadOutput, RusotoError<CreateMultipartUploadError>> {
20201         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
20202 
20203         let mut request = SignedRequest::new("POST", "s3", &self.region, &request_uri);
20204 
20205         if let Some(ref acl) = input.acl {
20206             request.add_header("x-amz-acl", &acl.to_string());
20207         }
20208 
20209         if let Some(ref cache_control) = input.cache_control {
20210             request.add_header("Cache-Control", &cache_control.to_string());
20211         }
20212 
20213         if let Some(ref content_disposition) = input.content_disposition {
20214             request.add_header("Content-Disposition", &content_disposition.to_string());
20215         }
20216 
20217         if let Some(ref content_encoding) = input.content_encoding {
20218             request.add_header("Content-Encoding", &content_encoding.to_string());
20219         }
20220 
20221         if let Some(ref content_language) = input.content_language {
20222             request.add_header("Content-Language", &content_language.to_string());
20223         }
20224 
20225         if let Some(ref content_type) = input.content_type {
20226             request.add_header("Content-Type", &content_type.to_string());
20227         }
20228 
20229         if let Some(ref expires) = input.expires {
20230             request.add_header("Expires", &expires.to_string());
20231         }
20232 
20233         if let Some(ref grant_full_control) = input.grant_full_control {
20234             request.add_header("x-amz-grant-full-control", &grant_full_control.to_string());
20235         }
20236 
20237         if let Some(ref grant_read) = input.grant_read {
20238             request.add_header("x-amz-grant-read", &grant_read.to_string());
20239         }
20240 
20241         if let Some(ref grant_read_acp) = input.grant_read_acp {
20242             request.add_header("x-amz-grant-read-acp", &grant_read_acp.to_string());
20243         }
20244 
20245         if let Some(ref grant_write_acp) = input.grant_write_acp {
20246             request.add_header("x-amz-grant-write-acp", &grant_write_acp.to_string());
20247         }
20248 
20249         if let Some(ref metadata) = input.metadata {
20250             for (header_name, header_value) in metadata.iter() {
20251                 let header = format!("x-amz-meta-{}", header_name);
20252                 request.add_header(header, header_value);
20253             }
20254         }
20255 
20256         if let Some(ref object_lock_legal_hold_status) = input.object_lock_legal_hold_status {
20257             request.add_header(
20258                 "x-amz-object-lock-legal-hold",
20259                 &object_lock_legal_hold_status.to_string(),
20260             );
20261         }
20262 
20263         if let Some(ref object_lock_mode) = input.object_lock_mode {
20264             request.add_header("x-amz-object-lock-mode", &object_lock_mode.to_string());
20265         }
20266 
20267         if let Some(ref object_lock_retain_until_date) = input.object_lock_retain_until_date {
20268             request.add_header(
20269                 "x-amz-object-lock-retain-until-date",
20270                 &object_lock_retain_until_date.to_string(),
20271             );
20272         }
20273 
20274         if let Some(ref request_payer) = input.request_payer {
20275             request.add_header("x-amz-request-payer", &request_payer.to_string());
20276         }
20277 
20278         if let Some(ref sse_customer_algorithm) = input.sse_customer_algorithm {
20279             request.add_header(
20280                 "x-amz-server-side-encryption-customer-algorithm",
20281                 &sse_customer_algorithm.to_string(),
20282             );
20283         }
20284 
20285         if let Some(ref sse_customer_key) = input.sse_customer_key {
20286             request.add_header(
20287                 "x-amz-server-side-encryption-customer-key",
20288                 &sse_customer_key.to_string(),
20289             );
20290         }
20291 
20292         if let Some(ref sse_customer_key_md5) = input.sse_customer_key_md5 {
20293             request.add_header(
20294                 "x-amz-server-side-encryption-customer-key-MD5",
20295                 &sse_customer_key_md5.to_string(),
20296             );
20297         }
20298 
20299         if let Some(ref ssekms_encryption_context) = input.ssekms_encryption_context {
20300             request.add_header(
20301                 "x-amz-server-side-encryption-context",
20302                 &ssekms_encryption_context.to_string(),
20303             );
20304         }
20305 
20306         if let Some(ref ssekms_key_id) = input.ssekms_key_id {
20307             request.add_header(
20308                 "x-amz-server-side-encryption-aws-kms-key-id",
20309                 &ssekms_key_id.to_string(),
20310             );
20311         }
20312 
20313         if let Some(ref server_side_encryption) = input.server_side_encryption {
20314             request.add_header(
20315                 "x-amz-server-side-encryption",
20316                 &server_side_encryption.to_string(),
20317             );
20318         }
20319 
20320         if let Some(ref storage_class) = input.storage_class {
20321             request.add_header("x-amz-storage-class", &storage_class.to_string());
20322         }
20323 
20324         if let Some(ref tagging) = input.tagging {
20325             request.add_header("x-amz-tagging", &tagging.to_string());
20326         }
20327 
20328         if let Some(ref website_redirect_location) = input.website_redirect_location {
20329             request.add_header(
20330                 "x-amz-website-redirect-location",
20331                 &website_redirect_location.to_string(),
20332             );
20333         }
20334         let mut params = Params::new();
20335         params.put_key("uploads");
20336         request.set_params(params);
20337 
20338         let mut response = self
20339             .client
20340             .sign_and_dispatch(request)
20341             .await
20342             .map_err(RusotoError::from)?;
20343         if !response.status.is_success() {
20344             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20345             return Err(CreateMultipartUploadError::from_response(response));
20346         }
20347 
20348         let mut result;
20349         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20350         if xml_response.body.is_empty() {
20351             result = CreateMultipartUploadOutput::default();
20352         } else {
20353             let reader = EventReader::new_with_config(
20354                 xml_response.body.as_ref(),
20355                 ParserConfig::new().trim_whitespace(false),
20356             );
20357             let mut stack = XmlResponse::new(reader.into_iter().peekable());
20358             let _start_document = stack.next();
20359             let actual_tag_name = peek_at_name(&mut stack)?;
20360             result =
20361                 CreateMultipartUploadOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
20362         }
20363         if let Some(abort_date) = response.headers.get("x-amz-abort-date") {
20364             let value = abort_date.to_owned();
20365             result.abort_date = Some(value)
20366         };
20367         if let Some(abort_rule_id) = response.headers.get("x-amz-abort-rule-id") {
20368             let value = abort_rule_id.to_owned();
20369             result.abort_rule_id = Some(value)
20370         };
20371         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
20372             let value = request_charged.to_owned();
20373             result.request_charged = Some(value)
20374         };
20375         if let Some(sse_customer_algorithm) = response
20376             .headers
20377             .get("x-amz-server-side-encryption-customer-algorithm")
20378         {
20379             let value = sse_customer_algorithm.to_owned();
20380             result.sse_customer_algorithm = Some(value)
20381         };
20382         if let Some(sse_customer_key_md5) = response
20383             .headers
20384             .get("x-amz-server-side-encryption-customer-key-MD5")
20385         {
20386             let value = sse_customer_key_md5.to_owned();
20387             result.sse_customer_key_md5 = Some(value)
20388         };
20389         if let Some(ssekms_encryption_context) =
20390             response.headers.get("x-amz-server-side-encryption-context")
20391         {
20392             let value = ssekms_encryption_context.to_owned();
20393             result.ssekms_encryption_context = Some(value)
20394         };
20395         if let Some(ssekms_key_id) = response
20396             .headers
20397             .get("x-amz-server-side-encryption-aws-kms-key-id")
20398         {
20399             let value = ssekms_key_id.to_owned();
20400             result.ssekms_key_id = Some(value)
20401         };
20402         if let Some(server_side_encryption) = response.headers.get("x-amz-server-side-encryption") {
20403             let value = server_side_encryption.to_owned();
20404             result.server_side_encryption = Some(value)
20405         }; // parse non-payload
20406         Ok(result)
20407     }
20408 
20409     /// <p><p>Deletes the bucket. All objects (including all object versions and delete markers) in the bucket must be deleted before the bucket itself can be deleted.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> </p> </li> <li> <p> </p> </li> </ul></p>
20410     #[allow(unused_variables, warnings)]
delete_bucket( &self, input: DeleteBucketRequest, ) -> Result<(), RusotoError<DeleteBucketError>>20411     async fn delete_bucket(
20412         &self,
20413         input: DeleteBucketRequest,
20414     ) -> Result<(), RusotoError<DeleteBucketError>> {
20415         let request_uri = format!("/{bucket}", bucket = input.bucket);
20416 
20417         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20418 
20419         let mut response = self
20420             .client
20421             .sign_and_dispatch(request)
20422             .await
20423             .map_err(RusotoError::from)?;
20424         if !response.status.is_success() {
20425             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20426             return Err(DeleteBucketError::from_response(response));
20427         }
20428 
20429         std::mem::drop(response);
20430         Ok(())
20431     }
20432 
20433     /// <p><p>Deletes an analytics configuration for the bucket (specified by the analytics configuration ID).</p> <p>To use this operation, you must have permissions to perform the <code>s3:PutAnalyticsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For information about the Amazon S3 analytics feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html">Amazon S3 Analytics – Storage Class Analysis</a>. </p> <p>The following operations are related to <code>DeleteBucketAnalyticsConfiguration</code>:</p> <ul> <li> <p> </p> </li> <li> <p> </p> </li> <li> <p> </p> </li> </ul></p>
20434     #[allow(unused_variables, warnings)]
delete_bucket_analytics_configuration( &self, input: DeleteBucketAnalyticsConfigurationRequest, ) -> Result<(), RusotoError<DeleteBucketAnalyticsConfigurationError>>20435     async fn delete_bucket_analytics_configuration(
20436         &self,
20437         input: DeleteBucketAnalyticsConfigurationRequest,
20438     ) -> Result<(), RusotoError<DeleteBucketAnalyticsConfigurationError>> {
20439         let request_uri = format!("/{bucket}", bucket = input.bucket);
20440 
20441         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20442 
20443         let mut params = Params::new();
20444         params.put("id", &input.id);
20445         params.put_key("analytics");
20446         request.set_params(params);
20447 
20448         let mut response = self
20449             .client
20450             .sign_and_dispatch(request)
20451             .await
20452             .map_err(RusotoError::from)?;
20453         if !response.status.is_success() {
20454             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20455             return Err(DeleteBucketAnalyticsConfigurationError::from_response(
20456                 response,
20457             ));
20458         }
20459 
20460         std::mem::drop(response);
20461         Ok(())
20462     }
20463 
20464     /// <p><p>Deletes the <code>cors</code> configuration information set for the bucket.</p> <p>To use this operation, you must have permission to perform the <code>s3:PutBucketCORS</code> action. The bucket owner has this permission by default and can grant this permission to others. </p> <p>For information about <code>cors</code>, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html">Enabling Cross-Origin Resource Sharing</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p class="title"> <b>Related Resources:</b> </p> <ul> <li> <p> </p> </li> <li> <p> <a>RESTOPTIONSobject</a> </p> </li> </ul></p>
20465     #[allow(unused_variables, warnings)]
delete_bucket_cors( &self, input: DeleteBucketCorsRequest, ) -> Result<(), RusotoError<DeleteBucketCorsError>>20466     async fn delete_bucket_cors(
20467         &self,
20468         input: DeleteBucketCorsRequest,
20469     ) -> Result<(), RusotoError<DeleteBucketCorsError>> {
20470         let request_uri = format!("/{bucket}", bucket = input.bucket);
20471 
20472         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20473 
20474         let mut params = Params::new();
20475         params.put_key("cors");
20476         request.set_params(params);
20477 
20478         let mut response = self
20479             .client
20480             .sign_and_dispatch(request)
20481             .await
20482             .map_err(RusotoError::from)?;
20483         if !response.status.is_success() {
20484             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20485             return Err(DeleteBucketCorsError::from_response(response));
20486         }
20487 
20488         std::mem::drop(response);
20489         Ok(())
20490     }
20491 
20492     /// <p><p>This implementation of the DELETE operation removes default encryption from the bucket. For information about the Amazon S3 default encryption feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//bucket-encryption.html">Amazon S3 Default Bucket Encryption</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>To use this operation, you must have permissions to perform the <code>s3:PutEncryptionConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>PutBucketEncryption</a> </p> </li> <li> <p> <a>GetBucketEncryption</a> </p> </li> </ul></p>
20493     #[allow(unused_variables, warnings)]
delete_bucket_encryption( &self, input: DeleteBucketEncryptionRequest, ) -> Result<(), RusotoError<DeleteBucketEncryptionError>>20494     async fn delete_bucket_encryption(
20495         &self,
20496         input: DeleteBucketEncryptionRequest,
20497     ) -> Result<(), RusotoError<DeleteBucketEncryptionError>> {
20498         let request_uri = format!("/{bucket}", bucket = input.bucket);
20499 
20500         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20501 
20502         let mut params = Params::new();
20503         params.put_key("encryption");
20504         request.set_params(params);
20505 
20506         let mut response = self
20507             .client
20508             .sign_and_dispatch(request)
20509             .await
20510             .map_err(RusotoError::from)?;
20511         if !response.status.is_success() {
20512             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20513             return Err(DeleteBucketEncryptionError::from_response(response));
20514         }
20515 
20516         std::mem::drop(response);
20517         Ok(())
20518     }
20519 
20520     /// <p><p>Deletes an inventory configuration (identified by the inventory ID) from the bucket.</p> <p>To use this operation, you must have permissions to perform the <code>s3:PutInventoryConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For information about the Amazon S3 inventory feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html">Amazon S3 Inventory</a>.</p> <p>Operations related to <code>DeleteBucketInventoryConfiguration</code> include: </p> <ul> <li> <p> <a>GetBucketInventoryConfiguration</a> </p> </li> <li> <p> <a>PutBucketInventoryConfiguration</a> </p> </li> <li> <p> <a>ListBucketInventoryConfigurations</a> </p> </li> </ul></p>
20521     #[allow(unused_variables, warnings)]
delete_bucket_inventory_configuration( &self, input: DeleteBucketInventoryConfigurationRequest, ) -> Result<(), RusotoError<DeleteBucketInventoryConfigurationError>>20522     async fn delete_bucket_inventory_configuration(
20523         &self,
20524         input: DeleteBucketInventoryConfigurationRequest,
20525     ) -> Result<(), RusotoError<DeleteBucketInventoryConfigurationError>> {
20526         let request_uri = format!("/{bucket}", bucket = input.bucket);
20527 
20528         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20529 
20530         let mut params = Params::new();
20531         params.put("id", &input.id);
20532         params.put_key("inventory");
20533         request.set_params(params);
20534 
20535         let mut response = self
20536             .client
20537             .sign_and_dispatch(request)
20538             .await
20539             .map_err(RusotoError::from)?;
20540         if !response.status.is_success() {
20541             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20542             return Err(DeleteBucketInventoryConfigurationError::from_response(
20543                 response,
20544             ));
20545         }
20546 
20547         std::mem::drop(response);
20548         Ok(())
20549     }
20550 
20551     /// <p><p>Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of rules contained in the deleted lifecycle configuration.</p> <p>To use this operation, you must have permission to perform the <code>s3:PutLifecycleConfiguration</code> action. By default, the bucket owner has this permission and the bucket owner can grant this permission to others.</p> <p>There is usually some time lag before lifecycle configuration deletion is fully propagated to all the Amazon S3 systems.</p> <p>For more information about the object expiration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions">Elements to Describe Lifecycle Actions</a>.</p> <p>Related actions include:</p> <ul> <li> <p> <a>PutBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a>GetBucketLifecycleConfiguration</a> </p> </li> </ul></p>
20552     #[allow(unused_variables, warnings)]
delete_bucket_lifecycle( &self, input: DeleteBucketLifecycleRequest, ) -> Result<(), RusotoError<DeleteBucketLifecycleError>>20553     async fn delete_bucket_lifecycle(
20554         &self,
20555         input: DeleteBucketLifecycleRequest,
20556     ) -> Result<(), RusotoError<DeleteBucketLifecycleError>> {
20557         let request_uri = format!("/{bucket}", bucket = input.bucket);
20558 
20559         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20560 
20561         let mut params = Params::new();
20562         params.put_key("lifecycle");
20563         request.set_params(params);
20564 
20565         let mut response = self
20566             .client
20567             .sign_and_dispatch(request)
20568             .await
20569             .map_err(RusotoError::from)?;
20570         if !response.status.is_success() {
20571             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20572             return Err(DeleteBucketLifecycleError::from_response(response));
20573         }
20574 
20575         std::mem::drop(response);
20576         Ok(())
20577     }
20578 
20579     /// <p><p>Deletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the metrics configuration ID) from the bucket. Note that this doesn&#39;t include the daily storage metrics.</p> <p> To use this operation, you must have permissions to perform the <code>s3:PutMetricsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For information about CloudWatch request metrics for Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html">Monitoring Metrics with Amazon CloudWatch</a>. </p> <p>The following operations are related to <code>DeleteBucketMetricsConfiguration</code>:</p> <ul> <li> <p> <a>GetBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>ListBucketMetricsConfigurations</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html">Monitoring Metrics with Amazon CloudWatch</a> </p> </li> </ul></p>
20580     #[allow(unused_variables, warnings)]
delete_bucket_metrics_configuration( &self, input: DeleteBucketMetricsConfigurationRequest, ) -> Result<(), RusotoError<DeleteBucketMetricsConfigurationError>>20581     async fn delete_bucket_metrics_configuration(
20582         &self,
20583         input: DeleteBucketMetricsConfigurationRequest,
20584     ) -> Result<(), RusotoError<DeleteBucketMetricsConfigurationError>> {
20585         let request_uri = format!("/{bucket}", bucket = input.bucket);
20586 
20587         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20588 
20589         let mut params = Params::new();
20590         params.put("id", &input.id);
20591         params.put_key("metrics");
20592         request.set_params(params);
20593 
20594         let mut response = self
20595             .client
20596             .sign_and_dispatch(request)
20597             .await
20598             .map_err(RusotoError::from)?;
20599         if !response.status.is_success() {
20600             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20601             return Err(DeleteBucketMetricsConfigurationError::from_response(
20602                 response,
20603             ));
20604         }
20605 
20606         std::mem::drop(response);
20607         Ok(())
20608     }
20609 
20610     /// <p><p>This implementation of the DELETE operation uses the policy subresource to delete the policy of a specified bucket. If you are using an identity other than the root user of the AWS account that owns the bucket, the calling identity must have the <code>DeleteBucketPolicy</code> permissions on the specified bucket and belong to the bucket owner&#39;s account to use this operation. </p> <p>If you don&#39;t have <code>DeleteBucketPolicy</code> permissions, Amazon S3 returns a <code>403 Access Denied</code> error. If you have the correct permissions, but you&#39;re not using an identity that belongs to the bucket owner&#39;s account, Amazon S3 returns a <code>405 Method Not Allowed</code> error. </p> <important> <p>As a security precaution, the root user of the AWS account that owns a bucket can always use this operation, even if the policy explicitly denies the root user the ability to perform this action.</p> </important> <p>For more information about bucket policies, see <a href=" https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html">Using Bucket Policies and UserPolicies</a>. </p> <p>The following operations are related to <code>DeleteBucketPolicy</code> </p> <ul> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>DeleteObject</a> </p> </li> </ul></p>
20611     #[allow(unused_variables, warnings)]
delete_bucket_policy( &self, input: DeleteBucketPolicyRequest, ) -> Result<(), RusotoError<DeleteBucketPolicyError>>20612     async fn delete_bucket_policy(
20613         &self,
20614         input: DeleteBucketPolicyRequest,
20615     ) -> Result<(), RusotoError<DeleteBucketPolicyError>> {
20616         let request_uri = format!("/{bucket}", bucket = input.bucket);
20617 
20618         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20619 
20620         let mut params = Params::new();
20621         params.put_key("policy");
20622         request.set_params(params);
20623 
20624         let mut response = self
20625             .client
20626             .sign_and_dispatch(request)
20627             .await
20628             .map_err(RusotoError::from)?;
20629         if !response.status.is_success() {
20630             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20631             return Err(DeleteBucketPolicyError::from_response(response));
20632         }
20633 
20634         std::mem::drop(response);
20635         Ok(())
20636     }
20637 
20638     /// <p><p> Deletes the replication configuration from the bucket.</p> <p>To use this operation, you must have permissions to perform the <code>s3:PutReplicationConfiguration</code> action. The bucket owner has these permissions by default and can grant it to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>. </p> <note> <p>It can take a while for the deletion of a replication configuration to fully propagate.</p> </note> <p> For information about replication configuration, see <a href=" https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html">Replication</a> in the <i>Amazon S3 Developer Guide</i>. </p> <p>The following operations are related to <code>DeleteBucketReplication</code>:</p> <ul> <li> <p> <a>PutBucketReplication</a> </p> </li> <li> <p> <a>GetBucketReplication</a> </p> </li> </ul></p>
20639     #[allow(unused_variables, warnings)]
delete_bucket_replication( &self, input: DeleteBucketReplicationRequest, ) -> Result<(), RusotoError<DeleteBucketReplicationError>>20640     async fn delete_bucket_replication(
20641         &self,
20642         input: DeleteBucketReplicationRequest,
20643     ) -> Result<(), RusotoError<DeleteBucketReplicationError>> {
20644         let request_uri = format!("/{bucket}", bucket = input.bucket);
20645 
20646         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20647 
20648         let mut params = Params::new();
20649         params.put_key("replication");
20650         request.set_params(params);
20651 
20652         let mut response = self
20653             .client
20654             .sign_and_dispatch(request)
20655             .await
20656             .map_err(RusotoError::from)?;
20657         if !response.status.is_success() {
20658             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20659             return Err(DeleteBucketReplicationError::from_response(response));
20660         }
20661 
20662         std::mem::drop(response);
20663         Ok(())
20664     }
20665 
20666     /// <p><p>Deletes the tags from the bucket.</p> <p>To use this operation, you must have permission to perform the <code>s3:PutBucketTagging</code> action. By default, the bucket owner has this permission and can grant this permission to others. </p> <p>The following operations are related to <code>DeleteBucketTagging</code>:</p> <ul> <li> <p> <a>GetBucketTagging</a> </p> </li> <li> <p> <a>PutBucketTagging</a> </p> </li> </ul></p>
20667     #[allow(unused_variables, warnings)]
delete_bucket_tagging( &self, input: DeleteBucketTaggingRequest, ) -> Result<(), RusotoError<DeleteBucketTaggingError>>20668     async fn delete_bucket_tagging(
20669         &self,
20670         input: DeleteBucketTaggingRequest,
20671     ) -> Result<(), RusotoError<DeleteBucketTaggingError>> {
20672         let request_uri = format!("/{bucket}", bucket = input.bucket);
20673 
20674         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20675 
20676         let mut params = Params::new();
20677         params.put_key("tagging");
20678         request.set_params(params);
20679 
20680         let mut response = self
20681             .client
20682             .sign_and_dispatch(request)
20683             .await
20684             .map_err(RusotoError::from)?;
20685         if !response.status.is_success() {
20686             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20687             return Err(DeleteBucketTaggingError::from_response(response));
20688         }
20689 
20690         std::mem::drop(response);
20691         Ok(())
20692     }
20693 
20694     /// <p><p>This operation removes the website configuration for a bucket. Amazon S3 returns a <code>200 OK</code> response upon successfully deleting a website configuration on the specified bucket. You will get a <code>200 OK</code> response if the website configuration you are trying to delete does not exist on the bucket. Amazon S3 returns a <code>404</code> response if the bucket specified in the request does not exist.</p> <p>This DELETE operation requires the <code>S3:DeleteBucketWebsite</code> permission. By default, only the bucket owner can delete the website configuration attached to a bucket. However, bucket owners can grant other users permission to delete the website configuration by writing a bucket policy granting them the <code>S3:DeleteBucketWebsite</code> permission. </p> <p>For more information about hosting websites, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a>. </p> <p>The following operations are related to <code>DeleteBucketWebsite</code>:</p> <ul> <li> <p> <a>GetBucketWebsite</a> </p> </li> <li> <p> <a>PutBucketWebsite</a> </p> </li> </ul></p>
20695     #[allow(unused_variables, warnings)]
delete_bucket_website( &self, input: DeleteBucketWebsiteRequest, ) -> Result<(), RusotoError<DeleteBucketWebsiteError>>20696     async fn delete_bucket_website(
20697         &self,
20698         input: DeleteBucketWebsiteRequest,
20699     ) -> Result<(), RusotoError<DeleteBucketWebsiteError>> {
20700         let request_uri = format!("/{bucket}", bucket = input.bucket);
20701 
20702         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20703 
20704         let mut params = Params::new();
20705         params.put_key("website");
20706         request.set_params(params);
20707 
20708         let mut response = self
20709             .client
20710             .sign_and_dispatch(request)
20711             .await
20712             .map_err(RusotoError::from)?;
20713         if !response.status.is_success() {
20714             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20715             return Err(DeleteBucketWebsiteError::from_response(response));
20716         }
20717 
20718         std::mem::drop(response);
20719         Ok(())
20720     }
20721 
20722     /// <p><p>Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. If there isn&#39;t a null version, Amazon S3 does not remove any objects.</p> <p>To remove a specific version, you must be the bucket owner and you must use the version Id subresource. Using this subresource permanently deletes the version. If the object deleted is a delete marker, Amazon S3 sets the response header, <code>x-amz-delete-marker</code>, to true. </p> <p>If the object you want to delete is in a bucket where the bucket versioning configuration is MFA Delete enabled, you must include the <code>x-amz-mfa</code> request header in the DELETE <code>versionId</code> request. Requests that include <code>x-amz-mfa</code> must use HTTPS. </p> <p> For more information about MFA Delete, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html">Using MFA Delete</a>. To see sample requests that use versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete">Sample Request</a>. </p> <p>You can delete objects by explicitly calling the DELETE Object API or configure its lifecycle (<a>PutBucketLifecycle</a>) to enable Amazon S3 to remove them for you. If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them the <code>s3:DeleteObject</code>, <code>s3:DeleteObjectVersion</code>, and <code>s3:PutLifeCycleConfiguration</code> actions. </p> <p>The following operation is related to <code>DeleteObject</code>:</p> <ul> <li> <p> <a>PutObject</a> </p> </li> </ul></p>
20723     #[allow(unused_variables, warnings)]
delete_object( &self, input: DeleteObjectRequest, ) -> Result<DeleteObjectOutput, RusotoError<DeleteObjectError>>20724     async fn delete_object(
20725         &self,
20726         input: DeleteObjectRequest,
20727     ) -> Result<DeleteObjectOutput, RusotoError<DeleteObjectError>> {
20728         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
20729 
20730         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20731 
20732         if let Some(ref bypass_governance_retention) = input.bypass_governance_retention {
20733             request.add_header(
20734                 "x-amz-bypass-governance-retention",
20735                 &bypass_governance_retention.to_string(),
20736             );
20737         }
20738 
20739         if let Some(ref mfa) = input.mfa {
20740             request.add_header("x-amz-mfa", &mfa.to_string());
20741         }
20742 
20743         if let Some(ref request_payer) = input.request_payer {
20744             request.add_header("x-amz-request-payer", &request_payer.to_string());
20745         }
20746         let mut params = Params::new();
20747         if let Some(ref x) = input.version_id {
20748             params.put("versionId", x);
20749         }
20750         request.set_params(params);
20751 
20752         let mut response = self
20753             .client
20754             .sign_and_dispatch(request)
20755             .await
20756             .map_err(RusotoError::from)?;
20757         if !response.status.is_success() {
20758             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20759             return Err(DeleteObjectError::from_response(response));
20760         }
20761 
20762         let mut result;
20763         result = DeleteObjectOutput::default();
20764         if let Some(delete_marker) = response.headers.get("x-amz-delete-marker") {
20765             let value = delete_marker.to_owned();
20766             result.delete_marker = Some(value.parse::<bool>().unwrap())
20767         };
20768         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
20769             let value = request_charged.to_owned();
20770             result.request_charged = Some(value)
20771         };
20772         if let Some(version_id) = response.headers.get("x-amz-version-id") {
20773             let value = version_id.to_owned();
20774             result.version_id = Some(value)
20775         }; // parse non-payload
20776         Ok(result)
20777     }
20778 
20779     /// <p><p>Removes the entire tag set from the specified object. For more information about managing object tags, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html"> Object Tagging</a>.</p> <p>To use this operation, you must have permission to perform the <code>s3:DeleteObjectTagging</code> action.</p> <p>To delete tags of a specific object version, add the <code>versionId</code> query parameter in the request. You will need permission for the <code>s3:DeleteObjectVersionTagging</code> action.</p> <p>The following operations are related to <code>DeleteBucketMetricsConfiguration</code>:</p> <ul> <li> <p> <a>PutObjectTagging</a> </p> </li> <li> <p> <a>GetObjectTagging</a> </p> </li> </ul></p>
20780     #[allow(unused_variables, warnings)]
delete_object_tagging( &self, input: DeleteObjectTaggingRequest, ) -> Result<DeleteObjectTaggingOutput, RusotoError<DeleteObjectTaggingError>>20781     async fn delete_object_tagging(
20782         &self,
20783         input: DeleteObjectTaggingRequest,
20784     ) -> Result<DeleteObjectTaggingOutput, RusotoError<DeleteObjectTaggingError>> {
20785         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
20786 
20787         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20788 
20789         let mut params = Params::new();
20790         if let Some(ref x) = input.version_id {
20791             params.put("versionId", x);
20792         }
20793         params.put_key("tagging");
20794         request.set_params(params);
20795 
20796         let mut response = self
20797             .client
20798             .sign_and_dispatch(request)
20799             .await
20800             .map_err(RusotoError::from)?;
20801         if !response.status.is_success() {
20802             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20803             return Err(DeleteObjectTaggingError::from_response(response));
20804         }
20805 
20806         let mut result;
20807         result = DeleteObjectTaggingOutput::default();
20808         if let Some(version_id) = response.headers.get("x-amz-version-id") {
20809             let value = version_id.to_owned();
20810             result.version_id = Some(value)
20811         }; // parse non-payload
20812         Ok(result)
20813     }
20814 
20815     /// <p><p>This operation enables you to delete multiple objects from a bucket using a single HTTP request. If you know the object keys that you want to delete, then this operation provides a suitable alternative to sending individual delete requests, reducing per-request overhead.</p> <p>The request contains a list of up to 1000 keys that you want to delete. In the XML, you provide the object key names, and optionally, version IDs if you want to delete a specific version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a delete operation and returns the result of that delete, success, or failure, in the response. Note that if the object specified in the request is not found, Amazon S3 returns the result as deleted.</p> <p> The operation supports two modes for the response: verbose and quiet. By default, the operation uses verbose mode in which the response includes the result of deletion of each key in your request. In quiet mode the response includes only keys where the delete operation encountered an error. For a successful deletion, the operation does not return any information about the delete in the response body.</p> <p>When performing this operation on an MFA Delete enabled bucket, that attempts to delete any versioned objects, you must include an MFA token. If you do not provide one, the entire request will fail, even if there are non-versioned objects you are trying to delete. If you provide an invalid token, whether there are versioned keys in the request or not, the entire Multi-Object Delete request will fail. For information about MFA Delete, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete"> MFA Delete</a>.</p> <p>Finally, the Content-MD5 header is required for all Multi-Object Delete requests. Amazon S3 uses the header value to ensure that your request body has not been altered in transit.</p> <p>The following operations are related to <code>DeleteObjects</code>:</p> <ul> <li> <p> <a>CreateMultipartUpload</a> </p> </li> <li> <p> <a>UploadPart</a> </p> </li> <li> <p> <a>CompleteMultipartUpload</a> </p> </li> <li> <p> <a>ListParts</a> </p> </li> <li> <p> <a>AbortMultipartUpload</a> </p> </li> </ul></p>
20816     #[allow(unused_variables, warnings)]
delete_objects( &self, input: DeleteObjectsRequest, ) -> Result<DeleteObjectsOutput, RusotoError<DeleteObjectsError>>20817     async fn delete_objects(
20818         &self,
20819         input: DeleteObjectsRequest,
20820     ) -> Result<DeleteObjectsOutput, RusotoError<DeleteObjectsError>> {
20821         let request_uri = format!("/{bucket}", bucket = input.bucket);
20822 
20823         let mut request = SignedRequest::new("POST", "s3", &self.region, &request_uri);
20824 
20825         if let Some(ref bypass_governance_retention) = input.bypass_governance_retention {
20826             request.add_header(
20827                 "x-amz-bypass-governance-retention",
20828                 &bypass_governance_retention.to_string(),
20829             );
20830         }
20831 
20832         if let Some(ref mfa) = input.mfa {
20833             request.add_header("x-amz-mfa", &mfa.to_string());
20834         }
20835 
20836         if let Some(ref request_payer) = input.request_payer {
20837             request.add_header("x-amz-request-payer", &request_payer.to_string());
20838         }
20839         let mut params = Params::new();
20840         params.put_key("delete");
20841         request.set_params(params);
20842         let mut writer = EventWriter::new(Vec::new());
20843         DeleteSerializer::serialize(&mut writer, "Delete", &input.delete);
20844         request.set_payload(Some(writer.into_inner()));
20845         request.set_content_md5_header();
20846 
20847         let mut response = self
20848             .client
20849             .sign_and_dispatch(request)
20850             .await
20851             .map_err(RusotoError::from)?;
20852         if !response.status.is_success() {
20853             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20854             return Err(DeleteObjectsError::from_response(response));
20855         }
20856 
20857         let mut result;
20858         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20859         if xml_response.body.is_empty() {
20860             result = DeleteObjectsOutput::default();
20861         } else {
20862             let reader = EventReader::new_with_config(
20863                 xml_response.body.as_ref(),
20864                 ParserConfig::new().trim_whitespace(false),
20865             );
20866             let mut stack = XmlResponse::new(reader.into_iter().peekable());
20867             let _start_document = stack.next();
20868             let actual_tag_name = peek_at_name(&mut stack)?;
20869             result = DeleteObjectsOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
20870         }
20871         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
20872             let value = request_charged.to_owned();
20873             result.request_charged = Some(value)
20874         }; // parse non-payload
20875         Ok(result)
20876     }
20877 
20878     /// <p><p>Removes the <code>PublicAccessBlock</code> configuration for an Amazon S3 bucket. To use this operation, you must have the <code>s3:PutBucketPublicAccessBlock</code> permission. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>The following operations are related to <code>DeleteBucketMetricsConfiguration</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html">Using Amazon S3 Block Public Access</a> </p> </li> <li> <p> <a>GetPublicAccessBlock</a> </p> </li> <li> <p> <a>PutPublicAccessBlock</a> </p> </li> <li> <p> <a>GetBucketPolicyStatus</a> </p> </li> </ul></p>
20879     #[allow(unused_variables, warnings)]
delete_public_access_block( &self, input: DeletePublicAccessBlockRequest, ) -> Result<(), RusotoError<DeletePublicAccessBlockError>>20880     async fn delete_public_access_block(
20881         &self,
20882         input: DeletePublicAccessBlockRequest,
20883     ) -> Result<(), RusotoError<DeletePublicAccessBlockError>> {
20884         let request_uri = format!("/{bucket}", bucket = input.bucket);
20885 
20886         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20887 
20888         let mut params = Params::new();
20889         params.put_key("publicAccessBlock");
20890         request.set_params(params);
20891 
20892         let mut response = self
20893             .client
20894             .sign_and_dispatch(request)
20895             .await
20896             .map_err(RusotoError::from)?;
20897         if !response.status.is_success() {
20898             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20899             return Err(DeletePublicAccessBlockError::from_response(response));
20900         }
20901 
20902         std::mem::drop(response);
20903         Ok(())
20904     }
20905 
20906     /// <p><p>This implementation of the GET operation uses the <code>accelerate</code> subresource to return the Transfer Acceleration state of a bucket, which is either <code>Enabled</code> or <code>Suspended</code>. Amazon S3 Transfer Acceleration is a bucket-level feature that enables you to perform faster data transfers to and from Amazon S3.</p> <p>To use this operation, you must have permission to perform the <code>s3:GetAccelerateConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>You set the Transfer Acceleration state of an existing bucket to <code>Enabled</code> or <code>Suspended</code> by using the <a>PutBucketAccelerateConfiguration</a> operation. </p> <p>A GET <code>accelerate</code> request does not return a state value for a bucket that has no transfer acceleration state. A bucket has no Transfer Acceleration state if a state has never been set on the bucket. </p> <p>For more information about transfer acceleration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//transfer-acceleration.html">Transfer Acceleration</a> in the Amazon Simple Storage Service Developer Guide.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>PutBucketAccelerateConfiguration</a> </p> </li> </ul></p>
20907     #[allow(unused_variables, warnings)]
get_bucket_accelerate_configuration( &self, input: GetBucketAccelerateConfigurationRequest, ) -> Result< GetBucketAccelerateConfigurationOutput, RusotoError<GetBucketAccelerateConfigurationError>, >20908     async fn get_bucket_accelerate_configuration(
20909         &self,
20910         input: GetBucketAccelerateConfigurationRequest,
20911     ) -> Result<
20912         GetBucketAccelerateConfigurationOutput,
20913         RusotoError<GetBucketAccelerateConfigurationError>,
20914     > {
20915         let request_uri = format!("/{bucket}", bucket = input.bucket);
20916 
20917         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20918 
20919         let mut params = Params::new();
20920         params.put_key("accelerate");
20921         request.set_params(params);
20922 
20923         let mut response = self
20924             .client
20925             .sign_and_dispatch(request)
20926             .await
20927             .map_err(RusotoError::from)?;
20928         if !response.status.is_success() {
20929             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20930             return Err(GetBucketAccelerateConfigurationError::from_response(
20931                 response,
20932             ));
20933         }
20934 
20935         let mut result;
20936         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20937         if xml_response.body.is_empty() {
20938             result = GetBucketAccelerateConfigurationOutput::default();
20939         } else {
20940             let reader = EventReader::new_with_config(
20941                 xml_response.body.as_ref(),
20942                 ParserConfig::new().trim_whitespace(false),
20943             );
20944             let mut stack = XmlResponse::new(reader.into_iter().peekable());
20945             let _start_document = stack.next();
20946             let actual_tag_name = peek_at_name(&mut stack)?;
20947             result = GetBucketAccelerateConfigurationOutputDeserializer::deserialize(
20948                 &actual_tag_name,
20949                 &mut stack,
20950             )?;
20951         }
20952         // parse non-payload
20953         Ok(result)
20954     }
20955 
20956     /// <p><p>This implementation of the <code>GET</code> operation uses the <code>acl</code> subresource to return the access control list (ACL) of a bucket. To use <code>GET</code> to return the ACL of the bucket, you must have <code>READ<em>ACP</code> access to the bucket. If <code>READ</em>ACP</code> permission is granted to the anonymous user, you can return the ACL of the bucket without using an authorization header.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> </p> </li> </ul></p>
20957     #[allow(unused_variables, warnings)]
get_bucket_acl( &self, input: GetBucketAclRequest, ) -> Result<GetBucketAclOutput, RusotoError<GetBucketAclError>>20958     async fn get_bucket_acl(
20959         &self,
20960         input: GetBucketAclRequest,
20961     ) -> Result<GetBucketAclOutput, RusotoError<GetBucketAclError>> {
20962         let request_uri = format!("/{bucket}", bucket = input.bucket);
20963 
20964         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20965 
20966         let mut params = Params::new();
20967         params.put_key("acl");
20968         request.set_params(params);
20969 
20970         let mut response = self
20971             .client
20972             .sign_and_dispatch(request)
20973             .await
20974             .map_err(RusotoError::from)?;
20975         if !response.status.is_success() {
20976             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20977             return Err(GetBucketAclError::from_response(response));
20978         }
20979 
20980         let mut result;
20981         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20982         if xml_response.body.is_empty() {
20983             result = GetBucketAclOutput::default();
20984         } else {
20985             let reader = EventReader::new_with_config(
20986                 xml_response.body.as_ref(),
20987                 ParserConfig::new().trim_whitespace(false),
20988             );
20989             let mut stack = XmlResponse::new(reader.into_iter().peekable());
20990             let _start_document = stack.next();
20991             let actual_tag_name = peek_at_name(&mut stack)?;
20992             result = GetBucketAclOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
20993         }
20994         // parse non-payload
20995         Ok(result)
20996     }
20997 
20998     /// <p><p>This implementation of the GET operation returns an analytics configuration (identified by the analytics configuration ID) from the bucket.</p> <p>To use this operation, you must have permissions to perform the <code>s3:GetAnalyticsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources"> Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. </p> <p>For information about Amazon S3 analytics feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html">Amazon S3 Analytics – Storage Class Analysis</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> </p> </li> <li> <p> </p> </li> <li> <p> </p> </li> </ul></p>
20999     #[allow(unused_variables, warnings)]
get_bucket_analytics_configuration( &self, input: GetBucketAnalyticsConfigurationRequest, ) -> Result< GetBucketAnalyticsConfigurationOutput, RusotoError<GetBucketAnalyticsConfigurationError>, >21000     async fn get_bucket_analytics_configuration(
21001         &self,
21002         input: GetBucketAnalyticsConfigurationRequest,
21003     ) -> Result<
21004         GetBucketAnalyticsConfigurationOutput,
21005         RusotoError<GetBucketAnalyticsConfigurationError>,
21006     > {
21007         let request_uri = format!("/{bucket}", bucket = input.bucket);
21008 
21009         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21010 
21011         let mut params = Params::new();
21012         params.put("id", &input.id);
21013         params.put_key("analytics");
21014         request.set_params(params);
21015 
21016         let mut response = self
21017             .client
21018             .sign_and_dispatch(request)
21019             .await
21020             .map_err(RusotoError::from)?;
21021         if !response.status.is_success() {
21022             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21023             return Err(GetBucketAnalyticsConfigurationError::from_response(
21024                 response,
21025             ));
21026         }
21027 
21028         let mut result;
21029         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21030         if xml_response.body.is_empty() {
21031             result = GetBucketAnalyticsConfigurationOutput::default();
21032         } else {
21033             let reader = EventReader::new_with_config(
21034                 xml_response.body.as_ref(),
21035                 ParserConfig::new().trim_whitespace(false),
21036             );
21037             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21038             let _start_document = stack.next();
21039             let actual_tag_name = peek_at_name(&mut stack)?;
21040             result = GetBucketAnalyticsConfigurationOutputDeserializer::deserialize(
21041                 &actual_tag_name,
21042                 &mut stack,
21043             )?;
21044         }
21045         // parse non-payload
21046         Ok(result)
21047     }
21048 
21049     /// <p><p>Returns the cors configuration information set for the bucket.</p> <p> To use this operation, you must have permission to perform the s3:GetBucketCORS action. By default, the bucket owner has this permission and can grant it to others.</p> <p> For more information about cors, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html"> Enabling Cross-Origin Resource Sharing</a>.</p> <p>The following operations are related to <code>GetBucketCors</code>:</p> <ul> <li> <p> <a>PutBucketCors</a> </p> </li> <li> <p> <a>DeleteBucketCors</a> </p> </li> </ul></p>
21050     #[allow(unused_variables, warnings)]
get_bucket_cors( &self, input: GetBucketCorsRequest, ) -> Result<GetBucketCorsOutput, RusotoError<GetBucketCorsError>>21051     async fn get_bucket_cors(
21052         &self,
21053         input: GetBucketCorsRequest,
21054     ) -> Result<GetBucketCorsOutput, RusotoError<GetBucketCorsError>> {
21055         let request_uri = format!("/{bucket}", bucket = input.bucket);
21056 
21057         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21058 
21059         let mut params = Params::new();
21060         params.put_key("cors");
21061         request.set_params(params);
21062 
21063         let mut response = self
21064             .client
21065             .sign_and_dispatch(request)
21066             .await
21067             .map_err(RusotoError::from)?;
21068         if !response.status.is_success() {
21069             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21070             return Err(GetBucketCorsError::from_response(response));
21071         }
21072 
21073         let mut result;
21074         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21075         if xml_response.body.is_empty() {
21076             result = GetBucketCorsOutput::default();
21077         } else {
21078             let reader = EventReader::new_with_config(
21079                 xml_response.body.as_ref(),
21080                 ParserConfig::new().trim_whitespace(false),
21081             );
21082             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21083             let _start_document = stack.next();
21084             let actual_tag_name = peek_at_name(&mut stack)?;
21085             result = GetBucketCorsOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
21086         }
21087         // parse non-payload
21088         Ok(result)
21089     }
21090 
21091     /// <p><p>Returns the default encryption configuration for an Amazon S3 bucket. For information about the Amazon S3 default encryption feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html">Amazon S3 Default Bucket Encryption</a>.</p> <p> To use this operation, you must have permission to perform the <code>s3:GetEncryptionConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>The following operations are related to <code>GetBucketEncryption</code>:</p> <ul> <li> <p> <a>PutBucketEncryption</a> </p> </li> <li> <p> <a>DeleteBucketEncryption</a> </p> </li> </ul></p>
21092     #[allow(unused_variables, warnings)]
get_bucket_encryption( &self, input: GetBucketEncryptionRequest, ) -> Result<GetBucketEncryptionOutput, RusotoError<GetBucketEncryptionError>>21093     async fn get_bucket_encryption(
21094         &self,
21095         input: GetBucketEncryptionRequest,
21096     ) -> Result<GetBucketEncryptionOutput, RusotoError<GetBucketEncryptionError>> {
21097         let request_uri = format!("/{bucket}", bucket = input.bucket);
21098 
21099         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21100 
21101         let mut params = Params::new();
21102         params.put_key("encryption");
21103         request.set_params(params);
21104 
21105         let mut response = self
21106             .client
21107             .sign_and_dispatch(request)
21108             .await
21109             .map_err(RusotoError::from)?;
21110         if !response.status.is_success() {
21111             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21112             return Err(GetBucketEncryptionError::from_response(response));
21113         }
21114 
21115         let mut result;
21116         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21117         if xml_response.body.is_empty() {
21118             result = GetBucketEncryptionOutput::default();
21119         } else {
21120             let reader = EventReader::new_with_config(
21121                 xml_response.body.as_ref(),
21122                 ParserConfig::new().trim_whitespace(false),
21123             );
21124             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21125             let _start_document = stack.next();
21126             let actual_tag_name = peek_at_name(&mut stack)?;
21127             result =
21128                 GetBucketEncryptionOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
21129         }
21130         // parse non-payload
21131         Ok(result)
21132     }
21133 
21134     /// <p><p>Returns an inventory configuration (identified by the inventory configuration ID) from the bucket.</p> <p>To use this operation, you must have permissions to perform the <code>s3:GetInventoryConfiguration</code> action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For information about the Amazon S3 inventory feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html">Amazon S3 Inventory</a>.</p> <p>The following operations are related to <code>GetBucketInventoryConfiguration</code>:</p> <ul> <li> <p> <a>DeleteBucketInventoryConfiguration</a> </p> </li> <li> <p> <a>ListBucketInventoryConfigurations</a> </p> </li> <li> <p> <a>PutBucketInventoryConfiguration</a> </p> </li> </ul></p>
21135     #[allow(unused_variables, warnings)]
get_bucket_inventory_configuration( &self, input: GetBucketInventoryConfigurationRequest, ) -> Result< GetBucketInventoryConfigurationOutput, RusotoError<GetBucketInventoryConfigurationError>, >21136     async fn get_bucket_inventory_configuration(
21137         &self,
21138         input: GetBucketInventoryConfigurationRequest,
21139     ) -> Result<
21140         GetBucketInventoryConfigurationOutput,
21141         RusotoError<GetBucketInventoryConfigurationError>,
21142     > {
21143         let request_uri = format!("/{bucket}", bucket = input.bucket);
21144 
21145         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21146 
21147         let mut params = Params::new();
21148         params.put("id", &input.id);
21149         params.put_key("inventory");
21150         request.set_params(params);
21151 
21152         let mut response = self
21153             .client
21154             .sign_and_dispatch(request)
21155             .await
21156             .map_err(RusotoError::from)?;
21157         if !response.status.is_success() {
21158             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21159             return Err(GetBucketInventoryConfigurationError::from_response(
21160                 response,
21161             ));
21162         }
21163 
21164         let mut result;
21165         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21166         if xml_response.body.is_empty() {
21167             result = GetBucketInventoryConfigurationOutput::default();
21168         } else {
21169             let reader = EventReader::new_with_config(
21170                 xml_response.body.as_ref(),
21171                 ParserConfig::new().trim_whitespace(false),
21172             );
21173             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21174             let _start_document = stack.next();
21175             let actual_tag_name = peek_at_name(&mut stack)?;
21176             result = GetBucketInventoryConfigurationOutputDeserializer::deserialize(
21177                 &actual_tag_name,
21178                 &mut stack,
21179             )?;
21180         }
21181         // parse non-payload
21182         Ok(result)
21183     }
21184 
21185     /// <p><important> <p>For an updated version of this API, see <a>GetBucketLifecycleConfiguration</a>. If you configured a bucket lifecycle using the <code>filter</code> element, you should see the updated version of this topic. This topic is provided for backward compatibility.</p> </important> <p>Returns the lifecycle configuration information set on the bucket. For information about lifecycle configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html">Object Lifecycle Management</a>.</p> <p> To use this operation, you must have permission to perform the <code>s3:GetLifecycleConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p> <code>GetBucketLifecycle</code> has the following special error:</p> <ul> <li> <p>Error code: <code>NoSuchLifecycleConfiguration</code> </p> <ul> <li> <p>Description: The lifecycle configuration does not exist.</p> </li> <li> <p>HTTP Status Code: 404 Not Found</p> </li> <li> <p>SOAP Fault Code Prefix: Client</p> </li> </ul> </li> </ul> <p>The following operations are related to <code>GetBucketLifecycle</code>:</p> <ul> <li> <p> <a>GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a>PutBucketLifecycle</a> </p> </li> <li> <p> <a>DeleteBucketLifecycle</a> </p> </li> </ul></p>
21186     #[allow(unused_variables, warnings)]
get_bucket_lifecycle( &self, input: GetBucketLifecycleRequest, ) -> Result<GetBucketLifecycleOutput, RusotoError<GetBucketLifecycleError>>21187     async fn get_bucket_lifecycle(
21188         &self,
21189         input: GetBucketLifecycleRequest,
21190     ) -> Result<GetBucketLifecycleOutput, RusotoError<GetBucketLifecycleError>> {
21191         let request_uri = format!("/{bucket}", bucket = input.bucket);
21192 
21193         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21194 
21195         let mut params = Params::new();
21196         params.put_key("lifecycle");
21197         request.set_params(params);
21198 
21199         let mut response = self
21200             .client
21201             .sign_and_dispatch(request)
21202             .await
21203             .map_err(RusotoError::from)?;
21204         if !response.status.is_success() {
21205             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21206             return Err(GetBucketLifecycleError::from_response(response));
21207         }
21208 
21209         let mut result;
21210         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21211         if xml_response.body.is_empty() {
21212             result = GetBucketLifecycleOutput::default();
21213         } else {
21214             let reader = EventReader::new_with_config(
21215                 xml_response.body.as_ref(),
21216                 ParserConfig::new().trim_whitespace(false),
21217             );
21218             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21219             let _start_document = stack.next();
21220             let actual_tag_name = peek_at_name(&mut stack)?;
21221             result =
21222                 GetBucketLifecycleOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
21223         }
21224         // parse non-payload
21225         Ok(result)
21226     }
21227 
21228     /// <p><note> <p>Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, or a combination of both. Accordingly, this section describes the latest API. The response describes the new filter element that you can use to specify a filter to select a subset of objects to which the rule applies. If you are still using previous version of the lifecycle configuration, it works. For the earlier API description, see <a>GetBucketLifecycle</a>.</p> </note> <p>Returns the lifecycle configuration information set on the bucket. For information about lifecycle configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html">Object Lifecycle Management</a>.</p> <p>To use this operation, you must have permission to perform the <code>s3:GetLifecycleConfiguration</code> action. The bucket owner has this permission, by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p> <code>GetBucketLifecycleConfiguration</code> has the following special error:</p> <ul> <li> <p>Error code: <code>NoSuchLifecycleConfiguration</code> </p> <ul> <li> <p>Description: The lifecycle configuration does not exist.</p> </li> <li> <p>HTTP Status Code: 404 Not Found</p> </li> <li> <p>SOAP Fault Code Prefix: Client</p> </li> </ul> </li> </ul> <p>The following operations are related to <code>DeleteBucketMetricsConfiguration</code>:</p> <ul> <li> <p> <a>GetBucketLifecycle</a> </p> </li> <li> <p> <a>PutBucketLifecycle</a> </p> </li> <li> <p> <a>DeleteBucketLifecycle</a> </p> </li> </ul></p>
21229     #[allow(unused_variables, warnings)]
get_bucket_lifecycle_configuration( &self, input: GetBucketLifecycleConfigurationRequest, ) -> Result< GetBucketLifecycleConfigurationOutput, RusotoError<GetBucketLifecycleConfigurationError>, >21230     async fn get_bucket_lifecycle_configuration(
21231         &self,
21232         input: GetBucketLifecycleConfigurationRequest,
21233     ) -> Result<
21234         GetBucketLifecycleConfigurationOutput,
21235         RusotoError<GetBucketLifecycleConfigurationError>,
21236     > {
21237         let request_uri = format!("/{bucket}", bucket = input.bucket);
21238 
21239         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21240 
21241         let mut params = Params::new();
21242         params.put_key("lifecycle");
21243         request.set_params(params);
21244 
21245         let mut response = self
21246             .client
21247             .sign_and_dispatch(request)
21248             .await
21249             .map_err(RusotoError::from)?;
21250         if !response.status.is_success() {
21251             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21252             return Err(GetBucketLifecycleConfigurationError::from_response(
21253                 response,
21254             ));
21255         }
21256 
21257         let mut result;
21258         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21259         if xml_response.body.is_empty() {
21260             result = GetBucketLifecycleConfigurationOutput::default();
21261         } else {
21262             let reader = EventReader::new_with_config(
21263                 xml_response.body.as_ref(),
21264                 ParserConfig::new().trim_whitespace(false),
21265             );
21266             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21267             let _start_document = stack.next();
21268             let actual_tag_name = peek_at_name(&mut stack)?;
21269             result = GetBucketLifecycleConfigurationOutputDeserializer::deserialize(
21270                 &actual_tag_name,
21271                 &mut stack,
21272             )?;
21273         }
21274         // parse non-payload
21275         Ok(result)
21276     }
21277 
21278     /// <p><p>Returns the Region the bucket resides in. You set the bucket&#39;s Region using the <code>LocationConstraint</code> request parameter in a <code>CreateBucket</code> request. For more information, see <a>CreateBucket</a>.</p> <p> To use this implementation of the operation, you must be the bucket owner.</p> <p>The following operations are related to <code>GetBucketLocation</code>:</p> <ul> <li> <p> <a>GetObject</a> </p> </li> <li> <p> <a>CreateBucket</a> </p> </li> </ul></p>
21279     #[allow(unused_variables, warnings)]
get_bucket_location( &self, input: GetBucketLocationRequest, ) -> Result<GetBucketLocationOutput, RusotoError<GetBucketLocationError>>21280     async fn get_bucket_location(
21281         &self,
21282         input: GetBucketLocationRequest,
21283     ) -> Result<GetBucketLocationOutput, RusotoError<GetBucketLocationError>> {
21284         let request_uri = format!("/{bucket}", bucket = input.bucket);
21285 
21286         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21287 
21288         let mut params = Params::new();
21289         params.put_key("location");
21290         request.set_params(params);
21291 
21292         let mut response = self
21293             .client
21294             .sign_and_dispatch(request)
21295             .await
21296             .map_err(RusotoError::from)?;
21297         if !response.status.is_success() {
21298             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21299             return Err(GetBucketLocationError::from_response(response));
21300         }
21301 
21302         let mut result;
21303         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21304         if xml_response.body.is_empty() {
21305             result = GetBucketLocationOutput::default();
21306         } else {
21307             let reader = EventReader::new_with_config(
21308                 xml_response.body.as_ref(),
21309                 ParserConfig::new().trim_whitespace(false),
21310             );
21311             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21312             let _start_document = stack.next();
21313             let actual_tag_name = peek_at_name(&mut stack)?;
21314             result =
21315                 GetBucketLocationOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
21316         }
21317         // parse non-payload
21318         Ok(result)
21319     }
21320 
21321     /// <p><p>Returns the logging status of a bucket and the permissions users have to view and modify that status. To use GET, you must be the bucket owner.</p> <p>The following operations are related to <code>GetBucketLogging</code>:</p> <ul> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>PutBucketLogging</a> </p> </li> </ul></p>
21322     #[allow(unused_variables, warnings)]
get_bucket_logging( &self, input: GetBucketLoggingRequest, ) -> Result<GetBucketLoggingOutput, RusotoError<GetBucketLoggingError>>21323     async fn get_bucket_logging(
21324         &self,
21325         input: GetBucketLoggingRequest,
21326     ) -> Result<GetBucketLoggingOutput, RusotoError<GetBucketLoggingError>> {
21327         let request_uri = format!("/{bucket}", bucket = input.bucket);
21328 
21329         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21330 
21331         let mut params = Params::new();
21332         params.put_key("logging");
21333         request.set_params(params);
21334 
21335         let mut response = self
21336             .client
21337             .sign_and_dispatch(request)
21338             .await
21339             .map_err(RusotoError::from)?;
21340         if !response.status.is_success() {
21341             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21342             return Err(GetBucketLoggingError::from_response(response));
21343         }
21344 
21345         let mut result;
21346         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21347         if xml_response.body.is_empty() {
21348             result = GetBucketLoggingOutput::default();
21349         } else {
21350             let reader = EventReader::new_with_config(
21351                 xml_response.body.as_ref(),
21352                 ParserConfig::new().trim_whitespace(false),
21353             );
21354             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21355             let _start_document = stack.next();
21356             let actual_tag_name = peek_at_name(&mut stack)?;
21357             result = GetBucketLoggingOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
21358         }
21359         // parse non-payload
21360         Ok(result)
21361     }
21362 
21363     /// <p><p>Gets a metrics configuration (specified by the metrics configuration ID) from the bucket. Note that this doesn&#39;t include the daily storage metrics.</p> <p> To use this operation, you must have permissions to perform the <code>s3:GetMetricsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p> For information about CloudWatch request metrics for Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html">Monitoring Metrics with Amazon CloudWatch</a>.</p> <p>The following operations are related to <code>GetBucketMetricsConfiguration</code>:</p> <ul> <li> <p> <a>PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>DeleteBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>ListBucketMetricsConfigurations</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html">Monitoring Metrics with Amazon CloudWatch</a> </p> </li> </ul></p>
21364     #[allow(unused_variables, warnings)]
get_bucket_metrics_configuration( &self, input: GetBucketMetricsConfigurationRequest, ) -> Result<GetBucketMetricsConfigurationOutput, RusotoError<GetBucketMetricsConfigurationError>>21365     async fn get_bucket_metrics_configuration(
21366         &self,
21367         input: GetBucketMetricsConfigurationRequest,
21368     ) -> Result<GetBucketMetricsConfigurationOutput, RusotoError<GetBucketMetricsConfigurationError>>
21369     {
21370         let request_uri = format!("/{bucket}", bucket = input.bucket);
21371 
21372         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21373 
21374         let mut params = Params::new();
21375         params.put("id", &input.id);
21376         params.put_key("metrics");
21377         request.set_params(params);
21378 
21379         let mut response = self
21380             .client
21381             .sign_and_dispatch(request)
21382             .await
21383             .map_err(RusotoError::from)?;
21384         if !response.status.is_success() {
21385             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21386             return Err(GetBucketMetricsConfigurationError::from_response(response));
21387         }
21388 
21389         let mut result;
21390         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21391         if xml_response.body.is_empty() {
21392             result = GetBucketMetricsConfigurationOutput::default();
21393         } else {
21394             let reader = EventReader::new_with_config(
21395                 xml_response.body.as_ref(),
21396                 ParserConfig::new().trim_whitespace(false),
21397             );
21398             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21399             let _start_document = stack.next();
21400             let actual_tag_name = peek_at_name(&mut stack)?;
21401             result = GetBucketMetricsConfigurationOutputDeserializer::deserialize(
21402                 &actual_tag_name,
21403                 &mut stack,
21404             )?;
21405         }
21406         // parse non-payload
21407         Ok(result)
21408     }
21409 
21410     /// <p> No longer used, see <a>GetBucketNotificationConfiguration</a>.</p>
21411     #[allow(unused_variables, warnings)]
get_bucket_notification( &self, input: GetBucketNotificationConfigurationRequest, ) -> Result<NotificationConfigurationDeprecated, RusotoError<GetBucketNotificationError>>21412     async fn get_bucket_notification(
21413         &self,
21414         input: GetBucketNotificationConfigurationRequest,
21415     ) -> Result<NotificationConfigurationDeprecated, RusotoError<GetBucketNotificationError>> {
21416         let request_uri = format!("/{bucket}", bucket = input.bucket);
21417 
21418         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21419 
21420         let mut params = Params::new();
21421         params.put_key("notification");
21422         request.set_params(params);
21423 
21424         let mut response = self
21425             .client
21426             .sign_and_dispatch(request)
21427             .await
21428             .map_err(RusotoError::from)?;
21429         if !response.status.is_success() {
21430             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21431             return Err(GetBucketNotificationError::from_response(response));
21432         }
21433 
21434         let mut result;
21435         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21436         if xml_response.body.is_empty() {
21437             result = NotificationConfigurationDeprecated::default();
21438         } else {
21439             let reader = EventReader::new_with_config(
21440                 xml_response.body.as_ref(),
21441                 ParserConfig::new().trim_whitespace(false),
21442             );
21443             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21444             let _start_document = stack.next();
21445             let actual_tag_name = peek_at_name(&mut stack)?;
21446             result = NotificationConfigurationDeprecatedDeserializer::deserialize(
21447                 &actual_tag_name,
21448                 &mut stack,
21449             )?;
21450         }
21451         // parse non-payload
21452         Ok(result)
21453     }
21454 
21455     /// <p><p>Returns the notification configuration of a bucket.</p> <p>If notifications are not enabled on the bucket, the operation returns an empty <code>NotificationConfiguration</code> element.</p> <p>By default, you must be the bucket owner to read the notification configuration of a bucket. However, the bucket owner can use a bucket policy to grant permission to other users to read this configuration with the <code>s3:GetBucketNotification</code> permission.</p> <p>For more information about setting and reading the notification configuration on a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html">Setting Up Notification of Bucket Events</a>. For more information about bucket policies, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html">Using Bucket Policies</a>.</p> <p>The following operation is related to <code>GetBucketNotification</code>:</p> <ul> <li> <p> <a>PutBucketNotification</a> </p> </li> </ul></p>
21456     #[allow(unused_variables, warnings)]
get_bucket_notification_configuration( &self, input: GetBucketNotificationConfigurationRequest, ) -> Result<NotificationConfiguration, RusotoError<GetBucketNotificationConfigurationError>>21457     async fn get_bucket_notification_configuration(
21458         &self,
21459         input: GetBucketNotificationConfigurationRequest,
21460     ) -> Result<NotificationConfiguration, RusotoError<GetBucketNotificationConfigurationError>>
21461     {
21462         let request_uri = format!("/{bucket}", bucket = input.bucket);
21463 
21464         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21465 
21466         let mut params = Params::new();
21467         params.put_key("notification");
21468         request.set_params(params);
21469 
21470         let mut response = self
21471             .client
21472             .sign_and_dispatch(request)
21473             .await
21474             .map_err(RusotoError::from)?;
21475         if !response.status.is_success() {
21476             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21477             return Err(GetBucketNotificationConfigurationError::from_response(
21478                 response,
21479             ));
21480         }
21481 
21482         let mut result;
21483         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21484         if xml_response.body.is_empty() {
21485             result = NotificationConfiguration::default();
21486         } else {
21487             let reader = EventReader::new_with_config(
21488                 xml_response.body.as_ref(),
21489                 ParserConfig::new().trim_whitespace(false),
21490             );
21491             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21492             let _start_document = stack.next();
21493             let actual_tag_name = peek_at_name(&mut stack)?;
21494             result =
21495                 NotificationConfigurationDeserializer::deserialize(&actual_tag_name, &mut stack)?;
21496         }
21497         // parse non-payload
21498         Ok(result)
21499     }
21500 
21501     /// <p><p>Returns the policy of a specified bucket. If you are using an identity other than the root user of the AWS account that owns the bucket, the calling identity must have the <code>GetBucketPolicy</code> permissions on the specified bucket and belong to the bucket owner&#39;s account in order to use this operation.</p> <p>If you don&#39;t have <code>GetBucketPolicy</code> permissions, Amazon S3 returns a <code>403 Access Denied</code> error. If you have the correct permissions, but you&#39;re not using an identity that belongs to the bucket owner&#39;s account, Amazon S3 returns a <code>405 Method Not Allowed</code> error.</p> <important> <p>As a security precaution, the root user of the AWS account that owns a bucket can always use this operation, even if the policy explicitly denies the root user the ability to perform this action.</p> </important> <p>For more information about bucket policies, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html">Using Bucket Policies and User Policies</a>.</p> <p>The following operation is related to <code>GetBucketPolicy</code>:</p> <ul> <li> <p> <a>GetObject</a> </p> </li> </ul></p>
21502     #[allow(unused_variables, warnings)]
get_bucket_policy( &self, input: GetBucketPolicyRequest, ) -> Result<GetBucketPolicyOutput, RusotoError<GetBucketPolicyError>>21503     async fn get_bucket_policy(
21504         &self,
21505         input: GetBucketPolicyRequest,
21506     ) -> Result<GetBucketPolicyOutput, RusotoError<GetBucketPolicyError>> {
21507         let request_uri = format!("/{bucket}", bucket = input.bucket);
21508 
21509         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21510 
21511         let mut params = Params::new();
21512         params.put_key("policy");
21513         request.set_params(params);
21514 
21515         let mut response = self
21516             .client
21517             .sign_and_dispatch(request)
21518             .await
21519             .map_err(RusotoError::from)?;
21520         if !response.status.is_success() {
21521             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21522             return Err(GetBucketPolicyError::from_response(response));
21523         }
21524 
21525         let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21526         let mut result = GetBucketPolicyOutput::default();
21527         result.policy = Some(String::from_utf8_lossy(response.body.as_ref()).into());
21528 
21529         Ok(result)
21530     }
21531 
21532     /// <p><p>Retrieves the policy status for an Amazon S3 bucket, indicating whether the bucket is public. In order to use this operation, you must have the <code>s3:GetBucketPolicyStatus</code> permission. For more information about Amazon S3 permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a>.</p> <p> For more information about when Amazon S3 considers a bucket public, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status">The Meaning of &quot;Public&quot;</a>. </p> <p>The following operations are related to <code>GetBucketPolicyStatus</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html">Using Amazon S3 Block Public Access</a> </p> </li> <li> <p> <a>GetPublicAccessBlock</a> </p> </li> <li> <p> <a>PutPublicAccessBlock</a> </p> </li> <li> <p> <a>DeletePublicAccessBlock</a> </p> </li> </ul></p>
21533     #[allow(unused_variables, warnings)]
get_bucket_policy_status( &self, input: GetBucketPolicyStatusRequest, ) -> Result<GetBucketPolicyStatusOutput, RusotoError<GetBucketPolicyStatusError>>21534     async fn get_bucket_policy_status(
21535         &self,
21536         input: GetBucketPolicyStatusRequest,
21537     ) -> Result<GetBucketPolicyStatusOutput, RusotoError<GetBucketPolicyStatusError>> {
21538         let request_uri = format!("/{bucket}", bucket = input.bucket);
21539 
21540         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21541 
21542         let mut params = Params::new();
21543         params.put_key("policyStatus");
21544         request.set_params(params);
21545 
21546         let mut response = self
21547             .client
21548             .sign_and_dispatch(request)
21549             .await
21550             .map_err(RusotoError::from)?;
21551         if !response.status.is_success() {
21552             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21553             return Err(GetBucketPolicyStatusError::from_response(response));
21554         }
21555 
21556         let mut result;
21557         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21558         if xml_response.body.is_empty() {
21559             result = GetBucketPolicyStatusOutput::default();
21560         } else {
21561             let reader = EventReader::new_with_config(
21562                 xml_response.body.as_ref(),
21563                 ParserConfig::new().trim_whitespace(false),
21564             );
21565             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21566             let _start_document = stack.next();
21567             let actual_tag_name = peek_at_name(&mut stack)?;
21568             result =
21569                 GetBucketPolicyStatusOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
21570         }
21571         // parse non-payload
21572         Ok(result)
21573     }
21574 
21575     /// <p><p>Returns the replication configuration of a bucket.</p> <note> <p> It can take a while to propagate the put or delete a replication configuration to all Amazon S3 systems. Therefore, a get request soon after put or delete can return a wrong result. </p> </note> <p> For information about replication configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html">Replication</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>This operation requires permissions for the <code>s3:GetReplicationConfiguration</code> action. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html">Using Bucket Policies and User Policies</a>.</p> <p>If you include the <code>Filter</code> element in a replication configuration, you must also include the <code>DeleteMarkerReplication</code> and <code>Priority</code> elements. The response also returns those elements.</p> <p>For information about <code>GetBucketReplication</code> errors, see <a>ReplicationErrorCodeList</a> </p> <p>The following operations are related to <code>GetBucketReplication</code>:</p> <ul> <li> <p> <a>PutBucketReplication</a> </p> </li> <li> <p> <a>DeleteBucketReplication</a> </p> </li> </ul></p>
21576     #[allow(unused_variables, warnings)]
get_bucket_replication( &self, input: GetBucketReplicationRequest, ) -> Result<GetBucketReplicationOutput, RusotoError<GetBucketReplicationError>>21577     async fn get_bucket_replication(
21578         &self,
21579         input: GetBucketReplicationRequest,
21580     ) -> Result<GetBucketReplicationOutput, RusotoError<GetBucketReplicationError>> {
21581         let request_uri = format!("/{bucket}", bucket = input.bucket);
21582 
21583         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21584 
21585         let mut params = Params::new();
21586         params.put_key("replication");
21587         request.set_params(params);
21588 
21589         let mut response = self
21590             .client
21591             .sign_and_dispatch(request)
21592             .await
21593             .map_err(RusotoError::from)?;
21594         if !response.status.is_success() {
21595             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21596             return Err(GetBucketReplicationError::from_response(response));
21597         }
21598 
21599         let mut result;
21600         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21601         if xml_response.body.is_empty() {
21602             result = GetBucketReplicationOutput::default();
21603         } else {
21604             let reader = EventReader::new_with_config(
21605                 xml_response.body.as_ref(),
21606                 ParserConfig::new().trim_whitespace(false),
21607             );
21608             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21609             let _start_document = stack.next();
21610             let actual_tag_name = peek_at_name(&mut stack)?;
21611             result =
21612                 GetBucketReplicationOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
21613         }
21614         // parse non-payload
21615         Ok(result)
21616     }
21617 
21618     /// <p><p>Returns the request payment configuration of a bucket. To use this version of the operation, you must be the bucket owner. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html">Requester Pays Buckets</a>.</p> <p>The following operations are related to <code>GetBucketRequestPayment</code>:</p> <ul> <li> <p> <a>ListObjects</a> </p> </li> </ul></p>
21619     #[allow(unused_variables, warnings)]
get_bucket_request_payment( &self, input: GetBucketRequestPaymentRequest, ) -> Result<GetBucketRequestPaymentOutput, RusotoError<GetBucketRequestPaymentError>>21620     async fn get_bucket_request_payment(
21621         &self,
21622         input: GetBucketRequestPaymentRequest,
21623     ) -> Result<GetBucketRequestPaymentOutput, RusotoError<GetBucketRequestPaymentError>> {
21624         let request_uri = format!("/{bucket}", bucket = input.bucket);
21625 
21626         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21627 
21628         let mut params = Params::new();
21629         params.put_key("requestPayment");
21630         request.set_params(params);
21631 
21632         let mut response = self
21633             .client
21634             .sign_and_dispatch(request)
21635             .await
21636             .map_err(RusotoError::from)?;
21637         if !response.status.is_success() {
21638             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21639             return Err(GetBucketRequestPaymentError::from_response(response));
21640         }
21641 
21642         let mut result;
21643         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21644         if xml_response.body.is_empty() {
21645             result = GetBucketRequestPaymentOutput::default();
21646         } else {
21647             let reader = EventReader::new_with_config(
21648                 xml_response.body.as_ref(),
21649                 ParserConfig::new().trim_whitespace(false),
21650             );
21651             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21652             let _start_document = stack.next();
21653             let actual_tag_name = peek_at_name(&mut stack)?;
21654             result = GetBucketRequestPaymentOutputDeserializer::deserialize(
21655                 &actual_tag_name,
21656                 &mut stack,
21657             )?;
21658         }
21659         // parse non-payload
21660         Ok(result)
21661     }
21662 
21663     /// <p><p>Returns the tag set associated with the bucket.</p> <p>To use this operation, you must have permission to perform the <code>s3:GetBucketTagging</code> action. By default, the bucket owner has this permission and can grant this permission to others.</p> <p> <code>GetBucketTagging</code> has the following special error:</p> <ul> <li> <p>Error code: <code>NoSuchTagSetError</code> </p> <ul> <li> <p>Description: There is no tag set associated with the bucket.</p> </li> </ul> </li> </ul> <p>The following operations are related to <code>GetBucketTagging</code>:</p> <ul> <li> <p> <a>PutBucketTagging</a> </p> </li> <li> <p> <a>DeleteBucketTagging</a> </p> </li> </ul></p>
21664     #[allow(unused_variables, warnings)]
get_bucket_tagging( &self, input: GetBucketTaggingRequest, ) -> Result<GetBucketTaggingOutput, RusotoError<GetBucketTaggingError>>21665     async fn get_bucket_tagging(
21666         &self,
21667         input: GetBucketTaggingRequest,
21668     ) -> Result<GetBucketTaggingOutput, RusotoError<GetBucketTaggingError>> {
21669         let request_uri = format!("/{bucket}", bucket = input.bucket);
21670 
21671         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21672 
21673         let mut params = Params::new();
21674         params.put_key("tagging");
21675         request.set_params(params);
21676 
21677         let mut response = self
21678             .client
21679             .sign_and_dispatch(request)
21680             .await
21681             .map_err(RusotoError::from)?;
21682         if !response.status.is_success() {
21683             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21684             return Err(GetBucketTaggingError::from_response(response));
21685         }
21686 
21687         let mut result;
21688         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21689         if xml_response.body.is_empty() {
21690             result = GetBucketTaggingOutput::default();
21691         } else {
21692             let reader = EventReader::new_with_config(
21693                 xml_response.body.as_ref(),
21694                 ParserConfig::new().trim_whitespace(false),
21695             );
21696             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21697             let _start_document = stack.next();
21698             let actual_tag_name = peek_at_name(&mut stack)?;
21699             result = GetBucketTaggingOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
21700         }
21701         // parse non-payload
21702         Ok(result)
21703     }
21704 
21705     /// <p><p>Returns the versioning state of a bucket.</p> <p>To retrieve the versioning state of a bucket, you must be the bucket owner.</p> <p>This implementation also returns the MFA Delete status of the versioning state. If the MFA Delete status is <code>enabled</code>, the bucket owner must use an authentication device to change the versioning state of the bucket.</p> <p>The following operations are related to <code>GetBucketVersioning</code>:</p> <ul> <li> <p> <a>GetObject</a> </p> </li> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a>DeleteObject</a> </p> </li> </ul></p>
21706     #[allow(unused_variables, warnings)]
get_bucket_versioning( &self, input: GetBucketVersioningRequest, ) -> Result<GetBucketVersioningOutput, RusotoError<GetBucketVersioningError>>21707     async fn get_bucket_versioning(
21708         &self,
21709         input: GetBucketVersioningRequest,
21710     ) -> Result<GetBucketVersioningOutput, RusotoError<GetBucketVersioningError>> {
21711         let request_uri = format!("/{bucket}", bucket = input.bucket);
21712 
21713         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21714 
21715         let mut params = Params::new();
21716         params.put_key("versioning");
21717         request.set_params(params);
21718 
21719         let mut response = self
21720             .client
21721             .sign_and_dispatch(request)
21722             .await
21723             .map_err(RusotoError::from)?;
21724         if !response.status.is_success() {
21725             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21726             return Err(GetBucketVersioningError::from_response(response));
21727         }
21728 
21729         let mut result;
21730         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21731         if xml_response.body.is_empty() {
21732             result = GetBucketVersioningOutput::default();
21733         } else {
21734             let reader = EventReader::new_with_config(
21735                 xml_response.body.as_ref(),
21736                 ParserConfig::new().trim_whitespace(false),
21737             );
21738             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21739             let _start_document = stack.next();
21740             let actual_tag_name = peek_at_name(&mut stack)?;
21741             result =
21742                 GetBucketVersioningOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
21743         }
21744         // parse non-payload
21745         Ok(result)
21746     }
21747 
21748     /// <p><p>Returns the website configuration for a bucket. To host website on Amazon S3, you can configure a bucket as website by adding a website configuration. For more information about hosting websites, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a>. </p> <p>This GET operation requires the <code>S3:GetBucketWebsite</code> permission. By default, only the bucket owner can read the bucket website configuration. However, bucket owners can allow other users to read the website configuration by writing a bucket policy granting them the <code>S3:GetBucketWebsite</code> permission.</p> <p>The following operations are related to <code>DeleteBucketWebsite</code>:</p> <ul> <li> <p> <a>DeleteBucketWebsite</a> </p> </li> <li> <p> <a>PutBucketWebsite</a> </p> </li> </ul></p>
21749     #[allow(unused_variables, warnings)]
get_bucket_website( &self, input: GetBucketWebsiteRequest, ) -> Result<GetBucketWebsiteOutput, RusotoError<GetBucketWebsiteError>>21750     async fn get_bucket_website(
21751         &self,
21752         input: GetBucketWebsiteRequest,
21753     ) -> Result<GetBucketWebsiteOutput, RusotoError<GetBucketWebsiteError>> {
21754         let request_uri = format!("/{bucket}", bucket = input.bucket);
21755 
21756         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21757 
21758         let mut params = Params::new();
21759         params.put_key("website");
21760         request.set_params(params);
21761 
21762         let mut response = self
21763             .client
21764             .sign_and_dispatch(request)
21765             .await
21766             .map_err(RusotoError::from)?;
21767         if !response.status.is_success() {
21768             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21769             return Err(GetBucketWebsiteError::from_response(response));
21770         }
21771 
21772         let mut result;
21773         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21774         if xml_response.body.is_empty() {
21775             result = GetBucketWebsiteOutput::default();
21776         } else {
21777             let reader = EventReader::new_with_config(
21778                 xml_response.body.as_ref(),
21779                 ParserConfig::new().trim_whitespace(false),
21780             );
21781             let mut stack = XmlResponse::new(reader.into_iter().peekable());
21782             let _start_document = stack.next();
21783             let actual_tag_name = peek_at_name(&mut stack)?;
21784             result = GetBucketWebsiteOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
21785         }
21786         // parse non-payload
21787         Ok(result)
21788     }
21789 
21790     /// <p><p>Retrieves objects from Amazon S3. To use <code>GET</code>, you must have <code>READ</code> access to the object. If you grant <code>READ</code> access to the anonymous user, you can return the object without using an authorization header.</p> <p>An Amazon S3 bucket has no directory hierarchy such as you would find in a typical computer file system. You can, however, create a logical hierarchy by using object key names that imply a folder structure. For example, instead of naming an object <code>sample.jpg</code>, you can name it <code>photos/2006/February/sample.jpg</code>.</p> <p>To get an object from such a logical hierarchy, specify the full key name for the object in the <code>GET</code> operation. For a virtual hosted-style request example, if you have the object <code>photos/2006/February/sample.jpg</code>, specify the resource as <code>/photos/2006/February/sample.jpg</code>. For a path-style request example, if you have the object <code>photos/2006/February/sample.jpg</code> in the bucket named <code>examplebucket</code>, specify the resource as <code>/examplebucket/photos/2006/February/sample.jpg</code>. For more information about request types, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket">HTTP Host Header Bucket Specification</a>.</p> <p>To distribute large files to many people, you can save bandwidth costs by using BitTorrent. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.html">Amazon S3 Torrent</a>. For more information about returning the ACL of an object, see <a>GetObjectAcl</a>.</p> <p>If the object you are retrieving is stored in the GLACIER or DEEP_ARCHIVE storage classes, before you can retrieve the object you must first restore a copy using . Otherwise, this operation returns an <code>InvalidObjectStateError</code> error. For information about restoring archived objects, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html">Restoring Archived Objects</a>.</p> <p>Encryption request headers, like <code>x-amz-server-side-encryption</code>, should not be sent for GET requests if your object uses server-side encryption with CMKs stored in AWS KMS (SSE-KMS) or server-side encryption with Amazon S3–managed encryption keys (SSE-S3). If your object does use these types of keys, you’ll get an HTTP 400 BadRequest error.</p> <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p> <ul> <li> <p>x-amz-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key-MD5</p> </li> </ul> <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a>.</p> <p>Assuming you have permission to read object tags (permission for the <code>s3:GetObjectVersionTagging</code> action), the response also returns the <code>x-amz-tagging-count</code> header that provides the count of number of tags associated with the object. You can use <a>GetObjectTagging</a> to retrieve the tag set associated with an object.</p> <p> <b>Permissions</b> </p> <p>You need the <code>s3:GetObject</code> permission for this operation. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a>. If the object you request does not exist, the error Amazon S3 returns depends on whether you also have the <code>s3:ListBucket</code> permission.</p> <ul> <li> <p>If you have the <code>s3:ListBucket</code> permission on the bucket, Amazon S3 will return an HTTP status code 404 (&quot;no such key&quot;) error.</p> </li> <li> <p>If you don’t have the <code>s3:ListBucket</code> permission, Amazon S3 will return an HTTP status code 403 (&quot;access denied&quot;) error.</p> </li> </ul> <p> <b>Versioning</b> </p> <p>By default, the GET operation returns the current version of an object. To return a different version, use the <code>versionId</code> subresource.</p> <note> <p>If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes <code>x-amz-delete-marker: true</code> in the response.</p> </note> <p>For more information about versioning, see <a>PutBucketVersioning</a>. </p> <p> <b>Overriding Response Header Values</b> </p> <p>There are times when you want to override certain response header values in a GET response. For example, you might override the Content-Disposition response header value in your GET request.</p> <p>You can override values for a set of response headers using the following query parameters. These response header values are sent only on a successful request, that is, when status code 200 OK is returned. The set of headers you can override using these parameters is a subset of the headers that Amazon S3 accepts when you create an object. The response headers that you can override for the GET response are <code>Content-Type</code>, <code>Content-Language</code>, <code>Expires</code>, <code>Cache-Control</code>, <code>Content-Disposition</code>, and <code>Content-Encoding</code>. To override these header values in the GET response, you use the following request parameters.</p> <note> <p>You must sign the request, either using an Authorization header or a presigned URL, when using these parameters. They cannot be used with an unsigned (anonymous) request.</p> </note> <ul> <li> <p> <code>response-content-type</code> </p> </li> <li> <p> <code>response-content-language</code> </p> </li> <li> <p> <code>response-expires</code> </p> </li> <li> <p> <code>response-cache-control</code> </p> </li> <li> <p> <code>response-content-disposition</code> </p> </li> <li> <p> <code>response-content-encoding</code> </p> </li> </ul> <p> <b>Additional Considerations about Request Headers</b> </p> <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns 200 OK and the data requested. </p> <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns 304 Not Modified response code.</p> <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p> <p>The following operations are related to <code>GetObject</code>:</p> <ul> <li> <p> <a>ListBuckets</a> </p> </li> <li> <p> <a>GetObjectAcl</a> </p> </li> </ul></p>
21791     #[allow(unused_variables, warnings)]
get_object( &self, input: GetObjectRequest, ) -> Result<GetObjectOutput, RusotoError<GetObjectError>>21792     async fn get_object(
21793         &self,
21794         input: GetObjectRequest,
21795     ) -> Result<GetObjectOutput, RusotoError<GetObjectError>> {
21796         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
21797 
21798         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21799 
21800         if let Some(ref if_match) = input.if_match {
21801             request.add_header("If-Match", &if_match.to_string());
21802         }
21803 
21804         if let Some(ref if_modified_since) = input.if_modified_since {
21805             request.add_header("If-Modified-Since", &if_modified_since.to_string());
21806         }
21807 
21808         if let Some(ref if_none_match) = input.if_none_match {
21809             request.add_header("If-None-Match", &if_none_match.to_string());
21810         }
21811 
21812         if let Some(ref if_unmodified_since) = input.if_unmodified_since {
21813             request.add_header("If-Unmodified-Since", &if_unmodified_since.to_string());
21814         }
21815 
21816         if let Some(ref range) = input.range {
21817             request.add_header("Range", &range.to_string());
21818         }
21819 
21820         if let Some(ref request_payer) = input.request_payer {
21821             request.add_header("x-amz-request-payer", &request_payer.to_string());
21822         }
21823 
21824         if let Some(ref sse_customer_algorithm) = input.sse_customer_algorithm {
21825             request.add_header(
21826                 "x-amz-server-side-encryption-customer-algorithm",
21827                 &sse_customer_algorithm.to_string(),
21828             );
21829         }
21830 
21831         if let Some(ref sse_customer_key) = input.sse_customer_key {
21832             request.add_header(
21833                 "x-amz-server-side-encryption-customer-key",
21834                 &sse_customer_key.to_string(),
21835             );
21836         }
21837 
21838         if let Some(ref sse_customer_key_md5) = input.sse_customer_key_md5 {
21839             request.add_header(
21840                 "x-amz-server-side-encryption-customer-key-MD5",
21841                 &sse_customer_key_md5.to_string(),
21842             );
21843         }
21844         let mut params = Params::new();
21845         if let Some(ref x) = input.part_number {
21846             params.put("partNumber", x);
21847         }
21848         if let Some(ref x) = input.response_cache_control {
21849             params.put("response-cache-control", x);
21850         }
21851         if let Some(ref x) = input.response_content_disposition {
21852             params.put("response-content-disposition", x);
21853         }
21854         if let Some(ref x) = input.response_content_encoding {
21855             params.put("response-content-encoding", x);
21856         }
21857         if let Some(ref x) = input.response_content_language {
21858             params.put("response-content-language", x);
21859         }
21860         if let Some(ref x) = input.response_content_type {
21861             params.put("response-content-type", x);
21862         }
21863         if let Some(ref x) = input.response_expires {
21864             params.put("response-expires", x);
21865         }
21866         if let Some(ref x) = input.version_id {
21867             params.put("versionId", x);
21868         }
21869         request.set_params(params);
21870 
21871         let mut response = self
21872             .client
21873             .sign_and_dispatch(request)
21874             .await
21875             .map_err(RusotoError::from)?;
21876         if !response.status.is_success() {
21877             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
21878             return Err(GetObjectError::from_response(response));
21879         }
21880 
21881         let mut result = GetObjectOutput::default();
21882         result.body = Some(response.body);
21883         if let Some(accept_ranges) = response.headers.get("accept-ranges") {
21884             let value = accept_ranges.to_owned();
21885             result.accept_ranges = Some(value)
21886         };
21887         if let Some(cache_control) = response.headers.get("Cache-Control") {
21888             let value = cache_control.to_owned();
21889             result.cache_control = Some(value)
21890         };
21891         if let Some(content_disposition) = response.headers.get("Content-Disposition") {
21892             let value = content_disposition.to_owned();
21893             result.content_disposition = Some(value)
21894         };
21895         if let Some(content_encoding) = response.headers.get("Content-Encoding") {
21896             let value = content_encoding.to_owned();
21897             result.content_encoding = Some(value)
21898         };
21899         if let Some(content_language) = response.headers.get("Content-Language") {
21900             let value = content_language.to_owned();
21901             result.content_language = Some(value)
21902         };
21903         if let Some(content_length) = response.headers.get("Content-Length") {
21904             let value = content_length.to_owned();
21905             result.content_length = Some(value.parse::<i64>().unwrap())
21906         };
21907         if let Some(content_range) = response.headers.get("Content-Range") {
21908             let value = content_range.to_owned();
21909             result.content_range = Some(value)
21910         };
21911         if let Some(content_type) = response.headers.get("Content-Type") {
21912             let value = content_type.to_owned();
21913             result.content_type = Some(value)
21914         };
21915         if let Some(delete_marker) = response.headers.get("x-amz-delete-marker") {
21916             let value = delete_marker.to_owned();
21917             result.delete_marker = Some(value.parse::<bool>().unwrap())
21918         };
21919         if let Some(e_tag) = response.headers.get("ETag") {
21920             let value = e_tag.to_owned();
21921             result.e_tag = Some(value)
21922         };
21923         if let Some(expiration) = response.headers.get("x-amz-expiration") {
21924             let value = expiration.to_owned();
21925             result.expiration = Some(value)
21926         };
21927         if let Some(expires) = response.headers.get("Expires") {
21928             let value = expires.to_owned();
21929             result.expires = Some(value)
21930         };
21931         if let Some(last_modified) = response.headers.get("Last-Modified") {
21932             let value = last_modified.to_owned();
21933             result.last_modified = Some(value)
21934         };
21935         let mut values = ::std::collections::HashMap::new();
21936         for (key, value) in response.headers.iter() {
21937             if key.as_str().starts_with("x-amz-meta-") {
21938                 values.insert(
21939                     key.as_str()["x-amz-meta-".len()..].to_owned(),
21940                     value.to_owned(),
21941                 );
21942             }
21943         }
21944         result.metadata = Some(values);
21945         if let Some(missing_meta) = response.headers.get("x-amz-missing-meta") {
21946             let value = missing_meta.to_owned();
21947             result.missing_meta = Some(value.parse::<i64>().unwrap())
21948         };
21949         if let Some(object_lock_legal_hold_status) =
21950             response.headers.get("x-amz-object-lock-legal-hold")
21951         {
21952             let value = object_lock_legal_hold_status.to_owned();
21953             result.object_lock_legal_hold_status = Some(value)
21954         };
21955         if let Some(object_lock_mode) = response.headers.get("x-amz-object-lock-mode") {
21956             let value = object_lock_mode.to_owned();
21957             result.object_lock_mode = Some(value)
21958         };
21959         if let Some(object_lock_retain_until_date) =
21960             response.headers.get("x-amz-object-lock-retain-until-date")
21961         {
21962             let value = object_lock_retain_until_date.to_owned();
21963             result.object_lock_retain_until_date = Some(value)
21964         };
21965         if let Some(parts_count) = response.headers.get("x-amz-mp-parts-count") {
21966             let value = parts_count.to_owned();
21967             result.parts_count = Some(value.parse::<i64>().unwrap())
21968         };
21969         if let Some(replication_status) = response.headers.get("x-amz-replication-status") {
21970             let value = replication_status.to_owned();
21971             result.replication_status = Some(value)
21972         };
21973         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
21974             let value = request_charged.to_owned();
21975             result.request_charged = Some(value)
21976         };
21977         if let Some(restore) = response.headers.get("x-amz-restore") {
21978             let value = restore.to_owned();
21979             result.restore = Some(value)
21980         };
21981         if let Some(sse_customer_algorithm) = response
21982             .headers
21983             .get("x-amz-server-side-encryption-customer-algorithm")
21984         {
21985             let value = sse_customer_algorithm.to_owned();
21986             result.sse_customer_algorithm = Some(value)
21987         };
21988         if let Some(sse_customer_key_md5) = response
21989             .headers
21990             .get("x-amz-server-side-encryption-customer-key-MD5")
21991         {
21992             let value = sse_customer_key_md5.to_owned();
21993             result.sse_customer_key_md5 = Some(value)
21994         };
21995         if let Some(ssekms_key_id) = response
21996             .headers
21997             .get("x-amz-server-side-encryption-aws-kms-key-id")
21998         {
21999             let value = ssekms_key_id.to_owned();
22000             result.ssekms_key_id = Some(value)
22001         };
22002         if let Some(server_side_encryption) = response.headers.get("x-amz-server-side-encryption") {
22003             let value = server_side_encryption.to_owned();
22004             result.server_side_encryption = Some(value)
22005         };
22006         if let Some(storage_class) = response.headers.get("x-amz-storage-class") {
22007             let value = storage_class.to_owned();
22008             result.storage_class = Some(value)
22009         };
22010         if let Some(tag_count) = response.headers.get("x-amz-tagging-count") {
22011             let value = tag_count.to_owned();
22012             result.tag_count = Some(value.parse::<i64>().unwrap())
22013         };
22014         if let Some(version_id) = response.headers.get("x-amz-version-id") {
22015             let value = version_id.to_owned();
22016             result.version_id = Some(value)
22017         };
22018         if let Some(website_redirect_location) =
22019             response.headers.get("x-amz-website-redirect-location")
22020         {
22021             let value = website_redirect_location.to_owned();
22022             result.website_redirect_location = Some(value)
22023         };
22024         Ok(result)
22025     }
22026 
22027     /// <p><p>Returns the access control list (ACL) of an object. To use this operation, you must have READ_ACP access to the object.</p> <p> <b>Versioning</b> </p> <p>By default, GET returns ACL information about the current version of an object. To return ACL information about a different version, use the versionId subresource.</p> <p>The following operations are related to <code>GetObjectAcl</code>:</p> <ul> <li> <p> <a>GetObject</a> </p> </li> <li> <p> <a>DeleteObject</a> </p> </li> <li> <p> <a>PutObject</a> </p> </li> </ul></p>
22028     #[allow(unused_variables, warnings)]
get_object_acl( &self, input: GetObjectAclRequest, ) -> Result<GetObjectAclOutput, RusotoError<GetObjectAclError>>22029     async fn get_object_acl(
22030         &self,
22031         input: GetObjectAclRequest,
22032     ) -> Result<GetObjectAclOutput, RusotoError<GetObjectAclError>> {
22033         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
22034 
22035         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22036 
22037         if let Some(ref request_payer) = input.request_payer {
22038             request.add_header("x-amz-request-payer", &request_payer.to_string());
22039         }
22040         let mut params = Params::new();
22041         if let Some(ref x) = input.version_id {
22042             params.put("versionId", x);
22043         }
22044         params.put_key("acl");
22045         request.set_params(params);
22046 
22047         let mut response = self
22048             .client
22049             .sign_and_dispatch(request)
22050             .await
22051             .map_err(RusotoError::from)?;
22052         if !response.status.is_success() {
22053             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22054             return Err(GetObjectAclError::from_response(response));
22055         }
22056 
22057         let mut result;
22058         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22059         if xml_response.body.is_empty() {
22060             result = GetObjectAclOutput::default();
22061         } else {
22062             let reader = EventReader::new_with_config(
22063                 xml_response.body.as_ref(),
22064                 ParserConfig::new().trim_whitespace(false),
22065             );
22066             let mut stack = XmlResponse::new(reader.into_iter().peekable());
22067             let _start_document = stack.next();
22068             let actual_tag_name = peek_at_name(&mut stack)?;
22069             result = GetObjectAclOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
22070         }
22071         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
22072             let value = request_charged.to_owned();
22073             result.request_charged = Some(value)
22074         }; // parse non-payload
22075         Ok(result)
22076     }
22077 
22078     /// <p>Gets an object's current Legal Hold status. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a>.</p>
22079     #[allow(unused_variables, warnings)]
get_object_legal_hold( &self, input: GetObjectLegalHoldRequest, ) -> Result<GetObjectLegalHoldOutput, RusotoError<GetObjectLegalHoldError>>22080     async fn get_object_legal_hold(
22081         &self,
22082         input: GetObjectLegalHoldRequest,
22083     ) -> Result<GetObjectLegalHoldOutput, RusotoError<GetObjectLegalHoldError>> {
22084         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
22085 
22086         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22087 
22088         if let Some(ref request_payer) = input.request_payer {
22089             request.add_header("x-amz-request-payer", &request_payer.to_string());
22090         }
22091         let mut params = Params::new();
22092         if let Some(ref x) = input.version_id {
22093             params.put("versionId", x);
22094         }
22095         params.put_key("legal-hold");
22096         request.set_params(params);
22097 
22098         let mut response = self
22099             .client
22100             .sign_and_dispatch(request)
22101             .await
22102             .map_err(RusotoError::from)?;
22103         if !response.status.is_success() {
22104             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22105             return Err(GetObjectLegalHoldError::from_response(response));
22106         }
22107 
22108         let mut result;
22109         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22110         if xml_response.body.is_empty() {
22111             result = GetObjectLegalHoldOutput::default();
22112         } else {
22113             let reader = EventReader::new_with_config(
22114                 xml_response.body.as_ref(),
22115                 ParserConfig::new().trim_whitespace(false),
22116             );
22117             let mut stack = XmlResponse::new(reader.into_iter().peekable());
22118             let _start_document = stack.next();
22119             let actual_tag_name = peek_at_name(&mut stack)?;
22120             result =
22121                 GetObjectLegalHoldOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
22122         }
22123         // parse non-payload
22124         Ok(result)
22125     }
22126 
22127     /// <p>Gets the Object Lock configuration for a bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a>.</p>
22128     #[allow(unused_variables, warnings)]
get_object_lock_configuration( &self, input: GetObjectLockConfigurationRequest, ) -> Result<GetObjectLockConfigurationOutput, RusotoError<GetObjectLockConfigurationError>>22129     async fn get_object_lock_configuration(
22130         &self,
22131         input: GetObjectLockConfigurationRequest,
22132     ) -> Result<GetObjectLockConfigurationOutput, RusotoError<GetObjectLockConfigurationError>>
22133     {
22134         let request_uri = format!("/{bucket}", bucket = input.bucket);
22135 
22136         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22137 
22138         let mut params = Params::new();
22139         params.put_key("object-lock");
22140         request.set_params(params);
22141 
22142         let mut response = self
22143             .client
22144             .sign_and_dispatch(request)
22145             .await
22146             .map_err(RusotoError::from)?;
22147         if !response.status.is_success() {
22148             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22149             return Err(GetObjectLockConfigurationError::from_response(response));
22150         }
22151 
22152         let mut result;
22153         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22154         if xml_response.body.is_empty() {
22155             result = GetObjectLockConfigurationOutput::default();
22156         } else {
22157             let reader = EventReader::new_with_config(
22158                 xml_response.body.as_ref(),
22159                 ParserConfig::new().trim_whitespace(false),
22160             );
22161             let mut stack = XmlResponse::new(reader.into_iter().peekable());
22162             let _start_document = stack.next();
22163             let actual_tag_name = peek_at_name(&mut stack)?;
22164             result = GetObjectLockConfigurationOutputDeserializer::deserialize(
22165                 &actual_tag_name,
22166                 &mut stack,
22167             )?;
22168         }
22169         // parse non-payload
22170         Ok(result)
22171     }
22172 
22173     /// <p>Retrieves an object's retention settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a>.</p>
22174     #[allow(unused_variables, warnings)]
get_object_retention( &self, input: GetObjectRetentionRequest, ) -> Result<GetObjectRetentionOutput, RusotoError<GetObjectRetentionError>>22175     async fn get_object_retention(
22176         &self,
22177         input: GetObjectRetentionRequest,
22178     ) -> Result<GetObjectRetentionOutput, RusotoError<GetObjectRetentionError>> {
22179         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
22180 
22181         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22182 
22183         if let Some(ref request_payer) = input.request_payer {
22184             request.add_header("x-amz-request-payer", &request_payer.to_string());
22185         }
22186         let mut params = Params::new();
22187         if let Some(ref x) = input.version_id {
22188             params.put("versionId", x);
22189         }
22190         params.put_key("retention");
22191         request.set_params(params);
22192 
22193         let mut response = self
22194             .client
22195             .sign_and_dispatch(request)
22196             .await
22197             .map_err(RusotoError::from)?;
22198         if !response.status.is_success() {
22199             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22200             return Err(GetObjectRetentionError::from_response(response));
22201         }
22202 
22203         let mut result;
22204         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22205         if xml_response.body.is_empty() {
22206             result = GetObjectRetentionOutput::default();
22207         } else {
22208             let reader = EventReader::new_with_config(
22209                 xml_response.body.as_ref(),
22210                 ParserConfig::new().trim_whitespace(false),
22211             );
22212             let mut stack = XmlResponse::new(reader.into_iter().peekable());
22213             let _start_document = stack.next();
22214             let actual_tag_name = peek_at_name(&mut stack)?;
22215             result =
22216                 GetObjectRetentionOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
22217         }
22218         // parse non-payload
22219         Ok(result)
22220     }
22221 
22222     /// <p><p>Returns the tag-set of an object. You send the GET request against the tagging subresource associated with the object.</p> <p>To use this operation, you must have permission to perform the <code>s3:GetObjectTagging</code> action. By default, the GET operation returns information about current version of an object. For a versioned bucket, you can have multiple versions of an object in your bucket. To retrieve tags of any other version, use the versionId query parameter. You also need permission for the <code>s3:GetObjectVersionTagging</code> action.</p> <p> By default, the bucket owner has this permission and can grant this permission to others.</p> <p> For information about the Amazon S3 object tagging feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html">Object Tagging</a>.</p> <p>The following operation is related to <code>GetObjectTagging</code>:</p> <ul> <li> <p> <a>PutObjectTagging</a> </p> </li> </ul></p>
22223     #[allow(unused_variables, warnings)]
get_object_tagging( &self, input: GetObjectTaggingRequest, ) -> Result<GetObjectTaggingOutput, RusotoError<GetObjectTaggingError>>22224     async fn get_object_tagging(
22225         &self,
22226         input: GetObjectTaggingRequest,
22227     ) -> Result<GetObjectTaggingOutput, RusotoError<GetObjectTaggingError>> {
22228         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
22229 
22230         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22231 
22232         let mut params = Params::new();
22233         if let Some(ref x) = input.version_id {
22234             params.put("versionId", x);
22235         }
22236         params.put_key("tagging");
22237         request.set_params(params);
22238 
22239         let mut response = self
22240             .client
22241             .sign_and_dispatch(request)
22242             .await
22243             .map_err(RusotoError::from)?;
22244         if !response.status.is_success() {
22245             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22246             return Err(GetObjectTaggingError::from_response(response));
22247         }
22248 
22249         let mut result;
22250         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22251         if xml_response.body.is_empty() {
22252             result = GetObjectTaggingOutput::default();
22253         } else {
22254             let reader = EventReader::new_with_config(
22255                 xml_response.body.as_ref(),
22256                 ParserConfig::new().trim_whitespace(false),
22257             );
22258             let mut stack = XmlResponse::new(reader.into_iter().peekable());
22259             let _start_document = stack.next();
22260             let actual_tag_name = peek_at_name(&mut stack)?;
22261             result = GetObjectTaggingOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
22262         }
22263         if let Some(version_id) = response.headers.get("x-amz-version-id") {
22264             let value = version_id.to_owned();
22265             result.version_id = Some(value)
22266         }; // parse non-payload
22267         Ok(result)
22268     }
22269 
22270     /// <p><p>Return torrent files from a bucket. BitTorrent can save you bandwidth when you&#39;re distributing large files. For more information about BitTorrent, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.html">Amazon S3 Torrent</a>.</p> <note> <p>You can get torrent only for objects that are less than 5 GB in size and that are not encrypted using server-side encryption with customer-provided encryption key.</p> </note> <p>To use GET, you must have READ access to the object.</p> <p>The following operation is related to <code>GetObjectTorrent</code>:</p> <ul> <li> <p> <a>GetObject</a> </p> </li> </ul></p>
22271     #[allow(unused_variables, warnings)]
get_object_torrent( &self, input: GetObjectTorrentRequest, ) -> Result<GetObjectTorrentOutput, RusotoError<GetObjectTorrentError>>22272     async fn get_object_torrent(
22273         &self,
22274         input: GetObjectTorrentRequest,
22275     ) -> Result<GetObjectTorrentOutput, RusotoError<GetObjectTorrentError>> {
22276         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
22277 
22278         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22279 
22280         if let Some(ref request_payer) = input.request_payer {
22281             request.add_header("x-amz-request-payer", &request_payer.to_string());
22282         }
22283         let mut params = Params::new();
22284         params.put_key("torrent");
22285         request.set_params(params);
22286 
22287         let mut response = self
22288             .client
22289             .sign_and_dispatch(request)
22290             .await
22291             .map_err(RusotoError::from)?;
22292         if !response.status.is_success() {
22293             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22294             return Err(GetObjectTorrentError::from_response(response));
22295         }
22296 
22297         let mut result = GetObjectTorrentOutput::default();
22298         result.body = Some(response.body);
22299         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
22300             let value = request_charged.to_owned();
22301             result.request_charged = Some(value)
22302         };
22303         Ok(result)
22304     }
22305 
22306     /// <p><p>Retrieves the <code>PublicAccessBlock</code> configuration for an Amazon S3 bucket. To use this operation, you must have the <code>s3:GetBucketPublicAccessBlock</code> permission. For more information about Amazon S3 permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a>.</p> <important> <p>When Amazon S3 evaluates the <code>PublicAccessBlock</code> configuration for a bucket or an object, it checks the <code>PublicAccessBlock</code> configuration for both the bucket (or the bucket that contains the object) and the bucket owner&#39;s account. If the <code>PublicAccessBlock</code> settings are different between the bucket and the account, Amazon S3 uses the most restrictive combination of the bucket-level and account-level settings.</p> </important> <p>For more information about when Amazon S3 considers a bucket or an object public, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status">The Meaning of &quot;Public&quot;</a>.</p> <p>The following operations are related to <code>GetPublicAccessBlock</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html">Using Amazon S3 Block Public Access</a> </p> </li> <li> <p> <a>PutPublicAccessBlock</a> </p> </li> <li> <p> <a>GetPublicAccessBlock</a> </p> </li> <li> <p> <a>DeletePublicAccessBlock</a> </p> </li> </ul></p>
22307     #[allow(unused_variables, warnings)]
get_public_access_block( &self, input: GetPublicAccessBlockRequest, ) -> Result<GetPublicAccessBlockOutput, RusotoError<GetPublicAccessBlockError>>22308     async fn get_public_access_block(
22309         &self,
22310         input: GetPublicAccessBlockRequest,
22311     ) -> Result<GetPublicAccessBlockOutput, RusotoError<GetPublicAccessBlockError>> {
22312         let request_uri = format!("/{bucket}", bucket = input.bucket);
22313 
22314         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22315 
22316         let mut params = Params::new();
22317         params.put_key("publicAccessBlock");
22318         request.set_params(params);
22319 
22320         let mut response = self
22321             .client
22322             .sign_and_dispatch(request)
22323             .await
22324             .map_err(RusotoError::from)?;
22325         if !response.status.is_success() {
22326             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22327             return Err(GetPublicAccessBlockError::from_response(response));
22328         }
22329 
22330         let mut result;
22331         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22332         if xml_response.body.is_empty() {
22333             result = GetPublicAccessBlockOutput::default();
22334         } else {
22335             let reader = EventReader::new_with_config(
22336                 xml_response.body.as_ref(),
22337                 ParserConfig::new().trim_whitespace(false),
22338             );
22339             let mut stack = XmlResponse::new(reader.into_iter().peekable());
22340             let _start_document = stack.next();
22341             let actual_tag_name = peek_at_name(&mut stack)?;
22342             result =
22343                 GetPublicAccessBlockOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
22344         }
22345         // parse non-payload
22346         Ok(result)
22347     }
22348 
22349     /// <p>This operation is useful to determine if a bucket exists and you have permission to access it. The operation returns a <code>200 OK</code> if the bucket exists and you have permission to access it. Otherwise, the operation might return responses such as <code>404 Not Found</code> and <code>403 Forbidden</code>. </p> <p>To use this operation, you must have permissions to perform the <code>s3:ListBucket</code> action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p>
22350     #[allow(unused_variables, warnings)]
head_bucket( &self, input: HeadBucketRequest, ) -> Result<(), RusotoError<HeadBucketError>>22351     async fn head_bucket(
22352         &self,
22353         input: HeadBucketRequest,
22354     ) -> Result<(), RusotoError<HeadBucketError>> {
22355         let request_uri = format!("/{bucket}", bucket = input.bucket);
22356 
22357         let mut request = SignedRequest::new("HEAD", "s3", &self.region, &request_uri);
22358 
22359         let mut response = self
22360             .client
22361             .sign_and_dispatch(request)
22362             .await
22363             .map_err(RusotoError::from)?;
22364         if !response.status.is_success() {
22365             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22366             return Err(HeadBucketError::from_response(response));
22367         }
22368 
22369         std::mem::drop(response);
22370         Ok(())
22371     }
22372 
22373     /// <p><p>The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you&#39;re only interested in an object&#39;s metadata. To use HEAD, you must have READ access to the object.</p> <p>A <code>HEAD</code> request has the same options as a <code>GET</code> operation on an object. The response is identical to the <code>GET</code> response except that there is no response body.</p> <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the metadata from the object, you must use the following headers:</p> <ul> <li> <p>x-amz-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key-MD5</p> </li> </ul> <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a>.</p> <note> <p>Encryption request headers, like <code>x-amz-server-side-encryption</code>, should not be sent for GET requests if your object uses server-side encryption with CMKs stored in AWS KMS (SSE-KMS) or server-side encryption with Amazon S3–managed encryption keys (SSE-S3). If your object does use these types of keys, you’ll get an HTTP 400 BadRequest error.</p> </note> <p>Request headers are limited to 8 KB in size. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html">Common Request Headers</a>.</p> <p>Consider the following when using request headers:</p> <ul> <li> <p> Consideration 1 – If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p> <ul> <li> <p> <code>If-Match</code> condition evaluates to <code>true</code>, and;</p> </li> <li> <p> <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p> </li> </ul> <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p> </li> <li> <p> Consideration 2 – If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p> <ul> <li> <p> <code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p> </li> <li> <p> <code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p> </li> </ul> <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p> </li> </ul> <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p> <p> <b>Permissions</b> </p> <p>You need the <code>s3:GetObject</code> permission for this operation. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a>. If the object you request does not exist, the error Amazon S3 returns depends on whether you also have the s3:ListBucket permission.</p> <ul> <li> <p>If you have the <code>s3:ListBucket</code> permission on the bucket, Amazon S3 returns an HTTP status code 404 (&quot;no such key&quot;) error.</p> </li> <li> <p>If you don’t have the <code>s3:ListBucket</code> permission, Amazon S3 returns an HTTP status code 403 (&quot;access denied&quot;) error.</p> </li> </ul> <p>The following operation is related to <code>HeadObject</code>:</p> <ul> <li> <p> <a>GetObject</a> </p> </li> </ul></p>
22374     #[allow(unused_variables, warnings)]
head_object( &self, input: HeadObjectRequest, ) -> Result<HeadObjectOutput, RusotoError<HeadObjectError>>22375     async fn head_object(
22376         &self,
22377         input: HeadObjectRequest,
22378     ) -> Result<HeadObjectOutput, RusotoError<HeadObjectError>> {
22379         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
22380 
22381         let mut request = SignedRequest::new("HEAD", "s3", &self.region, &request_uri);
22382 
22383         if let Some(ref if_match) = input.if_match {
22384             request.add_header("If-Match", &if_match.to_string());
22385         }
22386 
22387         if let Some(ref if_modified_since) = input.if_modified_since {
22388             request.add_header("If-Modified-Since", &if_modified_since.to_string());
22389         }
22390 
22391         if let Some(ref if_none_match) = input.if_none_match {
22392             request.add_header("If-None-Match", &if_none_match.to_string());
22393         }
22394 
22395         if let Some(ref if_unmodified_since) = input.if_unmodified_since {
22396             request.add_header("If-Unmodified-Since", &if_unmodified_since.to_string());
22397         }
22398 
22399         if let Some(ref range) = input.range {
22400             request.add_header("Range", &range.to_string());
22401         }
22402 
22403         if let Some(ref request_payer) = input.request_payer {
22404             request.add_header("x-amz-request-payer", &request_payer.to_string());
22405         }
22406 
22407         if let Some(ref sse_customer_algorithm) = input.sse_customer_algorithm {
22408             request.add_header(
22409                 "x-amz-server-side-encryption-customer-algorithm",
22410                 &sse_customer_algorithm.to_string(),
22411             );
22412         }
22413 
22414         if let Some(ref sse_customer_key) = input.sse_customer_key {
22415             request.add_header(
22416                 "x-amz-server-side-encryption-customer-key",
22417                 &sse_customer_key.to_string(),
22418             );
22419         }
22420 
22421         if let Some(ref sse_customer_key_md5) = input.sse_customer_key_md5 {
22422             request.add_header(
22423                 "x-amz-server-side-encryption-customer-key-MD5",
22424                 &sse_customer_key_md5.to_string(),
22425             );
22426         }
22427         let mut params = Params::new();
22428         if let Some(ref x) = input.part_number {
22429             params.put("partNumber", x);
22430         }
22431         if let Some(ref x) = input.version_id {
22432             params.put("versionId", x);
22433         }
22434         request.set_params(params);
22435 
22436         let mut response = self
22437             .client
22438             .sign_and_dispatch(request)
22439             .await
22440             .map_err(RusotoError::from)?;
22441         if !response.status.is_success() {
22442             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22443             return Err(HeadObjectError::from_response(response));
22444         }
22445 
22446         let mut result;
22447         result = HeadObjectOutput::default();
22448         if let Some(accept_ranges) = response.headers.get("accept-ranges") {
22449             let value = accept_ranges.to_owned();
22450             result.accept_ranges = Some(value)
22451         };
22452         if let Some(cache_control) = response.headers.get("Cache-Control") {
22453             let value = cache_control.to_owned();
22454             result.cache_control = Some(value)
22455         };
22456         if let Some(content_disposition) = response.headers.get("Content-Disposition") {
22457             let value = content_disposition.to_owned();
22458             result.content_disposition = Some(value)
22459         };
22460         if let Some(content_encoding) = response.headers.get("Content-Encoding") {
22461             let value = content_encoding.to_owned();
22462             result.content_encoding = Some(value)
22463         };
22464         if let Some(content_language) = response.headers.get("Content-Language") {
22465             let value = content_language.to_owned();
22466             result.content_language = Some(value)
22467         };
22468         if let Some(content_length) = response.headers.get("Content-Length") {
22469             let value = content_length.to_owned();
22470             result.content_length = Some(value.parse::<i64>().unwrap())
22471         };
22472         if let Some(content_type) = response.headers.get("Content-Type") {
22473             let value = content_type.to_owned();
22474             result.content_type = Some(value)
22475         };
22476         if let Some(delete_marker) = response.headers.get("x-amz-delete-marker") {
22477             let value = delete_marker.to_owned();
22478             result.delete_marker = Some(value.parse::<bool>().unwrap())
22479         };
22480         if let Some(e_tag) = response.headers.get("ETag") {
22481             let value = e_tag.to_owned();
22482             result.e_tag = Some(value)
22483         };
22484         if let Some(expiration) = response.headers.get("x-amz-expiration") {
22485             let value = expiration.to_owned();
22486             result.expiration = Some(value)
22487         };
22488         if let Some(expires) = response.headers.get("Expires") {
22489             let value = expires.to_owned();
22490             result.expires = Some(value)
22491         };
22492         if let Some(last_modified) = response.headers.get("Last-Modified") {
22493             let value = last_modified.to_owned();
22494             result.last_modified = Some(value)
22495         };
22496         let mut values = ::std::collections::HashMap::new();
22497         for (key, value) in response.headers.iter() {
22498             if key.as_str().starts_with("x-amz-meta-") {
22499                 values.insert(
22500                     key.as_str()["x-amz-meta-".len()..].to_owned(),
22501                     value.to_owned(),
22502                 );
22503             }
22504         }
22505         result.metadata = Some(values);
22506         if let Some(missing_meta) = response.headers.get("x-amz-missing-meta") {
22507             let value = missing_meta.to_owned();
22508             result.missing_meta = Some(value.parse::<i64>().unwrap())
22509         };
22510         if let Some(object_lock_legal_hold_status) =
22511             response.headers.get("x-amz-object-lock-legal-hold")
22512         {
22513             let value = object_lock_legal_hold_status.to_owned();
22514             result.object_lock_legal_hold_status = Some(value)
22515         };
22516         if let Some(object_lock_mode) = response.headers.get("x-amz-object-lock-mode") {
22517             let value = object_lock_mode.to_owned();
22518             result.object_lock_mode = Some(value)
22519         };
22520         if let Some(object_lock_retain_until_date) =
22521             response.headers.get("x-amz-object-lock-retain-until-date")
22522         {
22523             let value = object_lock_retain_until_date.to_owned();
22524             result.object_lock_retain_until_date = Some(value)
22525         };
22526         if let Some(parts_count) = response.headers.get("x-amz-mp-parts-count") {
22527             let value = parts_count.to_owned();
22528             result.parts_count = Some(value.parse::<i64>().unwrap())
22529         };
22530         if let Some(replication_status) = response.headers.get("x-amz-replication-status") {
22531             let value = replication_status.to_owned();
22532             result.replication_status = Some(value)
22533         };
22534         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
22535             let value = request_charged.to_owned();
22536             result.request_charged = Some(value)
22537         };
22538         if let Some(restore) = response.headers.get("x-amz-restore") {
22539             let value = restore.to_owned();
22540             result.restore = Some(value)
22541         };
22542         if let Some(sse_customer_algorithm) = response
22543             .headers
22544             .get("x-amz-server-side-encryption-customer-algorithm")
22545         {
22546             let value = sse_customer_algorithm.to_owned();
22547             result.sse_customer_algorithm = Some(value)
22548         };
22549         if let Some(sse_customer_key_md5) = response
22550             .headers
22551             .get("x-amz-server-side-encryption-customer-key-MD5")
22552         {
22553             let value = sse_customer_key_md5.to_owned();
22554             result.sse_customer_key_md5 = Some(value)
22555         };
22556         if let Some(ssekms_key_id) = response
22557             .headers
22558             .get("x-amz-server-side-encryption-aws-kms-key-id")
22559         {
22560             let value = ssekms_key_id.to_owned();
22561             result.ssekms_key_id = Some(value)
22562         };
22563         if let Some(server_side_encryption) = response.headers.get("x-amz-server-side-encryption") {
22564             let value = server_side_encryption.to_owned();
22565             result.server_side_encryption = Some(value)
22566         };
22567         if let Some(storage_class) = response.headers.get("x-amz-storage-class") {
22568             let value = storage_class.to_owned();
22569             result.storage_class = Some(value)
22570         };
22571         if let Some(version_id) = response.headers.get("x-amz-version-id") {
22572             let value = version_id.to_owned();
22573             result.version_id = Some(value)
22574         };
22575         if let Some(website_redirect_location) =
22576             response.headers.get("x-amz-website-redirect-location")
22577         {
22578             let value = website_redirect_location.to_owned();
22579             result.website_redirect_location = Some(value)
22580         }; // parse non-payload
22581         Ok(result)
22582     }
22583 
22584     /// <p><p>Lists the analytics configurations for the bucket. You can have up to 1,000 analytics configurations per bucket.</p> <p>This operation supports list pagination and does not return more than 100 configurations at a time. You should always check the <code>IsTruncated</code> element in the response. If there are no more configurations to list, <code>IsTruncated</code> is set to false. If there are more configurations to list, <code>IsTruncated</code> is set to true, and there will be a value in <code>NextContinuationToken</code>. You use the <code>NextContinuationToken</code> value to continue the pagination of the list by passing the value in continuation-token in the request to <code>GET</code> the next page.</p> <p>To use this operation, you must have permissions to perform the <code>s3:GetAnalyticsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For information about Amazon S3 analytics feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html">Amazon S3 Analytics – Storage Class Analysis</a>. </p> <p>The following operations are related to <code>ListBucketAnalyticsConfigurations</code>:</p> <ul> <li> <p> <a>GetBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a>DeleteBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a>PutBucketAnalyticsConfiguration</a> </p> </li> </ul></p>
22585     #[allow(unused_variables, warnings)]
list_bucket_analytics_configurations( &self, input: ListBucketAnalyticsConfigurationsRequest, ) -> Result< ListBucketAnalyticsConfigurationsOutput, RusotoError<ListBucketAnalyticsConfigurationsError>, >22586     async fn list_bucket_analytics_configurations(
22587         &self,
22588         input: ListBucketAnalyticsConfigurationsRequest,
22589     ) -> Result<
22590         ListBucketAnalyticsConfigurationsOutput,
22591         RusotoError<ListBucketAnalyticsConfigurationsError>,
22592     > {
22593         let request_uri = format!("/{bucket}", bucket = input.bucket);
22594 
22595         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22596 
22597         let mut params = Params::new();
22598         if let Some(ref x) = input.continuation_token {
22599             params.put("continuation-token", x);
22600         }
22601         params.put_key("analytics");
22602         request.set_params(params);
22603 
22604         let mut response = self
22605             .client
22606             .sign_and_dispatch(request)
22607             .await
22608             .map_err(RusotoError::from)?;
22609         if !response.status.is_success() {
22610             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22611             return Err(ListBucketAnalyticsConfigurationsError::from_response(
22612                 response,
22613             ));
22614         }
22615 
22616         let mut result;
22617         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22618         if xml_response.body.is_empty() {
22619             result = ListBucketAnalyticsConfigurationsOutput::default();
22620         } else {
22621             let reader = EventReader::new_with_config(
22622                 xml_response.body.as_ref(),
22623                 ParserConfig::new().trim_whitespace(false),
22624             );
22625             let mut stack = XmlResponse::new(reader.into_iter().peekable());
22626             let _start_document = stack.next();
22627             let actual_tag_name = peek_at_name(&mut stack)?;
22628             result = ListBucketAnalyticsConfigurationsOutputDeserializer::deserialize(
22629                 &actual_tag_name,
22630                 &mut stack,
22631             )?;
22632         }
22633         // parse non-payload
22634         Ok(result)
22635     }
22636 
22637     /// <p><p>Returns a list of inventory configurations for the bucket. You can have up to 1,000 analytics configurations per bucket.</p> <p>This operation supports list pagination and does not return more than 100 configurations at a time. Always check the <code>IsTruncated</code> element in the response. If there are no more configurations to list, <code>IsTruncated</code> is set to false. If there are more configurations to list, <code>IsTruncated</code> is set to true, and there is a value in <code>NextContinuationToken</code>. You use the <code>NextContinuationToken</code> value to continue the pagination of the list by passing the value in continuation-token in the request to <code>GET</code> the next page.</p> <p> To use this operation, you must have permissions to perform the <code>s3:GetInventoryConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For information about the Amazon S3 inventory feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html">Amazon S3 Inventory</a> </p> <p>The following operations are related to <code>ListBucketInventoryConfigurations</code>:</p> <ul> <li> <p> <a>GetBucketInventoryConfiguration</a> </p> </li> <li> <p> <a>DeleteBucketInventoryConfiguration</a> </p> </li> <li> <p> <a>PutBucketInventoryConfiguration</a> </p> </li> </ul></p>
22638     #[allow(unused_variables, warnings)]
list_bucket_inventory_configurations( &self, input: ListBucketInventoryConfigurationsRequest, ) -> Result< ListBucketInventoryConfigurationsOutput, RusotoError<ListBucketInventoryConfigurationsError>, >22639     async fn list_bucket_inventory_configurations(
22640         &self,
22641         input: ListBucketInventoryConfigurationsRequest,
22642     ) -> Result<
22643         ListBucketInventoryConfigurationsOutput,
22644         RusotoError<ListBucketInventoryConfigurationsError>,
22645     > {
22646         let request_uri = format!("/{bucket}", bucket = input.bucket);
22647 
22648         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22649 
22650         let mut params = Params::new();
22651         if let Some(ref x) = input.continuation_token {
22652             params.put("continuation-token", x);
22653         }
22654         params.put_key("inventory");
22655         request.set_params(params);
22656 
22657         let mut response = self
22658             .client
22659             .sign_and_dispatch(request)
22660             .await
22661             .map_err(RusotoError::from)?;
22662         if !response.status.is_success() {
22663             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22664             return Err(ListBucketInventoryConfigurationsError::from_response(
22665                 response,
22666             ));
22667         }
22668 
22669         let mut result;
22670         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22671         if xml_response.body.is_empty() {
22672             result = ListBucketInventoryConfigurationsOutput::default();
22673         } else {
22674             let reader = EventReader::new_with_config(
22675                 xml_response.body.as_ref(),
22676                 ParserConfig::new().trim_whitespace(false),
22677             );
22678             let mut stack = XmlResponse::new(reader.into_iter().peekable());
22679             let _start_document = stack.next();
22680             let actual_tag_name = peek_at_name(&mut stack)?;
22681             result = ListBucketInventoryConfigurationsOutputDeserializer::deserialize(
22682                 &actual_tag_name,
22683                 &mut stack,
22684             )?;
22685         }
22686         // parse non-payload
22687         Ok(result)
22688     }
22689 
22690     /// <p><p>Lists the metrics configurations for the bucket. The metrics configurations are only for the request metrics of the bucket and do not provide information on daily storage metrics. You can have up to 1,000 configurations per bucket.</p> <p>This operation supports list pagination and does not return more than 100 configurations at a time. Always check the <code>IsTruncated</code> element in the response. If there are no more configurations to list, <code>IsTruncated</code> is set to false. If there are more configurations to list, <code>IsTruncated</code> is set to true, and there is a value in <code>NextContinuationToken</code>. You use the <code>NextContinuationToken</code> value to continue the pagination of the list by passing the value in <code>continuation-token</code> in the request to <code>GET</code> the next page.</p> <p>To use this operation, you must have permissions to perform the <code>s3:GetMetricsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For more information about metrics configurations and CloudWatch request metrics, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html">Monitoring Metrics with Amazon CloudWatch</a>.</p> <p>The following operations are related to <code>ListBucketMetricsConfigurations</code>:</p> <ul> <li> <p> <a>PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>GetBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>DeleteBucketMetricsConfiguration</a> </p> </li> </ul></p>
22691     #[allow(unused_variables, warnings)]
list_bucket_metrics_configurations( &self, input: ListBucketMetricsConfigurationsRequest, ) -> Result< ListBucketMetricsConfigurationsOutput, RusotoError<ListBucketMetricsConfigurationsError>, >22692     async fn list_bucket_metrics_configurations(
22693         &self,
22694         input: ListBucketMetricsConfigurationsRequest,
22695     ) -> Result<
22696         ListBucketMetricsConfigurationsOutput,
22697         RusotoError<ListBucketMetricsConfigurationsError>,
22698     > {
22699         let request_uri = format!("/{bucket}", bucket = input.bucket);
22700 
22701         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22702 
22703         let mut params = Params::new();
22704         if let Some(ref x) = input.continuation_token {
22705             params.put("continuation-token", x);
22706         }
22707         params.put_key("metrics");
22708         request.set_params(params);
22709 
22710         let mut response = self
22711             .client
22712             .sign_and_dispatch(request)
22713             .await
22714             .map_err(RusotoError::from)?;
22715         if !response.status.is_success() {
22716             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22717             return Err(ListBucketMetricsConfigurationsError::from_response(
22718                 response,
22719             ));
22720         }
22721 
22722         let mut result;
22723         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22724         if xml_response.body.is_empty() {
22725             result = ListBucketMetricsConfigurationsOutput::default();
22726         } else {
22727             let reader = EventReader::new_with_config(
22728                 xml_response.body.as_ref(),
22729                 ParserConfig::new().trim_whitespace(false),
22730             );
22731             let mut stack = XmlResponse::new(reader.into_iter().peekable());
22732             let _start_document = stack.next();
22733             let actual_tag_name = peek_at_name(&mut stack)?;
22734             result = ListBucketMetricsConfigurationsOutputDeserializer::deserialize(
22735                 &actual_tag_name,
22736                 &mut stack,
22737             )?;
22738         }
22739         // parse non-payload
22740         Ok(result)
22741     }
22742 
22743     /// <p>Returns a list of all buckets owned by the authenticated sender of the request.</p>
22744     #[allow(unused_variables, warnings)]
list_buckets(&self) -> Result<ListBucketsOutput, RusotoError<ListBucketsError>>22745     async fn list_buckets(&self) -> Result<ListBucketsOutput, RusotoError<ListBucketsError>> {
22746         let request_uri = "/";
22747 
22748         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22749 
22750         let mut response = self
22751             .client
22752             .sign_and_dispatch(request)
22753             .await
22754             .map_err(RusotoError::from)?;
22755         if !response.status.is_success() {
22756             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22757             return Err(ListBucketsError::from_response(response));
22758         }
22759 
22760         let mut result;
22761         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22762         if xml_response.body.is_empty() {
22763             result = ListBucketsOutput::default();
22764         } else {
22765             let reader = EventReader::new_with_config(
22766                 xml_response.body.as_ref(),
22767                 ParserConfig::new().trim_whitespace(false),
22768             );
22769             let mut stack = XmlResponse::new(reader.into_iter().peekable());
22770             let _start_document = stack.next();
22771             let actual_tag_name = peek_at_name(&mut stack)?;
22772             result = ListBucketsOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
22773         }
22774         // parse non-payload
22775         Ok(result)
22776     }
22777 
22778     /// <p><p>This operation lists in-progress multipart uploads. An in-progress multipart upload is a multipart upload that has been initiated using the Initiate Multipart Upload request, but has not yet been completed or aborted.</p> <p>This operation returns at most 1,000 multipart uploads in the response. 1,000 multipart uploads is the maximum number of uploads a response can include, which is also the default value. You can further limit the number of uploads in a response by specifying the <code>max-uploads</code> parameter in the response. If additional multipart uploads satisfy the list criteria, the response will contain an <code>IsTruncated</code> element with the value true. To list the additional multipart uploads, use the <code>key-marker</code> and <code>upload-id-marker</code> request parameters.</p> <p>In the response, the uploads are sorted by key. If your application has initiated more than one multipart upload using the same object key, then uploads in the response are first sorted by key. Additionally, uploads are sorted in ascending order within each key by the upload initiation time.</p> <p>For more information on multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html">Uploading Objects Using Multipart Upload</a>.</p> <p>For information on permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and Permissions</a>.</p> <p>The following operations are related to <code>ListMultipartUploads</code>:</p> <ul> <li> <p> <a>CreateMultipartUpload</a> </p> </li> <li> <p> <a>UploadPart</a> </p> </li> <li> <p> <a>CompleteMultipartUpload</a> </p> </li> <li> <p> <a>ListParts</a> </p> </li> <li> <p> <a>AbortMultipartUpload</a> </p> </li> </ul></p>
22779     #[allow(unused_variables, warnings)]
list_multipart_uploads( &self, input: ListMultipartUploadsRequest, ) -> Result<ListMultipartUploadsOutput, RusotoError<ListMultipartUploadsError>>22780     async fn list_multipart_uploads(
22781         &self,
22782         input: ListMultipartUploadsRequest,
22783     ) -> Result<ListMultipartUploadsOutput, RusotoError<ListMultipartUploadsError>> {
22784         let request_uri = format!("/{bucket}", bucket = input.bucket);
22785 
22786         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22787 
22788         let mut params = Params::new();
22789         if let Some(ref x) = input.delimiter {
22790             params.put("delimiter", x);
22791         }
22792         if let Some(ref x) = input.encoding_type {
22793             params.put("encoding-type", x);
22794         }
22795         if let Some(ref x) = input.key_marker {
22796             params.put("key-marker", x);
22797         }
22798         if let Some(ref x) = input.max_uploads {
22799             params.put("max-uploads", x);
22800         }
22801         if let Some(ref x) = input.prefix {
22802             params.put("prefix", x);
22803         }
22804         if let Some(ref x) = input.upload_id_marker {
22805             params.put("upload-id-marker", x);
22806         }
22807         params.put_key("uploads");
22808         request.set_params(params);
22809 
22810         let mut response = self
22811             .client
22812             .sign_and_dispatch(request)
22813             .await
22814             .map_err(RusotoError::from)?;
22815         if !response.status.is_success() {
22816             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22817             return Err(ListMultipartUploadsError::from_response(response));
22818         }
22819 
22820         let mut result;
22821         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22822         if xml_response.body.is_empty() {
22823             result = ListMultipartUploadsOutput::default();
22824         } else {
22825             let reader = EventReader::new_with_config(
22826                 xml_response.body.as_ref(),
22827                 ParserConfig::new().trim_whitespace(false),
22828             );
22829             let mut stack = XmlResponse::new(reader.into_iter().peekable());
22830             let _start_document = stack.next();
22831             let actual_tag_name = peek_at_name(&mut stack)?;
22832             result =
22833                 ListMultipartUploadsOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
22834         }
22835         // parse non-payload
22836         Ok(result)
22837     }
22838 
22839     /// <p><p>Returns metadata about all of the versions of objects in a bucket. You can also use request parameters as selection criteria to return metadata about a subset of all the object versions. </p> <note> <p> A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately.</p> </note> <p>To use this operation, you must have READ access to the bucket.</p> <p>The following operations are related to <code>ListObjectVersions</code>:</p> <ul> <li> <p> <a>ListObjectsV2</a> </p> </li> <li> <p> <a>GetObject</a> </p> </li> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a>DeleteObject</a> </p> </li> </ul></p>
22840     #[allow(unused_variables, warnings)]
list_object_versions( &self, input: ListObjectVersionsRequest, ) -> Result<ListObjectVersionsOutput, RusotoError<ListObjectVersionsError>>22841     async fn list_object_versions(
22842         &self,
22843         input: ListObjectVersionsRequest,
22844     ) -> Result<ListObjectVersionsOutput, RusotoError<ListObjectVersionsError>> {
22845         let request_uri = format!("/{bucket}", bucket = input.bucket);
22846 
22847         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22848 
22849         let mut params = Params::new();
22850         if let Some(ref x) = input.delimiter {
22851             params.put("delimiter", x);
22852         }
22853         if let Some(ref x) = input.encoding_type {
22854             params.put("encoding-type", x);
22855         }
22856         if let Some(ref x) = input.key_marker {
22857             params.put("key-marker", x);
22858         }
22859         if let Some(ref x) = input.max_keys {
22860             params.put("max-keys", x);
22861         }
22862         if let Some(ref x) = input.prefix {
22863             params.put("prefix", x);
22864         }
22865         if let Some(ref x) = input.version_id_marker {
22866             params.put("version-id-marker", x);
22867         }
22868         params.put_key("versions");
22869         request.set_params(params);
22870 
22871         let mut response = self
22872             .client
22873             .sign_and_dispatch(request)
22874             .await
22875             .map_err(RusotoError::from)?;
22876         if !response.status.is_success() {
22877             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22878             return Err(ListObjectVersionsError::from_response(response));
22879         }
22880 
22881         let mut result;
22882         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22883         if xml_response.body.is_empty() {
22884             result = ListObjectVersionsOutput::default();
22885         } else {
22886             let reader = EventReader::new_with_config(
22887                 xml_response.body.as_ref(),
22888                 ParserConfig::new().trim_whitespace(false),
22889             );
22890             let mut stack = XmlResponse::new(reader.into_iter().peekable());
22891             let _start_document = stack.next();
22892             let actual_tag_name = peek_at_name(&mut stack)?;
22893             result =
22894                 ListObjectVersionsOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
22895         }
22896         // parse non-payload
22897         Ok(result)
22898     }
22899 
22900     /// <p><p>Returns some or all (up to 1,000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK response can contain valid or invalid XML. Be sure to design your application to parse the contents of the response and handle it appropriately.</p> <important> <p>This API has been revised. We recommend that you use the newer version, <a>ListObjectsV2</a>, when developing applications. For backward compatibility, Amazon S3 continues to support <code>ListObjects</code>.</p> </important> <p>The following operations are related to <code>ListObjects</code>:</p> <ul> <li> <p> <a>ListObjectsV2</a> </p> </li> <li> <p> <a>GetObject</a> </p> </li> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>ListBuckets</a> </p> </li> </ul></p>
22901     #[allow(unused_variables, warnings)]
list_objects( &self, input: ListObjectsRequest, ) -> Result<ListObjectsOutput, RusotoError<ListObjectsError>>22902     async fn list_objects(
22903         &self,
22904         input: ListObjectsRequest,
22905     ) -> Result<ListObjectsOutput, RusotoError<ListObjectsError>> {
22906         let request_uri = format!("/{bucket}", bucket = input.bucket);
22907 
22908         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22909 
22910         if let Some(ref request_payer) = input.request_payer {
22911             request.add_header("x-amz-request-payer", &request_payer.to_string());
22912         }
22913         let mut params = Params::new();
22914         if let Some(ref x) = input.delimiter {
22915             params.put("delimiter", x);
22916         }
22917         if let Some(ref x) = input.encoding_type {
22918             params.put("encoding-type", x);
22919         }
22920         if let Some(ref x) = input.marker {
22921             params.put("marker", x);
22922         }
22923         if let Some(ref x) = input.max_keys {
22924             params.put("max-keys", x);
22925         }
22926         if let Some(ref x) = input.prefix {
22927             params.put("prefix", x);
22928         }
22929         request.set_params(params);
22930 
22931         let mut response = self
22932             .client
22933             .sign_and_dispatch(request)
22934             .await
22935             .map_err(RusotoError::from)?;
22936         if !response.status.is_success() {
22937             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22938             return Err(ListObjectsError::from_response(response));
22939         }
22940 
22941         let mut result;
22942         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
22943         if xml_response.body.is_empty() {
22944             result = ListObjectsOutput::default();
22945         } else {
22946             let reader = EventReader::new_with_config(
22947                 xml_response.body.as_ref(),
22948                 ParserConfig::new().trim_whitespace(false),
22949             );
22950             let mut stack = XmlResponse::new(reader.into_iter().peekable());
22951             let _start_document = stack.next();
22952             let actual_tag_name = peek_at_name(&mut stack)?;
22953             result = ListObjectsOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
22954         }
22955         // parse non-payload
22956         Ok(result)
22957     }
22958 
22959     /// <p><p>Returns some or all (up to 1,000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A <code>200 OK</code> response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately.</p> <p>To use this operation, you must have READ access to the bucket.</p> <p>To use this operation in an AWS Identity and Access Management (IAM) policy, you must have permissions to perform the <code>s3:ListBucket</code> action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <important> <p>This section describes the latest revision of the API. We recommend that you use this revised API for application development. For backward compatibility, Amazon S3 continues to support the prior version of this API, <a>ListObjects</a>.</p> </important> <p>To get a list of your buckets, see <a>ListBuckets</a>.</p> <p>The following operations are related to <code>ListObjectsV2</code>:</p> <ul> <li> <p> <a>GetObject</a> </p> </li> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a>CreateBucket</a> </p> </li> </ul></p>
22960     #[allow(unused_variables, warnings)]
list_objects_v2( &self, input: ListObjectsV2Request, ) -> Result<ListObjectsV2Output, RusotoError<ListObjectsV2Error>>22961     async fn list_objects_v2(
22962         &self,
22963         input: ListObjectsV2Request,
22964     ) -> Result<ListObjectsV2Output, RusotoError<ListObjectsV2Error>> {
22965         let request_uri = format!("/{bucket}", bucket = input.bucket);
22966 
22967         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
22968 
22969         if let Some(ref request_payer) = input.request_payer {
22970             request.add_header("x-amz-request-payer", &request_payer.to_string());
22971         }
22972         let mut params = Params::new();
22973         if let Some(ref x) = input.continuation_token {
22974             params.put("continuation-token", x);
22975         }
22976         if let Some(ref x) = input.delimiter {
22977             params.put("delimiter", x);
22978         }
22979         if let Some(ref x) = input.encoding_type {
22980             params.put("encoding-type", x);
22981         }
22982         if let Some(ref x) = input.fetch_owner {
22983             params.put("fetch-owner", x);
22984         }
22985         if let Some(ref x) = input.max_keys {
22986             params.put("max-keys", x);
22987         }
22988         if let Some(ref x) = input.prefix {
22989             params.put("prefix", x);
22990         }
22991         if let Some(ref x) = input.start_after {
22992             params.put("start-after", x);
22993         }
22994         params.put("list-type", "2");
22995         request.set_params(params);
22996 
22997         let mut response = self
22998             .client
22999             .sign_and_dispatch(request)
23000             .await
23001             .map_err(RusotoError::from)?;
23002         if !response.status.is_success() {
23003             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23004             return Err(ListObjectsV2Error::from_response(response));
23005         }
23006 
23007         let mut result;
23008         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23009         if xml_response.body.is_empty() {
23010             result = ListObjectsV2Output::default();
23011         } else {
23012             let reader = EventReader::new_with_config(
23013                 xml_response.body.as_ref(),
23014                 ParserConfig::new().trim_whitespace(false),
23015             );
23016             let mut stack = XmlResponse::new(reader.into_iter().peekable());
23017             let _start_document = stack.next();
23018             let actual_tag_name = peek_at_name(&mut stack)?;
23019             result = ListObjectsV2OutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
23020         }
23021         // parse non-payload
23022         Ok(result)
23023     }
23024 
23025     /// <p><p>Lists the parts that have been uploaded for a specific multipart upload. This operation must include the upload ID, which you obtain by sending the initiate multipart upload request (see <a>CreateMultipartUpload</a>). This request returns a maximum of 1,000 uploaded parts. The default number of parts returned is 1,000 parts. You can restrict the number of parts returned by specifying the <code>max-parts</code> request parameter. If your multipart upload consists of more than 1,000 parts, the response returns an <code>IsTruncated</code> field with the value of true, and a <code>NextPartNumberMarker</code> element. In subsequent <code>ListParts</code> requests you can include the part-number-marker query string parameter and set its value to the <code>NextPartNumberMarker</code> field value from the previous response.</p> <p>For more information on multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html">Uploading Objects Using Multipart Upload</a>.</p> <p>For information on permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and Permissions</a>.</p> <p>The following operations are related to <code>ListParts</code>:</p> <ul> <li> <p> <a>CreateMultipartUpload</a> </p> </li> <li> <p> <a>UploadPart</a> </p> </li> <li> <p> <a>CompleteMultipartUpload</a> </p> </li> <li> <p> <a>AbortMultipartUpload</a> </p> </li> <li> <p> <a>ListMultipartUploads</a> </p> </li> </ul></p>
23026     #[allow(unused_variables, warnings)]
list_parts( &self, input: ListPartsRequest, ) -> Result<ListPartsOutput, RusotoError<ListPartsError>>23027     async fn list_parts(
23028         &self,
23029         input: ListPartsRequest,
23030     ) -> Result<ListPartsOutput, RusotoError<ListPartsError>> {
23031         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
23032 
23033         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
23034 
23035         if let Some(ref request_payer) = input.request_payer {
23036             request.add_header("x-amz-request-payer", &request_payer.to_string());
23037         }
23038         let mut params = Params::new();
23039         if let Some(ref x) = input.max_parts {
23040             params.put("max-parts", x);
23041         }
23042         if let Some(ref x) = input.part_number_marker {
23043             params.put("part-number-marker", x);
23044         }
23045         params.put("uploadId", &input.upload_id);
23046         request.set_params(params);
23047 
23048         let mut response = self
23049             .client
23050             .sign_and_dispatch(request)
23051             .await
23052             .map_err(RusotoError::from)?;
23053         if !response.status.is_success() {
23054             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23055             return Err(ListPartsError::from_response(response));
23056         }
23057 
23058         let mut result;
23059         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23060         if xml_response.body.is_empty() {
23061             result = ListPartsOutput::default();
23062         } else {
23063             let reader = EventReader::new_with_config(
23064                 xml_response.body.as_ref(),
23065                 ParserConfig::new().trim_whitespace(false),
23066             );
23067             let mut stack = XmlResponse::new(reader.into_iter().peekable());
23068             let _start_document = stack.next();
23069             let actual_tag_name = peek_at_name(&mut stack)?;
23070             result = ListPartsOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
23071         }
23072         if let Some(abort_date) = response.headers.get("x-amz-abort-date") {
23073             let value = abort_date.to_owned();
23074             result.abort_date = Some(value)
23075         };
23076         if let Some(abort_rule_id) = response.headers.get("x-amz-abort-rule-id") {
23077             let value = abort_rule_id.to_owned();
23078             result.abort_rule_id = Some(value)
23079         };
23080         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
23081             let value = request_charged.to_owned();
23082             result.request_charged = Some(value)
23083         }; // parse non-payload
23084         Ok(result)
23085     }
23086 
23087     /// <p><p>Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration is a bucket-level feature that enables you to perform faster data transfers to Amazon S3.</p> <p> To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p> The Transfer Acceleration state of a bucket can be set to one of the following two values:</p> <ul> <li> <p> Enabled – Enables accelerated data transfers to the bucket.</p> </li> <li> <p> Suspended – Disables accelerated data transfers to the bucket.</p> </li> </ul> <p>The <a>GetBucketAccelerateConfiguration</a> operation returns the transfer acceleration state of a bucket.</p> <p>After setting the Transfer Acceleration state of a bucket to Enabled, it might take up to thirty minutes before the data transfer rates to the bucket increase.</p> <p> The name of the bucket used for Transfer Acceleration must be DNS-compliant and must not contain periods (&quot;.&quot;).</p> <p> For more information about transfer acceleration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html">Transfer Acceleration</a>.</p> <p>The following operations are related to <code>PutBucketAccelerateConfiguration</code>:</p> <ul> <li> <p> <a>GetBucketAccelerateConfiguration</a> </p> </li> <li> <p> <a>CreateBucket</a> </p> </li> </ul></p>
23088     #[allow(unused_variables, warnings)]
put_bucket_accelerate_configuration( &self, input: PutBucketAccelerateConfigurationRequest, ) -> Result<(), RusotoError<PutBucketAccelerateConfigurationError>>23089     async fn put_bucket_accelerate_configuration(
23090         &self,
23091         input: PutBucketAccelerateConfigurationRequest,
23092     ) -> Result<(), RusotoError<PutBucketAccelerateConfigurationError>> {
23093         let request_uri = format!("/{bucket}", bucket = input.bucket);
23094 
23095         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23096 
23097         let mut params = Params::new();
23098         params.put_key("accelerate");
23099         request.set_params(params);
23100         let mut writer = EventWriter::new(Vec::new());
23101         AccelerateConfigurationSerializer::serialize(
23102             &mut writer,
23103             "AccelerateConfiguration",
23104             &input.accelerate_configuration,
23105         );
23106         request.set_payload(Some(writer.into_inner()));
23107 
23108         let mut response = self
23109             .client
23110             .sign_and_dispatch(request)
23111             .await
23112             .map_err(RusotoError::from)?;
23113         if !response.status.is_success() {
23114             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23115             return Err(PutBucketAccelerateConfigurationError::from_response(
23116                 response,
23117             ));
23118         }
23119 
23120         std::mem::drop(response);
23121         Ok(())
23122     }
23123 
23124     /// <p><p>Sets the permissions on an existing bucket using access control lists (ACL). For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. To set the ACL of a bucket, you must have <code>WRITE_ACP</code> permission.</p> <p>You can use one of the following two ways to set a bucket&#39;s permissions:</p> <ul> <li> <p>Specify the ACL in the request body</p> </li> <li> <p>Specify permissions using request headers</p> </li> </ul> <note> <p>You cannot specify access permission using both the body and the request headers.</p> </note> <p>Depending on your application needs, you may choose to set the ACL on a bucket using either the request body or the headers. For example, if you have an existing application that updates a bucket ACL using the request body, then you can continue to use that approach.</p> <p> <b>Access Permissions</b> </p> <p>You can set access permissions using one of the following methods:</p> <ul> <li> <p>Specify a canned ACL with the <code>x-amz-acl</code> request header. Amazon S3 supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each canned ACL has a predefined set of grantees and permissions. Specify the canned ACL name as the value of <code>x-amz-acl</code>. If you use this header, you cannot use other access control-specific headers in your request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly with the <code>x-amz-grant-read</code>, <code>x-amz-grant-read-acp</code>, <code>x-amz-grant-write-acp</code>, and <code>x-amz-grant-full-control</code> headers. When using these headers, you specify explicit access permissions and grantees (AWS accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific headers, you cannot use the <code>x-amz-acl</code> header to set a canned ACL. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>.</p> <p>You specify each grantee as a type=value pair, where the type is one of the following:</p> <ul> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> </li> <li> <p> <code>id</code> – if the value specified is the canonical user ID of an AWS account</p> </li> <li> <p> <code>uri</code> – if you are granting permissions to a predefined group</p> </li> </ul> <p>For example, the following <code>x-amz-grant-write</code> header grants create, overwrite, and delete objects permission to LogDelivery group predefined by Amazon S3 and two AWS accounts identified by their email addresses.</p> <p> <code>x-amz-grant-write: uri=&quot;http://acs.amazonaws.com/groups/s3/LogDelivery&quot;, emailAddress=&quot;xyz@amazon.com&quot;, emailAddress=&quot;abc@amazon.com&quot; </code> </p> </li> </ul> <p>You can use either a canned ACL or specify access permissions explicitly. You cannot do both.</p> <p> <b>Grantee Values</b> </p> <p>You can specify the person (grantee) to whom you&#39;re assigning access rights (using request elements) in the following ways:</p> <ul> <li> <p>By Email address:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;AmazonCustomerByEmail&quot;&gt;&lt;EmailAddress&gt;&lt;&gt;Grantees@email.com&lt;&gt;&lt;/EmailAddress&gt;lt;/Grantee&gt;</code> </p> <p>The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl request, appears as the CanonicalUser.</p> </li> <li> <p>By the person&#39;s ID:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;CanonicalUser&quot;&gt;&lt;ID&gt;&lt;&gt;ID&lt;&gt;&lt;/ID&gt;&lt;DisplayName&gt;&lt;&gt;GranteesEmail&lt;&gt;&lt;/DisplayName&gt; &lt;/Grantee&gt;</code> </p> <p>DisplayName is optional and ignored in the request</p> </li> <li> <p>By URI:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;Group&quot;&gt;&lt;URI&gt;&lt;&gt;http://acs.amazonaws.com/groups/global/AuthenticatedUsers&lt;&gt;&lt;/URI&gt;&lt;/Grantee&gt;</code> </p> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>DeleteBucket</a> </p> </li> <li> <p> <a>GetObjectAcl</a> </p> </li> </ul></p>
23125     #[allow(unused_variables, warnings)]
put_bucket_acl( &self, input: PutBucketAclRequest, ) -> Result<(), RusotoError<PutBucketAclError>>23126     async fn put_bucket_acl(
23127         &self,
23128         input: PutBucketAclRequest,
23129     ) -> Result<(), RusotoError<PutBucketAclError>> {
23130         let request_uri = format!("/{bucket}", bucket = input.bucket);
23131 
23132         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23133 
23134         if let Some(ref acl) = input.acl {
23135             request.add_header("x-amz-acl", &acl.to_string());
23136         }
23137 
23138         if let Some(ref content_md5) = input.content_md5 {
23139             request.add_header("Content-MD5", &content_md5.to_string());
23140         }
23141 
23142         if let Some(ref grant_full_control) = input.grant_full_control {
23143             request.add_header("x-amz-grant-full-control", &grant_full_control.to_string());
23144         }
23145 
23146         if let Some(ref grant_read) = input.grant_read {
23147             request.add_header("x-amz-grant-read", &grant_read.to_string());
23148         }
23149 
23150         if let Some(ref grant_read_acp) = input.grant_read_acp {
23151             request.add_header("x-amz-grant-read-acp", &grant_read_acp.to_string());
23152         }
23153 
23154         if let Some(ref grant_write) = input.grant_write {
23155             request.add_header("x-amz-grant-write", &grant_write.to_string());
23156         }
23157 
23158         if let Some(ref grant_write_acp) = input.grant_write_acp {
23159             request.add_header("x-amz-grant-write-acp", &grant_write_acp.to_string());
23160         }
23161         let mut params = Params::new();
23162         params.put_key("acl");
23163         request.set_params(params);
23164         if input.access_control_policy.is_some() {
23165             let mut writer = EventWriter::new(Vec::new());
23166             AccessControlPolicySerializer::serialize(
23167                 &mut writer,
23168                 "AccessControlPolicy",
23169                 input.access_control_policy.as_ref().unwrap(),
23170             );
23171             request.set_payload(Some(writer.into_inner()));
23172         } else {
23173             request.set_payload(Some(Vec::new()));
23174         }
23175 
23176         let mut response = self
23177             .client
23178             .sign_and_dispatch(request)
23179             .await
23180             .map_err(RusotoError::from)?;
23181         if !response.status.is_success() {
23182             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23183             return Err(PutBucketAclError::from_response(response));
23184         }
23185 
23186         std::mem::drop(response);
23187         Ok(())
23188     }
23189 
23190     /// <p><p>Sets an analytics configuration for the bucket (specified by the analytics configuration ID). You can have up to 1,000 analytics configurations per bucket.</p> <p>You can choose to have storage class analysis export analysis reports sent to a comma-separated values (CSV) flat file. See the <code>DataExport</code> request element. Reports are updated daily and are based on the object filters that you configure. When selecting data export, you specify a destination bucket and an optional destination prefix where the file is written. You can export the data to a destination bucket in a different account. However, the destination bucket must be in the same Region as the bucket that you are making the PUT analytics configuration to. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html">Amazon S3 Analytics – Storage Class Analysis</a>. </p> <important> <p>You must create a bucket policy on the destination bucket where the exported file is written to grant permissions to Amazon S3 to write objects to the bucket. For an example policy, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9">Granting Permissions for Amazon S3 Inventory and Storage Class Analysis</a>.</p> </important> <p>To use this operation, you must have permissions to perform the <code>s3:PutAnalyticsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p class="title"> <b>Special Errors</b> </p> <ul> <li> <ul> <li> <p> <i>HTTP Error: HTTP 400 Bad Request</i> </p> </li> <li> <p> <i>Code: InvalidArgument</i> </p> </li> <li> <p> <i>Cause: Invalid argument.</i> </p> </li> </ul> </li> <li> <ul> <li> <p> <i>HTTP Error: HTTP 400 Bad Request</i> </p> </li> <li> <p> <i>Code: TooManyConfigurations</i> </p> </li> <li> <p> <i>Cause: You are attempting to create a new configuration but have already reached the 1,000-configuration limit.</i> </p> </li> </ul> </li> <li> <ul> <li> <p> <i>HTTP Error: HTTP 403 Forbidden</i> </p> </li> <li> <p> <i>Code: AccessDenied</i> </p> </li> <li> <p> <i>Cause: You are not the owner of the specified bucket, or you do not have the s3:PutAnalyticsConfiguration bucket permission to set the configuration on the bucket.</i> </p> </li> </ul> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> </p> </li> <li> <p> </p> </li> <li> <p> </p> </li> </ul></p>
23191     #[allow(unused_variables, warnings)]
put_bucket_analytics_configuration( &self, input: PutBucketAnalyticsConfigurationRequest, ) -> Result<(), RusotoError<PutBucketAnalyticsConfigurationError>>23192     async fn put_bucket_analytics_configuration(
23193         &self,
23194         input: PutBucketAnalyticsConfigurationRequest,
23195     ) -> Result<(), RusotoError<PutBucketAnalyticsConfigurationError>> {
23196         let request_uri = format!("/{bucket}", bucket = input.bucket);
23197 
23198         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23199 
23200         let mut params = Params::new();
23201         params.put("id", &input.id);
23202         params.put_key("analytics");
23203         request.set_params(params);
23204         let mut writer = EventWriter::new(Vec::new());
23205         AnalyticsConfigurationSerializer::serialize(
23206             &mut writer,
23207             "AnalyticsConfiguration",
23208             &input.analytics_configuration,
23209         );
23210         request.set_payload(Some(writer.into_inner()));
23211 
23212         let mut response = self
23213             .client
23214             .sign_and_dispatch(request)
23215             .await
23216             .map_err(RusotoError::from)?;
23217         if !response.status.is_success() {
23218             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23219             return Err(PutBucketAnalyticsConfigurationError::from_response(
23220                 response,
23221             ));
23222         }
23223 
23224         std::mem::drop(response);
23225         Ok(())
23226     }
23227 
23228     /// <p><p>Sets the <code>cors</code> configuration for your bucket. If the configuration exists, Amazon S3 replaces it.</p> <p>To use this operation, you must be allowed to perform the <code>s3:PutBucketCORS</code> action. By default, the bucket owner has this permission and can grant it to others.</p> <p>You set this configuration on a bucket so that the bucket can service cross-origin requests. For example, you might want to enable a request whose origin is <code>http://www.example.com</code> to access your Amazon S3 bucket at <code>my.example.bucket.com</code> by using the browser&#39;s <code>XMLHttpRequest</code> capability.</p> <p>To enable cross-origin resource sharing (CORS) on a bucket, you add the <code>cors</code> subresource to the bucket. The <code>cors</code> subresource is an XML document in which you configure rules that identify origins and the HTTP methods that can be executed on your bucket. The document is limited to 64 KB in size. </p> <p>When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against a bucket, it evaluates the <code>cors</code> configuration on the bucket and uses the first <code>CORSRule</code> rule that matches the incoming browser request to enable a cross-origin request. For a rule to match, the following conditions must be met:</p> <ul> <li> <p>The request&#39;s <code>Origin</code> header must match <code>AllowedOrigin</code> elements.</p> </li> <li> <p>The request method (for example, GET, PUT, HEAD, and so on) or the <code>Access-Control-Request-Method</code> header in case of a pre-flight <code>OPTIONS</code> request must be one of the <code>AllowedMethod</code> elements. </p> </li> <li> <p>Every header specified in the <code>Access-Control-Request-Headers</code> request header of a pre-flight request must match an <code>AllowedHeader</code> element. </p> </li> </ul> <p> For more information about CORS, go to <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html">Enabling Cross-Origin Resource Sharing</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>GetBucketCors</a> </p> </li> <li> <p> <a>DeleteBucketCors</a> </p> </li> <li> <p> <a>RESTOPTIONSobject</a> </p> </li> </ul></p>
23229     #[allow(unused_variables, warnings)]
put_bucket_cors( &self, input: PutBucketCorsRequest, ) -> Result<(), RusotoError<PutBucketCorsError>>23230     async fn put_bucket_cors(
23231         &self,
23232         input: PutBucketCorsRequest,
23233     ) -> Result<(), RusotoError<PutBucketCorsError>> {
23234         let request_uri = format!("/{bucket}", bucket = input.bucket);
23235 
23236         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23237 
23238         if let Some(ref content_md5) = input.content_md5 {
23239             request.add_header("Content-MD5", &content_md5.to_string());
23240         }
23241         let mut params = Params::new();
23242         params.put_key("cors");
23243         request.set_params(params);
23244         let mut writer = EventWriter::new(Vec::new());
23245         CORSConfigurationSerializer::serialize(
23246             &mut writer,
23247             "CORSConfiguration",
23248             &input.cors_configuration,
23249         );
23250         request.set_payload(Some(writer.into_inner()));
23251         request.set_content_md5_header();
23252 
23253         let mut response = self
23254             .client
23255             .sign_and_dispatch(request)
23256             .await
23257             .map_err(RusotoError::from)?;
23258         if !response.status.is_success() {
23259             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23260             return Err(PutBucketCorsError::from_response(response));
23261         }
23262 
23263         std::mem::drop(response);
23264         Ok(())
23265     }
23266 
23267     /// <p><p>This implementation of the <code>PUT</code> operation uses the <code>encryption</code> subresource to set the default encryption state of an existing bucket.</p> <p>This implementation of the <code>PUT</code> operation sets default encryption for a bucket using server-side encryption with Amazon S3-managed keys SSE-S3 or AWS KMS customer master keys (CMKs) (SSE-KMS).</p> <important> <p>This operation requires AWS Signature Version 4. For more information, see <a href="sig-v4-authenticating-requests.html"> Authenticating Requests (AWS Signature Version 4)</a>. </p> </important> <p>To use this operation, you must have permissions to perform the <code>s3:PutEncryptionConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the Amazon Simple Storage Service Developer Guide. </p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>GetBucketEncryption</a> </p> </li> <li> <p> <a>DeleteBucketEncryption</a> </p> </li> </ul></p>
23268     #[allow(unused_variables, warnings)]
put_bucket_encryption( &self, input: PutBucketEncryptionRequest, ) -> Result<(), RusotoError<PutBucketEncryptionError>>23269     async fn put_bucket_encryption(
23270         &self,
23271         input: PutBucketEncryptionRequest,
23272     ) -> Result<(), RusotoError<PutBucketEncryptionError>> {
23273         let request_uri = format!("/{bucket}", bucket = input.bucket);
23274 
23275         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23276 
23277         if let Some(ref content_md5) = input.content_md5 {
23278             request.add_header("Content-MD5", &content_md5.to_string());
23279         }
23280         let mut params = Params::new();
23281         params.put_key("encryption");
23282         request.set_params(params);
23283         let mut writer = EventWriter::new(Vec::new());
23284         ServerSideEncryptionConfigurationSerializer::serialize(
23285             &mut writer,
23286             "ServerSideEncryptionConfiguration",
23287             &input.server_side_encryption_configuration,
23288         );
23289         request.set_payload(Some(writer.into_inner()));
23290 
23291         let mut response = self
23292             .client
23293             .sign_and_dispatch(request)
23294             .await
23295             .map_err(RusotoError::from)?;
23296         if !response.status.is_success() {
23297             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23298             return Err(PutBucketEncryptionError::from_response(response));
23299         }
23300 
23301         std::mem::drop(response);
23302         Ok(())
23303     }
23304 
23305     /// <p><p>This implementation of the <code>PUT</code> operation adds an inventory configuration (identified by the inventory ID) to the bucket. You can have up to 1,000 inventory configurations per bucket. </p> <p>Amazon S3 inventory generates inventories of the objects in the bucket on a daily or weekly basis, and the results are published to a flat file. The bucket that is inventoried is called the <i>source</i> bucket, and the bucket where the inventory flat file is stored is called the <i>destination</i> bucket. The <i>destination</i> bucket must be in the same AWS Region as the <i>source</i> bucket. </p> <p>When you configure an inventory for a <i>source</i> bucket, you specify the <i>destination</i> bucket where you want the inventory to be stored, and whether to generate the inventory daily or weekly. You can also configure what object metadata to include and whether to inventory all object versions or only current versions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//storage-inventory.html">Amazon S3 Inventory</a> in the Amazon Simple Storage Service Developer Guide.</p> <important> <p>You must create a bucket policy on the <i>destination</i> bucket to grant permissions to Amazon S3 to write objects to the bucket in the defined location. For an example policy, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9"> Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.</a> </p> </important> <p>To use this operation, you must have permissions to perform the <code>s3:PutInventoryConfiguration</code> action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the Amazon Simple Storage Service Developer Guide.</p> <p class="title"> <b>Special Errors</b> </p> <ul> <li> <p class="title"> <b>HTTP 400 Bad Request Error</b> </p> <ul> <li> <p> <i>Code:</i> InvalidArgument</p> </li> <li> <p> <i>Cause:</i> Invalid Argument</p> </li> </ul> </li> <li> <p class="title"> <b>HTTP 400 Bad Request Error</b> </p> <ul> <li> <p> <i>Code:</i> TooManyConfigurations</p> </li> <li> <p> <i>Cause:</i> You are attempting to create a new configuration but have already reached the 1,000-configuration limit. </p> </li> </ul> </li> <li> <p class="title"> <b>HTTP 403 Forbidden Error</b> </p> <ul> <li> <p> <i>Code:</i> AccessDenied</p> </li> <li> <p> <i>Cause:</i> You are not the owner of the specified bucket, or you do not have the <code>s3:PutInventoryConfiguration</code> bucket permission to set the configuration on the bucket </p> </li> </ul> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>GetBucketInventoryConfiguration</a> </p> </li> <li> <p> <a>DeleteBucketInventoryConfiguration</a> </p> </li> <li> <p> <a>ListBucketInventoryConfigurations</a> </p> </li> </ul></p>
23306     #[allow(unused_variables, warnings)]
put_bucket_inventory_configuration( &self, input: PutBucketInventoryConfigurationRequest, ) -> Result<(), RusotoError<PutBucketInventoryConfigurationError>>23307     async fn put_bucket_inventory_configuration(
23308         &self,
23309         input: PutBucketInventoryConfigurationRequest,
23310     ) -> Result<(), RusotoError<PutBucketInventoryConfigurationError>> {
23311         let request_uri = format!("/{bucket}", bucket = input.bucket);
23312 
23313         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23314 
23315         let mut params = Params::new();
23316         params.put("id", &input.id);
23317         params.put_key("inventory");
23318         request.set_params(params);
23319         let mut writer = EventWriter::new(Vec::new());
23320         InventoryConfigurationSerializer::serialize(
23321             &mut writer,
23322             "InventoryConfiguration",
23323             &input.inventory_configuration,
23324         );
23325         request.set_payload(Some(writer.into_inner()));
23326 
23327         let mut response = self
23328             .client
23329             .sign_and_dispatch(request)
23330             .await
23331             .map_err(RusotoError::from)?;
23332         if !response.status.is_success() {
23333             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23334             return Err(PutBucketInventoryConfigurationError::from_response(
23335                 response,
23336             ));
23337         }
23338 
23339         std::mem::drop(response);
23340         Ok(())
23341     }
23342 
23343     /// <p><important> <p>For an updated version of this API, see <a>PutBucketLifecycleConfiguration</a>. This version has been deprecated. Existing lifecycle configurations will work. For new lifecycle configurations, use the updated API. </p> </important> <p>Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. For information about lifecycle configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//object-lifecycle-mgmt.html">Object Lifecycle Management</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. </p> <p>By default, all Amazon S3 resources, including buckets, objects, and related subresources (for example, lifecycle configuration and website configuration) are private. Only the resource owner, the AWS account that created the resource, can access it. The resource owner can optionally grant access permissions to others by writing an access policy. For this operation, users must get the <code>s3:PutLifecycleConfiguration</code> permission.</p> <p>You can also explicitly deny permissions. Explicit denial also supersedes any other permissions. If you want to prevent users or accounts from removing or deleting objects from your bucket, you must deny them permissions for the following actions: </p> <ul> <li> <p> <code>s3:DeleteObject</code> </p> </li> <li> <p> <code>s3:DeleteObjectVersion</code> </p> </li> <li> <p> <code>s3:PutLifecycleConfiguration</code> </p> </li> </ul> <p>For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>For more examples of transitioning objects to storage classes such as STANDARD<em>IA or ONEZONE</em>IA, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//intro-lifecycle-rules.html#lifecycle-configuration-examples">Examples of Lifecycle Configuration</a>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>GetBucketLifecycle</a>(Deprecated)</p> </li> <li> <p> <a>GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> </p> </li> <li> <p>By default, a resource owner—in this case, a bucket owner, which is the AWS account that created the bucket—can perform any of the operations. A resource owner can also grant others permission to perform the operation. For more information, see the following topics in the Amazon Simple Storage Service Developer Guide: </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//using-with-s3-actions.html">Specifying Permissions in a Policy</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev//s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> </p> </li> </ul> </li> </ul></p>
23344     #[allow(unused_variables, warnings)]
put_bucket_lifecycle( &self, input: PutBucketLifecycleRequest, ) -> Result<(), RusotoError<PutBucketLifecycleError>>23345     async fn put_bucket_lifecycle(
23346         &self,
23347         input: PutBucketLifecycleRequest,
23348     ) -> Result<(), RusotoError<PutBucketLifecycleError>> {
23349         let request_uri = format!("/{bucket}", bucket = input.bucket);
23350 
23351         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23352 
23353         if let Some(ref content_md5) = input.content_md5 {
23354             request.add_header("Content-MD5", &content_md5.to_string());
23355         }
23356         let mut params = Params::new();
23357         params.put_key("lifecycle");
23358         request.set_params(params);
23359         if input.lifecycle_configuration.is_some() {
23360             let mut writer = EventWriter::new(Vec::new());
23361             LifecycleConfigurationSerializer::serialize(
23362                 &mut writer,
23363                 "LifecycleConfiguration",
23364                 input.lifecycle_configuration.as_ref().unwrap(),
23365             );
23366             request.set_payload(Some(writer.into_inner()));
23367         } else {
23368             request.set_payload(Some(Vec::new()));
23369         }
23370         request.set_content_md5_header();
23371 
23372         let mut response = self
23373             .client
23374             .sign_and_dispatch(request)
23375             .await
23376             .map_err(RusotoError::from)?;
23377         if !response.status.is_success() {
23378             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23379             return Err(PutBucketLifecycleError::from_response(response));
23380         }
23381 
23382         std::mem::drop(response);
23383         Ok(())
23384     }
23385 
23386     /// <p><p>Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. For information about lifecycle configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <note> <p>Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, or a combination of both. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility. For the related API description, see <a>PutBucketLifecycle</a>.</p> </note> <p> <b>Rules</b> </p> <p>You specify the lifecycle configuration in your request body. The lifecycle configuration is specified as XML consisting of one or more rules. Each rule consists of the following:</p> <ul> <li> <p>Filter identifying a subset of objects to which the rule applies. The filter can be based on a key name prefix, object tags, or a combination of both.</p> </li> <li> <p>Status whether the rule is in effect.</p> </li> <li> <p>One or more lifecycle transition and expiration actions that you want Amazon S3 to perform on the objects identified by the filter. If the state of your bucket is versioning-enabled or versioning-suspended, you can have many versions of the same object (one current version and zero or more noncurrent versions). Amazon S3 provides predefined actions that you can specify for current and noncurrent object versions.</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html">Object Lifecycle Management</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html">Lifecycle Configuration Elements</a>.</p> <p> <b>Permissions</b> </p> <p>By default, all Amazon S3 resources are private, including buckets, objects, and related subresources (for example, lifecycle configuration and website configuration). Only the resource owner (that is, the AWS account that created it) can access the resource. The resource owner can optionally grant access permissions to others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration permission.</p> <p>You can also explicitly deny permissions. Explicit deny also supersedes any other permissions. If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them permissions for the following actions:</p> <ul> <li> <p>s3:DeleteObject</p> </li> <li> <p>s3:DeleteObjectVersion</p> </li> <li> <p>s3:PutLifecycleConfiguration</p> </li> </ul> <p>For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>The following are related to <code>PutBucketLifecycleConfiguration</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-configuration-examples.html">Examples of Lifecycle Configuration</a> </p> </li> <li> <p> <a>GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a>DeleteBucketLifecycle</a> </p> </li> </ul></p>
23387     #[allow(unused_variables, warnings)]
put_bucket_lifecycle_configuration( &self, input: PutBucketLifecycleConfigurationRequest, ) -> Result<(), RusotoError<PutBucketLifecycleConfigurationError>>23388     async fn put_bucket_lifecycle_configuration(
23389         &self,
23390         input: PutBucketLifecycleConfigurationRequest,
23391     ) -> Result<(), RusotoError<PutBucketLifecycleConfigurationError>> {
23392         let request_uri = format!("/{bucket}", bucket = input.bucket);
23393 
23394         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23395 
23396         let mut params = Params::new();
23397         params.put_key("lifecycle");
23398         request.set_params(params);
23399         if input.lifecycle_configuration.is_some() {
23400             let mut writer = EventWriter::new(Vec::new());
23401             BucketLifecycleConfigurationSerializer::serialize(
23402                 &mut writer,
23403                 "LifecycleConfiguration",
23404                 input.lifecycle_configuration.as_ref().unwrap(),
23405             );
23406             request.set_payload(Some(writer.into_inner()));
23407         } else {
23408             request.set_payload(Some(Vec::new()));
23409         }
23410         request.set_content_md5_header();
23411 
23412         let mut response = self
23413             .client
23414             .sign_and_dispatch(request)
23415             .await
23416             .map_err(RusotoError::from)?;
23417         if !response.status.is_success() {
23418             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23419             return Err(PutBucketLifecycleConfigurationError::from_response(
23420                 response,
23421             ));
23422         }
23423 
23424         std::mem::drop(response);
23425         Ok(())
23426     }
23427 
23428     /// <p><p>Set the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters. All logs are saved to buckets in the same AWS Region as the source bucket. To set the logging status of a bucket, you must be the bucket owner.</p> <p>The bucket owner is automatically granted FULL_CONTROL to all logs. You use the <code>Grantee</code> request element to grant access to other people. The <code>Permissions</code> request element specifies the kind of access the grantee has to the logs.</p> <p> <b>Grantee Values</b> </p> <p>You can specify the person (grantee) to whom you&#39;re assigning access rights (using request elements) in the following ways:</p> <ul> <li> <p>By the person&#39;s ID:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;CanonicalUser&quot;&gt;&lt;ID&gt;&lt;&gt;ID&lt;&gt;&lt;/ID&gt;&lt;DisplayName&gt;&lt;&gt;GranteesEmail&lt;&gt;&lt;/DisplayName&gt; &lt;/Grantee&gt;</code> </p> <p>DisplayName is optional and ignored in the request.</p> </li> <li> <p>By Email address:</p> <p> <code> &lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;AmazonCustomerByEmail&quot;&gt;&lt;EmailAddress&gt;&lt;&gt;Grantees@email.com&lt;&gt;&lt;/EmailAddress&gt;&lt;/Grantee&gt;</code> </p> <p>The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl request, appears as the CanonicalUser.</p> </li> <li> <p>By URI:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;Group&quot;&gt;&lt;URI&gt;&lt;&gt;http://acs.amazonaws.com/groups/global/AuthenticatedUsers&lt;&gt;&lt;/URI&gt;&lt;/Grantee&gt;</code> </p> </li> </ul> <p>To enable logging, you use LoggingEnabled and its children request elements. To disable logging, you use an empty BucketLoggingStatus request element:</p> <p> <code>&lt;BucketLoggingStatus xmlns=&quot;http://doc.s3.amazonaws.com/2006-03-01&quot; /&gt;</code> </p> <p>For more information about server access logging, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerLogs.html">Server Access Logging</a>. </p> <p>For more information about creating a bucket, see <a>CreateBucket</a>. For more information about returning the logging status of a bucket, see <a>GetBucketLogging</a>.</p> <p>The following operations are related to <code>PutBucketLogging</code>:</p> <ul> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a>DeleteBucket</a> </p> </li> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>GetBucketLogging</a> </p> </li> </ul></p>
23429     #[allow(unused_variables, warnings)]
put_bucket_logging( &self, input: PutBucketLoggingRequest, ) -> Result<(), RusotoError<PutBucketLoggingError>>23430     async fn put_bucket_logging(
23431         &self,
23432         input: PutBucketLoggingRequest,
23433     ) -> Result<(), RusotoError<PutBucketLoggingError>> {
23434         let request_uri = format!("/{bucket}", bucket = input.bucket);
23435 
23436         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23437 
23438         if let Some(ref content_md5) = input.content_md5 {
23439             request.add_header("Content-MD5", &content_md5.to_string());
23440         }
23441         let mut params = Params::new();
23442         params.put_key("logging");
23443         request.set_params(params);
23444         let mut writer = EventWriter::new(Vec::new());
23445         BucketLoggingStatusSerializer::serialize(
23446             &mut writer,
23447             "BucketLoggingStatus",
23448             &input.bucket_logging_status,
23449         );
23450         request.set_payload(Some(writer.into_inner()));
23451 
23452         let mut response = self
23453             .client
23454             .sign_and_dispatch(request)
23455             .await
23456             .map_err(RusotoError::from)?;
23457         if !response.status.is_success() {
23458             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23459             return Err(PutBucketLoggingError::from_response(response));
23460         }
23461 
23462         std::mem::drop(response);
23463         Ok(())
23464     }
23465 
23466     /// <p><p>Sets a metrics configuration (specified by the metrics configuration ID) for the bucket. You can have up to 1,000 metrics configurations per bucket. If you&#39;re updating an existing metrics configuration, note that this is a full replacement of the existing metrics configuration. If you don&#39;t include the elements you want to keep, they are erased.</p> <p>To use this operation, you must have permissions to perform the <code>s3:PutMetricsConfiguration</code> action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>For information about CloudWatch request metrics for Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html">Monitoring Metrics with Amazon CloudWatch</a>.</p> <p>The following operations are related to <code>PutBucketMetricsConfiguration</code>:</p> <ul> <li> <p> <a>DeleteBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a>ListBucketMetricsConfigurations</a> </p> </li> </ul> <p> <code>GetBucketLifecycle</code> has the following special error:</p> <ul> <li> <p>Error code: <code>TooManyConfigurations</code> </p> <ul> <li> <p>Description: You are attempting to create a new configuration but have already reached the 1,000-configuration limit.</p> </li> <li> <p>HTTP Status Code: HTTP 400 Bad Request</p> </li> </ul> </li> </ul></p>
23467     #[allow(unused_variables, warnings)]
put_bucket_metrics_configuration( &self, input: PutBucketMetricsConfigurationRequest, ) -> Result<(), RusotoError<PutBucketMetricsConfigurationError>>23468     async fn put_bucket_metrics_configuration(
23469         &self,
23470         input: PutBucketMetricsConfigurationRequest,
23471     ) -> Result<(), RusotoError<PutBucketMetricsConfigurationError>> {
23472         let request_uri = format!("/{bucket}", bucket = input.bucket);
23473 
23474         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23475 
23476         let mut params = Params::new();
23477         params.put("id", &input.id);
23478         params.put_key("metrics");
23479         request.set_params(params);
23480         let mut writer = EventWriter::new(Vec::new());
23481         MetricsConfigurationSerializer::serialize(
23482             &mut writer,
23483             "MetricsConfiguration",
23484             &input.metrics_configuration,
23485         );
23486         request.set_payload(Some(writer.into_inner()));
23487 
23488         let mut response = self
23489             .client
23490             .sign_and_dispatch(request)
23491             .await
23492             .map_err(RusotoError::from)?;
23493         if !response.status.is_success() {
23494             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23495             return Err(PutBucketMetricsConfigurationError::from_response(response));
23496         }
23497 
23498         std::mem::drop(response);
23499         Ok(())
23500     }
23501 
23502     /// <p> No longer used, see the <a>PutBucketNotificationConfiguration</a> operation.</p>
23503     #[allow(unused_variables, warnings)]
put_bucket_notification( &self, input: PutBucketNotificationRequest, ) -> Result<(), RusotoError<PutBucketNotificationError>>23504     async fn put_bucket_notification(
23505         &self,
23506         input: PutBucketNotificationRequest,
23507     ) -> Result<(), RusotoError<PutBucketNotificationError>> {
23508         let request_uri = format!("/{bucket}", bucket = input.bucket);
23509 
23510         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23511 
23512         if let Some(ref content_md5) = input.content_md5 {
23513             request.add_header("Content-MD5", &content_md5.to_string());
23514         }
23515         let mut params = Params::new();
23516         params.put_key("notification");
23517         request.set_params(params);
23518         let mut writer = EventWriter::new(Vec::new());
23519         NotificationConfigurationDeprecatedSerializer::serialize(
23520             &mut writer,
23521             "NotificationConfigurationDeprecated",
23522             &input.notification_configuration,
23523         );
23524         request.set_payload(Some(writer.into_inner()));
23525 
23526         let mut response = self
23527             .client
23528             .sign_and_dispatch(request)
23529             .await
23530             .map_err(RusotoError::from)?;
23531         if !response.status.is_success() {
23532             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23533             return Err(PutBucketNotificationError::from_response(response));
23534         }
23535 
23536         std::mem::drop(response);
23537         Ok(())
23538     }
23539 
23540     /// <p><p>Enables notifications of specified events for a bucket. For more information about event notifications, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html">Configuring Event Notifications</a>.</p> <p>Using this API, you can replace an existing notification configuration. The configuration is an XML file that defines the event types that you want Amazon S3 to publish and the destination where you want Amazon S3 to publish an event notification when it detects an event of the specified type.</p> <p>By default, your bucket has no event notifications configured. That is, the notification configuration will be an empty <code>NotificationConfiguration</code>.</p> <p> <code>&lt;NotificationConfiguration&gt;</code> </p> <p> <code>&lt;/NotificationConfiguration&gt;</code> </p> <p>This operation replaces the existing notification configuration with the configuration you include in the request body.</p> <p>After Amazon S3 receives this request, it first verifies that any Amazon Simple Notification Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS) destination exists, and that the bucket owner has permission to publish to it by sending a test notification. In the case of AWS Lambda destinations, Amazon S3 verifies that the Lambda function permissions grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html">Configuring Notifications for Amazon S3 Events</a>.</p> <p>You can disable notifications by adding the empty NotificationConfiguration element.</p> <p>By default, only the bucket owner can configure notifications on a bucket. However, bucket owners can use a bucket policy to grant permission to other users to set this configuration with <code>s3:PutBucketNotification</code> permission.</p> <note> <p>The PUT notification is an atomic operation. For example, suppose your notification configuration includes SNS topic, SQS queue, and Lambda function configurations. When you send a PUT request with this configuration, Amazon S3 sends test messages to your SNS topic. If the message fails, the entire PUT operation will fail, and Amazon S3 will not add the configuration to your bucket.</p> </note> <p> <b>Responses</b> </p> <p>If the configuration in the request body includes only one <code>TopicConfiguration</code> specifying only the <code>s3:ReducedRedundancyLostObject</code> event type, the response will also include the <code>x-amz-sns-test-message-id</code> header containing the message ID of the test notification sent to the topic.</p> <p>The following operation is related to <code>PutBucketNotificationConfiguration</code>:</p> <ul> <li> <p> <a>GetBucketNotificationConfiguration</a> </p> </li> </ul></p>
23541     #[allow(unused_variables, warnings)]
put_bucket_notification_configuration( &self, input: PutBucketNotificationConfigurationRequest, ) -> Result<(), RusotoError<PutBucketNotificationConfigurationError>>23542     async fn put_bucket_notification_configuration(
23543         &self,
23544         input: PutBucketNotificationConfigurationRequest,
23545     ) -> Result<(), RusotoError<PutBucketNotificationConfigurationError>> {
23546         let request_uri = format!("/{bucket}", bucket = input.bucket);
23547 
23548         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23549 
23550         let mut params = Params::new();
23551         params.put_key("notification");
23552         request.set_params(params);
23553         let mut writer = EventWriter::new(Vec::new());
23554         NotificationConfigurationSerializer::serialize(
23555             &mut writer,
23556             "NotificationConfiguration",
23557             &input.notification_configuration,
23558         );
23559         request.set_payload(Some(writer.into_inner()));
23560 
23561         let mut response = self
23562             .client
23563             .sign_and_dispatch(request)
23564             .await
23565             .map_err(RusotoError::from)?;
23566         if !response.status.is_success() {
23567             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23568             return Err(PutBucketNotificationConfigurationError::from_response(
23569                 response,
23570             ));
23571         }
23572 
23573         std::mem::drop(response);
23574         Ok(())
23575     }
23576 
23577     /// <p><p>Applies an Amazon S3 bucket policy to an Amazon S3 bucket. If you are using an identity other than the root user of the AWS account that owns the bucket, the calling identity must have the <code>PutBucketPolicy</code> permissions on the specified bucket and belong to the bucket owner&#39;s account in order to use this operation.</p> <p>If you don&#39;t have <code>PutBucketPolic</code>y permissions, Amazon S3 returns a <code>403 Access Denied</code> error. If you have the correct permissions, but you&#39;re not using an identity that belongs to the bucket owner&#39;s account, Amazon S3 returns a <code>405 Method Not Allowed</code> error.</p> <important> <p> As a security precaution, the root user of the AWS account that owns a bucket can always use this operation, even if the policy explicitly denies the root user the ability to perform this action. </p> </important> <p>For more information about bucket policies, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html">Using Bucket Policies and User Policies</a>.</p> <p>The following operations are related to <code>PutBucketPolicy</code>:</p> <ul> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>DeleteBucket</a> </p> </li> </ul></p>
23578     #[allow(unused_variables, warnings)]
put_bucket_policy( &self, input: PutBucketPolicyRequest, ) -> Result<(), RusotoError<PutBucketPolicyError>>23579     async fn put_bucket_policy(
23580         &self,
23581         input: PutBucketPolicyRequest,
23582     ) -> Result<(), RusotoError<PutBucketPolicyError>> {
23583         let request_uri = format!("/{bucket}", bucket = input.bucket);
23584 
23585         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23586 
23587         if let Some(ref confirm_remove_self_bucket_access) = input.confirm_remove_self_bucket_access
23588         {
23589             request.add_header(
23590                 "x-amz-confirm-remove-self-bucket-access",
23591                 &confirm_remove_self_bucket_access.to_string(),
23592             );
23593         }
23594 
23595         if let Some(ref content_md5) = input.content_md5 {
23596             request.add_header("Content-MD5", &content_md5.to_string());
23597         }
23598         let mut params = Params::new();
23599         params.put_key("policy");
23600         request.set_params(params);
23601         request.set_payload(Some(input.policy.into_bytes()));
23602 
23603         let mut response = self
23604             .client
23605             .sign_and_dispatch(request)
23606             .await
23607             .map_err(RusotoError::from)?;
23608         if !response.status.is_success() {
23609             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23610             return Err(PutBucketPolicyError::from_response(response));
23611         }
23612 
23613         std::mem::drop(response);
23614         Ok(())
23615     }
23616 
23617     /// <p><p> Creates a replication configuration or replaces an existing one. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html">Replication</a> in the <i>Amazon S3 Developer Guide</i>. </p> <note> <p>To perform this operation, the user or role performing the operation must have the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html">iam:PassRole</a> permission.</p> </note> <p>Specify the replication configuration in the request body. In the replication configuration, you provide the name of the destination bucket where you want Amazon S3 to replicate objects, the IAM role that Amazon S3 can assume to replicate objects on your behalf, and other relevant information.</p> <p>A replication configuration must include at least one rule, and can contain a maximum of 1,000. Each rule identifies a subset of objects to replicate by filtering the objects in the source bucket. To choose additional subsets of objects to replicate, add a rule for each subset. All rules must specify the same destination bucket.</p> <p>To specify a subset of the objects in the source bucket to apply a replication rule to, add the Filter element as a child of the Rule element. You can filter objects based on an object key prefix, one or more object tags, or both. When you add the Filter element in the configuration, you must also add the following elements: <code>DeleteMarkerReplication</code>, <code>Status</code>, and <code>Priority</code>.</p> <p>For information about enabling versioning on a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html">Using Versioning</a>.</p> <p>By default, a resource owner, in this case the AWS account that created the bucket, can perform this operation. The resource owner can also grant others permissions to perform the operation. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p> <b>Handling Replication of Encrypted Objects</b> </p> <p>By default, Amazon S3 doesn&#39;t replicate objects that are stored at rest using server-side encryption with CMKs stored in AWS KMS. To replicate AWS KMS-encrypted objects, add the following: <code>SourceSelectionCriteria</code>, <code>SseKmsEncryptedObjects</code>, <code>Status</code>, <code>EncryptionConfiguration</code>, and <code>ReplicaKmsKeyID</code>. For information about replication configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-config-for-kms-objects.html">Replicating Objects Created with SSE Using CMKs stored in AWS KMS</a>.</p> <p>For information on <code>PutBucketReplication</code> errors, see <a>ReplicationErrorCodeList</a> </p> <p>The following operations are related to <code>PutBucketReplication</code>:</p> <ul> <li> <p> <a>GetBucketReplication</a> </p> </li> <li> <p> <a>DeleteBucketReplication</a> </p> </li> </ul></p>
23618     #[allow(unused_variables, warnings)]
put_bucket_replication( &self, input: PutBucketReplicationRequest, ) -> Result<(), RusotoError<PutBucketReplicationError>>23619     async fn put_bucket_replication(
23620         &self,
23621         input: PutBucketReplicationRequest,
23622     ) -> Result<(), RusotoError<PutBucketReplicationError>> {
23623         let request_uri = format!("/{bucket}", bucket = input.bucket);
23624 
23625         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23626 
23627         if let Some(ref content_md5) = input.content_md5 {
23628             request.add_header("Content-MD5", &content_md5.to_string());
23629         }
23630 
23631         if let Some(ref token) = input.token {
23632             request.add_header("x-amz-bucket-object-lock-token", &token.to_string());
23633         }
23634         let mut params = Params::new();
23635         params.put_key("replication");
23636         request.set_params(params);
23637         let mut writer = EventWriter::new(Vec::new());
23638         ReplicationConfigurationSerializer::serialize(
23639             &mut writer,
23640             "ReplicationConfiguration",
23641             &input.replication_configuration,
23642         );
23643         request.set_payload(Some(writer.into_inner()));
23644         request.set_content_md5_header();
23645 
23646         let mut response = self
23647             .client
23648             .sign_and_dispatch(request)
23649             .await
23650             .map_err(RusotoError::from)?;
23651         if !response.status.is_success() {
23652             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23653             return Err(PutBucketReplicationError::from_response(response));
23654         }
23655 
23656         std::mem::drop(response);
23657         Ok(())
23658     }
23659 
23660     /// <p><p>Sets the request payment configuration for a bucket. By default, the bucket owner pays for downloads from the bucket. This configuration parameter enables the bucket owner (only) to specify that the person requesting the download will be charged for the download. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html">Requester Pays Buckets</a>.</p> <p>The following operations are related to <code>PutBucketRequestPayment</code>:</p> <ul> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>GetBucketRequestPayment</a> </p> </li> </ul></p>
23661     #[allow(unused_variables, warnings)]
put_bucket_request_payment( &self, input: PutBucketRequestPaymentRequest, ) -> Result<(), RusotoError<PutBucketRequestPaymentError>>23662     async fn put_bucket_request_payment(
23663         &self,
23664         input: PutBucketRequestPaymentRequest,
23665     ) -> Result<(), RusotoError<PutBucketRequestPaymentError>> {
23666         let request_uri = format!("/{bucket}", bucket = input.bucket);
23667 
23668         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23669 
23670         if let Some(ref content_md5) = input.content_md5 {
23671             request.add_header("Content-MD5", &content_md5.to_string());
23672         }
23673         let mut params = Params::new();
23674         params.put_key("requestPayment");
23675         request.set_params(params);
23676         let mut writer = EventWriter::new(Vec::new());
23677         RequestPaymentConfigurationSerializer::serialize(
23678             &mut writer,
23679             "RequestPaymentConfiguration",
23680             &input.request_payment_configuration,
23681         );
23682         request.set_payload(Some(writer.into_inner()));
23683 
23684         let mut response = self
23685             .client
23686             .sign_and_dispatch(request)
23687             .await
23688             .map_err(RusotoError::from)?;
23689         if !response.status.is_success() {
23690             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23691             return Err(PutBucketRequestPaymentError::from_response(response));
23692         }
23693 
23694         std::mem::drop(response);
23695         Ok(())
23696     }
23697 
23698     /// <p><p>Sets the tags for a bucket.</p> <p>Use tags to organize your AWS bill to reflect your own cost structure. To do this, sign up to get your AWS account bill with tag key values included. Then, to see the cost of combined resources, organize your billing information according to resources with the same tag key values. For example, you can tag several resources with a specific application name, and then organize your billing information to see the total cost of that application across several services. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Cost Allocation and Tagging</a>.</p> <note> <p>Within a bucket, if you add a tag that has the same key as an existing tag, the new value overwrites the old value. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CostAllocTagging.html">Using Cost Allocation in Amazon S3 Bucket Tags</a>.</p> </note> <p>To use this operation, you must have permissions to perform the <code>s3:PutBucketTagging</code> action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p> <code>PutBucketTagging</code> has the following special errors:</p> <ul> <li> <p>Error code: <code>InvalidTagError</code> </p> <ul> <li> <p>Description: The tag provided was not a valid tag. This error can occur if the tag did not pass input validation. For information about tag restrictions, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2//allocation-tag-restrictions.html">User-Defined Tag Restrictions</a> and <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2//aws-tag-restrictions.html">AWS-Generated Cost Allocation Tag Restrictions</a>.</p> </li> </ul> </li> <li> <p>Error code: <code>MalformedXMLError</code> </p> <ul> <li> <p>Description: The XML provided does not match the schema.</p> </li> </ul> </li> <li> <p>Error code: <code>OperationAbortedError </code> </p> <ul> <li> <p>Description: A conflicting conditional operation is currently in progress against this resource. Please try again.</p> </li> </ul> </li> <li> <p>Error code: <code>InternalError</code> </p> <ul> <li> <p>Description: The service was unable to apply the provided tag to the bucket.</p> </li> </ul> </li> </ul> <p>The following operations are related to <code>PutBucketTagging</code>:</p> <ul> <li> <p> <a>GetBucketTagging</a> </p> </li> <li> <p> <a>DeleteBucketTagging</a> </p> </li> </ul></p>
23699     #[allow(unused_variables, warnings)]
put_bucket_tagging( &self, input: PutBucketTaggingRequest, ) -> Result<(), RusotoError<PutBucketTaggingError>>23700     async fn put_bucket_tagging(
23701         &self,
23702         input: PutBucketTaggingRequest,
23703     ) -> Result<(), RusotoError<PutBucketTaggingError>> {
23704         let request_uri = format!("/{bucket}", bucket = input.bucket);
23705 
23706         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23707 
23708         if let Some(ref content_md5) = input.content_md5 {
23709             request.add_header("Content-MD5", &content_md5.to_string());
23710         }
23711         let mut params = Params::new();
23712         params.put_key("tagging");
23713         request.set_params(params);
23714         let mut writer = EventWriter::new(Vec::new());
23715         TaggingSerializer::serialize(&mut writer, "Tagging", &input.tagging);
23716         request.set_payload(Some(writer.into_inner()));
23717         request.set_content_md5_header();
23718 
23719         let mut response = self
23720             .client
23721             .sign_and_dispatch(request)
23722             .await
23723             .map_err(RusotoError::from)?;
23724         if !response.status.is_success() {
23725             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23726             return Err(PutBucketTaggingError::from_response(response));
23727         }
23728 
23729         std::mem::drop(response);
23730         Ok(())
23731     }
23732 
23733     /// <p><p>Sets the versioning state of an existing bucket. To set the versioning state, you must be the bucket owner.</p> <p>You can set the versioning state with one of the following values:</p> <p> <b>Enabled</b>—Enables versioning for the objects in the bucket. All objects added to the bucket receive a unique version ID.</p> <p> <b>Suspended</b>—Disables versioning for the objects in the bucket. All objects added to the bucket receive the version ID null.</p> <p>If the versioning state has never been set on a bucket, it has no versioning state; a <a>GetBucketVersioning</a> request does not return a versioning state value.</p> <p>If the bucket owner enables MFA Delete in the bucket versioning configuration, the bucket owner must include the <code>x-amz-mfa request</code> header and the <code>Status</code> and the <code>MfaDelete</code> request elements in a request to set the versioning state of the bucket.</p> <important> <p>If you have an object expiration lifecycle policy in your non-versioned bucket and you want to maintain the same permanent delete behavior when you enable versioning, you must add a noncurrent expiration policy. The noncurrent expiration lifecycle policy will manage the deletes of the noncurrent object versions in the version-enabled bucket. (A version-enabled bucket maintains one current and zero or more noncurrent object versions.) For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-and-other-bucket-config">Lifecycle and Versioning</a>.</p> </important> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>CreateBucket</a> </p> </li> <li> <p> <a>DeleteBucket</a> </p> </li> <li> <p> <a>GetBucketVersioning</a> </p> </li> </ul></p>
23734     #[allow(unused_variables, warnings)]
put_bucket_versioning( &self, input: PutBucketVersioningRequest, ) -> Result<(), RusotoError<PutBucketVersioningError>>23735     async fn put_bucket_versioning(
23736         &self,
23737         input: PutBucketVersioningRequest,
23738     ) -> Result<(), RusotoError<PutBucketVersioningError>> {
23739         let request_uri = format!("/{bucket}", bucket = input.bucket);
23740 
23741         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23742 
23743         if let Some(ref content_md5) = input.content_md5 {
23744             request.add_header("Content-MD5", &content_md5.to_string());
23745         }
23746 
23747         if let Some(ref mfa) = input.mfa {
23748             request.add_header("x-amz-mfa", &mfa.to_string());
23749         }
23750         let mut params = Params::new();
23751         params.put_key("versioning");
23752         request.set_params(params);
23753         let mut writer = EventWriter::new(Vec::new());
23754         VersioningConfigurationSerializer::serialize(
23755             &mut writer,
23756             "VersioningConfiguration",
23757             &input.versioning_configuration,
23758         );
23759         request.set_payload(Some(writer.into_inner()));
23760 
23761         let mut response = self
23762             .client
23763             .sign_and_dispatch(request)
23764             .await
23765             .map_err(RusotoError::from)?;
23766         if !response.status.is_success() {
23767             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23768             return Err(PutBucketVersioningError::from_response(response));
23769         }
23770 
23771         std::mem::drop(response);
23772         Ok(())
23773     }
23774 
23775     /// <p><p>Sets the configuration of the website that is specified in the <code>website</code> subresource. To configure a bucket as a website, you can add this subresource on the bucket with website configuration information such as the file name of the index document and any redirect rules. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a>.</p> <p>This PUT operation requires the <code>S3:PutBucketWebsite</code> permission. By default, only the bucket owner can configure the website attached to a bucket; however, bucket owners can allow other users to set the website configuration by writing a bucket policy that grants them the <code>S3:PutBucketWebsite</code> permission.</p> <p>To redirect all website requests sent to the bucket&#39;s website endpoint, you add a website configuration with the following elements. Because all requests are sent to another website, you don&#39;t need to provide index document name for the bucket.</p> <ul> <li> <p> <code>WebsiteConfiguration</code> </p> </li> <li> <p> <code>RedirectAllRequestsTo</code> </p> </li> <li> <p> <code>HostName</code> </p> </li> <li> <p> <code>Protocol</code> </p> </li> </ul> <p>If you want granular control over redirects, you can use the following elements to add routing rules that describe conditions for redirecting requests and information about the redirect destination. In this case, the website configuration must provide an index document for the bucket, because some requests might not be redirected. </p> <ul> <li> <p> <code>WebsiteConfiguration</code> </p> </li> <li> <p> <code>IndexDocument</code> </p> </li> <li> <p> <code>Suffix</code> </p> </li> <li> <p> <code>ErrorDocument</code> </p> </li> <li> <p> <code>Key</code> </p> </li> <li> <p> <code>RoutingRules</code> </p> </li> <li> <p> <code>RoutingRule</code> </p> </li> <li> <p> <code>Condition</code> </p> </li> <li> <p> <code>HttpErrorCodeReturnedEquals</code> </p> </li> <li> <p> <code>KeyPrefixEquals</code> </p> </li> <li> <p> <code>Redirect</code> </p> </li> <li> <p> <code>Protocol</code> </p> </li> <li> <p> <code>HostName</code> </p> </li> <li> <p> <code>ReplaceKeyPrefixWith</code> </p> </li> <li> <p> <code>ReplaceKeyWith</code> </p> </li> <li> <p> <code>HttpRedirectCode</code> </p> </li> </ul></p>
23776     #[allow(unused_variables, warnings)]
put_bucket_website( &self, input: PutBucketWebsiteRequest, ) -> Result<(), RusotoError<PutBucketWebsiteError>>23777     async fn put_bucket_website(
23778         &self,
23779         input: PutBucketWebsiteRequest,
23780     ) -> Result<(), RusotoError<PutBucketWebsiteError>> {
23781         let request_uri = format!("/{bucket}", bucket = input.bucket);
23782 
23783         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23784 
23785         if let Some(ref content_md5) = input.content_md5 {
23786             request.add_header("Content-MD5", &content_md5.to_string());
23787         }
23788         let mut params = Params::new();
23789         params.put_key("website");
23790         request.set_params(params);
23791         let mut writer = EventWriter::new(Vec::new());
23792         WebsiteConfigurationSerializer::serialize(
23793             &mut writer,
23794             "WebsiteConfiguration",
23795             &input.website_configuration,
23796         );
23797         request.set_payload(Some(writer.into_inner()));
23798 
23799         let mut response = self
23800             .client
23801             .sign_and_dispatch(request)
23802             .await
23803             .map_err(RusotoError::from)?;
23804         if !response.status.is_success() {
23805             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23806             return Err(PutBucketWebsiteError::from_response(response));
23807         }
23808 
23809         std::mem::drop(response);
23810         Ok(())
23811     }
23812 
23813     /// <p><p>Adds an object to a bucket. You must have WRITE permissions on a bucket to add an object to it.</p> <p>Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added the entire object to the bucket.</p> <p>Amazon S3 is a distributed system. If it receives multiple write requests for the same object simultaneously, it overwrites all but the last object written. Amazon S3 does not provide object locking; if you need this, make sure to build it into your application layer or use versioning instead.</p> <p>To ensure that data is not corrupted traversing the network, use the <code>Content-MD5</code> header. When you use this header, Amazon S3 checks the object against the provided MD5 value and, if they do not match, returns an error. Additionally, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.</p> <note> <p>To configure your application to send the request headers before sending the request body, use the <code>100-continue</code> HTTP status code. For PUT operations, this helps you avoid sending the message body if the message is rejected based on the headers (for example, because authentication fails or a redirect occurs). For more information on the <code>100-continue</code> HTTP status code, see Section 8.2.3 of <a href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a>.</p> </note> <p>You can optionally request server-side encryption. With server-side encryption, Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts the data when you access it. You have the option to provide your own encryption key or use AWS managed encryption keys. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a>.</p> <dl> <dt>Access Permissions</dt> <dd> <p>You can optionally specify the accounts or groups that should be granted specific permissions on the new object. There are two ways to grant the permissions using the request headers:</p> <ul> <li> <p>Specify a canned ACL with the <code>x-amz-acl</code> request header. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly with the <code>x-amz-grant-read</code>, <code>x-amz-grant-read-acp</code>, <code>x-amz-grant-write-acp</code>, and <code>x-amz-grant-full-control</code> headers. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>.</p> </li> </ul> <p>You can use either a canned ACL or specify access permissions explicitly. You cannot do both.</p> </dd> <dt>Server-Side- Encryption-Specific Request Headers</dt> <dd> <p>You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption. Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. The option you use depends on whether you want to use AWS managed encryption keys or provide your own encryption key. </p> <ul> <li> <p>Use encryption keys managed by Amazon S3 or customer master keys (CMKs) stored in AWS Key Management Service (AWS KMS) – If you want AWS to manage the keys used to encrypt data, specify the following headers in the request.</p> <ul> <li> <p>x-amz-server-side​-encryption</p> </li> <li> <p>x-amz-server-side-encryption-aws-kms-key-id</p> </li> <li> <p>x-amz-server-side-encryption-context</p> </li> </ul> <note> <p>If you specify <code>x-amz-server-side-encryption:aws:kms</code>, but don&#39;t provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the AWS managed CMK in AWS KMS to protect the data. If you want to use a customer managed AWS KMS CMK, you must provide the <code>x-amz-server-side-encryption-aws-kms-key-id</code> of the symmetric customer managed CMK. Amazon S3 only supports symmetric CMKs and not asymmetric CMKs. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric Keys</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> </note> <important> <p>All GET and PUT requests for an object protected by AWS KMS fail if you don&#39;t make them with SSL or by using SigV4.</p> </important> <p>For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in AWS</a>.</p> </li> <li> <p>Use customer-provided encryption keys – If you want to manage your own encryption keys, provide all the following headers in the request.</p> <ul> <li> <p>x-amz-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key-MD5</p> </li> </ul> <p>For more information about server-side encryption with CMKs stored in KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in AWS</a>.</p> </li> </ul> </dd> <dt>Access-Control-List (ACL)-Specific Request Headers</dt> <dd> <p>You also can use the following access control–related headers with this operation. By default, all objects are private. Only the owner has full access control. When adding a new object, you can grant permissions to individual AWS accounts or to predefined groups defined by Amazon S3. These permissions are then added to the Access Control List (ACL) on the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. With this operation, you can grant access permissions using one of the following two methods:</p> <ul> <li> <p>Specify a canned ACL (<code>x-amz-acl</code>) — Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly — To explicitly grant access permissions to specific AWS accounts or groups, use the following headers. Each header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>. In the header, you specify a list of grantees who get the specific permission. To grant permissions explicitly use:</p> <ul> <li> <p>x-amz-grant-read</p> </li> <li> <p>x-amz-grant-write</p> </li> <li> <p>x-amz-grant-read-acp</p> </li> <li> <p>x-amz-grant-write-acp</p> </li> <li> <p>x-amz-grant-full-control</p> </li> </ul> <p>You specify each grantee as a type=value pair, where the type is one of the following:</p> <ul> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> <important> <p>Using email addresses to specify a grantee is only supported in the following AWS Regions: </p> <ul> <li> <p>US East (N. Virginia)</p> </li> <li> <p>US West (N. California)</p> </li> <li> <p> US West (Oregon)</p> </li> <li> <p> Asia Pacific (Singapore)</p> </li> <li> <p>Asia Pacific (Sydney)</p> </li> <li> <p>Asia Pacific (Tokyo)</p> </li> <li> <p>EU (Ireland)</p> </li> <li> <p>South America (São Paulo)</p> </li> </ul> <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the AWS General Reference</p> </important> </li> <li> <p> <code>id</code> – if the value specified is the canonical user ID of an AWS account</p> </li> <li> <p> <code>uri</code> – if you are granting permissions to a predefined group</p> </li> </ul> <p>For example, the following <code>x-amz-grant-read</code> header grants the AWS accounts identified by email addresses permissions to read object data and its metadata:</p> <p> <code>x-amz-grant-read: emailAddress=&quot;xyz@amazon.com&quot;, emailAddress=&quot;abc@amazon.com&quot; </code> </p> </li> </ul> </dd> <dt>Server-Side- Encryption-Specific Request Headers</dt> <dd> <p>You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption. Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. The option you use depends on whether you want to use AWS-managed encryption keys or provide your own encryption key. </p> <ul> <li> <p>Use encryption keys managed by Amazon S3 or customer master keys (CMKs) stored in AWS Key Management Service (AWS KMS) – If you want AWS to manage the keys used to encrypt data, specify the following headers in the request.</p> <ul> <li> <p>x-amz-server-side​-encryption</p> </li> <li> <p>x-amz-server-side-encryption-aws-kms-key-id</p> </li> <li> <p>x-amz-server-side-encryption-context</p> </li> </ul> <note> <p>If you specify <code>x-amz-server-side-encryption:aws:kms</code>, but don&#39;t provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the AWS managed CMK in AWS KMS to protect the data. If you want to use a customer managed AWS KMS CMK, you must provide the <code>x-amz-server-side-encryption-aws-kms-key-id</code> of the symmetric customer managed CMK. Amazon S3 only supports symmetric CMKs and not asymmetric CMKs. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric Keys</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> </note> <important> <p>All GET and PUT requests for an object protected by AWS KMS fail if you don&#39;t make them with SSL or by using SigV4.</p> </important> <p>For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS</a>.</p> </li> <li> <p>Use customer-provided encryption keys – If you want to manage your own encryption keys, provide all the following headers in the request.</p> <note> <p>If you use this feature, the ETag value that Amazon S3 returns in the response is not the MD5 of the object.</p> </note> <ul> <li> <p>x-amz-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key-MD5</p> </li> </ul> <p>For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS</a>.</p> </li> </ul> </dd> </dl> <p> <b>Storage Class Options</b> </p> <p>By default, Amazon S3 uses the Standard storage class to store newly created objects. The Standard storage class provides high durability and high availability. You can specify other storage classes depending on the performance needs. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the Amazon Simple Storage Service Developer Guide.</p> <p> <b>Versioning</b> </p> <p>If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response using the <code>x-amz-version-id response</code> header. If versioning is suspended, Amazon S3 always uses null as the version ID for the object stored. For more information about returning the versioning state of a bucket, see <a>GetBucketVersioning</a>. If you enable versioning for a bucket, when Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>CopyObject</a> </p> </li> <li> <p> <a>DeleteObject</a> </p> </li> </ul></p>
23814     #[allow(unused_variables, warnings)]
put_object( &self, input: PutObjectRequest, ) -> Result<PutObjectOutput, RusotoError<PutObjectError>>23815     async fn put_object(
23816         &self,
23817         input: PutObjectRequest,
23818     ) -> Result<PutObjectOutput, RusotoError<PutObjectError>> {
23819         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
23820 
23821         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23822 
23823         if let Some(ref acl) = input.acl {
23824             request.add_header("x-amz-acl", &acl.to_string());
23825         }
23826 
23827         if let Some(ref cache_control) = input.cache_control {
23828             request.add_header("Cache-Control", &cache_control.to_string());
23829         }
23830 
23831         if let Some(ref content_disposition) = input.content_disposition {
23832             request.add_header("Content-Disposition", &content_disposition.to_string());
23833         }
23834 
23835         if let Some(ref content_encoding) = input.content_encoding {
23836             request.add_header("Content-Encoding", &content_encoding.to_string());
23837         }
23838 
23839         if let Some(ref content_language) = input.content_language {
23840             request.add_header("Content-Language", &content_language.to_string());
23841         }
23842 
23843         if let Some(ref content_length) = input.content_length {
23844             request.add_header("Content-Length", &content_length.to_string());
23845         }
23846 
23847         if let Some(ref content_md5) = input.content_md5 {
23848             request.add_header("Content-MD5", &content_md5.to_string());
23849         }
23850 
23851         if let Some(ref content_type) = input.content_type {
23852             request.add_header("Content-Type", &content_type.to_string());
23853         }
23854 
23855         if let Some(ref expires) = input.expires {
23856             request.add_header("Expires", &expires.to_string());
23857         }
23858 
23859         if let Some(ref grant_full_control) = input.grant_full_control {
23860             request.add_header("x-amz-grant-full-control", &grant_full_control.to_string());
23861         }
23862 
23863         if let Some(ref grant_read) = input.grant_read {
23864             request.add_header("x-amz-grant-read", &grant_read.to_string());
23865         }
23866 
23867         if let Some(ref grant_read_acp) = input.grant_read_acp {
23868             request.add_header("x-amz-grant-read-acp", &grant_read_acp.to_string());
23869         }
23870 
23871         if let Some(ref grant_write_acp) = input.grant_write_acp {
23872             request.add_header("x-amz-grant-write-acp", &grant_write_acp.to_string());
23873         }
23874 
23875         if let Some(ref metadata) = input.metadata {
23876             for (header_name, header_value) in metadata.iter() {
23877                 let header = format!("x-amz-meta-{}", header_name);
23878                 request.add_header(header, header_value);
23879             }
23880         }
23881 
23882         if let Some(ref object_lock_legal_hold_status) = input.object_lock_legal_hold_status {
23883             request.add_header(
23884                 "x-amz-object-lock-legal-hold",
23885                 &object_lock_legal_hold_status.to_string(),
23886             );
23887         }
23888 
23889         if let Some(ref object_lock_mode) = input.object_lock_mode {
23890             request.add_header("x-amz-object-lock-mode", &object_lock_mode.to_string());
23891         }
23892 
23893         if let Some(ref object_lock_retain_until_date) = input.object_lock_retain_until_date {
23894             request.add_header(
23895                 "x-amz-object-lock-retain-until-date",
23896                 &object_lock_retain_until_date.to_string(),
23897             );
23898         }
23899 
23900         if let Some(ref request_payer) = input.request_payer {
23901             request.add_header("x-amz-request-payer", &request_payer.to_string());
23902         }
23903 
23904         if let Some(ref sse_customer_algorithm) = input.sse_customer_algorithm {
23905             request.add_header(
23906                 "x-amz-server-side-encryption-customer-algorithm",
23907                 &sse_customer_algorithm.to_string(),
23908             );
23909         }
23910 
23911         if let Some(ref sse_customer_key) = input.sse_customer_key {
23912             request.add_header(
23913                 "x-amz-server-side-encryption-customer-key",
23914                 &sse_customer_key.to_string(),
23915             );
23916         }
23917 
23918         if let Some(ref sse_customer_key_md5) = input.sse_customer_key_md5 {
23919             request.add_header(
23920                 "x-amz-server-side-encryption-customer-key-MD5",
23921                 &sse_customer_key_md5.to_string(),
23922             );
23923         }
23924 
23925         if let Some(ref ssekms_encryption_context) = input.ssekms_encryption_context {
23926             request.add_header(
23927                 "x-amz-server-side-encryption-context",
23928                 &ssekms_encryption_context.to_string(),
23929             );
23930         }
23931 
23932         if let Some(ref ssekms_key_id) = input.ssekms_key_id {
23933             request.add_header(
23934                 "x-amz-server-side-encryption-aws-kms-key-id",
23935                 &ssekms_key_id.to_string(),
23936             );
23937         }
23938 
23939         if let Some(ref server_side_encryption) = input.server_side_encryption {
23940             request.add_header(
23941                 "x-amz-server-side-encryption",
23942                 &server_side_encryption.to_string(),
23943             );
23944         }
23945 
23946         if let Some(ref storage_class) = input.storage_class {
23947             request.add_header("x-amz-storage-class", &storage_class.to_string());
23948         }
23949 
23950         if let Some(ref tagging) = input.tagging {
23951             request.add_header("x-amz-tagging", &tagging.to_string());
23952         }
23953 
23954         if let Some(ref website_redirect_location) = input.website_redirect_location {
23955             request.add_header(
23956                 "x-amz-website-redirect-location",
23957                 &website_redirect_location.to_string(),
23958             );
23959         }
23960 
23961         if let Some(__body) = input.body {
23962             request.set_payload_stream(__body);
23963         }
23964 
23965         let mut response = self
23966             .client
23967             .sign_and_dispatch(request)
23968             .await
23969             .map_err(RusotoError::from)?;
23970         if !response.status.is_success() {
23971             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
23972             return Err(PutObjectError::from_response(response));
23973         }
23974 
23975         let mut result;
23976         result = PutObjectOutput::default();
23977         if let Some(e_tag) = response.headers.get("ETag") {
23978             let value = e_tag.to_owned();
23979             result.e_tag = Some(value)
23980         };
23981         if let Some(expiration) = response.headers.get("x-amz-expiration") {
23982             let value = expiration.to_owned();
23983             result.expiration = Some(value)
23984         };
23985         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
23986             let value = request_charged.to_owned();
23987             result.request_charged = Some(value)
23988         };
23989         if let Some(sse_customer_algorithm) = response
23990             .headers
23991             .get("x-amz-server-side-encryption-customer-algorithm")
23992         {
23993             let value = sse_customer_algorithm.to_owned();
23994             result.sse_customer_algorithm = Some(value)
23995         };
23996         if let Some(sse_customer_key_md5) = response
23997             .headers
23998             .get("x-amz-server-side-encryption-customer-key-MD5")
23999         {
24000             let value = sse_customer_key_md5.to_owned();
24001             result.sse_customer_key_md5 = Some(value)
24002         };
24003         if let Some(ssekms_encryption_context) =
24004             response.headers.get("x-amz-server-side-encryption-context")
24005         {
24006             let value = ssekms_encryption_context.to_owned();
24007             result.ssekms_encryption_context = Some(value)
24008         };
24009         if let Some(ssekms_key_id) = response
24010             .headers
24011             .get("x-amz-server-side-encryption-aws-kms-key-id")
24012         {
24013             let value = ssekms_key_id.to_owned();
24014             result.ssekms_key_id = Some(value)
24015         };
24016         if let Some(server_side_encryption) = response.headers.get("x-amz-server-side-encryption") {
24017             let value = server_side_encryption.to_owned();
24018             result.server_side_encryption = Some(value)
24019         };
24020         if let Some(version_id) = response.headers.get("x-amz-version-id") {
24021             let value = version_id.to_owned();
24022             result.version_id = Some(value)
24023         }; // parse non-payload
24024         Ok(result)
24025     }
24026 
24027     /// <p><p>Uses the <code>acl</code> subresource to set the access control list (ACL) permissions for an object that already exists in a bucket. You must have <code>WRITE_ACP</code> permission to set the ACL of an object.</p> <p>Depending on your application needs, you can choose to set the ACL on an object using either the request body or the headers. For example, if you have an existing application that updates a bucket ACL using the request body, you can continue to use that approach.</p> <p> <b>Access Permissions</b> </p> <p>You can set access permissions using one of the following methods:</p> <ul> <li> <p>Specify a canned ACL with the <code>x-amz-acl</code> request header. Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. Specify the canned ACL name as the value of <code>x-amz-ac</code>l. If you use this header, you cannot use other access control-specific headers in your request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p> </li> <li> <p>Specify access permissions explicitly with the <code>x-amz-grant-read</code>, <code>x-amz-grant-read-acp</code>, <code>x-amz-grant-write-acp</code>, and <code>x-amz-grant-full-control</code> headers. When using these headers, you specify explicit access permissions and grantees (AWS accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific headers, you cannot use <code>x-amz-acl</code> header to set a canned ACL. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>.</p> <p>You specify each grantee as a type=value pair, where the type is one of the following:</p> <ul> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> </li> <li> <p> <code>id</code> – if the value specified is the canonical user ID of an AWS account</p> </li> <li> <p> <code>uri</code> – if you are granting permissions to a predefined group</p> </li> </ul> <p>For example, the following <code>x-amz-grant-read</code> header grants list objects permission to the two AWS accounts identified by their email addresses.</p> <p> <code>x-amz-grant-read: emailAddress=&quot;xyz@amazon.com&quot;, emailAddress=&quot;abc@amazon.com&quot; </code> </p> </li> </ul> <p>You can use either a canned ACL or specify access permissions explicitly. You cannot do both.</p> <p> <b>Grantee Values</b> </p> <p>You can specify the person (grantee) to whom you&#39;re assigning access rights (using request elements) in the following ways:</p> <ul> <li> <p>By Email address:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;AmazonCustomerByEmail&quot;&gt;&lt;EmailAddress&gt;&lt;&gt;Grantees@email.com&lt;&gt;&lt;/EmailAddress&gt;lt;/Grantee&gt;</code> </p> <p>The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl request, appears as the CanonicalUser.</p> </li> <li> <p>By the person&#39;s ID:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;CanonicalUser&quot;&gt;&lt;ID&gt;&lt;&gt;ID&lt;&gt;&lt;/ID&gt;&lt;DisplayName&gt;&lt;&gt;GranteesEmail&lt;&gt;&lt;/DisplayName&gt; &lt;/Grantee&gt;</code> </p> <p>DisplayName is optional and ignored in the request.</p> </li> <li> <p>By URI:</p> <p> <code>&lt;Grantee xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;Group&quot;&gt;&lt;URI&gt;&lt;&gt;http://acs.amazonaws.com/groups/global/AuthenticatedUsers&lt;&gt;&lt;/URI&gt;&lt;/Grantee&gt;</code> </p> </li> </ul> <p> <b>Versioning</b> </p> <p>The ACL of an object is set at the object version level. By default, PUT sets the ACL of the current version of an object. To set the ACL of a different version, use the <code>versionId</code> subresource.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>CopyObject</a> </p> </li> <li> <p> <a>GetObject</a> </p> </li> </ul></p>
24028     #[allow(unused_variables, warnings)]
put_object_acl( &self, input: PutObjectAclRequest, ) -> Result<PutObjectAclOutput, RusotoError<PutObjectAclError>>24029     async fn put_object_acl(
24030         &self,
24031         input: PutObjectAclRequest,
24032     ) -> Result<PutObjectAclOutput, RusotoError<PutObjectAclError>> {
24033         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
24034 
24035         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
24036 
24037         if let Some(ref acl) = input.acl {
24038             request.add_header("x-amz-acl", &acl.to_string());
24039         }
24040 
24041         if let Some(ref content_md5) = input.content_md5 {
24042             request.add_header("Content-MD5", &content_md5.to_string());
24043         }
24044 
24045         if let Some(ref grant_full_control) = input.grant_full_control {
24046             request.add_header("x-amz-grant-full-control", &grant_full_control.to_string());
24047         }
24048 
24049         if let Some(ref grant_read) = input.grant_read {
24050             request.add_header("x-amz-grant-read", &grant_read.to_string());
24051         }
24052 
24053         if let Some(ref grant_read_acp) = input.grant_read_acp {
24054             request.add_header("x-amz-grant-read-acp", &grant_read_acp.to_string());
24055         }
24056 
24057         if let Some(ref grant_write) = input.grant_write {
24058             request.add_header("x-amz-grant-write", &grant_write.to_string());
24059         }
24060 
24061         if let Some(ref grant_write_acp) = input.grant_write_acp {
24062             request.add_header("x-amz-grant-write-acp", &grant_write_acp.to_string());
24063         }
24064 
24065         if let Some(ref request_payer) = input.request_payer {
24066             request.add_header("x-amz-request-payer", &request_payer.to_string());
24067         }
24068         let mut params = Params::new();
24069         if let Some(ref x) = input.version_id {
24070             params.put("versionId", x);
24071         }
24072         params.put_key("acl");
24073         request.set_params(params);
24074         if input.access_control_policy.is_some() {
24075             let mut writer = EventWriter::new(Vec::new());
24076             AccessControlPolicySerializer::serialize(
24077                 &mut writer,
24078                 "AccessControlPolicy",
24079                 input.access_control_policy.as_ref().unwrap(),
24080             );
24081             request.set_payload(Some(writer.into_inner()));
24082         } else {
24083             request.set_payload(Some(Vec::new()));
24084         }
24085 
24086         let mut response = self
24087             .client
24088             .sign_and_dispatch(request)
24089             .await
24090             .map_err(RusotoError::from)?;
24091         if !response.status.is_success() {
24092             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
24093             return Err(PutObjectAclError::from_response(response));
24094         }
24095 
24096         let mut result;
24097         result = PutObjectAclOutput::default();
24098         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
24099             let value = request_charged.to_owned();
24100             result.request_charged = Some(value)
24101         }; // parse non-payload
24102         Ok(result)
24103     }
24104 
24105     /// <p><p>Applies a Legal Hold configuration to the specified object.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a> </p> </li> </ul></p>
24106     #[allow(unused_variables, warnings)]
put_object_legal_hold( &self, input: PutObjectLegalHoldRequest, ) -> Result<PutObjectLegalHoldOutput, RusotoError<PutObjectLegalHoldError>>24107     async fn put_object_legal_hold(
24108         &self,
24109         input: PutObjectLegalHoldRequest,
24110     ) -> Result<PutObjectLegalHoldOutput, RusotoError<PutObjectLegalHoldError>> {
24111         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
24112 
24113         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
24114 
24115         if let Some(ref content_md5) = input.content_md5 {
24116             request.add_header("Content-MD5", &content_md5.to_string());
24117         }
24118 
24119         if let Some(ref request_payer) = input.request_payer {
24120             request.add_header("x-amz-request-payer", &request_payer.to_string());
24121         }
24122         let mut params = Params::new();
24123         if let Some(ref x) = input.version_id {
24124             params.put("versionId", x);
24125         }
24126         params.put_key("legal-hold");
24127         request.set_params(params);
24128         if input.legal_hold.is_some() {
24129             let mut writer = EventWriter::new(Vec::new());
24130             ObjectLockLegalHoldSerializer::serialize(
24131                 &mut writer,
24132                 "LegalHold",
24133                 input.legal_hold.as_ref().unwrap(),
24134             );
24135             request.set_payload(Some(writer.into_inner()));
24136         } else {
24137             request.set_payload(Some(Vec::new()));
24138         }
24139 
24140         let mut response = self
24141             .client
24142             .sign_and_dispatch(request)
24143             .await
24144             .map_err(RusotoError::from)?;
24145         if !response.status.is_success() {
24146             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
24147             return Err(PutObjectLegalHoldError::from_response(response));
24148         }
24149 
24150         let mut result;
24151         result = PutObjectLegalHoldOutput::default();
24152         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
24153             let value = request_charged.to_owned();
24154             result.request_charged = Some(value)
24155         }; // parse non-payload
24156         Ok(result)
24157     }
24158 
24159     /// <p><p>Places an Object Lock configuration on the specified bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket.</p> <note> <p> <code>DefaultRetention</code> requires either Days or Years. You can&#39;t specify both at the same time.</p> </note> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a> </p> </li> </ul></p>
24160     #[allow(unused_variables, warnings)]
put_object_lock_configuration( &self, input: PutObjectLockConfigurationRequest, ) -> Result<PutObjectLockConfigurationOutput, RusotoError<PutObjectLockConfigurationError>>24161     async fn put_object_lock_configuration(
24162         &self,
24163         input: PutObjectLockConfigurationRequest,
24164     ) -> Result<PutObjectLockConfigurationOutput, RusotoError<PutObjectLockConfigurationError>>
24165     {
24166         let request_uri = format!("/{bucket}", bucket = input.bucket);
24167 
24168         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
24169 
24170         if let Some(ref content_md5) = input.content_md5 {
24171             request.add_header("Content-MD5", &content_md5.to_string());
24172         }
24173 
24174         if let Some(ref request_payer) = input.request_payer {
24175             request.add_header("x-amz-request-payer", &request_payer.to_string());
24176         }
24177 
24178         if let Some(ref token) = input.token {
24179             request.add_header("x-amz-bucket-object-lock-token", &token.to_string());
24180         }
24181         let mut params = Params::new();
24182         params.put_key("object-lock");
24183         request.set_params(params);
24184         if input.object_lock_configuration.is_some() {
24185             let mut writer = EventWriter::new(Vec::new());
24186             ObjectLockConfigurationSerializer::serialize(
24187                 &mut writer,
24188                 "ObjectLockConfiguration",
24189                 input.object_lock_configuration.as_ref().unwrap(),
24190             );
24191             request.set_payload(Some(writer.into_inner()));
24192         } else {
24193             request.set_payload(Some(Vec::new()));
24194         }
24195 
24196         let mut response = self
24197             .client
24198             .sign_and_dispatch(request)
24199             .await
24200             .map_err(RusotoError::from)?;
24201         if !response.status.is_success() {
24202             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
24203             return Err(PutObjectLockConfigurationError::from_response(response));
24204         }
24205 
24206         let mut result;
24207         result = PutObjectLockConfigurationOutput::default();
24208         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
24209             let value = request_charged.to_owned();
24210             result.request_charged = Some(value)
24211         }; // parse non-payload
24212         Ok(result)
24213     }
24214 
24215     /// <p><p>Places an Object Retention configuration on an object.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a> </p> </li> </ul></p>
24216     #[allow(unused_variables, warnings)]
put_object_retention( &self, input: PutObjectRetentionRequest, ) -> Result<PutObjectRetentionOutput, RusotoError<PutObjectRetentionError>>24217     async fn put_object_retention(
24218         &self,
24219         input: PutObjectRetentionRequest,
24220     ) -> Result<PutObjectRetentionOutput, RusotoError<PutObjectRetentionError>> {
24221         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
24222 
24223         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
24224 
24225         if let Some(ref bypass_governance_retention) = input.bypass_governance_retention {
24226             request.add_header(
24227                 "x-amz-bypass-governance-retention",
24228                 &bypass_governance_retention.to_string(),
24229             );
24230         }
24231 
24232         if let Some(ref content_md5) = input.content_md5 {
24233             request.add_header("Content-MD5", &content_md5.to_string());
24234         }
24235 
24236         if let Some(ref request_payer) = input.request_payer {
24237             request.add_header("x-amz-request-payer", &request_payer.to_string());
24238         }
24239         let mut params = Params::new();
24240         if let Some(ref x) = input.version_id {
24241             params.put("versionId", x);
24242         }
24243         params.put_key("retention");
24244         request.set_params(params);
24245         if input.retention.is_some() {
24246             let mut writer = EventWriter::new(Vec::new());
24247             ObjectLockRetentionSerializer::serialize(
24248                 &mut writer,
24249                 "Retention",
24250                 input.retention.as_ref().unwrap(),
24251             );
24252             request.set_payload(Some(writer.into_inner()));
24253         } else {
24254             request.set_payload(Some(Vec::new()));
24255         }
24256 
24257         let mut response = self
24258             .client
24259             .sign_and_dispatch(request)
24260             .await
24261             .map_err(RusotoError::from)?;
24262         if !response.status.is_success() {
24263             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
24264             return Err(PutObjectRetentionError::from_response(response));
24265         }
24266 
24267         let mut result;
24268         result = PutObjectRetentionOutput::default();
24269         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
24270             let value = request_charged.to_owned();
24271             result.request_charged = Some(value)
24272         }; // parse non-payload
24273         Ok(result)
24274     }
24275 
24276     /// <p><p>Sets the supplied tag-set to an object that already exists in a bucket</p> <p>A tag is a key-value pair. You can associate tags with an object by sending a PUT request against the tagging subresource that is associated with the object. You can retrieve tags by sending a GET request. For more information, see <a>GetObjectTagging</a>.</p> <p>For tagging-related restrictions related to characters and encodings, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html">Tag Restrictions</a>. Note that Amazon S3 limits the maximum number of tags to 10 tags per object.</p> <p>To use this operation, you must have permission to perform the <code>s3:PutObjectTagging</code> action. By default, the bucket owner has this permission and can grant this permission to others.</p> <p>To put tags of any other version, use the <code>versionId</code> query parameter. You also need permission for the <code>s3:PutObjectVersionTagging</code> action.</p> <p>For information about the Amazon S3 object tagging feature, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html">Object Tagging</a>.</p> <p class="title"> <b>Special Errors</b> </p> <ul> <li> <p class="title"> <b/> </p> <ul> <li> <p> <i>Code: InvalidTagError </i> </p> </li> <li> <p> <i>Cause: The tag provided was not a valid tag. This error can occur if the tag did not pass input validation. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html">Object Tagging</a>.</i> </p> </li> </ul> </li> <li> <p class="title"> <b/> </p> <ul> <li> <p> <i>Code: MalformedXMLError </i> </p> </li> <li> <p> <i>Cause: The XML provided does not match the schema.</i> </p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code: OperationAbortedError </i> </p> </li> <li> <p> <i>Cause: A conflicting conditional operation is currently in progress against this resource. Please try again.</i> </p> </li> </ul> </li> <li> <ul> <li> <p> <i>Code: InternalError</i> </p> </li> <li> <p> <i>Cause: The service was unable to apply the provided tag to the object.</i> </p> </li> </ul> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>GetObjectTagging</a> </p> </li> </ul></p>
24277     #[allow(unused_variables, warnings)]
put_object_tagging( &self, input: PutObjectTaggingRequest, ) -> Result<PutObjectTaggingOutput, RusotoError<PutObjectTaggingError>>24278     async fn put_object_tagging(
24279         &self,
24280         input: PutObjectTaggingRequest,
24281     ) -> Result<PutObjectTaggingOutput, RusotoError<PutObjectTaggingError>> {
24282         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
24283 
24284         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
24285 
24286         if let Some(ref content_md5) = input.content_md5 {
24287             request.add_header("Content-MD5", &content_md5.to_string());
24288         }
24289         let mut params = Params::new();
24290         if let Some(ref x) = input.version_id {
24291             params.put("versionId", x);
24292         }
24293         params.put_key("tagging");
24294         request.set_params(params);
24295         let mut writer = EventWriter::new(Vec::new());
24296         TaggingSerializer::serialize(&mut writer, "Tagging", &input.tagging);
24297         request.set_payload(Some(writer.into_inner()));
24298 
24299         let mut response = self
24300             .client
24301             .sign_and_dispatch(request)
24302             .await
24303             .map_err(RusotoError::from)?;
24304         if !response.status.is_success() {
24305             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
24306             return Err(PutObjectTaggingError::from_response(response));
24307         }
24308 
24309         let mut result;
24310         result = PutObjectTaggingOutput::default();
24311         if let Some(version_id) = response.headers.get("x-amz-version-id") {
24312             let value = version_id.to_owned();
24313             result.version_id = Some(value)
24314         }; // parse non-payload
24315         Ok(result)
24316     }
24317 
24318     /// <p><p>Creates or modifies the <code>PublicAccessBlock</code> configuration for an Amazon S3 bucket. To use this operation, you must have the <code>s3:PutBucketPublicAccessBlock</code> permission. For more information about Amazon S3 permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a>.</p> <important> <p>When Amazon S3 evaluates the <code>PublicAccessBlock</code> configuration for a bucket or an object, it checks the <code>PublicAccessBlock</code> configuration for both the bucket (or the bucket that contains the object) and the bucket owner&#39;s account. If the <code>PublicAccessBlock</code> configurations are different between the bucket and the account, Amazon S3 uses the most restrictive combination of the bucket-level and account-level settings.</p> </important> <p>For more information about when Amazon S3 considers a bucket or an object public, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status">The Meaning of &quot;Public&quot;</a>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>GetPublicAccessBlock</a> </p> </li> <li> <p> <a>DeletePublicAccessBlock</a> </p> </li> <li> <p> <a>GetBucketPolicyStatus</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html">Using Amazon S3 Block Public Access</a> </p> </li> </ul></p>
24319     #[allow(unused_variables, warnings)]
put_public_access_block( &self, input: PutPublicAccessBlockRequest, ) -> Result<(), RusotoError<PutPublicAccessBlockError>>24320     async fn put_public_access_block(
24321         &self,
24322         input: PutPublicAccessBlockRequest,
24323     ) -> Result<(), RusotoError<PutPublicAccessBlockError>> {
24324         let request_uri = format!("/{bucket}", bucket = input.bucket);
24325 
24326         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
24327 
24328         if let Some(ref content_md5) = input.content_md5 {
24329             request.add_header("Content-MD5", &content_md5.to_string());
24330         }
24331         let mut params = Params::new();
24332         params.put_key("publicAccessBlock");
24333         request.set_params(params);
24334         let mut writer = EventWriter::new(Vec::new());
24335         PublicAccessBlockConfigurationSerializer::serialize(
24336             &mut writer,
24337             "PublicAccessBlockConfiguration",
24338             &input.public_access_block_configuration,
24339         );
24340         request.set_payload(Some(writer.into_inner()));
24341 
24342         let mut response = self
24343             .client
24344             .sign_and_dispatch(request)
24345             .await
24346             .map_err(RusotoError::from)?;
24347         if !response.status.is_success() {
24348             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
24349             return Err(PutPublicAccessBlockError::from_response(response));
24350         }
24351 
24352         std::mem::drop(response);
24353         Ok(())
24354     }
24355 
24356     /// <p><p>Restores an archived copy of an object back into Amazon S3</p> <p>This operation performs the following types of requests: </p> <ul> <li> <p> <code>select</code> - Perform a select query on an archived object</p> </li> <li> <p> <code>restore an archive</code> - Restore an archived object</p> </li> </ul> <p>To use this operation, you must have permissions to perform the <code>s3:RestoreObject</code> and <code>s3:GetObject</code> actions. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p> <b>Querying Archives with Select Requests</b> </p> <p>You use a select type of request to perform SQL queries on archived objects. The archived objects that are being queried by the select request must be formatted as uncompressed comma-separated values (CSV) files. You can run queries and custom analytics on your archived data without having to restore your data to a hotter Amazon S3 tier. For an overview about select requests, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html">Querying Archived Objects</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>When making a select request, do the following:</p> <ul> <li> <p>Define an output location for the select query&#39;s output. This must be an Amazon S3 bucket in the same AWS Region as the bucket that contains the archive object that is being queried. The AWS account that initiates the job must have permissions to write to the S3 bucket. You can specify the storage class and encryption for the output objects stored in the bucket. For more information about output, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html">Querying Archived Objects</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>For more information about the <code>S3</code> structure in the request body, see the following:</p> <ul> <li> <p> <a>PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Managing Access with ACLs</a> in the <i>Amazon Simple Storage Service Developer Guide</i> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Protecting Data Using Server-Side Encryption</a> in the <i>Amazon Simple Storage Service Developer Guide</i> </p> </li> </ul> </li> <li> <p>Define the SQL expression for the <code>SELECT</code> type of restoration for your query in the request body&#39;s <code>SelectParameters</code> structure. You can use expressions like the following examples.</p> <ul> <li> <p>The following expression returns all records from the specified object.</p> <p> <code>SELECT * FROM Object</code> </p> </li> <li> <p>Assuming that you are not using any headers for data stored in the object, you can specify columns with positional headers.</p> <p> <code>SELECT s.<em>1, s.</em>2 FROM Object s WHERE s.<em>3 &gt; 100</code> </p> </li> <li> <p>If you have headers and you set the <code>fileHeaderInfo</code> in the <code>CSV</code> structure in the request body to <code>USE</code>, you can specify headers in the query. (If you set the <code>fileHeaderInfo</code> field to <code>IGNORE</code>, the first row is skipped for the query.) You cannot mix ordinal positions with header column names. </p> <p> <code>SELECT s.Id, s.FirstName, s.SSN FROM S3Object s</code> </p> </li> </ul> </li> </ul> <p>For more information about using SQL with Glacier Select restore, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html">SQL Reference for Amazon S3 Select and Glacier Select</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. </p> <p>When making a select request, you can also do the following:</p> <ul> <li> <p>To expedite your queries, specify the <code>Expedited</code> tier. For more information about tiers, see &quot;Restoring Archives,&quot; later in this topic.</p> </li> <li> <p>Specify details about the data serialization format of both the input object that is being queried and the serialization of the CSV-encoded query results.</p> </li> </ul> <p>The following are additional important facts about the select feature:</p> <ul> <li> <p>The output results are new Amazon S3 objects. Unlike archive retrievals, they are stored until explicitly deleted-manually or through a lifecycle policy.</p> </li> <li> <p>You can issue more than one select request on the same Amazon S3 object. Amazon S3 doesn&#39;t deduplicate requests, so avoid issuing duplicate requests.</p> </li> <li> <p> Amazon S3 accepts a select request even if the object has already been restored. A select request doesn’t return error response <code>409</code>.</p> </li> </ul> <p> <b>Restoring Archives</b> </p> <p>Objects in the GLACIER and DEEP</em>ARCHIVE storage classes are archived. To access an archived object, you must first initiate a restore request. This restores a temporary copy of the archived object. In a restore request, you specify the number of days that you want the restored copy to exist. After the specified period, Amazon S3 deletes the temporary copy but the object remains archived in the GLACIER or DEEP<em>ARCHIVE storage class that object was restored from. </p> <p>To restore a specific object version, you can provide a version ID. If you don&#39;t provide a version ID, Amazon S3 restores the current version.</p> <p>The time it takes restore jobs to finish depends on which storage class the object is being restored from and which data access tier you specify. </p> <p>When restoring an archived object (or using a select request), you can specify one of the following data access tier options in the <code>Tier</code> element of the request body: </p> <ul> <li> <p> <b> <code>Expedited</code> </b> - Expedited retrievals allow you to quickly access your data stored in the GLACIER storage class when occasional urgent requests for a subset of archives are required. For all but the largest archived objects (250 MB+), data accessed using Expedited retrievals are typically made available within 1–5 minutes. Provisioned capacity ensures that retrieval capacity for Expedited retrievals is available when you need it. Expedited retrievals and provisioned capacity are not available for the DEEP</em>ARCHIVE storage class.</p> </li> <li> <p> <b> <code>Standard</code> </b> - Standard retrievals allow you to access any of your archived objects within several hours. This is the default option for the GLACIER and DEEP<em>ARCHIVE retrieval requests that do not specify the retrieval option. Standard retrievals typically complete within 3-5 hours from the GLACIER storage class and typically complete within 12 hours from the DEEP</em>ARCHIVE storage class. </p> </li> <li> <p> <b> <code>Bulk</code> </b> - Bulk retrievals are Amazon S3 Glacier’s lowest-cost retrieval option, enabling you to retrieve large amounts, even petabytes, of data inexpensively in a day. Bulk retrievals typically complete within 5-12 hours from the GLACIER storage class and typically complete within 48 hours from the DEEP_ARCHIVE storage class.</p> </li> </ul> <p>For more information about archive retrieval options and provisioned capacity for <code>Expedited</code> data access, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html">Restoring Archived Objects</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. </p> <p>You can use Amazon S3 restore speed upgrade to change the restore speed to a faster speed while it is in progress. You upgrade the speed of an in-progress restoration by issuing another restore request to the same object, setting a new <code>Tier</code> request element. When issuing a request to upgrade the restore tier, you must choose a tier that is faster than the tier that the in-progress restore is using. You must not change any other parameters, such as the <code>Days</code> request element. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html#restoring-objects-upgrade-tier.title.html"> Upgrading the Speed of an In-Progress Restore</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. </p> <p>To get the status of object restoration, you can send a <code>HEAD</code> request. Operations return the <code>x-amz-restore</code> header, which provides information about the restoration status, in the response. You can use Amazon S3 event notifications to notify you when a restore is initiated or completed. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html">Configuring Amazon S3 Event Notifications</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>After restoring an archived object, you can update the restoration period by reissuing the request with a new period. Amazon S3 updates the restoration period relative to the current time and charges only for the request-there are no data transfer charges. You cannot update the restoration period when Amazon S3 is actively processing your current restore request for the object.</p> <p>If your bucket has a lifecycle configuration with a rule that includes an expiration action, the object expiration overrides the life span that you specify in a restore request. For example, if you restore an object copy for 10 days, but the object is scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days. For more information about lifecycle configuration, see <a>PutBucketLifecycleConfiguration</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html">Object Lifecycle Management</a> in <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p> <b>Responses</b> </p> <p>A successful operation returns either the <code>200 OK</code> or <code>202 Accepted</code> status code. </p> <ul> <li> <p>If the object copy is not previously restored, then Amazon S3 returns <code>202 Accepted</code> in the response. </p> </li> <li> <p>If the object copy is previously restored, Amazon S3 returns <code>200 OK</code> in the response. </p> </li> </ul> <p class="title"> <b>Special Errors</b> </p> <ul> <li> <p class="title"> <b/> </p> <ul> <li> <p> <i>Code: RestoreAlreadyInProgress</i> </p> </li> <li> <p> <i>Cause: Object restore is already in progress. (This error does not apply to SELECT type requests.)</i> </p> </li> <li> <p> <i>HTTP Status Code: 409 Conflict</i> </p> </li> <li> <p> <i>SOAP Fault Code Prefix: Client</i> </p> </li> </ul> </li> <li> <p class="title"> <b/> </p> <ul> <li> <p> <i>Code: GlacierExpeditedRetrievalNotAvailable</i> </p> </li> <li> <p> <i>Cause: Glacier expedited retrievals are currently not available. Try again later. (Returned if there is insufficient capacity to process the Expedited request. This error applies only to Expedited retrievals and not to Standard or Bulk retrievals.)</i> </p> </li> <li> <p> <i>HTTP Status Code: 503</i> </p> </li> <li> <p> <i>SOAP Fault Code Prefix: N/A</i> </p> </li> </ul> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>PutBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a>GetBucketNotificationConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html">SQL Reference for Amazon S3 Select and Glacier Select </a> in the <i>Amazon Simple Storage Service Developer Guide</i> </p> </li> </ul></p>
24357     #[allow(unused_variables, warnings)]
restore_object( &self, input: RestoreObjectRequest, ) -> Result<RestoreObjectOutput, RusotoError<RestoreObjectError>>24358     async fn restore_object(
24359         &self,
24360         input: RestoreObjectRequest,
24361     ) -> Result<RestoreObjectOutput, RusotoError<RestoreObjectError>> {
24362         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
24363 
24364         let mut request = SignedRequest::new("POST", "s3", &self.region, &request_uri);
24365 
24366         if let Some(ref request_payer) = input.request_payer {
24367             request.add_header("x-amz-request-payer", &request_payer.to_string());
24368         }
24369         let mut params = Params::new();
24370         if let Some(ref x) = input.version_id {
24371             params.put("versionId", x);
24372         }
24373         params.put_key("restore");
24374         request.set_params(params);
24375         if input.restore_request.is_some() {
24376             let mut writer = EventWriter::new(Vec::new());
24377             RestoreRequestSerializer::serialize(
24378                 &mut writer,
24379                 "RestoreRequest",
24380                 input.restore_request.as_ref().unwrap(),
24381             );
24382             request.set_payload(Some(writer.into_inner()));
24383         } else {
24384             request.set_payload(Some(Vec::new()));
24385         }
24386 
24387         let mut response = self
24388             .client
24389             .sign_and_dispatch(request)
24390             .await
24391             .map_err(RusotoError::from)?;
24392         if !response.status.is_success() {
24393             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
24394             return Err(RestoreObjectError::from_response(response));
24395         }
24396 
24397         let mut result;
24398         result = RestoreObjectOutput::default();
24399         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
24400             let value = request_charged.to_owned();
24401             result.request_charged = Some(value)
24402         };
24403         if let Some(restore_output_path) = response.headers.get("x-amz-restore-output-path") {
24404             let value = restore_output_path.to_owned();
24405             result.restore_output_path = Some(value)
24406         }; // parse non-payload
24407         Ok(result)
24408     }
24409 
24410     /// <p><p>This operation filters the contents of an Amazon S3 object based on a simple structured query language (SQL) statement. In the request, along with the SQL expression, you must also specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses this format to parse object data into records, and returns only records that match the specified SQL expression. You must also specify the data serialization format for the response.</p> <p>For more information about Amazon S3 Select, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/selecting-content-from-objects.html">Selecting Content from Objects</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>For more information about using SQL with Amazon S3 Select, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html"> SQL Reference for Amazon S3 Select and Glacier Select</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p/> <p> <b>Permissions</b> </p> <p>You must have <code>s3:GetObject</code> permission for this operation. Amazon S3 Select does not support anonymous access. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p/> <p> <i>Object Data Formats</i> </p> <p>You can use Amazon S3 Select to query objects that have the following format properties:</p> <ul> <li> <p> <i>CSV, JSON, and Parquet</i> - Objects must be in CSV, JSON, or Parquet format.</p> </li> <li> <p> <i>UTF-8</i> - UTF-8 is the only encoding type Amazon S3 Select supports.</p> </li> <li> <p> <i>GZIP or BZIP2</i> - CSV and JSON files can be compressed using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support whole-object compression for Parquet objects.</p> </li> <li> <p> <i>Server-side encryption</i> - Amazon S3 Select supports querying objects that are protected with server-side encryption.</p> <p>For objects that are encrypted with customer-provided encryption keys (SSE-C), you must use HTTPS, and you must use the headers that are documented in the <a>GetObject</a>. For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>For objects that are encrypted with Amazon S3 managed encryption keys (SSE-S3) and customer master keys (CMKs) stored in AWS Key Management Service (SSE-KMS), server-side encryption is handled transparently, so you don&#39;t need to specify anything. For more information about server-side encryption, including SSE-S3 and SSE-KMS, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Protecting Data Using Server-Side Encryption</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> </li> </ul> <p> <b>Working with the Response Body</b> </p> <p>Given the response size is unknown, Amazon S3 Select streams the response as a series of messages and includes a <code>Transfer-Encoding</code> header with <code>chunked</code> as its value in the response. For more information, see <a>RESTSelectObjectAppendix</a> .</p> <p/> <p> <b>GetObject Support</b> </p> <p>The <code>SelectObjectContent</code> operation does not support the following <code>GetObject</code> functionality. For more information, see <a>GetObject</a>.</p> <ul> <li> <p> <code>Range</code>: While you can specify a scan range for a Amazon S3 Select request, see <a>SelectObjectContentRequest$ScanRange</a> in the request parameters below, you cannot specify the range of bytes of an object to return. </p> </li> <li> <p>GLACIER, DEEP<em>ARCHIVE and REDUCED</em>REDUNDANCY storage classes: You cannot specify the GLACIER, DEEP<em>ARCHIVE, or <code>REDUCED</em>REDUNDANCY</code> storage classes. For more information, about storage classes see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#storage-class-intro">Storage Classes</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> </li> </ul> <p/> <p> <b>Special Errors</b> </p> <p>For a list of special errors for this operation and for general information about Amazon S3 errors and a list of error codes, see <a>ErrorResponses</a> </p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>GetObject</a> </p> </li> <li> <p> <a>GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a>PutBucketLifecycleConfiguration</a> </p> </li> </ul></p>
24411     #[allow(unused_variables, warnings)]
select_object_content( &self, input: SelectObjectContentRequest, ) -> Result<SelectObjectContentOutput, RusotoError<SelectObjectContentError>>24412     async fn select_object_content(
24413         &self,
24414         input: SelectObjectContentRequest,
24415     ) -> Result<SelectObjectContentOutput, RusotoError<SelectObjectContentError>> {
24416         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
24417 
24418         let mut request = SignedRequest::new("POST", "s3", &self.region, &request_uri);
24419 
24420         if let Some(ref sse_customer_algorithm) = input.sse_customer_algorithm {
24421             request.add_header(
24422                 "x-amz-server-side-encryption-customer-algorithm",
24423                 &sse_customer_algorithm.to_string(),
24424             );
24425         }
24426 
24427         if let Some(ref sse_customer_key) = input.sse_customer_key {
24428             request.add_header(
24429                 "x-amz-server-side-encryption-customer-key",
24430                 &sse_customer_key.to_string(),
24431             );
24432         }
24433 
24434         if let Some(ref sse_customer_key_md5) = input.sse_customer_key_md5 {
24435             request.add_header(
24436                 "x-amz-server-side-encryption-customer-key-MD5",
24437                 &sse_customer_key_md5.to_string(),
24438             );
24439         }
24440         let mut params = Params::new();
24441         params.put_key("select");
24442         params.put("select-type", "2");
24443         request.set_params(params);
24444         let mut writer = EventWriter::new(Vec::new());
24445         SelectObjectContentRequestSerializer::serialize(
24446             &mut writer,
24447             "SelectObjectContentRequest",
24448             &input,
24449             "http://s3.amazonaws.com/doc/2006-03-01/",
24450         );
24451         request.set_payload(Some(writer.into_inner()));
24452 
24453         let mut response = self
24454             .client
24455             .sign_and_dispatch(request)
24456             .await
24457             .map_err(RusotoError::from)?;
24458         if !response.status.is_success() {
24459             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
24460             return Err(SelectObjectContentError::from_response(response));
24461         }
24462 
24463         let mut result;
24464         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
24465         if xml_response.body.is_empty() {
24466             result = SelectObjectContentOutput::default();
24467         } else {
24468             let reader = EventReader::new_with_config(
24469                 xml_response.body.as_ref(),
24470                 ParserConfig::new().trim_whitespace(false),
24471             );
24472             let mut stack = XmlResponse::new(reader.into_iter().peekable());
24473             let _start_document = stack.next();
24474             let actual_tag_name = peek_at_name(&mut stack)?;
24475             result =
24476                 SelectObjectContentOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
24477         }
24478         // parse non-payload
24479         Ok(result)
24480     }
24481 
24482     /// <p><p>Uploads a part in a multipart upload.</p> <note> <p>In this operation, you provide part data in your request. However, you have an option to specify your existing Amazon S3 object as a data source for the part you are uploading. To upload a part from an existing object, you use the <a>UploadPartCopy</a> operation. </p> </note> <p>You must initiate a multipart upload (see <a>CreateMultipartUpload</a>) before you can upload any part. In response to your initiate request, Amazon S3 returns an upload ID, a unique identifier, that you must include in your upload part request.</p> <p>Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely identifies a part and also defines its position within the object being created. If you upload a new part using the same part number that was used with a previous part, the previously uploaded part is overwritten. Each part must be at least 5 MB in size, except the last part. There is no size limit on the last part of your multipart upload.</p> <p>To ensure that data is not corrupted when traversing the network, specify the <code>Content-MD5</code> header in the upload part request. Amazon S3 checks the part data against the provided MD5 value. If they do not match, Amazon S3 returns an error. </p> <p> <b>Note:</b> After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.</p> <p>For more information on multipart uploads, go to <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html">Multipart Upload Overview</a> in the <i>Amazon Simple Storage Service Developer Guide </i>.</p> <p>For information on the permissions required to use the multipart upload API, go to <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and Permissions</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>You can optionally request server-side encryption where Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it for you when you access it. You have the option of providing your own encryption key, or you can use the AWS managed encryption keys. If you choose to provide your own encryption key, the request headers you provide in the request must match the headers you used in the request to initiate the upload by using <a>CreateMultipartUpload</a>. For more information, go to <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>Server-side encryption is supported by the S3 Multipart Upload actions. Unless you are using a customer-provided encryption key, you don&#39;t need to specify the encryption parameters in each UploadPart request. Instead, you only need to specify the server-side encryption parameters in the initial Initiate Multipart request. For more information, see <a>CreateMultipartUpload</a>.</p> <p>If you requested server-side encryption using a customer-provided encryption key in your initiate multipart upload request, you must provide identical encryption information in each part upload using the following headers.</p> <ul> <li> <p>x-amz-server-side​-encryption​-customer-algorithm</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key</p> </li> <li> <p>x-amz-server-side​-encryption​-customer-key-MD5</p> </li> </ul> <p class="title"> <b>Special Errors</b> </p> <ul> <li> <p class="title"> <b/> </p> <ul> <li> <p> <i>Code: NoSuchUpload</i> </p> </li> <li> <p> <i>Cause: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.</i> </p> </li> <li> <p> <i> HTTP Status Code: 404 Not Found </i> </p> </li> <li> <p> <i>SOAP Fault Code Prefix: Client</i> </p> </li> </ul> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>CreateMultipartUpload</a> </p> </li> <li> <p> <a>CompleteMultipartUpload</a> </p> </li> <li> <p> <a>AbortMultipartUpload</a> </p> </li> <li> <p> <a>ListParts</a> </p> </li> <li> <p> <a>ListMultipartUploads</a> </p> </li> </ul></p>
24483     #[allow(unused_variables, warnings)]
upload_part( &self, input: UploadPartRequest, ) -> Result<UploadPartOutput, RusotoError<UploadPartError>>24484     async fn upload_part(
24485         &self,
24486         input: UploadPartRequest,
24487     ) -> Result<UploadPartOutput, RusotoError<UploadPartError>> {
24488         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
24489 
24490         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
24491 
24492         if let Some(ref content_length) = input.content_length {
24493             request.add_header("Content-Length", &content_length.to_string());
24494         }
24495 
24496         if let Some(ref content_md5) = input.content_md5 {
24497             request.add_header("Content-MD5", &content_md5.to_string());
24498         }
24499 
24500         if let Some(ref request_payer) = input.request_payer {
24501             request.add_header("x-amz-request-payer", &request_payer.to_string());
24502         }
24503 
24504         if let Some(ref sse_customer_algorithm) = input.sse_customer_algorithm {
24505             request.add_header(
24506                 "x-amz-server-side-encryption-customer-algorithm",
24507                 &sse_customer_algorithm.to_string(),
24508             );
24509         }
24510 
24511         if let Some(ref sse_customer_key) = input.sse_customer_key {
24512             request.add_header(
24513                 "x-amz-server-side-encryption-customer-key",
24514                 &sse_customer_key.to_string(),
24515             );
24516         }
24517 
24518         if let Some(ref sse_customer_key_md5) = input.sse_customer_key_md5 {
24519             request.add_header(
24520                 "x-amz-server-side-encryption-customer-key-MD5",
24521                 &sse_customer_key_md5.to_string(),
24522             );
24523         }
24524         let mut params = Params::new();
24525         params.put("partNumber", &input.part_number);
24526         params.put("uploadId", &input.upload_id);
24527         request.set_params(params);
24528         if let Some(__body) = input.body {
24529             request.set_payload_stream(__body);
24530         }
24531 
24532         let mut response = self
24533             .client
24534             .sign_and_dispatch(request)
24535             .await
24536             .map_err(RusotoError::from)?;
24537         if !response.status.is_success() {
24538             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
24539             return Err(UploadPartError::from_response(response));
24540         }
24541 
24542         let mut result;
24543         result = UploadPartOutput::default();
24544         if let Some(e_tag) = response.headers.get("ETag") {
24545             let value = e_tag.to_owned();
24546             result.e_tag = Some(value)
24547         };
24548         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
24549             let value = request_charged.to_owned();
24550             result.request_charged = Some(value)
24551         };
24552         if let Some(sse_customer_algorithm) = response
24553             .headers
24554             .get("x-amz-server-side-encryption-customer-algorithm")
24555         {
24556             let value = sse_customer_algorithm.to_owned();
24557             result.sse_customer_algorithm = Some(value)
24558         };
24559         if let Some(sse_customer_key_md5) = response
24560             .headers
24561             .get("x-amz-server-side-encryption-customer-key-MD5")
24562         {
24563             let value = sse_customer_key_md5.to_owned();
24564             result.sse_customer_key_md5 = Some(value)
24565         };
24566         if let Some(ssekms_key_id) = response
24567             .headers
24568             .get("x-amz-server-side-encryption-aws-kms-key-id")
24569         {
24570             let value = ssekms_key_id.to_owned();
24571             result.ssekms_key_id = Some(value)
24572         };
24573         if let Some(server_side_encryption) = response.headers.get("x-amz-server-side-encryption") {
24574             let value = server_side_encryption.to_owned();
24575             result.server_side_encryption = Some(value)
24576         }; // parse non-payload
24577         Ok(result)
24578     }
24579 
24580     /// <p><p>Uploads a part by copying data from an existing object as data source. You specify the data source by adding the request header <code>x-amz-copy-source</code> in your request and a byte range by adding the request header <code>x-amz-copy-source-range</code> in your request. </p> <p>The minimum allowable part size for a multipart upload is 5 MB. For more information about multipart upload limits, go to <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/qfacts.html">Quick Facts</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. </p> <note> <p>Instead of using an existing object as part data, you might use the <a>UploadPart</a> operation and provide data in your request.</p> </note> <p>You must initiate a multipart upload before you can upload any part. In response to your initiate request. Amazon S3 returns a unique identifier, the upload ID, that you must include in your upload part request.</p> <p>For more information about using the <code>UploadPartCopy</code> operation, see the following:</p> <ul> <li> <p>For conceptual information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html">Uploading Objects Using Multipart Upload</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> </li> <li> <p>For information about permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and Permissions</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> </li> <li> <p>For information about copying objects using a single atomic operation vs. the multipart upload, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html">Operations on Objects</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> </li> <li> <p>For information about using server-side encryption with customer-provided encryption keys with the UploadPartCopy operation, see <a>CopyObject</a> and <a>UploadPart</a>.</p> </li> </ul> <p>Note the following additional considerations about the request headers <code>x-amz-copy-source-if-match</code>, <code>x-amz-copy-source-if-none-match</code>, <code>x-amz-copy-source-if-unmodified-since</code>, and <code>x-amz-copy-source-if-modified-since</code>:</p> <p> </p> <ul> <li> <p> <b>Consideration 1</b> - If both of the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request as follows:</p> <p> <code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p> <p> <code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p> <p>Amazon S3 returns <code>200 OK</code> and copies the data. </p> </li> <li> <p> <b>Consideration 2</b> - If both of the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request as follows:</p> <p> <code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p> <p> <code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p> <p>Amazon S3 returns <code>412 Precondition Failed</code> response code. </p> </li> </ul> <p> <b>Versioning</b> </p> <p>If your bucket has versioning enabled, you could have multiple versions of the same object. By default, <code>x-amz-copy-source</code> identifies the current version of the object to copy. If the current version is a delete marker and you don&#39;t specify a versionId in the <code>x-amz-copy-source</code>, Amazon S3 returns a 404 error, because the object does not exist. If you specify versionId in the <code>x-amz-copy-source</code> and the versionId is a delete marker, Amazon S3 returns an HTTP 400 error, because you are not allowed to specify a delete marker as a version for the <code>x-amz-copy-source</code>. </p> <p>You can optionally specify a specific version of the source object to copy by adding the <code>versionId</code> subresource as shown in the following example:</p> <p> <code>x-amz-copy-source: /bucket/object?versionId=version id</code> </p> <p class="title"> <b>Special Errors</b> </p> <ul> <li> <p class="title"> <b/> </p> <ul> <li> <p> <i>Code: NoSuchUpload</i> </p> </li> <li> <p> <i>Cause: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.</i> </p> </li> <li> <p> <i>HTTP Status Code: 404 Not Found</i> </p> </li> </ul> </li> <li> <p class="title"> <b/> </p> <ul> <li> <p> <i>Code: InvalidRequest</i> </p> </li> <li> <p> <i>Cause: The specified copy source is not supported as a byte-range copy source.</i> </p> </li> <li> <p> <i>HTTP Status Code: 400 Bad Request</i> </p> </li> </ul> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a>CreateMultipartUpload</a> </p> </li> <li> <p> <a>UploadPart</a> </p> </li> <li> <p> <a>CompleteMultipartUpload</a> </p> </li> <li> <p> <a>AbortMultipartUpload</a> </p> </li> <li> <p> <a>ListParts</a> </p> </li> <li> <p> <a>ListMultipartUploads</a> </p> </li> </ul></p>
24581     #[allow(unused_variables, warnings)]
upload_part_copy( &self, input: UploadPartCopyRequest, ) -> Result<UploadPartCopyOutput, RusotoError<UploadPartCopyError>>24582     async fn upload_part_copy(
24583         &self,
24584         input: UploadPartCopyRequest,
24585     ) -> Result<UploadPartCopyOutput, RusotoError<UploadPartCopyError>> {
24586         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
24587 
24588         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
24589 
24590         request.add_header("x-amz-copy-source", &input.copy_source);
24591 
24592         if let Some(ref copy_source_if_match) = input.copy_source_if_match {
24593             request.add_header(
24594                 "x-amz-copy-source-if-match",
24595                 &copy_source_if_match.to_string(),
24596             );
24597         }
24598 
24599         if let Some(ref copy_source_if_modified_since) = input.copy_source_if_modified_since {
24600             request.add_header(
24601                 "x-amz-copy-source-if-modified-since",
24602                 &copy_source_if_modified_since.to_string(),
24603             );
24604         }
24605 
24606         if let Some(ref copy_source_if_none_match) = input.copy_source_if_none_match {
24607             request.add_header(
24608                 "x-amz-copy-source-if-none-match",
24609                 &copy_source_if_none_match.to_string(),
24610             );
24611         }
24612 
24613         if let Some(ref copy_source_if_unmodified_since) = input.copy_source_if_unmodified_since {
24614             request.add_header(
24615                 "x-amz-copy-source-if-unmodified-since",
24616                 &copy_source_if_unmodified_since.to_string(),
24617             );
24618         }
24619 
24620         if let Some(ref copy_source_range) = input.copy_source_range {
24621             request.add_header("x-amz-copy-source-range", &copy_source_range.to_string());
24622         }
24623 
24624         if let Some(ref copy_source_sse_customer_algorithm) =
24625             input.copy_source_sse_customer_algorithm
24626         {
24627             request.add_header(
24628                 "x-amz-copy-source-server-side-encryption-customer-algorithm",
24629                 &copy_source_sse_customer_algorithm.to_string(),
24630             );
24631         }
24632 
24633         if let Some(ref copy_source_sse_customer_key) = input.copy_source_sse_customer_key {
24634             request.add_header(
24635                 "x-amz-copy-source-server-side-encryption-customer-key",
24636                 &copy_source_sse_customer_key.to_string(),
24637             );
24638         }
24639 
24640         if let Some(ref copy_source_sse_customer_key_md5) = input.copy_source_sse_customer_key_md5 {
24641             request.add_header(
24642                 "x-amz-copy-source-server-side-encryption-customer-key-MD5",
24643                 &copy_source_sse_customer_key_md5.to_string(),
24644             );
24645         }
24646 
24647         if let Some(ref request_payer) = input.request_payer {
24648             request.add_header("x-amz-request-payer", &request_payer.to_string());
24649         }
24650 
24651         if let Some(ref sse_customer_algorithm) = input.sse_customer_algorithm {
24652             request.add_header(
24653                 "x-amz-server-side-encryption-customer-algorithm",
24654                 &sse_customer_algorithm.to_string(),
24655             );
24656         }
24657 
24658         if let Some(ref sse_customer_key) = input.sse_customer_key {
24659             request.add_header(
24660                 "x-amz-server-side-encryption-customer-key",
24661                 &sse_customer_key.to_string(),
24662             );
24663         }
24664 
24665         if let Some(ref sse_customer_key_md5) = input.sse_customer_key_md5 {
24666             request.add_header(
24667                 "x-amz-server-side-encryption-customer-key-MD5",
24668                 &sse_customer_key_md5.to_string(),
24669             );
24670         }
24671         let mut params = Params::new();
24672         params.put("partNumber", &input.part_number);
24673         params.put("uploadId", &input.upload_id);
24674         request.set_params(params);
24675 
24676         let mut response = self
24677             .client
24678             .sign_and_dispatch(request)
24679             .await
24680             .map_err(RusotoError::from)?;
24681         if !response.status.is_success() {
24682             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
24683             return Err(UploadPartCopyError::from_response(response));
24684         }
24685 
24686         let mut result;
24687         let xml_response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
24688         if xml_response.body.is_empty() {
24689             result = UploadPartCopyOutput::default();
24690         } else {
24691             let reader = EventReader::new_with_config(
24692                 xml_response.body.as_ref(),
24693                 ParserConfig::new().trim_whitespace(false),
24694             );
24695             let mut stack = XmlResponse::new(reader.into_iter().peekable());
24696             let _start_document = stack.next();
24697             let actual_tag_name = peek_at_name(&mut stack)?;
24698             result = UploadPartCopyOutputDeserializer::deserialize(&actual_tag_name, &mut stack)?;
24699         }
24700         if let Some(copy_source_version_id) = response.headers.get("x-amz-copy-source-version-id") {
24701             let value = copy_source_version_id.to_owned();
24702             result.copy_source_version_id = Some(value)
24703         };
24704         if let Some(request_charged) = response.headers.get("x-amz-request-charged") {
24705             let value = request_charged.to_owned();
24706             result.request_charged = Some(value)
24707         };
24708         if let Some(sse_customer_algorithm) = response
24709             .headers
24710             .get("x-amz-server-side-encryption-customer-algorithm")
24711         {
24712             let value = sse_customer_algorithm.to_owned();
24713             result.sse_customer_algorithm = Some(value)
24714         };
24715         if let Some(sse_customer_key_md5) = response
24716             .headers
24717             .get("x-amz-server-side-encryption-customer-key-MD5")
24718         {
24719             let value = sse_customer_key_md5.to_owned();
24720             result.sse_customer_key_md5 = Some(value)
24721         };
24722         if let Some(ssekms_key_id) = response
24723             .headers
24724             .get("x-amz-server-side-encryption-aws-kms-key-id")
24725         {
24726             let value = ssekms_key_id.to_owned();
24727             result.ssekms_key_id = Some(value)
24728         };
24729         if let Some(server_side_encryption) = response.headers.get("x-amz-server-side-encryption") {
24730             let value = server_side_encryption.to_owned();
24731             result.server_side_encryption = Some(value)
24732         }; // parse non-payload
24733         Ok(result)
24734     }
24735 }
24736 
24737 #[cfg(test)]
24738 mod protocol_tests {
24739 
24740     extern crate rusoto_mock;
24741 
24742     use self::rusoto_mock::*;
24743     use super::*;
24744     use rusoto_core::Region as rusoto_region;
24745 
24746     #[tokio::test]
test_parse_error_s3_create_bucket()24747     async fn test_parse_error_s3_create_bucket() {
24748         let mock_response = MockResponseReader::read_response(
24749             "test_resources/generated/error",
24750             "s3-create-bucket.xml",
24751         );
24752         let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
24753         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
24754         let request = CreateBucketRequest::default();
24755         let result = client.create_bucket(request).await;
24756         assert!(!result.is_ok(), "parse error: {:?}", result);
24757     }
24758 
24759     #[tokio::test]
test_parse_error_s3_list_objects()24760     async fn test_parse_error_s3_list_objects() {
24761         let mock_response = MockResponseReader::read_response(
24762             "test_resources/generated/error",
24763             "s3-list-objects.xml",
24764         );
24765         let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
24766         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
24767         let request = ListObjectsRequest::default();
24768         let result = client.list_objects(request).await;
24769         assert!(!result.is_ok(), "parse error: {:?}", result);
24770     }
24771 
24772     #[tokio::test]
test_parse_valid_s3_get_bucket_acl()24773     async fn test_parse_valid_s3_get_bucket_acl() {
24774         let mock_response = MockResponseReader::read_response(
24775             "test_resources/generated/valid",
24776             "s3-get-bucket-acl.xml",
24777         );
24778         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
24779         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
24780         let request = GetBucketAclRequest::default();
24781         let result = client.get_bucket_acl(request).await;
24782         assert!(result.is_ok(), "parse error: {:?}", result);
24783     }
24784 
24785     #[tokio::test]
test_parse_valid_s3_get_bucket_location()24786     async fn test_parse_valid_s3_get_bucket_location() {
24787         let mock_response = MockResponseReader::read_response(
24788             "test_resources/generated/valid",
24789             "s3-get-bucket-location.xml",
24790         );
24791         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
24792         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
24793         let request = GetBucketLocationRequest::default();
24794         let result = client.get_bucket_location(request).await;
24795         assert!(result.is_ok(), "parse error: {:?}", result);
24796     }
24797 
24798     #[tokio::test]
test_parse_valid_s3_get_bucket_logging()24799     async fn test_parse_valid_s3_get_bucket_logging() {
24800         let mock_response = MockResponseReader::read_response(
24801             "test_resources/generated/valid",
24802             "s3-get-bucket-logging.xml",
24803         );
24804         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
24805         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
24806         let request = GetBucketLoggingRequest::default();
24807         let result = client.get_bucket_logging(request).await;
24808         assert!(result.is_ok(), "parse error: {:?}", result);
24809     }
24810 
24811     #[tokio::test]
test_parse_valid_s3_get_bucket_policy()24812     async fn test_parse_valid_s3_get_bucket_policy() {
24813         let mock_response = MockResponseReader::read_response(
24814             "test_resources/generated/valid",
24815             "s3-get-bucket-policy.xml",
24816         );
24817         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
24818         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
24819         let request = GetBucketPolicyRequest::default();
24820         let result = client.get_bucket_policy(request).await;
24821         assert!(result.is_ok(), "parse error: {:?}", result);
24822     }
24823 
24824     #[tokio::test]
test_parse_valid_s3_list_buckets()24825     async fn test_parse_valid_s3_list_buckets() {
24826         let mock_response = MockResponseReader::read_response(
24827             "test_resources/generated/valid",
24828             "s3-list-buckets.xml",
24829         );
24830         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
24831         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
24832 
24833         let result = client.list_buckets().await;
24834         assert!(result.is_ok(), "parse error: {:?}", result);
24835     }
24836 
24837     #[tokio::test]
test_parse_valid_s3_list_multipart_uploads()24838     async fn test_parse_valid_s3_list_multipart_uploads() {
24839         let mock_response = MockResponseReader::read_response(
24840             "test_resources/generated/valid",
24841             "s3-list-multipart-uploads.xml",
24842         );
24843         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
24844         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
24845         let request = ListMultipartUploadsRequest::default();
24846         let result = client.list_multipart_uploads(request).await;
24847         assert!(result.is_ok(), "parse error: {:?}", result);
24848     }
24849 
24850     #[tokio::test]
test_parse_valid_s3_list_object_versions()24851     async fn test_parse_valid_s3_list_object_versions() {
24852         let mock_response = MockResponseReader::read_response(
24853             "test_resources/generated/valid",
24854             "s3-list-object-versions.xml",
24855         );
24856         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
24857         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
24858         let request = ListObjectVersionsRequest::default();
24859         let result = client.list_object_versions(request).await;
24860         assert!(result.is_ok(), "parse error: {:?}", result);
24861     }
24862 
24863     #[tokio::test]
test_parse_valid_s3_list_objects()24864     async fn test_parse_valid_s3_list_objects() {
24865         let mock_response = MockResponseReader::read_response(
24866             "test_resources/generated/valid",
24867             "s3-list-objects.xml",
24868         );
24869         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
24870         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
24871         let request = ListObjectsRequest::default();
24872         let result = client.list_objects(request).await;
24873         assert!(result.is_ok(), "parse error: {:?}", result);
24874     }
24875 }
24876