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     self as xml_util, deserialize_elements, find_start_element, skip_tree, write_characters_element,
26 };
27 use rusoto_core::proto::xml::util::{Next, Peek, XmlParseError, XmlResponse};
28 use rusoto_core::request::HttpResponse;
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::EventReader;
38 use xml::EventWriter;
39 
40 impl S3Client {
sign_and_dispatch<E>( &self, request: SignedRequest, from_response: fn(BufferedHttpResponse) -> RusotoError<E>, ) -> Result<HttpResponse, RusotoError<E>>41     async fn sign_and_dispatch<E>(
42         &self,
43         request: SignedRequest,
44         from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
45     ) -> Result<HttpResponse, RusotoError<E>> {
46         let mut response = self.client.sign_and_dispatch(request).await?;
47         if !response.status.is_success() {
48             let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
49             return Err(from_response(response));
50         }
51 
52         Ok(response)
53     }
54 }
55 use rusoto_core::event_stream::{DeserializeEvent, EventStream};
56 /// <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 S3 User Guide</i>.</p>
57 #[derive(Clone, Debug, Default, PartialEq)]
58 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
59 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
60 pub struct AbortIncompleteMultipartUpload {
61     /// <p>Specifies the number of days after which Amazon S3 aborts an incomplete multipart upload.</p>
62     pub days_after_initiation: Option<i64>,
63 }
64 
65 #[allow(dead_code)]
66 struct AbortIncompleteMultipartUploadDeserializer;
67 impl AbortIncompleteMultipartUploadDeserializer {
68     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AbortIncompleteMultipartUpload, XmlParseError>69     fn deserialize<T: Peek + Next>(
70         tag_name: &str,
71         stack: &mut T,
72     ) -> Result<AbortIncompleteMultipartUpload, XmlParseError> {
73         deserialize_elements::<_, AbortIncompleteMultipartUpload, _>(
74             tag_name,
75             stack,
76             |name, stack, obj| {
77                 match name {
78                     "DaysAfterInitiation" => {
79                         obj.days_after_initiation =
80                             Some(DaysAfterInitiationDeserializer::deserialize(
81                                 "DaysAfterInitiation",
82                                 stack,
83                             )?);
84                     }
85                     _ => skip_tree(stack),
86                 }
87                 Ok(())
88             },
89         )
90     }
91 }
92 
93 pub struct AbortIncompleteMultipartUploadSerializer;
94 impl AbortIncompleteMultipartUploadSerializer {
95     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AbortIncompleteMultipartUpload, ) -> Result<(), xml::writer::Error> where W: Write,96     pub fn serialize<W>(
97         mut writer: &mut EventWriter<W>,
98         name: &str,
99         obj: &AbortIncompleteMultipartUpload,
100     ) -> Result<(), xml::writer::Error>
101     where
102         W: Write,
103     {
104         writer.write(xml::writer::XmlEvent::start_element(name))?;
105         if let Some(ref value) = obj.days_after_initiation {
106             write_characters_element(writer, "DaysAfterInitiation", &value.to_string())?;
107         }
108         writer.write(xml::writer::XmlEvent::end_element())
109     }
110 }
111 
112 #[derive(Clone, Debug, Default, PartialEq)]
113 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
114 pub struct AbortMultipartUploadOutput {
115     pub request_charged: Option<String>,
116 }
117 
118 #[allow(dead_code)]
119 struct AbortMultipartUploadOutputDeserializer;
120 impl AbortMultipartUploadOutputDeserializer {
121     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AbortMultipartUploadOutput, XmlParseError>122     fn deserialize<T: Peek + Next>(
123         tag_name: &str,
124         stack: &mut T,
125     ) -> Result<AbortMultipartUploadOutput, XmlParseError> {
126         xml_util::start_element(tag_name, stack)?;
127 
128         let obj = AbortMultipartUploadOutput::default();
129 
130         xml_util::end_element(tag_name, stack)?;
131 
132         Ok(obj)
133     }
134 }
135 #[derive(Clone, Debug, Default, PartialEq)]
136 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
137 pub struct AbortMultipartUploadRequest {
138     /// <p>The bucket name to which the upload was taking place. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
139     pub bucket: String,
140     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
141     pub expected_bucket_owner: Option<String>,
142     /// <p>Key of the object for which the multipart upload was initiated.</p>
143     pub key: String,
144     pub request_payer: Option<String>,
145     /// <p>Upload ID that identifies the multipart upload.</p>
146     pub upload_id: String,
147 }
148 
149 /// <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 S3 User Guide</i>.</p>
150 #[derive(Clone, Debug, Default, PartialEq)]
151 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
152 pub struct AccelerateConfiguration {
153     /// <p>Specifies the transfer acceleration status of the bucket.</p>
154     pub status: Option<String>,
155 }
156 
157 pub struct AccelerateConfigurationSerializer;
158 impl AccelerateConfigurationSerializer {
159     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AccelerateConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,160     pub fn serialize<W>(
161         mut writer: &mut EventWriter<W>,
162         name: &str,
163         obj: &AccelerateConfiguration,
164     ) -> Result<(), xml::writer::Error>
165     where
166         W: Write,
167     {
168         writer.write(xml::writer::XmlEvent::start_element(name))?;
169         if let Some(ref value) = obj.status {
170             write_characters_element(writer, "Status", &value)?;
171         }
172         writer.write(xml::writer::XmlEvent::end_element())
173     }
174 }
175 
176 /// <p>Contains the elements that set the ACL permissions for an object per grantee.</p>
177 #[derive(Clone, Debug, Default, PartialEq)]
178 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
179 pub struct AccessControlPolicy {
180     /// <p>A list of grants.</p>
181     pub grants: Option<Vec<Grant>>,
182     /// <p>Container for the bucket owner's display name and ID.</p>
183     pub owner: Option<Owner>,
184 }
185 
186 pub struct AccessControlPolicySerializer;
187 impl AccessControlPolicySerializer {
188     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AccessControlPolicy, ) -> Result<(), xml::writer::Error> where W: Write,189     pub fn serialize<W>(
190         mut writer: &mut EventWriter<W>,
191         name: &str,
192         obj: &AccessControlPolicy,
193     ) -> Result<(), xml::writer::Error>
194     where
195         W: Write,
196     {
197         writer.write(xml::writer::XmlEvent::start_element(name))?;
198         if let Some(ref value) = obj.grants {
199             &GrantsSerializer::serialize(&mut writer, "AccessControlList", value)?;
200         }
201         if let Some(ref value) = obj.owner {
202             &OwnerSerializer::serialize(&mut writer, "Owner", value)?;
203         }
204         writer.write(xml::writer::XmlEvent::end_element())
205     }
206 }
207 
208 /// <p>A container for information about access control for replicas.</p>
209 #[derive(Clone, Debug, Default, PartialEq)]
210 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
211 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
212 pub struct AccessControlTranslation {
213     /// <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 S3 API Reference</i>.</p>
214     pub owner: String,
215 }
216 
217 #[allow(dead_code)]
218 struct AccessControlTranslationDeserializer;
219 impl AccessControlTranslationDeserializer {
220     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AccessControlTranslation, XmlParseError>221     fn deserialize<T: Peek + Next>(
222         tag_name: &str,
223         stack: &mut T,
224     ) -> Result<AccessControlTranslation, XmlParseError> {
225         deserialize_elements::<_, AccessControlTranslation, _>(
226             tag_name,
227             stack,
228             |name, stack, obj| {
229                 match name {
230                     "Owner" => {
231                         obj.owner = OwnerOverrideDeserializer::deserialize("Owner", stack)?;
232                     }
233                     _ => skip_tree(stack),
234                 }
235                 Ok(())
236             },
237         )
238     }
239 }
240 
241 pub struct AccessControlTranslationSerializer;
242 impl AccessControlTranslationSerializer {
243     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AccessControlTranslation, ) -> Result<(), xml::writer::Error> where W: Write,244     pub fn serialize<W>(
245         mut writer: &mut EventWriter<W>,
246         name: &str,
247         obj: &AccessControlTranslation,
248     ) -> Result<(), xml::writer::Error>
249     where
250         W: Write,
251     {
252         writer.write(xml::writer::XmlEvent::start_element(name))?;
253         write_characters_element(writer, "Owner", &obj.owner)?;
254         writer.write(xml::writer::XmlEvent::end_element())
255     }
256 }
257 
258 #[allow(dead_code)]
259 struct AccountIdDeserializer;
260 impl AccountIdDeserializer {
261     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>262     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
263         xml_util::deserialize_primitive(tag_name, stack, Ok)
264     }
265 }
266 
267 pub struct AccountIdSerializer;
268 impl AccountIdSerializer {
269     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,270     pub fn serialize<W>(
271         mut writer: &mut EventWriter<W>,
272         name: &str,
273         obj: &String,
274     ) -> Result<(), xml::writer::Error>
275     where
276         W: Write,
277     {
278         write_characters_element(writer, name, obj)
279     }
280 }
281 
282 pub struct AllowQuotedRecordDelimiterSerializer;
283 impl AllowQuotedRecordDelimiterSerializer {
284     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,285     pub fn serialize<W>(
286         mut writer: &mut EventWriter<W>,
287         name: &str,
288         obj: &bool,
289     ) -> Result<(), xml::writer::Error>
290     where
291         W: Write,
292     {
293         write_characters_element(writer, name, &obj.to_string())
294     }
295 }
296 
297 #[allow(dead_code)]
298 struct AllowedHeaderDeserializer;
299 impl AllowedHeaderDeserializer {
300     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>301     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
302         xml_util::deserialize_primitive(tag_name, stack, Ok)
303     }
304 }
305 
306 pub struct AllowedHeaderSerializer;
307 impl AllowedHeaderSerializer {
308     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,309     pub fn serialize<W>(
310         mut writer: &mut EventWriter<W>,
311         name: &str,
312         obj: &String,
313     ) -> Result<(), xml::writer::Error>
314     where
315         W: Write,
316     {
317         write_characters_element(writer, name, obj)
318     }
319 }
320 
321 #[allow(dead_code)]
322 struct AllowedHeadersDeserializer;
323 impl AllowedHeadersDeserializer {
324     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<String>, XmlParseError>325     fn deserialize<T: Peek + Next>(
326         tag_name: &str,
327         stack: &mut T,
328     ) -> Result<Vec<String>, XmlParseError> {
329         let mut obj = vec![];
330 
331         loop {
332             let consume_next_tag = match stack.peek() {
333                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
334                     name.local_name == tag_name
335                 }
336                 _ => false,
337             };
338 
339             if consume_next_tag {
340                 obj.push(AllowedHeaderDeserializer::deserialize(tag_name, stack)?);
341             } else {
342                 break;
343             }
344         }
345 
346         Ok(obj)
347     }
348 }
349 
350 pub struct AllowedHeadersSerializer;
351 impl AllowedHeadersSerializer {
352     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<String>, ) -> Result<(), xml::writer::Error> where W: Write,353     pub fn serialize<W>(
354         mut writer: &mut EventWriter<W>,
355         name: &str,
356         obj: &Vec<String>,
357     ) -> Result<(), xml::writer::Error>
358     where
359         W: Write,
360     {
361         for element in obj {
362             AllowedHeaderSerializer::serialize(writer, name, element)?;
363         }
364         Ok(())
365     }
366 }
367 
368 #[allow(dead_code)]
369 struct AllowedMethodDeserializer;
370 impl AllowedMethodDeserializer {
371     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>372     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
373         xml_util::deserialize_primitive(tag_name, stack, Ok)
374     }
375 }
376 
377 pub struct AllowedMethodSerializer;
378 impl AllowedMethodSerializer {
379     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,380     pub fn serialize<W>(
381         mut writer: &mut EventWriter<W>,
382         name: &str,
383         obj: &String,
384     ) -> Result<(), xml::writer::Error>
385     where
386         W: Write,
387     {
388         write_characters_element(writer, name, obj)
389     }
390 }
391 
392 #[allow(dead_code)]
393 struct AllowedMethodsDeserializer;
394 impl AllowedMethodsDeserializer {
395     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<String>, XmlParseError>396     fn deserialize<T: Peek + Next>(
397         tag_name: &str,
398         stack: &mut T,
399     ) -> Result<Vec<String>, XmlParseError> {
400         let mut obj = vec![];
401 
402         loop {
403             let consume_next_tag = match stack.peek() {
404                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
405                     name.local_name == tag_name
406                 }
407                 _ => false,
408             };
409 
410             if consume_next_tag {
411                 obj.push(AllowedMethodDeserializer::deserialize(tag_name, stack)?);
412             } else {
413                 break;
414             }
415         }
416 
417         Ok(obj)
418     }
419 }
420 
421 pub struct AllowedMethodsSerializer;
422 impl AllowedMethodsSerializer {
423     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<String>, ) -> Result<(), xml::writer::Error> where W: Write,424     pub fn serialize<W>(
425         mut writer: &mut EventWriter<W>,
426         name: &str,
427         obj: &Vec<String>,
428     ) -> Result<(), xml::writer::Error>
429     where
430         W: Write,
431     {
432         for element in obj {
433             AllowedMethodSerializer::serialize(writer, name, element)?;
434         }
435         Ok(())
436     }
437 }
438 
439 #[allow(dead_code)]
440 struct AllowedOriginDeserializer;
441 impl AllowedOriginDeserializer {
442     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>443     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
444         xml_util::deserialize_primitive(tag_name, stack, Ok)
445     }
446 }
447 
448 pub struct AllowedOriginSerializer;
449 impl AllowedOriginSerializer {
450     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,451     pub fn serialize<W>(
452         mut writer: &mut EventWriter<W>,
453         name: &str,
454         obj: &String,
455     ) -> Result<(), xml::writer::Error>
456     where
457         W: Write,
458     {
459         write_characters_element(writer, name, obj)
460     }
461 }
462 
463 #[allow(dead_code)]
464 struct AllowedOriginsDeserializer;
465 impl AllowedOriginsDeserializer {
466     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<String>, XmlParseError>467     fn deserialize<T: Peek + Next>(
468         tag_name: &str,
469         stack: &mut T,
470     ) -> Result<Vec<String>, XmlParseError> {
471         let mut obj = vec![];
472 
473         loop {
474             let consume_next_tag = match stack.peek() {
475                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
476                     name.local_name == tag_name
477                 }
478                 _ => false,
479             };
480 
481             if consume_next_tag {
482                 obj.push(AllowedOriginDeserializer::deserialize(tag_name, stack)?);
483             } else {
484                 break;
485             }
486         }
487 
488         Ok(obj)
489     }
490 }
491 
492 pub struct AllowedOriginsSerializer;
493 impl AllowedOriginsSerializer {
494     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<String>, ) -> Result<(), xml::writer::Error> where W: Write,495     pub fn serialize<W>(
496         mut writer: &mut EventWriter<W>,
497         name: &str,
498         obj: &Vec<String>,
499     ) -> Result<(), xml::writer::Error>
500     where
501         W: Write,
502     {
503         for element in obj {
504             AllowedOriginSerializer::serialize(writer, name, element)?;
505         }
506         Ok(())
507     }
508 }
509 
510 /// <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>
511 #[derive(Clone, Debug, Default, PartialEq)]
512 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
513 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
514 pub struct AnalyticsAndOperator {
515     /// <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>
516     pub prefix: Option<String>,
517     /// <p>The list of tags to use when evaluating an AND predicate.</p>
518     pub tags: Option<Vec<Tag>>,
519 }
520 
521 #[allow(dead_code)]
522 struct AnalyticsAndOperatorDeserializer;
523 impl AnalyticsAndOperatorDeserializer {
524     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AnalyticsAndOperator, XmlParseError>525     fn deserialize<T: Peek + Next>(
526         tag_name: &str,
527         stack: &mut T,
528     ) -> Result<AnalyticsAndOperator, XmlParseError> {
529         deserialize_elements::<_, AnalyticsAndOperator, _>(tag_name, stack, |name, stack, obj| {
530             match name {
531                 "Prefix" => {
532                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
533                 }
534                 "Tag" => {
535                     obj.tags
536                         .get_or_insert(vec![])
537                         .extend(TagSetDeserializer::deserialize("Tag", stack)?);
538                 }
539                 _ => skip_tree(stack),
540             }
541             Ok(())
542         })
543     }
544 }
545 
546 pub struct AnalyticsAndOperatorSerializer;
547 impl AnalyticsAndOperatorSerializer {
548     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AnalyticsAndOperator, ) -> Result<(), xml::writer::Error> where W: Write,549     pub fn serialize<W>(
550         mut writer: &mut EventWriter<W>,
551         name: &str,
552         obj: &AnalyticsAndOperator,
553     ) -> Result<(), xml::writer::Error>
554     where
555         W: Write,
556     {
557         writer.write(xml::writer::XmlEvent::start_element(name))?;
558         if let Some(ref value) = obj.prefix {
559             write_characters_element(writer, "Prefix", &value)?;
560         }
561         if let Some(ref value) = obj.tags {
562             &TagSetSerializer::serialize(&mut writer, "Tag", value)?;
563         }
564         writer.write(xml::writer::XmlEvent::end_element())
565     }
566 }
567 
568 /// <p>Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.</p>
569 #[derive(Clone, Debug, Default, PartialEq)]
570 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
571 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
572 pub struct AnalyticsConfiguration {
573     /// <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>
574     pub filter: Option<AnalyticsFilter>,
575     /// <p>The ID that identifies the analytics configuration.</p>
576     pub id: String,
577     /// <p> Contains data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes. </p>
578     pub storage_class_analysis: StorageClassAnalysis,
579 }
580 
581 #[allow(dead_code)]
582 struct AnalyticsConfigurationDeserializer;
583 impl AnalyticsConfigurationDeserializer {
584     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AnalyticsConfiguration, XmlParseError>585     fn deserialize<T: Peek + Next>(
586         tag_name: &str,
587         stack: &mut T,
588     ) -> Result<AnalyticsConfiguration, XmlParseError> {
589         deserialize_elements::<_, AnalyticsConfiguration, _>(tag_name, stack, |name, stack, obj| {
590             match name {
591                 "Filter" => {
592                     obj.filter = Some(AnalyticsFilterDeserializer::deserialize("Filter", stack)?);
593                 }
594                 "Id" => {
595                     obj.id = AnalyticsIdDeserializer::deserialize("Id", stack)?;
596                 }
597                 "StorageClassAnalysis" => {
598                     obj.storage_class_analysis = StorageClassAnalysisDeserializer::deserialize(
599                         "StorageClassAnalysis",
600                         stack,
601                     )?;
602                 }
603                 _ => skip_tree(stack),
604             }
605             Ok(())
606         })
607     }
608 }
609 
610 pub struct AnalyticsConfigurationSerializer;
611 impl AnalyticsConfigurationSerializer {
612     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AnalyticsConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,613     pub fn serialize<W>(
614         mut writer: &mut EventWriter<W>,
615         name: &str,
616         obj: &AnalyticsConfiguration,
617     ) -> Result<(), xml::writer::Error>
618     where
619         W: Write,
620     {
621         writer.write(xml::writer::XmlEvent::start_element(name))?;
622         if let Some(ref value) = obj.filter {
623             &AnalyticsFilterSerializer::serialize(&mut writer, "Filter", value)?;
624         }
625         write_characters_element(writer, "Id", &obj.id)?;
626         StorageClassAnalysisSerializer::serialize(
627             &mut writer,
628             "StorageClassAnalysis",
629             &obj.storage_class_analysis,
630         )?;
631         writer.write(xml::writer::XmlEvent::end_element())
632     }
633 }
634 
635 #[allow(dead_code)]
636 struct AnalyticsConfigurationListDeserializer;
637 impl AnalyticsConfigurationListDeserializer {
638     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<AnalyticsConfiguration>, XmlParseError>639     fn deserialize<T: Peek + Next>(
640         tag_name: &str,
641         stack: &mut T,
642     ) -> Result<Vec<AnalyticsConfiguration>, XmlParseError> {
643         let mut obj = vec![];
644 
645         loop {
646             let consume_next_tag = match stack.peek() {
647                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
648                     name.local_name == tag_name
649                 }
650                 _ => false,
651             };
652 
653             if consume_next_tag {
654                 obj.push(AnalyticsConfigurationDeserializer::deserialize(
655                     tag_name, stack,
656                 )?);
657             } else {
658                 break;
659             }
660         }
661 
662         Ok(obj)
663     }
664 }
665 /// <p>Where to publish the analytics results.</p>
666 #[derive(Clone, Debug, Default, PartialEq)]
667 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
668 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
669 pub struct AnalyticsExportDestination {
670     /// <p>A destination signifying output to an S3 bucket.</p>
671     pub s3_bucket_destination: AnalyticsS3BucketDestination,
672 }
673 
674 #[allow(dead_code)]
675 struct AnalyticsExportDestinationDeserializer;
676 impl AnalyticsExportDestinationDeserializer {
677     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AnalyticsExportDestination, XmlParseError>678     fn deserialize<T: Peek + Next>(
679         tag_name: &str,
680         stack: &mut T,
681     ) -> Result<AnalyticsExportDestination, XmlParseError> {
682         deserialize_elements::<_, AnalyticsExportDestination, _>(
683             tag_name,
684             stack,
685             |name, stack, obj| {
686                 match name {
687                     "S3BucketDestination" => {
688                         obj.s3_bucket_destination =
689                             AnalyticsS3BucketDestinationDeserializer::deserialize(
690                                 "S3BucketDestination",
691                                 stack,
692                             )?;
693                     }
694                     _ => skip_tree(stack),
695                 }
696                 Ok(())
697             },
698         )
699     }
700 }
701 
702 pub struct AnalyticsExportDestinationSerializer;
703 impl AnalyticsExportDestinationSerializer {
704     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AnalyticsExportDestination, ) -> Result<(), xml::writer::Error> where W: Write,705     pub fn serialize<W>(
706         mut writer: &mut EventWriter<W>,
707         name: &str,
708         obj: &AnalyticsExportDestination,
709     ) -> Result<(), xml::writer::Error>
710     where
711         W: Write,
712     {
713         writer.write(xml::writer::XmlEvent::start_element(name))?;
714         AnalyticsS3BucketDestinationSerializer::serialize(
715             &mut writer,
716             "S3BucketDestination",
717             &obj.s3_bucket_destination,
718         )?;
719         writer.write(xml::writer::XmlEvent::end_element())
720     }
721 }
722 
723 /// <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>
724 #[derive(Clone, Debug, Default, PartialEq)]
725 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
726 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
727 pub struct AnalyticsFilter {
728     /// <p>A conjunction (logical AND) of predicates, which is used in evaluating an analytics filter. The operator must have at least two predicates.</p>
729     pub and: Option<AnalyticsAndOperator>,
730     /// <p>The prefix to use when evaluating an analytics filter.</p>
731     pub prefix: Option<String>,
732     /// <p>The tag to use when evaluating an analytics filter.</p>
733     pub tag: Option<Tag>,
734 }
735 
736 #[allow(dead_code)]
737 struct AnalyticsFilterDeserializer;
738 impl AnalyticsFilterDeserializer {
739     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AnalyticsFilter, XmlParseError>740     fn deserialize<T: Peek + Next>(
741         tag_name: &str,
742         stack: &mut T,
743     ) -> Result<AnalyticsFilter, XmlParseError> {
744         deserialize_elements::<_, AnalyticsFilter, _>(tag_name, stack, |name, stack, obj| {
745             match name {
746                 "And" => {
747                     obj.and = Some(AnalyticsAndOperatorDeserializer::deserialize("And", stack)?);
748                 }
749                 "Prefix" => {
750                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
751                 }
752                 "Tag" => {
753                     obj.tag = Some(TagDeserializer::deserialize("Tag", stack)?);
754                 }
755                 _ => skip_tree(stack),
756             }
757             Ok(())
758         })
759     }
760 }
761 
762 pub struct AnalyticsFilterSerializer;
763 impl AnalyticsFilterSerializer {
764     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AnalyticsFilter, ) -> Result<(), xml::writer::Error> where W: Write,765     pub fn serialize<W>(
766         mut writer: &mut EventWriter<W>,
767         name: &str,
768         obj: &AnalyticsFilter,
769     ) -> Result<(), xml::writer::Error>
770     where
771         W: Write,
772     {
773         writer.write(xml::writer::XmlEvent::start_element(name))?;
774         if let Some(ref value) = obj.and {
775             &AnalyticsAndOperatorSerializer::serialize(&mut writer, "And", value)?;
776         }
777         if let Some(ref value) = obj.prefix {
778             write_characters_element(writer, "Prefix", &value)?;
779         }
780         if let Some(ref value) = obj.tag {
781             &TagSerializer::serialize(&mut writer, "Tag", value)?;
782         }
783         writer.write(xml::writer::XmlEvent::end_element())
784     }
785 }
786 
787 #[allow(dead_code)]
788 struct AnalyticsIdDeserializer;
789 impl AnalyticsIdDeserializer {
790     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>791     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
792         xml_util::deserialize_primitive(tag_name, stack, Ok)
793     }
794 }
795 
796 pub struct AnalyticsIdSerializer;
797 impl AnalyticsIdSerializer {
798     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,799     pub fn serialize<W>(
800         mut writer: &mut EventWriter<W>,
801         name: &str,
802         obj: &String,
803     ) -> Result<(), xml::writer::Error>
804     where
805         W: Write,
806     {
807         write_characters_element(writer, name, obj)
808     }
809 }
810 
811 /// <p>Contains information about where to publish the analytics results.</p>
812 #[derive(Clone, Debug, Default, PartialEq)]
813 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
814 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
815 pub struct AnalyticsS3BucketDestination {
816     /// <p>The Amazon Resource Name (ARN) of the bucket to which data is exported.</p>
817     pub bucket: String,
818     /// <p><p>The account ID that owns the destination S3 bucket. If no account ID is provided, the owner is not validated before exporting data.</p> <note> <p> Although this value is optional, we strongly recommend that you set it to help prevent problems if the destination bucket ownership changes. </p> </note></p>
819     pub bucket_account_id: Option<String>,
820     /// <p>Specifies the file format used when exporting data to Amazon S3.</p>
821     pub format: String,
822     /// <p>The prefix to use when exporting data. The prefix is prepended to all results.</p>
823     pub prefix: Option<String>,
824 }
825 
826 #[allow(dead_code)]
827 struct AnalyticsS3BucketDestinationDeserializer;
828 impl AnalyticsS3BucketDestinationDeserializer {
829     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<AnalyticsS3BucketDestination, XmlParseError>830     fn deserialize<T: Peek + Next>(
831         tag_name: &str,
832         stack: &mut T,
833     ) -> Result<AnalyticsS3BucketDestination, XmlParseError> {
834         deserialize_elements::<_, AnalyticsS3BucketDestination, _>(
835             tag_name,
836             stack,
837             |name, stack, obj| {
838                 match name {
839                     "Bucket" => {
840                         obj.bucket = BucketNameDeserializer::deserialize("Bucket", stack)?;
841                     }
842                     "BucketAccountId" => {
843                         obj.bucket_account_id = Some(AccountIdDeserializer::deserialize(
844                             "BucketAccountId",
845                             stack,
846                         )?);
847                     }
848                     "Format" => {
849                         obj.format =
850                             AnalyticsS3ExportFileFormatDeserializer::deserialize("Format", stack)?;
851                     }
852                     "Prefix" => {
853                         obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
854                     }
855                     _ => skip_tree(stack),
856                 }
857                 Ok(())
858             },
859         )
860     }
861 }
862 
863 pub struct AnalyticsS3BucketDestinationSerializer;
864 impl AnalyticsS3BucketDestinationSerializer {
865     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &AnalyticsS3BucketDestination, ) -> Result<(), xml::writer::Error> where W: Write,866     pub fn serialize<W>(
867         mut writer: &mut EventWriter<W>,
868         name: &str,
869         obj: &AnalyticsS3BucketDestination,
870     ) -> Result<(), xml::writer::Error>
871     where
872         W: Write,
873     {
874         writer.write(xml::writer::XmlEvent::start_element(name))?;
875         write_characters_element(writer, "Bucket", &obj.bucket)?;
876         if let Some(ref value) = obj.bucket_account_id {
877             write_characters_element(writer, "BucketAccountId", &value)?;
878         }
879         write_characters_element(writer, "Format", &obj.format)?;
880         if let Some(ref value) = obj.prefix {
881             write_characters_element(writer, "Prefix", &value)?;
882         }
883         writer.write(xml::writer::XmlEvent::end_element())
884     }
885 }
886 
887 #[allow(dead_code)]
888 struct AnalyticsS3ExportFileFormatDeserializer;
889 impl AnalyticsS3ExportFileFormatDeserializer {
890     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>891     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
892         xml_util::deserialize_primitive(tag_name, stack, Ok)
893     }
894 }
895 
896 pub struct AnalyticsS3ExportFileFormatSerializer;
897 impl AnalyticsS3ExportFileFormatSerializer {
898     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,899     pub fn serialize<W>(
900         mut writer: &mut EventWriter<W>,
901         name: &str,
902         obj: &String,
903     ) -> Result<(), xml::writer::Error>
904     where
905         W: Write,
906     {
907         write_characters_element(writer, name, obj)
908     }
909 }
910 
911 pub type StreamingBody = ::rusoto_core::ByteStream;
912 #[allow(dead_code)]
913 struct BodyDeserializer;
914 impl BodyDeserializer {
915     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<bytes::Bytes, XmlParseError>916     fn deserialize<T: Peek + Next>(
917         tag_name: &str,
918         stack: &mut T,
919     ) -> Result<bytes::Bytes, XmlParseError> {
920         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(s.into()))
921     }
922 }
923 
924 pub struct BodySerializer;
925 impl BodySerializer {
926     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bytes::Bytes, ) -> Result<(), xml::writer::Error> where W: Write,927     pub fn serialize<W>(
928         mut writer: &mut EventWriter<W>,
929         name: &str,
930         obj: &bytes::Bytes,
931     ) -> Result<(), xml::writer::Error>
932     where
933         W: Write,
934     {
935         write_characters_element(
936             writer,
937             name,
938             std::str::from_utf8(obj).expect("Not a UTF-8 string"),
939         )
940     }
941 }
942 
943 /// <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>
944 #[derive(Clone, Debug, Default, PartialEq)]
945 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
946 pub struct Bucket {
947     /// <p>Date the bucket was created. This date can change when making changes to your bucket, such as editing its bucket policy.</p>
948     pub creation_date: Option<String>,
949     /// <p>The name of the bucket.</p>
950     pub name: Option<String>,
951 }
952 
953 #[allow(dead_code)]
954 struct BucketDeserializer;
955 impl BucketDeserializer {
956     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Bucket, XmlParseError>957     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Bucket, XmlParseError> {
958         deserialize_elements::<_, Bucket, _>(tag_name, stack, |name, stack, obj| {
959             match name {
960                 "CreationDate" => {
961                     obj.creation_date = Some(CreationDateDeserializer::deserialize(
962                         "CreationDate",
963                         stack,
964                     )?);
965                 }
966                 "Name" => {
967                     obj.name = Some(BucketNameDeserializer::deserialize("Name", stack)?);
968                 }
969                 _ => skip_tree(stack),
970             }
971             Ok(())
972         })
973     }
974 }
975 #[allow(dead_code)]
976 struct BucketAccelerateStatusDeserializer;
977 impl BucketAccelerateStatusDeserializer {
978     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>979     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
980         xml_util::deserialize_primitive(tag_name, stack, Ok)
981     }
982 }
983 
984 pub struct BucketAccelerateStatusSerializer;
985 impl BucketAccelerateStatusSerializer {
986     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,987     pub fn serialize<W>(
988         mut writer: &mut EventWriter<W>,
989         name: &str,
990         obj: &String,
991     ) -> Result<(), xml::writer::Error>
992     where
993         W: Write,
994     {
995         write_characters_element(writer, name, obj)
996     }
997 }
998 
999 #[allow(dead_code)]
1000 struct BucketKeyEnabledDeserializer;
1001 impl BucketKeyEnabledDeserializer {
1002     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>1003     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
1004         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
1005     }
1006 }
1007 
1008 pub struct BucketKeyEnabledSerializer;
1009 impl BucketKeyEnabledSerializer {
1010     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,1011     pub fn serialize<W>(
1012         mut writer: &mut EventWriter<W>,
1013         name: &str,
1014         obj: &bool,
1015     ) -> Result<(), xml::writer::Error>
1016     where
1017         W: Write,
1018     {
1019         write_characters_element(writer, name, &obj.to_string())
1020     }
1021 }
1022 
1023 /// <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 S3 User Guide</i>.</p>
1024 #[derive(Clone, Debug, Default, PartialEq)]
1025 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1026 pub struct BucketLifecycleConfiguration {
1027     /// <p>A lifecycle rule for individual objects in an Amazon S3 bucket.</p>
1028     pub rules: Vec<LifecycleRule>,
1029 }
1030 
1031 pub struct BucketLifecycleConfigurationSerializer;
1032 impl BucketLifecycleConfigurationSerializer {
1033     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &BucketLifecycleConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,1034     pub fn serialize<W>(
1035         mut writer: &mut EventWriter<W>,
1036         name: &str,
1037         obj: &BucketLifecycleConfiguration,
1038     ) -> Result<(), xml::writer::Error>
1039     where
1040         W: Write,
1041     {
1042         writer.write(xml::writer::XmlEvent::start_element(name))?;
1043         LifecycleRulesSerializer::serialize(&mut writer, "Rule", &obj.rules)?;
1044         writer.write(xml::writer::XmlEvent::end_element())
1045     }
1046 }
1047 
1048 #[allow(dead_code)]
1049 struct BucketLocationConstraintDeserializer;
1050 impl BucketLocationConstraintDeserializer {
1051     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1052     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1053         xml_util::deserialize_primitive(tag_name, stack, Ok)
1054     }
1055 }
1056 
1057 pub struct BucketLocationConstraintSerializer;
1058 impl BucketLocationConstraintSerializer {
1059     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1060     pub fn serialize<W>(
1061         mut writer: &mut EventWriter<W>,
1062         name: &str,
1063         obj: &String,
1064     ) -> Result<(), xml::writer::Error>
1065     where
1066         W: Write,
1067     {
1068         write_characters_element(writer, name, obj)
1069     }
1070 }
1071 
1072 /// <p>Container for logging status information.</p>
1073 #[derive(Clone, Debug, Default, PartialEq)]
1074 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1075 pub struct BucketLoggingStatus {
1076     pub logging_enabled: Option<LoggingEnabled>,
1077 }
1078 
1079 pub struct BucketLoggingStatusSerializer;
1080 impl BucketLoggingStatusSerializer {
1081     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &BucketLoggingStatus, ) -> Result<(), xml::writer::Error> where W: Write,1082     pub fn serialize<W>(
1083         mut writer: &mut EventWriter<W>,
1084         name: &str,
1085         obj: &BucketLoggingStatus,
1086     ) -> Result<(), xml::writer::Error>
1087     where
1088         W: Write,
1089     {
1090         writer.write(xml::writer::XmlEvent::start_element(name))?;
1091         if let Some(ref value) = obj.logging_enabled {
1092             &LoggingEnabledSerializer::serialize(&mut writer, "LoggingEnabled", value)?;
1093         }
1094         writer.write(xml::writer::XmlEvent::end_element())
1095     }
1096 }
1097 
1098 #[allow(dead_code)]
1099 struct BucketLogsPermissionDeserializer;
1100 impl BucketLogsPermissionDeserializer {
1101     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1102     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1103         xml_util::deserialize_primitive(tag_name, stack, Ok)
1104     }
1105 }
1106 
1107 pub struct BucketLogsPermissionSerializer;
1108 impl BucketLogsPermissionSerializer {
1109     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1110     pub fn serialize<W>(
1111         mut writer: &mut EventWriter<W>,
1112         name: &str,
1113         obj: &String,
1114     ) -> Result<(), xml::writer::Error>
1115     where
1116         W: Write,
1117     {
1118         write_characters_element(writer, name, obj)
1119     }
1120 }
1121 
1122 #[allow(dead_code)]
1123 struct BucketNameDeserializer;
1124 impl BucketNameDeserializer {
1125     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1126     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1127         xml_util::deserialize_primitive(tag_name, stack, Ok)
1128     }
1129 }
1130 
1131 pub struct BucketNameSerializer;
1132 impl BucketNameSerializer {
1133     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1134     pub fn serialize<W>(
1135         mut writer: &mut EventWriter<W>,
1136         name: &str,
1137         obj: &String,
1138     ) -> Result<(), xml::writer::Error>
1139     where
1140         W: Write,
1141     {
1142         write_characters_element(writer, name, obj)
1143     }
1144 }
1145 
1146 #[allow(dead_code)]
1147 struct BucketVersioningStatusDeserializer;
1148 impl BucketVersioningStatusDeserializer {
1149     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1150     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1151         xml_util::deserialize_primitive(tag_name, stack, Ok)
1152     }
1153 }
1154 
1155 pub struct BucketVersioningStatusSerializer;
1156 impl BucketVersioningStatusSerializer {
1157     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1158     pub fn serialize<W>(
1159         mut writer: &mut EventWriter<W>,
1160         name: &str,
1161         obj: &String,
1162     ) -> Result<(), xml::writer::Error>
1163     where
1164         W: Write,
1165     {
1166         write_characters_element(writer, name, obj)
1167     }
1168 }
1169 
1170 #[allow(dead_code)]
1171 struct BucketsDeserializer;
1172 impl BucketsDeserializer {
1173     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Bucket>, XmlParseError>1174     fn deserialize<T: Peek + Next>(
1175         tag_name: &str,
1176         stack: &mut T,
1177     ) -> Result<Vec<Bucket>, XmlParseError> {
1178         deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
1179             if name == "Bucket" {
1180                 obj.push(BucketDeserializer::deserialize("Bucket", stack)?);
1181             } else {
1182                 skip_tree(stack);
1183             }
1184             Ok(())
1185         })
1186     }
1187 }
1188 #[allow(dead_code)]
1189 struct BytesProcessedDeserializer;
1190 impl BytesProcessedDeserializer {
1191     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>1192     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
1193         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
1194     }
1195 }
1196 #[allow(dead_code)]
1197 struct BytesReturnedDeserializer;
1198 impl BytesReturnedDeserializer {
1199     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>1200     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
1201         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
1202     }
1203 }
1204 #[allow(dead_code)]
1205 struct BytesScannedDeserializer;
1206 impl BytesScannedDeserializer {
1207     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>1208     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
1209         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
1210     }
1211 }
1212 /// <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 S3 User Guide</i>.</p>
1213 #[derive(Clone, Debug, Default, PartialEq)]
1214 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1215 pub struct CORSConfiguration {
1216     /// <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>
1217     pub cors_rules: Vec<CORSRule>,
1218 }
1219 
1220 pub struct CORSConfigurationSerializer;
1221 impl CORSConfigurationSerializer {
1222     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CORSConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,1223     pub fn serialize<W>(
1224         mut writer: &mut EventWriter<W>,
1225         name: &str,
1226         obj: &CORSConfiguration,
1227     ) -> Result<(), xml::writer::Error>
1228     where
1229         W: Write,
1230     {
1231         writer.write(xml::writer::XmlEvent::start_element(name))?;
1232         CORSRulesSerializer::serialize(&mut writer, "CORSRule", &obj.cors_rules)?;
1233         writer.write(xml::writer::XmlEvent::end_element())
1234     }
1235 }
1236 
1237 /// <p>Specifies a cross-origin access rule for an Amazon S3 bucket.</p>
1238 #[derive(Clone, Debug, Default, PartialEq)]
1239 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1240 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1241 pub struct CORSRule {
1242     /// <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>
1243     pub allowed_headers: Option<Vec<String>>,
1244     /// <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>
1245     pub allowed_methods: Vec<String>,
1246     /// <p>One or more origins you want customers to be able to access the bucket from.</p>
1247     pub allowed_origins: Vec<String>,
1248     /// <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>
1249     pub expose_headers: Option<Vec<String>>,
1250     /// <p>Unique identifier for the rule. The value cannot be longer than 255 characters.</p>
1251     pub id: Option<String>,
1252     /// <p>The time in seconds that your browser is to cache the preflight response for the specified resource.</p>
1253     pub max_age_seconds: Option<i64>,
1254 }
1255 
1256 #[allow(dead_code)]
1257 struct CORSRuleDeserializer;
1258 impl CORSRuleDeserializer {
1259     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CORSRule, XmlParseError>1260     fn deserialize<T: Peek + Next>(
1261         tag_name: &str,
1262         stack: &mut T,
1263     ) -> Result<CORSRule, XmlParseError> {
1264         deserialize_elements::<_, CORSRule, _>(tag_name, stack, |name, stack, obj| {
1265             match name {
1266                 "AllowedHeader" => {
1267                     obj.allowed_headers.get_or_insert(vec![]).extend(
1268                         AllowedHeadersDeserializer::deserialize("AllowedHeader", stack)?,
1269                     );
1270                 }
1271                 "AllowedMethod" => {
1272                     obj.allowed_methods
1273                         .extend(AllowedMethodsDeserializer::deserialize(
1274                             "AllowedMethod",
1275                             stack,
1276                         )?);
1277                 }
1278                 "AllowedOrigin" => {
1279                     obj.allowed_origins
1280                         .extend(AllowedOriginsDeserializer::deserialize(
1281                             "AllowedOrigin",
1282                             stack,
1283                         )?);
1284                 }
1285                 "ExposeHeader" => {
1286                     obj.expose_headers.get_or_insert(vec![]).extend(
1287                         ExposeHeadersDeserializer::deserialize("ExposeHeader", stack)?,
1288                     );
1289                 }
1290                 "ID" => {
1291                     obj.id = Some(IDDeserializer::deserialize("ID", stack)?);
1292                 }
1293                 "MaxAgeSeconds" => {
1294                     obj.max_age_seconds = Some(MaxAgeSecondsDeserializer::deserialize(
1295                         "MaxAgeSeconds",
1296                         stack,
1297                     )?);
1298                 }
1299                 _ => skip_tree(stack),
1300             }
1301             Ok(())
1302         })
1303     }
1304 }
1305 
1306 pub struct CORSRuleSerializer;
1307 impl CORSRuleSerializer {
1308     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CORSRule, ) -> Result<(), xml::writer::Error> where W: Write,1309     pub fn serialize<W>(
1310         mut writer: &mut EventWriter<W>,
1311         name: &str,
1312         obj: &CORSRule,
1313     ) -> Result<(), xml::writer::Error>
1314     where
1315         W: Write,
1316     {
1317         writer.write(xml::writer::XmlEvent::start_element(name))?;
1318         if let Some(ref value) = obj.allowed_headers {
1319             &AllowedHeadersSerializer::serialize(&mut writer, "AllowedHeader", value)?;
1320         }
1321         AllowedMethodsSerializer::serialize(&mut writer, "AllowedMethod", &obj.allowed_methods)?;
1322         AllowedOriginsSerializer::serialize(&mut writer, "AllowedOrigin", &obj.allowed_origins)?;
1323         if let Some(ref value) = obj.expose_headers {
1324             &ExposeHeadersSerializer::serialize(&mut writer, "ExposeHeader", value)?;
1325         }
1326         if let Some(ref value) = obj.id {
1327             write_characters_element(writer, "ID", &value)?;
1328         }
1329         if let Some(ref value) = obj.max_age_seconds {
1330             write_characters_element(writer, "MaxAgeSeconds", &value.to_string())?;
1331         }
1332         writer.write(xml::writer::XmlEvent::end_element())
1333     }
1334 }
1335 
1336 #[allow(dead_code)]
1337 struct CORSRulesDeserializer;
1338 impl CORSRulesDeserializer {
1339     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<CORSRule>, XmlParseError>1340     fn deserialize<T: Peek + Next>(
1341         tag_name: &str,
1342         stack: &mut T,
1343     ) -> Result<Vec<CORSRule>, XmlParseError> {
1344         let mut obj = vec![];
1345 
1346         loop {
1347             let consume_next_tag = match stack.peek() {
1348                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
1349                     name.local_name == tag_name
1350                 }
1351                 _ => false,
1352             };
1353 
1354             if consume_next_tag {
1355                 obj.push(CORSRuleDeserializer::deserialize(tag_name, stack)?);
1356             } else {
1357                 break;
1358             }
1359         }
1360 
1361         Ok(obj)
1362     }
1363 }
1364 
1365 pub struct CORSRulesSerializer;
1366 impl CORSRulesSerializer {
1367     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<CORSRule>, ) -> Result<(), xml::writer::Error> where W: Write,1368     pub fn serialize<W>(
1369         mut writer: &mut EventWriter<W>,
1370         name: &str,
1371         obj: &Vec<CORSRule>,
1372     ) -> Result<(), xml::writer::Error>
1373     where
1374         W: Write,
1375     {
1376         for element in obj {
1377             CORSRuleSerializer::serialize(writer, name, element)?;
1378         }
1379         Ok(())
1380     }
1381 }
1382 
1383 /// <p>Describes how an uncompressed comma-separated values (CSV)-formatted input object is formatted.</p>
1384 #[derive(Clone, Debug, Default, PartialEq)]
1385 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1386 pub struct CSVInput {
1387     /// <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>
1388     pub allow_quoted_record_delimiter: Option<bool>,
1389     /// <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>
1390     pub comments: Option<String>,
1391     /// <p>A single character used to separate individual fields in a record. You can specify an arbitrary delimiter.</p>
1392     pub field_delimiter: Option<String>,
1393     /// <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>
1394     pub file_header_info: Option<String>,
1395     /// <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>
1396     pub quote_character: Option<String>,
1397     /// <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>
1398     pub quote_escape_character: Option<String>,
1399     /// <p>A single character used to separate individual records in the input. Instead of the default value, you can specify an arbitrary delimiter.</p>
1400     pub record_delimiter: Option<String>,
1401 }
1402 
1403 pub struct CSVInputSerializer;
1404 impl CSVInputSerializer {
1405     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CSVInput, ) -> Result<(), xml::writer::Error> where W: Write,1406     pub fn serialize<W>(
1407         mut writer: &mut EventWriter<W>,
1408         name: &str,
1409         obj: &CSVInput,
1410     ) -> Result<(), xml::writer::Error>
1411     where
1412         W: Write,
1413     {
1414         writer.write(xml::writer::XmlEvent::start_element(name))?;
1415         if let Some(ref value) = obj.allow_quoted_record_delimiter {
1416             write_characters_element(writer, "AllowQuotedRecordDelimiter", &value.to_string())?;
1417         }
1418         if let Some(ref value) = obj.comments {
1419             write_characters_element(writer, "Comments", &value)?;
1420         }
1421         if let Some(ref value) = obj.field_delimiter {
1422             write_characters_element(writer, "FieldDelimiter", &value)?;
1423         }
1424         if let Some(ref value) = obj.file_header_info {
1425             write_characters_element(writer, "FileHeaderInfo", &value)?;
1426         }
1427         if let Some(ref value) = obj.quote_character {
1428             write_characters_element(writer, "QuoteCharacter", &value)?;
1429         }
1430         if let Some(ref value) = obj.quote_escape_character {
1431             write_characters_element(writer, "QuoteEscapeCharacter", &value)?;
1432         }
1433         if let Some(ref value) = obj.record_delimiter {
1434             write_characters_element(writer, "RecordDelimiter", &value)?;
1435         }
1436         writer.write(xml::writer::XmlEvent::end_element())
1437     }
1438 }
1439 
1440 /// <p>Describes how uncompressed comma-separated values (CSV)-formatted results are formatted.</p>
1441 #[derive(Clone, Debug, Default, PartialEq)]
1442 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1443 pub struct CSVOutput {
1444     /// <p>The value used to separate individual fields in a record. You can specify an arbitrary delimiter.</p>
1445     pub field_delimiter: Option<String>,
1446     /// <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>
1447     pub quote_character: Option<String>,
1448     /// <p>The single character used for escaping the quote character inside an already escaped value.</p>
1449     pub quote_escape_character: Option<String>,
1450     /// <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>
1451     pub quote_fields: Option<String>,
1452     /// <p>A single character used to separate individual records in the output. Instead of the default value, you can specify an arbitrary delimiter.</p>
1453     pub record_delimiter: Option<String>,
1454 }
1455 
1456 pub struct CSVOutputSerializer;
1457 impl CSVOutputSerializer {
1458     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CSVOutput, ) -> Result<(), xml::writer::Error> where W: Write,1459     pub fn serialize<W>(
1460         mut writer: &mut EventWriter<W>,
1461         name: &str,
1462         obj: &CSVOutput,
1463     ) -> Result<(), xml::writer::Error>
1464     where
1465         W: Write,
1466     {
1467         writer.write(xml::writer::XmlEvent::start_element(name))?;
1468         if let Some(ref value) = obj.field_delimiter {
1469             write_characters_element(writer, "FieldDelimiter", &value)?;
1470         }
1471         if let Some(ref value) = obj.quote_character {
1472             write_characters_element(writer, "QuoteCharacter", &value)?;
1473         }
1474         if let Some(ref value) = obj.quote_escape_character {
1475             write_characters_element(writer, "QuoteEscapeCharacter", &value)?;
1476         }
1477         if let Some(ref value) = obj.quote_fields {
1478             write_characters_element(writer, "QuoteFields", &value)?;
1479         }
1480         if let Some(ref value) = obj.record_delimiter {
1481             write_characters_element(writer, "RecordDelimiter", &value)?;
1482         }
1483         writer.write(xml::writer::XmlEvent::end_element())
1484     }
1485 }
1486 
1487 #[allow(dead_code)]
1488 struct CloudFunctionDeserializer;
1489 impl CloudFunctionDeserializer {
1490     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1491     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1492         xml_util::deserialize_primitive(tag_name, stack, Ok)
1493     }
1494 }
1495 
1496 pub struct CloudFunctionSerializer;
1497 impl CloudFunctionSerializer {
1498     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1499     pub fn serialize<W>(
1500         mut writer: &mut EventWriter<W>,
1501         name: &str,
1502         obj: &String,
1503     ) -> Result<(), xml::writer::Error>
1504     where
1505         W: Write,
1506     {
1507         write_characters_element(writer, name, obj)
1508     }
1509 }
1510 
1511 /// <p>Container for specifying the AWS Lambda notification configuration.</p>
1512 #[derive(Clone, Debug, Default, PartialEq)]
1513 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1514 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1515 pub struct CloudFunctionConfiguration {
1516     /// <p>Lambda cloud function ARN that Amazon S3 can invoke when it detects events of the specified type.</p>
1517     pub cloud_function: Option<String>,
1518     /// <p>Bucket events for which to send notifications.</p>
1519     pub events: Option<Vec<String>>,
1520     pub id: Option<String>,
1521     /// <p>The role supporting the invocation of the Lambda function</p>
1522     pub invocation_role: Option<String>,
1523 }
1524 
1525 #[allow(dead_code)]
1526 struct CloudFunctionConfigurationDeserializer;
1527 impl CloudFunctionConfigurationDeserializer {
1528     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CloudFunctionConfiguration, XmlParseError>1529     fn deserialize<T: Peek + Next>(
1530         tag_name: &str,
1531         stack: &mut T,
1532     ) -> Result<CloudFunctionConfiguration, XmlParseError> {
1533         deserialize_elements::<_, CloudFunctionConfiguration, _>(
1534             tag_name,
1535             stack,
1536             |name, stack, obj| {
1537                 match name {
1538                     "CloudFunction" => {
1539                         obj.cloud_function = Some(CloudFunctionDeserializer::deserialize(
1540                             "CloudFunction",
1541                             stack,
1542                         )?);
1543                     }
1544                     "Event" => {
1545                         obj.events
1546                             .get_or_insert(vec![])
1547                             .extend(EventListDeserializer::deserialize("Event", stack)?);
1548                     }
1549                     "Id" => {
1550                         obj.id = Some(NotificationIdDeserializer::deserialize("Id", stack)?);
1551                     }
1552                     "InvocationRole" => {
1553                         obj.invocation_role =
1554                             Some(CloudFunctionInvocationRoleDeserializer::deserialize(
1555                                 "InvocationRole",
1556                                 stack,
1557                             )?);
1558                     }
1559                     _ => skip_tree(stack),
1560                 }
1561                 Ok(())
1562             },
1563         )
1564     }
1565 }
1566 
1567 pub struct CloudFunctionConfigurationSerializer;
1568 impl CloudFunctionConfigurationSerializer {
1569     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CloudFunctionConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,1570     pub fn serialize<W>(
1571         mut writer: &mut EventWriter<W>,
1572         name: &str,
1573         obj: &CloudFunctionConfiguration,
1574     ) -> Result<(), xml::writer::Error>
1575     where
1576         W: Write,
1577     {
1578         writer.write(xml::writer::XmlEvent::start_element(name))?;
1579         if let Some(ref value) = obj.cloud_function {
1580             write_characters_element(writer, "CloudFunction", &value)?;
1581         }
1582         if let Some(ref value) = obj.events {
1583             &EventListSerializer::serialize(&mut writer, "Event", value)?;
1584         }
1585         if let Some(ref value) = obj.id {
1586             write_characters_element(writer, "Id", &value)?;
1587         }
1588         if let Some(ref value) = obj.invocation_role {
1589             write_characters_element(writer, "InvocationRole", &value)?;
1590         }
1591         writer.write(xml::writer::XmlEvent::end_element())
1592     }
1593 }
1594 
1595 #[allow(dead_code)]
1596 struct CloudFunctionInvocationRoleDeserializer;
1597 impl CloudFunctionInvocationRoleDeserializer {
1598     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1599     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1600         xml_util::deserialize_primitive(tag_name, stack, Ok)
1601     }
1602 }
1603 
1604 pub struct CloudFunctionInvocationRoleSerializer;
1605 impl CloudFunctionInvocationRoleSerializer {
1606     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1607     pub fn serialize<W>(
1608         mut writer: &mut EventWriter<W>,
1609         name: &str,
1610         obj: &String,
1611     ) -> Result<(), xml::writer::Error>
1612     where
1613         W: Write,
1614     {
1615         write_characters_element(writer, name, obj)
1616     }
1617 }
1618 
1619 #[allow(dead_code)]
1620 struct CodeDeserializer;
1621 impl CodeDeserializer {
1622     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>1623     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1624         xml_util::deserialize_primitive(tag_name, stack, Ok)
1625     }
1626 }
1627 
1628 pub struct CommentsSerializer;
1629 impl CommentsSerializer {
1630     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1631     pub fn serialize<W>(
1632         mut writer: &mut EventWriter<W>,
1633         name: &str,
1634         obj: &String,
1635     ) -> Result<(), xml::writer::Error>
1636     where
1637         W: Write,
1638     {
1639         write_characters_element(writer, name, obj)
1640     }
1641 }
1642 
1643 /// <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>
1644 #[derive(Clone, Debug, Default, PartialEq)]
1645 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1646 pub struct CommonPrefix {
1647     /// <p>Container for the specified common prefix.</p>
1648     pub prefix: Option<String>,
1649 }
1650 
1651 #[allow(dead_code)]
1652 struct CommonPrefixDeserializer;
1653 impl CommonPrefixDeserializer {
1654     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CommonPrefix, XmlParseError>1655     fn deserialize<T: Peek + Next>(
1656         tag_name: &str,
1657         stack: &mut T,
1658     ) -> Result<CommonPrefix, XmlParseError> {
1659         deserialize_elements::<_, CommonPrefix, _>(tag_name, stack, |name, stack, obj| {
1660             match name {
1661                 "Prefix" => {
1662                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
1663                 }
1664                 _ => skip_tree(stack),
1665             }
1666             Ok(())
1667         })
1668     }
1669 }
1670 #[allow(dead_code)]
1671 struct CommonPrefixListDeserializer;
1672 impl CommonPrefixListDeserializer {
1673     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<CommonPrefix>, XmlParseError>1674     fn deserialize<T: Peek + Next>(
1675         tag_name: &str,
1676         stack: &mut T,
1677     ) -> Result<Vec<CommonPrefix>, XmlParseError> {
1678         let mut obj = vec![];
1679 
1680         loop {
1681             let consume_next_tag = match stack.peek() {
1682                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
1683                     name.local_name == tag_name
1684                 }
1685                 _ => false,
1686             };
1687 
1688             if consume_next_tag {
1689                 obj.push(CommonPrefixDeserializer::deserialize(tag_name, stack)?);
1690             } else {
1691                 break;
1692             }
1693         }
1694 
1695         Ok(obj)
1696     }
1697 }
1698 #[derive(Clone, Debug, Default, PartialEq)]
1699 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1700 pub struct CompleteMultipartUploadOutput {
1701     /// <p>The name of the bucket that contains the newly created object.</p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
1702     pub bucket: Option<String>,
1703     /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with AWS KMS (SSE-KMS).</p>
1704     pub bucket_key_enabled: Option<bool>,
1705     /// <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>
1706     pub e_tag: Option<String>,
1707     /// <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>
1708     pub expiration: Option<String>,
1709     /// <p>The object key of the newly created object.</p>
1710     pub key: Option<String>,
1711     /// <p>The URI that identifies the newly created object.</p>
1712     pub location: Option<String>,
1713     pub request_charged: Option<String>,
1714     /// <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>
1715     pub ssekms_key_id: Option<String>,
1716     /// <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>
1717     pub server_side_encryption: Option<String>,
1718     /// <p>Version ID of the newly created object, in case the bucket has versioning turned on.</p>
1719     pub version_id: Option<String>,
1720 }
1721 
1722 #[allow(dead_code)]
1723 struct CompleteMultipartUploadOutputDeserializer;
1724 impl CompleteMultipartUploadOutputDeserializer {
1725     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CompleteMultipartUploadOutput, XmlParseError>1726     fn deserialize<T: Peek + Next>(
1727         tag_name: &str,
1728         stack: &mut T,
1729     ) -> Result<CompleteMultipartUploadOutput, XmlParseError> {
1730         deserialize_elements::<_, CompleteMultipartUploadOutput, _>(
1731             tag_name,
1732             stack,
1733             |name, stack, obj| {
1734                 match name {
1735                     "Bucket" => {
1736                         obj.bucket = Some(BucketNameDeserializer::deserialize("Bucket", stack)?);
1737                     }
1738                     "ETag" => {
1739                         obj.e_tag = Some(ETagDeserializer::deserialize("ETag", stack)?);
1740                     }
1741                     "Key" => {
1742                         obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
1743                     }
1744                     "Location" => {
1745                         obj.location = Some(LocationDeserializer::deserialize("Location", stack)?);
1746                     }
1747                     _ => skip_tree(stack),
1748                 }
1749                 Ok(())
1750             },
1751         )
1752     }
1753 }
1754 #[derive(Clone, Debug, Default, PartialEq)]
1755 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1756 pub struct CompleteMultipartUploadRequest {
1757     /// <p>Name of the bucket to which the multipart upload was initiated.</p>
1758     pub bucket: String,
1759     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
1760     pub expected_bucket_owner: Option<String>,
1761     /// <p>Object key for which the multipart upload was initiated.</p>
1762     pub key: String,
1763     /// <p>The container for the multipart upload request information.</p>
1764     pub multipart_upload: Option<CompletedMultipartUpload>,
1765     pub request_payer: Option<String>,
1766     /// <p>ID for the initiated multipart upload.</p>
1767     pub upload_id: String,
1768 }
1769 
1770 /// <p>The container for the completed multipart upload details.</p>
1771 #[derive(Clone, Debug, Default, PartialEq)]
1772 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1773 pub struct CompletedMultipartUpload {
1774     /// <p>Array of CompletedPart data types.</p>
1775     pub parts: Option<Vec<CompletedPart>>,
1776 }
1777 
1778 pub struct CompletedMultipartUploadSerializer;
1779 impl CompletedMultipartUploadSerializer {
1780     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CompletedMultipartUpload, ) -> Result<(), xml::writer::Error> where W: Write,1781     pub fn serialize<W>(
1782         mut writer: &mut EventWriter<W>,
1783         name: &str,
1784         obj: &CompletedMultipartUpload,
1785     ) -> Result<(), xml::writer::Error>
1786     where
1787         W: Write,
1788     {
1789         writer.write(xml::writer::XmlEvent::start_element(name))?;
1790         if let Some(ref value) = obj.parts {
1791             &CompletedPartListSerializer::serialize(&mut writer, "Part", value)?;
1792         }
1793         writer.write(xml::writer::XmlEvent::end_element())
1794     }
1795 }
1796 
1797 /// <p>Details of the parts that were uploaded.</p>
1798 #[derive(Clone, Debug, Default, PartialEq)]
1799 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1800 pub struct CompletedPart {
1801     /// <p>Entity tag returned when the part was uploaded.</p>
1802     pub e_tag: Option<String>,
1803     /// <p>Part number that identifies the part. This is a positive integer between 1 and 10,000.</p>
1804     pub part_number: Option<i64>,
1805 }
1806 
1807 pub struct CompletedPartSerializer;
1808 impl CompletedPartSerializer {
1809     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CompletedPart, ) -> Result<(), xml::writer::Error> where W: Write,1810     pub fn serialize<W>(
1811         mut writer: &mut EventWriter<W>,
1812         name: &str,
1813         obj: &CompletedPart,
1814     ) -> Result<(), xml::writer::Error>
1815     where
1816         W: Write,
1817     {
1818         writer.write(xml::writer::XmlEvent::start_element(name))?;
1819         if let Some(ref value) = obj.e_tag {
1820             write_characters_element(writer, "ETag", &value)?;
1821         }
1822         if let Some(ref value) = obj.part_number {
1823             write_characters_element(writer, "PartNumber", &value.to_string())?;
1824         }
1825         writer.write(xml::writer::XmlEvent::end_element())
1826     }
1827 }
1828 
1829 pub struct CompletedPartListSerializer;
1830 impl CompletedPartListSerializer {
1831     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<CompletedPart>, ) -> Result<(), xml::writer::Error> where W: Write,1832     pub fn serialize<W>(
1833         mut writer: &mut EventWriter<W>,
1834         name: &str,
1835         obj: &Vec<CompletedPart>,
1836     ) -> Result<(), xml::writer::Error>
1837     where
1838         W: Write,
1839     {
1840         for element in obj {
1841             CompletedPartSerializer::serialize(writer, name, element)?;
1842         }
1843         Ok(())
1844     }
1845 }
1846 
1847 pub struct CompressionTypeSerializer;
1848 impl CompressionTypeSerializer {
1849     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,1850     pub fn serialize<W>(
1851         mut writer: &mut EventWriter<W>,
1852         name: &str,
1853         obj: &String,
1854     ) -> Result<(), xml::writer::Error>
1855     where
1856         W: Write,
1857     {
1858         write_characters_element(writer, name, obj)
1859     }
1860 }
1861 
1862 /// <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>
1863 #[derive(Clone, Debug, Default, PartialEq)]
1864 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1865 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1866 pub struct Condition {
1867     /// <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>
1868     pub http_error_code_returned_equals: Option<String>,
1869     /// <p><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> <important> <p>Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints"> XML related object key constraints</a>.</p> </important></p>
1870     pub key_prefix_equals: Option<String>,
1871 }
1872 
1873 #[allow(dead_code)]
1874 struct ConditionDeserializer;
1875 impl ConditionDeserializer {
1876     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Condition, XmlParseError>1877     fn deserialize<T: Peek + Next>(
1878         tag_name: &str,
1879         stack: &mut T,
1880     ) -> Result<Condition, XmlParseError> {
1881         deserialize_elements::<_, Condition, _>(tag_name, stack, |name, stack, obj| {
1882             match name {
1883                 "HttpErrorCodeReturnedEquals" => {
1884                     obj.http_error_code_returned_equals =
1885                         Some(HttpErrorCodeReturnedEqualsDeserializer::deserialize(
1886                             "HttpErrorCodeReturnedEquals",
1887                             stack,
1888                         )?);
1889                 }
1890                 "KeyPrefixEquals" => {
1891                     obj.key_prefix_equals = Some(KeyPrefixEqualsDeserializer::deserialize(
1892                         "KeyPrefixEquals",
1893                         stack,
1894                     )?);
1895                 }
1896                 _ => skip_tree(stack),
1897             }
1898             Ok(())
1899         })
1900     }
1901 }
1902 
1903 pub struct ConditionSerializer;
1904 impl ConditionSerializer {
1905     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Condition, ) -> Result<(), xml::writer::Error> where W: Write,1906     pub fn serialize<W>(
1907         mut writer: &mut EventWriter<W>,
1908         name: &str,
1909         obj: &Condition,
1910     ) -> Result<(), xml::writer::Error>
1911     where
1912         W: Write,
1913     {
1914         writer.write(xml::writer::XmlEvent::start_element(name))?;
1915         if let Some(ref value) = obj.http_error_code_returned_equals {
1916             write_characters_element(writer, "HttpErrorCodeReturnedEquals", &value)?;
1917         }
1918         if let Some(ref value) = obj.key_prefix_equals {
1919             write_characters_element(writer, "KeyPrefixEquals", &value)?;
1920         }
1921         writer.write(xml::writer::XmlEvent::end_element())
1922     }
1923 }
1924 
1925 /// <p><p/></p>
1926 #[derive(Clone, Debug, Default, PartialEq)]
1927 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1928 pub struct ContinuationEvent {}
1929 
1930 #[allow(dead_code)]
1931 struct ContinuationEventDeserializer;
1932 impl ContinuationEventDeserializer {
1933     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ContinuationEvent, XmlParseError>1934     fn deserialize<T: Peek + Next>(
1935         tag_name: &str,
1936         stack: &mut T,
1937     ) -> Result<ContinuationEvent, XmlParseError> {
1938         xml_util::start_element(tag_name, stack)?;
1939 
1940         let obj = ContinuationEvent::default();
1941 
1942         xml_util::end_element(tag_name, stack)?;
1943 
1944         Ok(obj)
1945     }
1946 }
1947 #[derive(Clone, Debug, Default, PartialEq)]
1948 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1949 pub struct CopyObjectOutput {
1950     /// <p>Indicates whether the copied object uses an S3 Bucket Key for server-side encryption with AWS KMS (SSE-KMS).</p>
1951     pub bucket_key_enabled: Option<bool>,
1952     /// <p>Container for all response elements.</p>
1953     pub copy_object_result: Option<CopyObjectResult>,
1954     /// <p>Version of the copied object in the destination bucket.</p>
1955     pub copy_source_version_id: Option<String>,
1956     /// <p>If the object expiration is configured, the response includes this header.</p>
1957     pub expiration: Option<String>,
1958     pub request_charged: Option<String>,
1959     /// <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>
1960     pub sse_customer_algorithm: Option<String>,
1961     /// <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>
1962     pub sse_customer_key_md5: Option<String>,
1963     /// <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>
1964     pub ssekms_encryption_context: Option<String>,
1965     /// <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>
1966     pub ssekms_key_id: Option<String>,
1967     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
1968     pub server_side_encryption: Option<String>,
1969     /// <p>Version ID of the newly created copy.</p>
1970     pub version_id: Option<String>,
1971 }
1972 
1973 #[allow(dead_code)]
1974 struct CopyObjectOutputDeserializer;
1975 impl CopyObjectOutputDeserializer {
1976     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CopyObjectOutput, XmlParseError>1977     fn deserialize<T: Peek + Next>(
1978         tag_name: &str,
1979         stack: &mut T,
1980     ) -> Result<CopyObjectOutput, XmlParseError> {
1981         Ok(CopyObjectOutput {
1982             copy_object_result: Some(CopyObjectResultDeserializer::deserialize(
1983                 "CopyObjectResult",
1984                 stack,
1985             )?),
1986             ..CopyObjectOutput::default()
1987         })
1988     }
1989 }
1990 #[derive(Clone, Debug, Default, PartialEq)]
1991 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1992 pub struct CopyObjectRequest {
1993     /// <p>The canned ACL to apply to the object.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
1994     pub acl: Option<String>,
1995     /// <p>The name of the destination bucket.</p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
1996     pub bucket: String,
1997     /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using AWS KMS (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. </p> <p>Specifying this header with a COPY action doesn’t affect bucket-level settings for S3 Bucket Key.</p>
1998     pub bucket_key_enabled: Option<bool>,
1999     /// <p>Specifies caching behavior along the request/reply chain.</p>
2000     pub cache_control: Option<String>,
2001     /// <p>Specifies presentational information for the object.</p>
2002     pub content_disposition: Option<String>,
2003     /// <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>
2004     pub content_encoding: Option<String>,
2005     /// <p>The language the content is in.</p>
2006     pub content_language: Option<String>,
2007     /// <p>A standard MIME type describing the format of the object data.</p>
2008     pub content_type: Option<String>,
2009     /// <p>Specifies the source object for the copy operation. You specify the value in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p> <ul> <li> <p>For objects not accessed through an access point, specify the name of the source bucket and the key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL encoded.</p> </li> <li> <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:&lt;Region&gt;:&lt;account-id&gt;:accesspoint/&lt;access-point-name&gt;/object/&lt;key&gt;</code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p> <note> <p>Amazon S3 supports copy operations using access points only when the source and destination buckets are in the same AWS Region.</p> </note> <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:&lt;Region&gt;:&lt;account-id&gt;:outpost/&lt;outpost-id&gt;/object/&lt;key&gt;</code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL encoded. </p> </li> </ul> <p>To copy a specific version of an object, append <code>?versionId=&lt;version-id&gt;</code> to the value (for example, <code>awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>). If you don't specify a version ID, Amazon S3 copies the latest version of the source object.</p>
2010     pub copy_source: String,
2011     /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
2012     pub copy_source_if_match: Option<String>,
2013     /// <p>Copies the object if it has been modified since the specified time.</p>
2014     pub copy_source_if_modified_since: Option<String>,
2015     /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
2016     pub copy_source_if_none_match: Option<String>,
2017     /// <p>Copies the object if it hasn't been modified since the specified time.</p>
2018     pub copy_source_if_unmodified_since: Option<String>,
2019     /// <p>Specifies the algorithm to use when decrypting the source object (for example, AES256).</p>
2020     pub copy_source_sse_customer_algorithm: Option<String>,
2021     /// <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>
2022     pub copy_source_sse_customer_key: Option<String>,
2023     /// <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>
2024     pub copy_source_sse_customer_key_md5: Option<String>,
2025     /// <p>The account ID of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2026     pub expected_bucket_owner: Option<String>,
2027     /// <p>The account ID of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2028     pub expected_source_bucket_owner: Option<String>,
2029     /// <p>The date and time at which the object is no longer cacheable.</p>
2030     pub expires: Option<String>,
2031     /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
2032     pub grant_full_control: Option<String>,
2033     /// <p>Allows grantee to read the object data and its metadata.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
2034     pub grant_read: Option<String>,
2035     /// <p>Allows grantee to read the object ACL.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
2036     pub grant_read_acp: Option<String>,
2037     /// <p>Allows grantee to write the ACL for the applicable object.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
2038     pub grant_write_acp: Option<String>,
2039     /// <p>The key of the destination object.</p>
2040     pub key: String,
2041     /// <p>A map of metadata to store with the object in S3.</p>
2042     pub metadata: Option<::std::collections::HashMap<String, String>>,
2043     /// <p>Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request.</p>
2044     pub metadata_directive: Option<String>,
2045     /// <p>Specifies whether you want to apply a Legal Hold to the copied object.</p>
2046     pub object_lock_legal_hold_status: Option<String>,
2047     /// <p>The Object Lock mode that you want to apply to the copied object.</p>
2048     pub object_lock_mode: Option<String>,
2049     /// <p>The date and time when you want the copied object's Object Lock to expire.</p>
2050     pub object_lock_retain_until_date: Option<String>,
2051     pub request_payer: Option<String>,
2052     /// <p>Specifies the algorithm to use to when encrypting the object (for example, AES256).</p>
2053     pub sse_customer_algorithm: Option<String>,
2054     /// <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>
2055     pub sse_customer_key: Option<String>,
2056     /// <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>
2057     pub sse_customer_key_md5: Option<String>,
2058     /// <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>
2059     pub ssekms_encryption_context: Option<String>,
2060     /// <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 User Guide</i>.</p>
2061     pub ssekms_key_id: Option<String>,
2062     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
2063     pub server_side_encryption: Option<String>,
2064     /// <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. Depending on performance needs, you can specify a different Storage Class. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p>
2065     pub storage_class: Option<String>,
2066     /// <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>
2067     pub tagging: Option<String>,
2068     /// <p>Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request.</p>
2069     pub tagging_directive: Option<String>,
2070     /// <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>
2071     pub website_redirect_location: Option<String>,
2072 }
2073 
2074 /// <p>Container for all response elements.</p>
2075 #[derive(Clone, Debug, Default, PartialEq)]
2076 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2077 pub struct CopyObjectResult {
2078     /// <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 non-multipart object.</p>
2079     pub e_tag: Option<String>,
2080     /// <p>Creation date of the object.</p>
2081     pub last_modified: Option<String>,
2082 }
2083 
2084 #[allow(dead_code)]
2085 struct CopyObjectResultDeserializer;
2086 impl CopyObjectResultDeserializer {
2087     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CopyObjectResult, XmlParseError>2088     fn deserialize<T: Peek + Next>(
2089         tag_name: &str,
2090         stack: &mut T,
2091     ) -> Result<CopyObjectResult, XmlParseError> {
2092         deserialize_elements::<_, CopyObjectResult, _>(tag_name, stack, |name, stack, obj| {
2093             match name {
2094                 "ETag" => {
2095                     obj.e_tag = Some(ETagDeserializer::deserialize("ETag", stack)?);
2096                 }
2097                 "LastModified" => {
2098                     obj.last_modified = Some(LastModifiedDeserializer::deserialize(
2099                         "LastModified",
2100                         stack,
2101                     )?);
2102                 }
2103                 _ => skip_tree(stack),
2104             }
2105             Ok(())
2106         })
2107     }
2108 }
2109 /// <p>Container for all response elements.</p>
2110 #[derive(Clone, Debug, Default, PartialEq)]
2111 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2112 pub struct CopyPartResult {
2113     /// <p>Entity tag of the object.</p>
2114     pub e_tag: Option<String>,
2115     /// <p>Date and time at which the object was uploaded.</p>
2116     pub last_modified: Option<String>,
2117 }
2118 
2119 #[allow(dead_code)]
2120 struct CopyPartResultDeserializer;
2121 impl CopyPartResultDeserializer {
2122     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CopyPartResult, XmlParseError>2123     fn deserialize<T: Peek + Next>(
2124         tag_name: &str,
2125         stack: &mut T,
2126     ) -> Result<CopyPartResult, XmlParseError> {
2127         deserialize_elements::<_, CopyPartResult, _>(tag_name, stack, |name, stack, obj| {
2128             match name {
2129                 "ETag" => {
2130                     obj.e_tag = Some(ETagDeserializer::deserialize("ETag", stack)?);
2131                 }
2132                 "LastModified" => {
2133                     obj.last_modified = Some(LastModifiedDeserializer::deserialize(
2134                         "LastModified",
2135                         stack,
2136                     )?);
2137                 }
2138                 _ => skip_tree(stack),
2139             }
2140             Ok(())
2141         })
2142     }
2143 }
2144 /// <p>The configuration information for the bucket.</p>
2145 #[derive(Clone, Debug, Default, PartialEq)]
2146 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2147 pub struct CreateBucketConfiguration {
2148     /// <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>
2149     pub location_constraint: Option<String>,
2150 }
2151 
2152 pub struct CreateBucketConfigurationSerializer;
2153 impl CreateBucketConfigurationSerializer {
2154     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &CreateBucketConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,2155     pub fn serialize<W>(
2156         mut writer: &mut EventWriter<W>,
2157         name: &str,
2158         obj: &CreateBucketConfiguration,
2159     ) -> Result<(), xml::writer::Error>
2160     where
2161         W: Write,
2162     {
2163         writer.write(xml::writer::XmlEvent::start_element(name))?;
2164         if let Some(ref value) = obj.location_constraint {
2165             write_characters_element(writer, "LocationConstraint", &value)?;
2166         }
2167         writer.write(xml::writer::XmlEvent::end_element())
2168     }
2169 }
2170 
2171 #[derive(Clone, Debug, Default, PartialEq)]
2172 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2173 pub struct CreateBucketOutput {
2174     /// <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>
2175     pub location: Option<String>,
2176 }
2177 
2178 #[allow(dead_code)]
2179 struct CreateBucketOutputDeserializer;
2180 impl CreateBucketOutputDeserializer {
2181     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CreateBucketOutput, XmlParseError>2182     fn deserialize<T: Peek + Next>(
2183         tag_name: &str,
2184         stack: &mut T,
2185     ) -> Result<CreateBucketOutput, XmlParseError> {
2186         xml_util::start_element(tag_name, stack)?;
2187 
2188         let obj = CreateBucketOutput::default();
2189 
2190         xml_util::end_element(tag_name, stack)?;
2191 
2192         Ok(obj)
2193     }
2194 }
2195 #[derive(Clone, Debug, Default, PartialEq)]
2196 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2197 pub struct CreateBucketRequest {
2198     /// <p>The canned ACL to apply to the bucket.</p>
2199     pub acl: Option<String>,
2200     /// <p>The name of the bucket to create.</p>
2201     pub bucket: String,
2202     /// <p>The configuration information for the bucket.</p>
2203     pub create_bucket_configuration: Option<CreateBucketConfiguration>,
2204     /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p>
2205     pub grant_full_control: Option<String>,
2206     /// <p>Allows grantee to list the objects in the bucket.</p>
2207     pub grant_read: Option<String>,
2208     /// <p>Allows grantee to read the bucket ACL.</p>
2209     pub grant_read_acp: Option<String>,
2210     /// <p>Allows grantee to create new objects in the bucket.</p> <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p>
2211     pub grant_write: Option<String>,
2212     /// <p>Allows grantee to write the ACL for the applicable bucket.</p>
2213     pub grant_write_acp: Option<String>,
2214     /// <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p>
2215     pub object_lock_enabled_for_bucket: Option<bool>,
2216 }
2217 
2218 #[derive(Clone, Debug, Default, PartialEq)]
2219 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2220 pub struct CreateMultipartUploadOutput {
2221     /// <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>
2222     pub abort_date: Option<String>,
2223     /// <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>
2224     pub abort_rule_id: Option<String>,
2225     /// <p>The name of the bucket to which the multipart upload was initiated. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
2226     pub bucket: Option<String>,
2227     /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with AWS KMS (SSE-KMS).</p>
2228     pub bucket_key_enabled: Option<bool>,
2229     /// <p>Object key for which the multipart upload was initiated.</p>
2230     pub key: Option<String>,
2231     pub request_charged: Option<String>,
2232     /// <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>
2233     pub sse_customer_algorithm: Option<String>,
2234     /// <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>
2235     pub sse_customer_key_md5: Option<String>,
2236     /// <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>
2237     pub ssekms_encryption_context: Option<String>,
2238     /// <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>
2239     pub ssekms_key_id: Option<String>,
2240     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
2241     pub server_side_encryption: Option<String>,
2242     /// <p>ID for the initiated multipart upload.</p>
2243     pub upload_id: Option<String>,
2244 }
2245 
2246 #[allow(dead_code)]
2247 struct CreateMultipartUploadOutputDeserializer;
2248 impl CreateMultipartUploadOutputDeserializer {
2249     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<CreateMultipartUploadOutput, XmlParseError>2250     fn deserialize<T: Peek + Next>(
2251         tag_name: &str,
2252         stack: &mut T,
2253     ) -> Result<CreateMultipartUploadOutput, XmlParseError> {
2254         deserialize_elements::<_, CreateMultipartUploadOutput, _>(
2255             tag_name,
2256             stack,
2257             |name, stack, obj| {
2258                 match name {
2259                     "Bucket" => {
2260                         obj.bucket = Some(BucketNameDeserializer::deserialize("Bucket", stack)?);
2261                     }
2262                     "Key" => {
2263                         obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
2264                     }
2265                     "UploadId" => {
2266                         obj.upload_id = Some(MultipartUploadIdDeserializer::deserialize(
2267                             "UploadId", stack,
2268                         )?);
2269                     }
2270                     _ => skip_tree(stack),
2271                 }
2272                 Ok(())
2273             },
2274         )
2275     }
2276 }
2277 #[derive(Clone, Debug, Default, PartialEq)]
2278 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2279 pub struct CreateMultipartUploadRequest {
2280     /// <p>The canned ACL to apply to the object.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
2281     pub acl: Option<String>,
2282     /// <p>The name of the bucket to which to initiate the upload</p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
2283     pub bucket: String,
2284     /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using AWS KMS (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p> <p>Specifying this header with an object action doesn’t affect bucket-level settings for S3 Bucket Key.</p>
2285     pub bucket_key_enabled: Option<bool>,
2286     /// <p>Specifies caching behavior along the request/reply chain.</p>
2287     pub cache_control: Option<String>,
2288     /// <p>Specifies presentational information for the object.</p>
2289     pub content_disposition: Option<String>,
2290     /// <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>
2291     pub content_encoding: Option<String>,
2292     /// <p>The language the content is in.</p>
2293     pub content_language: Option<String>,
2294     /// <p>A standard MIME type describing the format of the object data.</p>
2295     pub content_type: Option<String>,
2296     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2297     pub expected_bucket_owner: Option<String>,
2298     /// <p>The date and time at which the object is no longer cacheable.</p>
2299     pub expires: Option<String>,
2300     /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
2301     pub grant_full_control: Option<String>,
2302     /// <p>Allows grantee to read the object data and its metadata.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
2303     pub grant_read: Option<String>,
2304     /// <p>Allows grantee to read the object ACL.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
2305     pub grant_read_acp: Option<String>,
2306     /// <p>Allows grantee to write the ACL for the applicable object.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
2307     pub grant_write_acp: Option<String>,
2308     /// <p>Object key for which the multipart upload is to be initiated.</p>
2309     pub key: String,
2310     /// <p>A map of metadata to store with the object in S3.</p>
2311     pub metadata: Option<::std::collections::HashMap<String, String>>,
2312     /// <p>Specifies whether you want to apply a Legal Hold to the uploaded object.</p>
2313     pub object_lock_legal_hold_status: Option<String>,
2314     /// <p>Specifies the Object Lock mode that you want to apply to the uploaded object.</p>
2315     pub object_lock_mode: Option<String>,
2316     /// <p>Specifies the date and time when you want the Object Lock to expire.</p>
2317     pub object_lock_retain_until_date: Option<String>,
2318     pub request_payer: Option<String>,
2319     /// <p>Specifies the algorithm to use to when encrypting the object (for example, AES256).</p>
2320     pub sse_customer_algorithm: Option<String>,
2321     /// <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>
2322     pub sse_customer_key: Option<String>,
2323     /// <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>
2324     pub sse_customer_key_md5: Option<String>,
2325     /// <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>
2326     pub ssekms_encryption_context: Option<String>,
2327     /// <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/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version">Specifying the Signature Version in Request Authentication</a> in the <i>Amazon S3 User Guide</i>.</p>
2328     pub ssekms_key_id: Option<String>,
2329     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
2330     pub server_side_encryption: Option<String>,
2331     /// <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. Depending on performance needs, you can specify a different Storage Class. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p>
2332     pub storage_class: Option<String>,
2333     /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters.</p>
2334     pub tagging: Option<String>,
2335     /// <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>
2336     pub website_redirect_location: Option<String>,
2337 }
2338 
2339 #[allow(dead_code)]
2340 struct CreationDateDeserializer;
2341 impl CreationDateDeserializer {
2342     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>2343     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2344         xml_util::deserialize_primitive(tag_name, stack, Ok)
2345     }
2346 }
2347 #[allow(dead_code)]
2348 struct DateDeserializer;
2349 impl DateDeserializer {
2350     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>2351     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2352         xml_util::deserialize_primitive(tag_name, stack, Ok)
2353     }
2354 }
2355 
2356 pub struct DateSerializer;
2357 impl DateSerializer {
2358     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,2359     pub fn serialize<W>(
2360         mut writer: &mut EventWriter<W>,
2361         name: &str,
2362         obj: &String,
2363     ) -> Result<(), xml::writer::Error>
2364     where
2365         W: Write,
2366     {
2367         write_characters_element(writer, name, obj)
2368     }
2369 }
2370 
2371 #[allow(dead_code)]
2372 struct DaysDeserializer;
2373 impl DaysDeserializer {
2374     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>2375     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
2376         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
2377     }
2378 }
2379 
2380 pub struct DaysSerializer;
2381 impl DaysSerializer {
2382     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,2383     pub fn serialize<W>(
2384         mut writer: &mut EventWriter<W>,
2385         name: &str,
2386         obj: &i64,
2387     ) -> Result<(), xml::writer::Error>
2388     where
2389         W: Write,
2390     {
2391         write_characters_element(writer, name, &obj.to_string())
2392     }
2393 }
2394 
2395 #[allow(dead_code)]
2396 struct DaysAfterInitiationDeserializer;
2397 impl DaysAfterInitiationDeserializer {
2398     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>2399     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
2400         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
2401     }
2402 }
2403 
2404 pub struct DaysAfterInitiationSerializer;
2405 impl DaysAfterInitiationSerializer {
2406     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,2407     pub fn serialize<W>(
2408         mut writer: &mut EventWriter<W>,
2409         name: &str,
2410         obj: &i64,
2411     ) -> Result<(), xml::writer::Error>
2412     where
2413         W: Write,
2414     {
2415         write_characters_element(writer, name, &obj.to_string())
2416     }
2417 }
2418 
2419 /// <p><p>The container element for specifying the default Object Lock retention settings for new objects placed in the specified bucket.</p> <note> <ul> <li> <p>The <code>DefaultRetention</code> settings require both a mode and a period.</p> </li> <li> <p>The <code>DefaultRetention</code> period can be either <code>Days</code> or <code>Years</code> but you must select one. You cannot specify <code>Days</code> and <code>Years</code> at the same time.</p> </li> </ul> </note></p>
2420 #[derive(Clone, Debug, Default, PartialEq)]
2421 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2422 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2423 pub struct DefaultRetention {
2424     /// <p>The number of days that you want to specify for the default retention period. Must be used with <code>Mode</code>.</p>
2425     pub days: Option<i64>,
2426     /// <p>The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. Must be used with either <code>Days</code> or <code>Years</code>.</p>
2427     pub mode: Option<String>,
2428     /// <p>The number of years that you want to specify for the default retention period. Must be used with <code>Mode</code>.</p>
2429     pub years: Option<i64>,
2430 }
2431 
2432 #[allow(dead_code)]
2433 struct DefaultRetentionDeserializer;
2434 impl DefaultRetentionDeserializer {
2435     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<DefaultRetention, XmlParseError>2436     fn deserialize<T: Peek + Next>(
2437         tag_name: &str,
2438         stack: &mut T,
2439     ) -> Result<DefaultRetention, XmlParseError> {
2440         deserialize_elements::<_, DefaultRetention, _>(tag_name, stack, |name, stack, obj| {
2441             match name {
2442                 "Days" => {
2443                     obj.days = Some(DaysDeserializer::deserialize("Days", stack)?);
2444                 }
2445                 "Mode" => {
2446                     obj.mode = Some(ObjectLockRetentionModeDeserializer::deserialize(
2447                         "Mode", stack,
2448                     )?);
2449                 }
2450                 "Years" => {
2451                     obj.years = Some(YearsDeserializer::deserialize("Years", stack)?);
2452                 }
2453                 _ => skip_tree(stack),
2454             }
2455             Ok(())
2456         })
2457     }
2458 }
2459 
2460 pub struct DefaultRetentionSerializer;
2461 impl DefaultRetentionSerializer {
2462     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &DefaultRetention, ) -> Result<(), xml::writer::Error> where W: Write,2463     pub fn serialize<W>(
2464         mut writer: &mut EventWriter<W>,
2465         name: &str,
2466         obj: &DefaultRetention,
2467     ) -> Result<(), xml::writer::Error>
2468     where
2469         W: Write,
2470     {
2471         writer.write(xml::writer::XmlEvent::start_element(name))?;
2472         if let Some(ref value) = obj.days {
2473             write_characters_element(writer, "Days", &value.to_string())?;
2474         }
2475         if let Some(ref value) = obj.mode {
2476             write_characters_element(writer, "Mode", &value)?;
2477         }
2478         if let Some(ref value) = obj.years {
2479             write_characters_element(writer, "Years", &value.to_string())?;
2480         }
2481         writer.write(xml::writer::XmlEvent::end_element())
2482     }
2483 }
2484 
2485 /// <p>Container for the objects to delete.</p>
2486 #[derive(Clone, Debug, Default, PartialEq)]
2487 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2488 pub struct Delete {
2489     /// <p>The objects to delete.</p>
2490     pub objects: Vec<ObjectIdentifier>,
2491     /// <p>Element to enable quiet mode for the request. When you add this element, you must set its value to true.</p>
2492     pub quiet: Option<bool>,
2493 }
2494 
2495 pub struct DeleteSerializer;
2496 impl DeleteSerializer {
2497     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Delete, ) -> Result<(), xml::writer::Error> where W: Write,2498     pub fn serialize<W>(
2499         mut writer: &mut EventWriter<W>,
2500         name: &str,
2501         obj: &Delete,
2502     ) -> Result<(), xml::writer::Error>
2503     where
2504         W: Write,
2505     {
2506         writer.write(xml::writer::XmlEvent::start_element(name))?;
2507         ObjectIdentifierListSerializer::serialize(&mut writer, "Object", &obj.objects)?;
2508         if let Some(ref value) = obj.quiet {
2509             write_characters_element(writer, "Quiet", &value.to_string())?;
2510         }
2511         writer.write(xml::writer::XmlEvent::end_element())
2512     }
2513 }
2514 
2515 #[derive(Clone, Debug, Default, PartialEq)]
2516 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2517 pub struct DeleteBucketAnalyticsConfigurationRequest {
2518     /// <p>The name of the bucket from which an analytics configuration is deleted.</p>
2519     pub bucket: String,
2520     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2521     pub expected_bucket_owner: Option<String>,
2522     /// <p>The ID that identifies the analytics configuration.</p>
2523     pub id: String,
2524 }
2525 
2526 #[derive(Clone, Debug, Default, PartialEq)]
2527 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2528 pub struct DeleteBucketCorsRequest {
2529     /// <p>Specifies the bucket whose <code>cors</code> configuration is being deleted.</p>
2530     pub bucket: String,
2531     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2532     pub expected_bucket_owner: Option<String>,
2533 }
2534 
2535 #[derive(Clone, Debug, Default, PartialEq)]
2536 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2537 pub struct DeleteBucketEncryptionRequest {
2538     /// <p>The name of the bucket containing the server-side encryption configuration to delete.</p>
2539     pub bucket: String,
2540     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2541     pub expected_bucket_owner: Option<String>,
2542 }
2543 
2544 #[derive(Clone, Debug, Default, PartialEq)]
2545 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2546 pub struct DeleteBucketIntelligentTieringConfigurationRequest {
2547     /// <p>The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.</p>
2548     pub bucket: String,
2549     /// <p>The ID used to identify the S3 Intelligent-Tiering configuration.</p>
2550     pub id: String,
2551 }
2552 
2553 #[derive(Clone, Debug, Default, PartialEq)]
2554 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2555 pub struct DeleteBucketInventoryConfigurationRequest {
2556     /// <p>The name of the bucket containing the inventory configuration to delete.</p>
2557     pub bucket: String,
2558     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2559     pub expected_bucket_owner: Option<String>,
2560     /// <p>The ID used to identify the inventory configuration.</p>
2561     pub id: String,
2562 }
2563 
2564 #[derive(Clone, Debug, Default, PartialEq)]
2565 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2566 pub struct DeleteBucketLifecycleRequest {
2567     /// <p>The bucket name of the lifecycle to delete.</p>
2568     pub bucket: String,
2569     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2570     pub expected_bucket_owner: Option<String>,
2571 }
2572 
2573 #[derive(Clone, Debug, Default, PartialEq)]
2574 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2575 pub struct DeleteBucketMetricsConfigurationRequest {
2576     /// <p>The name of the bucket containing the metrics configuration to delete.</p>
2577     pub bucket: String,
2578     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2579     pub expected_bucket_owner: Option<String>,
2580     /// <p>The ID used to identify the metrics configuration.</p>
2581     pub id: String,
2582 }
2583 
2584 #[derive(Clone, Debug, Default, PartialEq)]
2585 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2586 pub struct DeleteBucketOwnershipControlsRequest {
2587     /// <p>The Amazon S3 bucket whose <code>OwnershipControls</code> you want to delete. </p>
2588     pub bucket: String,
2589     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2590     pub expected_bucket_owner: Option<String>,
2591 }
2592 
2593 #[derive(Clone, Debug, Default, PartialEq)]
2594 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2595 pub struct DeleteBucketPolicyRequest {
2596     /// <p>The bucket name.</p>
2597     pub bucket: String,
2598     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2599     pub expected_bucket_owner: Option<String>,
2600 }
2601 
2602 #[derive(Clone, Debug, Default, PartialEq)]
2603 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2604 pub struct DeleteBucketReplicationRequest {
2605     /// <p> The bucket name. </p>
2606     pub bucket: String,
2607     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2608     pub expected_bucket_owner: Option<String>,
2609 }
2610 
2611 #[derive(Clone, Debug, Default, PartialEq)]
2612 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2613 pub struct DeleteBucketRequest {
2614     /// <p>Specifies the bucket being deleted.</p>
2615     pub bucket: String,
2616     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2617     pub expected_bucket_owner: Option<String>,
2618 }
2619 
2620 #[derive(Clone, Debug, Default, PartialEq)]
2621 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2622 pub struct DeleteBucketTaggingRequest {
2623     /// <p>The bucket that has the tag set to be removed.</p>
2624     pub bucket: String,
2625     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2626     pub expected_bucket_owner: Option<String>,
2627 }
2628 
2629 #[derive(Clone, Debug, Default, PartialEq)]
2630 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2631 pub struct DeleteBucketWebsiteRequest {
2632     /// <p>The bucket name for which you want to remove the website configuration. </p>
2633     pub bucket: String,
2634     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2635     pub expected_bucket_owner: Option<String>,
2636 }
2637 
2638 #[allow(dead_code)]
2639 struct DeleteMarkerDeserializer;
2640 impl DeleteMarkerDeserializer {
2641     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>2642     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
2643         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
2644     }
2645 }
2646 /// <p>Information about the delete marker.</p>
2647 #[derive(Clone, Debug, Default, PartialEq)]
2648 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2649 pub struct DeleteMarkerEntry {
2650     /// <p>Specifies whether the object is (true) or is not (false) the latest version of an object.</p>
2651     pub is_latest: Option<bool>,
2652     /// <p>The object key.</p>
2653     pub key: Option<String>,
2654     /// <p>Date and time the object was last modified.</p>
2655     pub last_modified: Option<String>,
2656     /// <p>The account that created the delete marker.&gt;</p>
2657     pub owner: Option<Owner>,
2658     /// <p>Version ID of an object.</p>
2659     pub version_id: Option<String>,
2660 }
2661 
2662 #[allow(dead_code)]
2663 struct DeleteMarkerEntryDeserializer;
2664 impl DeleteMarkerEntryDeserializer {
2665     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<DeleteMarkerEntry, XmlParseError>2666     fn deserialize<T: Peek + Next>(
2667         tag_name: &str,
2668         stack: &mut T,
2669     ) -> Result<DeleteMarkerEntry, XmlParseError> {
2670         deserialize_elements::<_, DeleteMarkerEntry, _>(tag_name, stack, |name, stack, obj| {
2671             match name {
2672                 "IsLatest" => {
2673                     obj.is_latest = Some(IsLatestDeserializer::deserialize("IsLatest", stack)?);
2674                 }
2675                 "Key" => {
2676                     obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
2677                 }
2678                 "LastModified" => {
2679                     obj.last_modified = Some(LastModifiedDeserializer::deserialize(
2680                         "LastModified",
2681                         stack,
2682                     )?);
2683                 }
2684                 "Owner" => {
2685                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
2686                 }
2687                 "VersionId" => {
2688                     obj.version_id = Some(ObjectVersionIdDeserializer::deserialize(
2689                         "VersionId",
2690                         stack,
2691                     )?);
2692                 }
2693                 _ => skip_tree(stack),
2694             }
2695             Ok(())
2696         })
2697     }
2698 }
2699 /// <p><p>Specifies whether Amazon S3 replicates delete markers. If you specify a <code>Filter</code> in your replication configuration, you must also include a <code>DeleteMarkerReplication</code> element. If your <code>Filter</code> includes a <code>Tag</code> element, the <code>DeleteMarkerReplication</code> <code>Status</code> must be set to Disabled, because Amazon S3 does not support replicating delete markers for tag-based rules. 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> <p>For more information about delete marker replication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html">Basic Rule Configuration</a>. </p> <note> <p>If you are using an earlier version of the replication configuration, Amazon S3 handles 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>
2700 #[derive(Clone, Debug, Default, PartialEq)]
2701 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2702 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2703 pub struct DeleteMarkerReplication {
2704     /// <p><p>Indicates whether to replicate delete markers.</p> <note> <p>Indicates whether to replicate delete markers.</p> </note></p>
2705     pub status: Option<String>,
2706 }
2707 
2708 #[allow(dead_code)]
2709 struct DeleteMarkerReplicationDeserializer;
2710 impl DeleteMarkerReplicationDeserializer {
2711     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<DeleteMarkerReplication, XmlParseError>2712     fn deserialize<T: Peek + Next>(
2713         tag_name: &str,
2714         stack: &mut T,
2715     ) -> Result<DeleteMarkerReplication, XmlParseError> {
2716         deserialize_elements::<_, DeleteMarkerReplication, _>(
2717             tag_name,
2718             stack,
2719             |name, stack, obj| {
2720                 match name {
2721                     "Status" => {
2722                         obj.status = Some(DeleteMarkerReplicationStatusDeserializer::deserialize(
2723                             "Status", stack,
2724                         )?);
2725                     }
2726                     _ => skip_tree(stack),
2727                 }
2728                 Ok(())
2729             },
2730         )
2731     }
2732 }
2733 
2734 pub struct DeleteMarkerReplicationSerializer;
2735 impl DeleteMarkerReplicationSerializer {
2736     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &DeleteMarkerReplication, ) -> Result<(), xml::writer::Error> where W: Write,2737     pub fn serialize<W>(
2738         mut writer: &mut EventWriter<W>,
2739         name: &str,
2740         obj: &DeleteMarkerReplication,
2741     ) -> Result<(), xml::writer::Error>
2742     where
2743         W: Write,
2744     {
2745         writer.write(xml::writer::XmlEvent::start_element(name))?;
2746         if let Some(ref value) = obj.status {
2747             write_characters_element(writer, "Status", &value)?;
2748         }
2749         writer.write(xml::writer::XmlEvent::end_element())
2750     }
2751 }
2752 
2753 #[allow(dead_code)]
2754 struct DeleteMarkerReplicationStatusDeserializer;
2755 impl DeleteMarkerReplicationStatusDeserializer {
2756     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>2757     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2758         xml_util::deserialize_primitive(tag_name, stack, Ok)
2759     }
2760 }
2761 
2762 pub struct DeleteMarkerReplicationStatusSerializer;
2763 impl DeleteMarkerReplicationStatusSerializer {
2764     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,2765     pub fn serialize<W>(
2766         mut writer: &mut EventWriter<W>,
2767         name: &str,
2768         obj: &String,
2769     ) -> Result<(), xml::writer::Error>
2770     where
2771         W: Write,
2772     {
2773         write_characters_element(writer, name, obj)
2774     }
2775 }
2776 
2777 #[allow(dead_code)]
2778 struct DeleteMarkerVersionIdDeserializer;
2779 impl DeleteMarkerVersionIdDeserializer {
2780     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>2781     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2782         xml_util::deserialize_primitive(tag_name, stack, Ok)
2783     }
2784 }
2785 #[allow(dead_code)]
2786 struct DeleteMarkersDeserializer;
2787 impl DeleteMarkersDeserializer {
2788     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<DeleteMarkerEntry>, XmlParseError>2789     fn deserialize<T: Peek + Next>(
2790         tag_name: &str,
2791         stack: &mut T,
2792     ) -> Result<Vec<DeleteMarkerEntry>, XmlParseError> {
2793         let mut obj = vec![];
2794 
2795         loop {
2796             let consume_next_tag = match stack.peek() {
2797                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
2798                     name.local_name == tag_name
2799                 }
2800                 _ => false,
2801             };
2802 
2803             if consume_next_tag {
2804                 obj.push(DeleteMarkerEntryDeserializer::deserialize(tag_name, stack)?);
2805             } else {
2806                 break;
2807             }
2808         }
2809 
2810         Ok(obj)
2811     }
2812 }
2813 #[derive(Clone, Debug, Default, PartialEq)]
2814 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2815 pub struct DeleteObjectOutput {
2816     /// <p>Specifies whether the versioned object that was permanently deleted was (true) or was not (false) a delete marker.</p>
2817     pub delete_marker: Option<bool>,
2818     pub request_charged: Option<String>,
2819     /// <p>Returns the version ID of the delete marker created as a result of the DELETE operation.</p>
2820     pub version_id: Option<String>,
2821 }
2822 
2823 #[allow(dead_code)]
2824 struct DeleteObjectOutputDeserializer;
2825 impl DeleteObjectOutputDeserializer {
2826     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<DeleteObjectOutput, XmlParseError>2827     fn deserialize<T: Peek + Next>(
2828         tag_name: &str,
2829         stack: &mut T,
2830     ) -> Result<DeleteObjectOutput, XmlParseError> {
2831         xml_util::start_element(tag_name, stack)?;
2832 
2833         let obj = DeleteObjectOutput::default();
2834 
2835         xml_util::end_element(tag_name, stack)?;
2836 
2837         Ok(obj)
2838     }
2839 }
2840 #[derive(Clone, Debug, Default, PartialEq)]
2841 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2842 pub struct DeleteObjectRequest {
2843     /// <p>The bucket name of the bucket containing the object. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
2844     pub bucket: String,
2845     /// <p>Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation.</p>
2846     pub bypass_governance_retention: Option<bool>,
2847     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2848     pub expected_bucket_owner: Option<String>,
2849     /// <p>Key name of the object to delete.</p>
2850     pub key: String,
2851     /// <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>
2852     pub mfa: Option<String>,
2853     pub request_payer: Option<String>,
2854     /// <p>VersionId used to reference a specific version of the object.</p>
2855     pub version_id: Option<String>,
2856 }
2857 
2858 #[derive(Clone, Debug, Default, PartialEq)]
2859 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2860 pub struct DeleteObjectTaggingOutput {
2861     /// <p>The versionId of the object the tag-set was removed from.</p>
2862     pub version_id: Option<String>,
2863 }
2864 
2865 #[allow(dead_code)]
2866 struct DeleteObjectTaggingOutputDeserializer;
2867 impl DeleteObjectTaggingOutputDeserializer {
2868     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<DeleteObjectTaggingOutput, XmlParseError>2869     fn deserialize<T: Peek + Next>(
2870         tag_name: &str,
2871         stack: &mut T,
2872     ) -> Result<DeleteObjectTaggingOutput, XmlParseError> {
2873         xml_util::start_element(tag_name, stack)?;
2874 
2875         let obj = DeleteObjectTaggingOutput::default();
2876 
2877         xml_util::end_element(tag_name, stack)?;
2878 
2879         Ok(obj)
2880     }
2881 }
2882 #[derive(Clone, Debug, Default, PartialEq)]
2883 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2884 pub struct DeleteObjectTaggingRequest {
2885     /// <p>The bucket name containing the objects from which to remove the tags. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
2886     pub bucket: String,
2887     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2888     pub expected_bucket_owner: Option<String>,
2889     /// <p>The key that identifies the object in the bucket from which to remove all tags.</p>
2890     pub key: String,
2891     /// <p>The versionId of the object that the tag-set will be removed from.</p>
2892     pub version_id: Option<String>,
2893 }
2894 
2895 #[derive(Clone, Debug, Default, PartialEq)]
2896 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2897 pub struct DeleteObjectsOutput {
2898     /// <p>Container element for a successful delete. It identifies the object that was successfully deleted.</p>
2899     pub deleted: Option<Vec<DeletedObject>>,
2900     /// <p>Container for a failed delete action that describes the object that Amazon S3 attempted to delete and the error it encountered.</p>
2901     pub errors: Option<Vec<S3Error>>,
2902     pub request_charged: Option<String>,
2903 }
2904 
2905 #[allow(dead_code)]
2906 struct DeleteObjectsOutputDeserializer;
2907 impl DeleteObjectsOutputDeserializer {
2908     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<DeleteObjectsOutput, XmlParseError>2909     fn deserialize<T: Peek + Next>(
2910         tag_name: &str,
2911         stack: &mut T,
2912     ) -> Result<DeleteObjectsOutput, XmlParseError> {
2913         deserialize_elements::<_, DeleteObjectsOutput, _>(tag_name, stack, |name, stack, obj| {
2914             match name {
2915                 "Deleted" => {
2916                     obj.deleted
2917                         .get_or_insert(vec![])
2918                         .extend(DeletedObjectsDeserializer::deserialize("Deleted", stack)?);
2919                 }
2920                 "Error" => {
2921                     obj.errors
2922                         .get_or_insert(vec![])
2923                         .extend(ErrorsDeserializer::deserialize("Error", stack)?);
2924                 }
2925                 _ => skip_tree(stack),
2926             }
2927             Ok(())
2928         })
2929     }
2930 }
2931 #[derive(Clone, Debug, Default, PartialEq)]
2932 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2933 pub struct DeleteObjectsRequest {
2934     /// <p>The bucket name containing the objects to delete. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
2935     pub bucket: String,
2936     /// <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>
2937     pub bypass_governance_retention: Option<bool>,
2938     /// <p>Container for the request.</p>
2939     pub delete: Delete,
2940     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2941     pub expected_bucket_owner: Option<String>,
2942     /// <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>
2943     pub mfa: Option<String>,
2944     pub request_payer: Option<String>,
2945 }
2946 
2947 #[derive(Clone, Debug, Default, PartialEq)]
2948 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2949 pub struct DeletePublicAccessBlockRequest {
2950     /// <p>The Amazon S3 bucket whose <code>PublicAccessBlock</code> configuration you want to delete. </p>
2951     pub bucket: String,
2952     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
2953     pub expected_bucket_owner: Option<String>,
2954 }
2955 
2956 /// <p>Information about the deleted object.</p>
2957 #[derive(Clone, Debug, Default, PartialEq)]
2958 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2959 pub struct DeletedObject {
2960     /// <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>
2961     pub delete_marker: Option<bool>,
2962     /// <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>
2963     pub delete_marker_version_id: Option<String>,
2964     /// <p>The name of the deleted object.</p>
2965     pub key: Option<String>,
2966     /// <p>The version ID of the deleted object.</p>
2967     pub version_id: Option<String>,
2968 }
2969 
2970 #[allow(dead_code)]
2971 struct DeletedObjectDeserializer;
2972 impl DeletedObjectDeserializer {
2973     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<DeletedObject, XmlParseError>2974     fn deserialize<T: Peek + Next>(
2975         tag_name: &str,
2976         stack: &mut T,
2977     ) -> Result<DeletedObject, XmlParseError> {
2978         deserialize_elements::<_, DeletedObject, _>(tag_name, stack, |name, stack, obj| {
2979             match name {
2980                 "DeleteMarker" => {
2981                     obj.delete_marker = Some(DeleteMarkerDeserializer::deserialize(
2982                         "DeleteMarker",
2983                         stack,
2984                     )?);
2985                 }
2986                 "DeleteMarkerVersionId" => {
2987                     obj.delete_marker_version_id =
2988                         Some(DeleteMarkerVersionIdDeserializer::deserialize(
2989                             "DeleteMarkerVersionId",
2990                             stack,
2991                         )?);
2992                 }
2993                 "Key" => {
2994                     obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
2995                 }
2996                 "VersionId" => {
2997                     obj.version_id = Some(ObjectVersionIdDeserializer::deserialize(
2998                         "VersionId",
2999                         stack,
3000                     )?);
3001                 }
3002                 _ => skip_tree(stack),
3003             }
3004             Ok(())
3005         })
3006     }
3007 }
3008 #[allow(dead_code)]
3009 struct DeletedObjectsDeserializer;
3010 impl DeletedObjectsDeserializer {
3011     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<DeletedObject>, XmlParseError>3012     fn deserialize<T: Peek + Next>(
3013         tag_name: &str,
3014         stack: &mut T,
3015     ) -> Result<Vec<DeletedObject>, XmlParseError> {
3016         let mut obj = vec![];
3017 
3018         loop {
3019             let consume_next_tag = match stack.peek() {
3020                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
3021                     name.local_name == tag_name
3022                 }
3023                 _ => false,
3024             };
3025 
3026             if consume_next_tag {
3027                 obj.push(DeletedObjectDeserializer::deserialize(tag_name, stack)?);
3028             } else {
3029                 break;
3030             }
3031         }
3032 
3033         Ok(obj)
3034     }
3035 }
3036 #[allow(dead_code)]
3037 struct DelimiterDeserializer;
3038 impl DelimiterDeserializer {
3039     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3040     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3041         xml_util::deserialize_primitive(tag_name, stack, Ok)
3042     }
3043 }
3044 
3045 pub struct DelimiterSerializer;
3046 impl DelimiterSerializer {
3047     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3048     pub fn serialize<W>(
3049         mut writer: &mut EventWriter<W>,
3050         name: &str,
3051         obj: &String,
3052     ) -> Result<(), xml::writer::Error>
3053     where
3054         W: Write,
3055     {
3056         write_characters_element(writer, name, obj)
3057     }
3058 }
3059 
3060 pub struct DescriptionSerializer;
3061 impl DescriptionSerializer {
3062     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3063     pub fn serialize<W>(
3064         mut writer: &mut EventWriter<W>,
3065         name: &str,
3066         obj: &String,
3067     ) -> Result<(), xml::writer::Error>
3068     where
3069         W: Write,
3070     {
3071         write_characters_element(writer, name, obj)
3072     }
3073 }
3074 
3075 /// <p>Specifies information about where to publish analysis or configuration results for an Amazon S3 bucket and S3 Replication Time Control (S3 RTC).</p>
3076 #[derive(Clone, Debug, Default, PartialEq)]
3077 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3078 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3079 pub struct Destination {
3080     /// <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>
3081     pub access_control_translation: Option<AccessControlTranslation>,
3082     /// <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 S3 User Guide</i>.</p>
3083     pub account: Option<String>,
3084     /// <p> The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the results.</p>
3085     pub bucket: String,
3086     /// <p>A container that provides information about encryption. If <code>SourceSelectionCriteria</code> is specified, you must specify this element.</p>
3087     pub encryption_configuration: Option<EncryptionConfiguration>,
3088     /// <p> A container specifying replication metrics-related settings enabling replication metrics and events. </p>
3089     pub metrics: Option<Metrics>,
3090     /// <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>
3091     pub replication_time: Option<ReplicationTime>,
3092     /// <p> The storage class to use when replicating objects, such as S3 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 S3 API Reference</i>.</p>
3093     pub storage_class: Option<String>,
3094 }
3095 
3096 #[allow(dead_code)]
3097 struct DestinationDeserializer;
3098 impl DestinationDeserializer {
3099     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Destination, XmlParseError>3100     fn deserialize<T: Peek + Next>(
3101         tag_name: &str,
3102         stack: &mut T,
3103     ) -> Result<Destination, XmlParseError> {
3104         deserialize_elements::<_, Destination, _>(tag_name, stack, |name, stack, obj| {
3105             match name {
3106                 "AccessControlTranslation" => {
3107                     obj.access_control_translation =
3108                         Some(AccessControlTranslationDeserializer::deserialize(
3109                             "AccessControlTranslation",
3110                             stack,
3111                         )?);
3112                 }
3113                 "Account" => {
3114                     obj.account = Some(AccountIdDeserializer::deserialize("Account", stack)?);
3115                 }
3116                 "Bucket" => {
3117                     obj.bucket = BucketNameDeserializer::deserialize("Bucket", stack)?;
3118                 }
3119                 "EncryptionConfiguration" => {
3120                     obj.encryption_configuration =
3121                         Some(EncryptionConfigurationDeserializer::deserialize(
3122                             "EncryptionConfiguration",
3123                             stack,
3124                         )?);
3125                 }
3126                 "Metrics" => {
3127                     obj.metrics = Some(MetricsDeserializer::deserialize("Metrics", stack)?);
3128                 }
3129                 "ReplicationTime" => {
3130                     obj.replication_time = Some(ReplicationTimeDeserializer::deserialize(
3131                         "ReplicationTime",
3132                         stack,
3133                     )?);
3134                 }
3135                 "StorageClass" => {
3136                     obj.storage_class = Some(StorageClassDeserializer::deserialize(
3137                         "StorageClass",
3138                         stack,
3139                     )?);
3140                 }
3141                 _ => skip_tree(stack),
3142             }
3143             Ok(())
3144         })
3145     }
3146 }
3147 
3148 pub struct DestinationSerializer;
3149 impl DestinationSerializer {
3150     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Destination, ) -> Result<(), xml::writer::Error> where W: Write,3151     pub fn serialize<W>(
3152         mut writer: &mut EventWriter<W>,
3153         name: &str,
3154         obj: &Destination,
3155     ) -> Result<(), xml::writer::Error>
3156     where
3157         W: Write,
3158     {
3159         writer.write(xml::writer::XmlEvent::start_element(name))?;
3160         if let Some(ref value) = obj.access_control_translation {
3161             &AccessControlTranslationSerializer::serialize(
3162                 &mut writer,
3163                 "AccessControlTranslation",
3164                 value,
3165             )?;
3166         }
3167         if let Some(ref value) = obj.account {
3168             write_characters_element(writer, "Account", &value)?;
3169         }
3170         write_characters_element(writer, "Bucket", &obj.bucket)?;
3171         if let Some(ref value) = obj.encryption_configuration {
3172             &EncryptionConfigurationSerializer::serialize(
3173                 &mut writer,
3174                 "EncryptionConfiguration",
3175                 value,
3176             )?;
3177         }
3178         if let Some(ref value) = obj.metrics {
3179             &MetricsSerializer::serialize(&mut writer, "Metrics", value)?;
3180         }
3181         if let Some(ref value) = obj.replication_time {
3182             &ReplicationTimeSerializer::serialize(&mut writer, "ReplicationTime", value)?;
3183         }
3184         if let Some(ref value) = obj.storage_class {
3185             write_characters_element(writer, "StorageClass", &value)?;
3186         }
3187         writer.write(xml::writer::XmlEvent::end_element())
3188     }
3189 }
3190 
3191 #[allow(dead_code)]
3192 struct DisplayNameDeserializer;
3193 impl DisplayNameDeserializer {
3194     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3195     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3196         xml_util::deserialize_primitive(tag_name, stack, Ok)
3197     }
3198 }
3199 
3200 pub struct DisplayNameSerializer;
3201 impl DisplayNameSerializer {
3202     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3203     pub fn serialize<W>(
3204         mut writer: &mut EventWriter<W>,
3205         name: &str,
3206         obj: &String,
3207     ) -> Result<(), xml::writer::Error>
3208     where
3209         W: Write,
3210     {
3211         write_characters_element(writer, name, obj)
3212     }
3213 }
3214 
3215 #[allow(dead_code)]
3216 struct ETagDeserializer;
3217 impl ETagDeserializer {
3218     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3219     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3220         xml_util::deserialize_primitive(tag_name, stack, Ok)
3221     }
3222 }
3223 
3224 pub struct ETagSerializer;
3225 impl ETagSerializer {
3226     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3227     pub fn serialize<W>(
3228         mut writer: &mut EventWriter<W>,
3229         name: &str,
3230         obj: &String,
3231     ) -> Result<(), xml::writer::Error>
3232     where
3233         W: Write,
3234     {
3235         write_characters_element(writer, name, obj)
3236     }
3237 }
3238 
3239 #[allow(dead_code)]
3240 struct EmailAddressDeserializer;
3241 impl EmailAddressDeserializer {
3242     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3243     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3244         xml_util::deserialize_primitive(tag_name, stack, Ok)
3245     }
3246 }
3247 
3248 pub struct EmailAddressSerializer;
3249 impl EmailAddressSerializer {
3250     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3251     pub fn serialize<W>(
3252         mut writer: &mut EventWriter<W>,
3253         name: &str,
3254         obj: &String,
3255     ) -> Result<(), xml::writer::Error>
3256     where
3257         W: Write,
3258     {
3259         write_characters_element(writer, name, obj)
3260     }
3261 }
3262 
3263 pub struct EnableRequestProgressSerializer;
3264 impl EnableRequestProgressSerializer {
3265     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,3266     pub fn serialize<W>(
3267         mut writer: &mut EventWriter<W>,
3268         name: &str,
3269         obj: &bool,
3270     ) -> Result<(), xml::writer::Error>
3271     where
3272         W: Write,
3273     {
3274         write_characters_element(writer, name, &obj.to_string())
3275     }
3276 }
3277 
3278 #[allow(dead_code)]
3279 struct EncodingTypeDeserializer;
3280 impl EncodingTypeDeserializer {
3281     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3282     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3283         xml_util::deserialize_primitive(tag_name, stack, Ok)
3284     }
3285 }
3286 
3287 pub struct EncodingTypeSerializer;
3288 impl EncodingTypeSerializer {
3289     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3290     pub fn serialize<W>(
3291         mut writer: &mut EventWriter<W>,
3292         name: &str,
3293         obj: &String,
3294     ) -> Result<(), xml::writer::Error>
3295     where
3296         W: Write,
3297     {
3298         write_characters_element(writer, name, obj)
3299     }
3300 }
3301 
3302 /// <p>Contains the type of server-side encryption used.</p>
3303 #[derive(Clone, Debug, Default, PartialEq)]
3304 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3305 pub struct Encryption {
3306     /// <p>The server-side encryption algorithm used when storing job results in Amazon S3 (for example, AES256, aws:kms).</p>
3307     pub encryption_type: String,
3308     /// <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>
3309     pub kms_context: Option<String>,
3310     /// <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>
3311     pub kms_key_id: Option<String>,
3312 }
3313 
3314 pub struct EncryptionSerializer;
3315 impl EncryptionSerializer {
3316     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Encryption, ) -> Result<(), xml::writer::Error> where W: Write,3317     pub fn serialize<W>(
3318         mut writer: &mut EventWriter<W>,
3319         name: &str,
3320         obj: &Encryption,
3321     ) -> Result<(), xml::writer::Error>
3322     where
3323         W: Write,
3324     {
3325         writer.write(xml::writer::XmlEvent::start_element(name))?;
3326         write_characters_element(writer, "EncryptionType", &obj.encryption_type)?;
3327         if let Some(ref value) = obj.kms_context {
3328             write_characters_element(writer, "KMSContext", &value)?;
3329         }
3330         if let Some(ref value) = obj.kms_key_id {
3331             write_characters_element(writer, "KMSKeyId", &value)?;
3332         }
3333         writer.write(xml::writer::XmlEvent::end_element())
3334     }
3335 }
3336 
3337 /// <p>Specifies encryption-related information for an Amazon S3 bucket that is a destination for replicated objects.</p>
3338 #[derive(Clone, Debug, Default, PartialEq)]
3339 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3340 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3341 pub struct EncryptionConfiguration {
3342     /// <p>Specifies the ID (Key ARN or Alias ARN) of the customer managed AWS KMS key 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 KMS keys. 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>
3343     pub replica_kms_key_id: Option<String>,
3344 }
3345 
3346 #[allow(dead_code)]
3347 struct EncryptionConfigurationDeserializer;
3348 impl EncryptionConfigurationDeserializer {
3349     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<EncryptionConfiguration, XmlParseError>3350     fn deserialize<T: Peek + Next>(
3351         tag_name: &str,
3352         stack: &mut T,
3353     ) -> Result<EncryptionConfiguration, XmlParseError> {
3354         deserialize_elements::<_, EncryptionConfiguration, _>(
3355             tag_name,
3356             stack,
3357             |name, stack, obj| {
3358                 match name {
3359                     "ReplicaKmsKeyID" => {
3360                         obj.replica_kms_key_id = Some(ReplicaKmsKeyIDDeserializer::deserialize(
3361                             "ReplicaKmsKeyID",
3362                             stack,
3363                         )?);
3364                     }
3365                     _ => skip_tree(stack),
3366                 }
3367                 Ok(())
3368             },
3369         )
3370     }
3371 }
3372 
3373 pub struct EncryptionConfigurationSerializer;
3374 impl EncryptionConfigurationSerializer {
3375     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &EncryptionConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,3376     pub fn serialize<W>(
3377         mut writer: &mut EventWriter<W>,
3378         name: &str,
3379         obj: &EncryptionConfiguration,
3380     ) -> Result<(), xml::writer::Error>
3381     where
3382         W: Write,
3383     {
3384         writer.write(xml::writer::XmlEvent::start_element(name))?;
3385         if let Some(ref value) = obj.replica_kms_key_id {
3386             write_characters_element(writer, "ReplicaKmsKeyID", &value)?;
3387         }
3388         writer.write(xml::writer::XmlEvent::end_element())
3389     }
3390 }
3391 
3392 pub struct EndSerializer;
3393 impl EndSerializer {
3394     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,3395     pub fn serialize<W>(
3396         mut writer: &mut EventWriter<W>,
3397         name: &str,
3398         obj: &i64,
3399     ) -> Result<(), xml::writer::Error>
3400     where
3401         W: Write,
3402     {
3403         write_characters_element(writer, name, &obj.to_string())
3404     }
3405 }
3406 
3407 /// <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>
3408 #[derive(Clone, Debug, Default, PartialEq)]
3409 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3410 pub struct EndEvent {}
3411 
3412 #[allow(dead_code)]
3413 struct EndEventDeserializer;
3414 impl EndEventDeserializer {
3415     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<EndEvent, XmlParseError>3416     fn deserialize<T: Peek + Next>(
3417         tag_name: &str,
3418         stack: &mut T,
3419     ) -> Result<EndEvent, XmlParseError> {
3420         xml_util::start_element(tag_name, stack)?;
3421 
3422         let obj = EndEvent::default();
3423 
3424         xml_util::end_element(tag_name, stack)?;
3425 
3426         Ok(obj)
3427     }
3428 }
3429 /// <p>Container for all error elements.</p>
3430 #[derive(Clone, Debug, Default, PartialEq)]
3431 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3432 pub struct S3Error {
3433     /// <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 action 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 action 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 action 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>
3434     pub code: Option<String>,
3435     /// <p>The error key.</p>
3436     pub key: Option<String>,
3437     /// <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>
3438     pub message: Option<String>,
3439     /// <p>The version ID of the error.</p>
3440     pub version_id: Option<String>,
3441 }
3442 
3443 #[allow(dead_code)]
3444 struct S3ErrorDeserializer;
3445 impl S3ErrorDeserializer {
3446     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<S3Error, XmlParseError>3447     fn deserialize<T: Peek + Next>(
3448         tag_name: &str,
3449         stack: &mut T,
3450     ) -> Result<S3Error, XmlParseError> {
3451         deserialize_elements::<_, S3Error, _>(tag_name, stack, |name, stack, obj| {
3452             match name {
3453                 "Code" => {
3454                     obj.code = Some(CodeDeserializer::deserialize("Code", stack)?);
3455                 }
3456                 "Key" => {
3457                     obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
3458                 }
3459                 "Message" => {
3460                     obj.message = Some(MessageDeserializer::deserialize("Message", stack)?);
3461                 }
3462                 "VersionId" => {
3463                     obj.version_id = Some(ObjectVersionIdDeserializer::deserialize(
3464                         "VersionId",
3465                         stack,
3466                     )?);
3467                 }
3468                 _ => skip_tree(stack),
3469             }
3470             Ok(())
3471         })
3472     }
3473 }
3474 /// <p>The error information.</p>
3475 #[derive(Clone, Debug, Default, PartialEq)]
3476 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3477 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3478 pub struct ErrorDocument {
3479     /// <p><p>The object key name to use when a 4XX class error occurs.</p> <important> <p>Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints"> XML related object key constraints</a>.</p> </important></p>
3480     pub key: String,
3481 }
3482 
3483 #[allow(dead_code)]
3484 struct ErrorDocumentDeserializer;
3485 impl ErrorDocumentDeserializer {
3486     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ErrorDocument, XmlParseError>3487     fn deserialize<T: Peek + Next>(
3488         tag_name: &str,
3489         stack: &mut T,
3490     ) -> Result<ErrorDocument, XmlParseError> {
3491         deserialize_elements::<_, ErrorDocument, _>(tag_name, stack, |name, stack, obj| {
3492             match name {
3493                 "Key" => {
3494                     obj.key = ObjectKeyDeserializer::deserialize("Key", stack)?;
3495                 }
3496                 _ => skip_tree(stack),
3497             }
3498             Ok(())
3499         })
3500     }
3501 }
3502 
3503 pub struct ErrorDocumentSerializer;
3504 impl ErrorDocumentSerializer {
3505     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ErrorDocument, ) -> Result<(), xml::writer::Error> where W: Write,3506     pub fn serialize<W>(
3507         mut writer: &mut EventWriter<W>,
3508         name: &str,
3509         obj: &ErrorDocument,
3510     ) -> Result<(), xml::writer::Error>
3511     where
3512         W: Write,
3513     {
3514         writer.write(xml::writer::XmlEvent::start_element(name))?;
3515         write_characters_element(writer, "Key", &obj.key)?;
3516         writer.write(xml::writer::XmlEvent::end_element())
3517     }
3518 }
3519 
3520 #[allow(dead_code)]
3521 struct ErrorsDeserializer;
3522 impl ErrorsDeserializer {
3523     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<S3Error>, XmlParseError>3524     fn deserialize<T: Peek + Next>(
3525         tag_name: &str,
3526         stack: &mut T,
3527     ) -> Result<Vec<S3Error>, XmlParseError> {
3528         let mut obj = vec![];
3529 
3530         loop {
3531             let consume_next_tag = match stack.peek() {
3532                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
3533                     name.local_name == tag_name
3534                 }
3535                 _ => false,
3536             };
3537 
3538             if consume_next_tag {
3539                 obj.push(S3ErrorDeserializer::deserialize(tag_name, stack)?);
3540             } else {
3541                 break;
3542             }
3543         }
3544 
3545         Ok(obj)
3546     }
3547 }
3548 #[allow(dead_code)]
3549 struct EventDeserializer;
3550 impl EventDeserializer {
3551     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3552     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3553         xml_util::deserialize_primitive(tag_name, stack, Ok)
3554     }
3555 }
3556 
3557 pub struct EventSerializer;
3558 impl EventSerializer {
3559     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3560     pub fn serialize<W>(
3561         mut writer: &mut EventWriter<W>,
3562         name: &str,
3563         obj: &String,
3564     ) -> Result<(), xml::writer::Error>
3565     where
3566         W: Write,
3567     {
3568         write_characters_element(writer, name, obj)
3569     }
3570 }
3571 
3572 #[allow(dead_code)]
3573 struct EventListDeserializer;
3574 impl EventListDeserializer {
3575     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<String>, XmlParseError>3576     fn deserialize<T: Peek + Next>(
3577         tag_name: &str,
3578         stack: &mut T,
3579     ) -> Result<Vec<String>, XmlParseError> {
3580         let mut obj = vec![];
3581 
3582         loop {
3583             let consume_next_tag = match stack.peek() {
3584                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
3585                     name.local_name == tag_name
3586                 }
3587                 _ => false,
3588             };
3589 
3590             if consume_next_tag {
3591                 obj.push(EventDeserializer::deserialize(tag_name, stack)?);
3592             } else {
3593                 break;
3594             }
3595         }
3596 
3597         Ok(obj)
3598     }
3599 }
3600 
3601 pub struct EventListSerializer;
3602 impl EventListSerializer {
3603     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<String>, ) -> Result<(), xml::writer::Error> where W: Write,3604     pub fn serialize<W>(
3605         mut writer: &mut EventWriter<W>,
3606         name: &str,
3607         obj: &Vec<String>,
3608     ) -> Result<(), xml::writer::Error>
3609     where
3610         W: Write,
3611     {
3612         for element in obj {
3613             EventSerializer::serialize(writer, name, element)?;
3614         }
3615         Ok(())
3616     }
3617 }
3618 
3619 /// <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 User Guide</i>. </p>
3620 #[derive(Clone, Debug, Default, PartialEq)]
3621 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3622 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3623 pub struct ExistingObjectReplication {
3624     /// <p><p/></p>
3625     pub status: String,
3626 }
3627 
3628 #[allow(dead_code)]
3629 struct ExistingObjectReplicationDeserializer;
3630 impl ExistingObjectReplicationDeserializer {
3631     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ExistingObjectReplication, XmlParseError>3632     fn deserialize<T: Peek + Next>(
3633         tag_name: &str,
3634         stack: &mut T,
3635     ) -> Result<ExistingObjectReplication, XmlParseError> {
3636         deserialize_elements::<_, ExistingObjectReplication, _>(
3637             tag_name,
3638             stack,
3639             |name, stack, obj| {
3640                 match name {
3641                     "Status" => {
3642                         obj.status = ExistingObjectReplicationStatusDeserializer::deserialize(
3643                             "Status", stack,
3644                         )?;
3645                     }
3646                     _ => skip_tree(stack),
3647                 }
3648                 Ok(())
3649             },
3650         )
3651     }
3652 }
3653 
3654 pub struct ExistingObjectReplicationSerializer;
3655 impl ExistingObjectReplicationSerializer {
3656     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ExistingObjectReplication, ) -> Result<(), xml::writer::Error> where W: Write,3657     pub fn serialize<W>(
3658         mut writer: &mut EventWriter<W>,
3659         name: &str,
3660         obj: &ExistingObjectReplication,
3661     ) -> Result<(), xml::writer::Error>
3662     where
3663         W: Write,
3664     {
3665         writer.write(xml::writer::XmlEvent::start_element(name))?;
3666         write_characters_element(writer, "Status", &obj.status)?;
3667         writer.write(xml::writer::XmlEvent::end_element())
3668     }
3669 }
3670 
3671 #[allow(dead_code)]
3672 struct ExistingObjectReplicationStatusDeserializer;
3673 impl ExistingObjectReplicationStatusDeserializer {
3674     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3675     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3676         xml_util::deserialize_primitive(tag_name, stack, Ok)
3677     }
3678 }
3679 
3680 pub struct ExistingObjectReplicationStatusSerializer;
3681 impl ExistingObjectReplicationStatusSerializer {
3682     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3683     pub fn serialize<W>(
3684         mut writer: &mut EventWriter<W>,
3685         name: &str,
3686         obj: &String,
3687     ) -> Result<(), xml::writer::Error>
3688     where
3689         W: Write,
3690     {
3691         write_characters_element(writer, name, obj)
3692     }
3693 }
3694 
3695 #[allow(dead_code)]
3696 struct ExpirationStatusDeserializer;
3697 impl ExpirationStatusDeserializer {
3698     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3699     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3700         xml_util::deserialize_primitive(tag_name, stack, Ok)
3701     }
3702 }
3703 
3704 pub struct ExpirationStatusSerializer;
3705 impl ExpirationStatusSerializer {
3706     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3707     pub fn serialize<W>(
3708         mut writer: &mut EventWriter<W>,
3709         name: &str,
3710         obj: &String,
3711     ) -> Result<(), xml::writer::Error>
3712     where
3713         W: Write,
3714     {
3715         write_characters_element(writer, name, obj)
3716     }
3717 }
3718 
3719 #[allow(dead_code)]
3720 struct ExpiredObjectDeleteMarkerDeserializer;
3721 impl ExpiredObjectDeleteMarkerDeserializer {
3722     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>3723     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
3724         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
3725     }
3726 }
3727 
3728 pub struct ExpiredObjectDeleteMarkerSerializer;
3729 impl ExpiredObjectDeleteMarkerSerializer {
3730     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,3731     pub fn serialize<W>(
3732         mut writer: &mut EventWriter<W>,
3733         name: &str,
3734         obj: &bool,
3735     ) -> Result<(), xml::writer::Error>
3736     where
3737         W: Write,
3738     {
3739         write_characters_element(writer, name, &obj.to_string())
3740     }
3741 }
3742 
3743 #[allow(dead_code)]
3744 struct ExposeHeaderDeserializer;
3745 impl ExposeHeaderDeserializer {
3746     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3747     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3748         xml_util::deserialize_primitive(tag_name, stack, Ok)
3749     }
3750 }
3751 
3752 pub struct ExposeHeaderSerializer;
3753 impl ExposeHeaderSerializer {
3754     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3755     pub fn serialize<W>(
3756         mut writer: &mut EventWriter<W>,
3757         name: &str,
3758         obj: &String,
3759     ) -> Result<(), xml::writer::Error>
3760     where
3761         W: Write,
3762     {
3763         write_characters_element(writer, name, obj)
3764     }
3765 }
3766 
3767 #[allow(dead_code)]
3768 struct ExposeHeadersDeserializer;
3769 impl ExposeHeadersDeserializer {
3770     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<String>, XmlParseError>3771     fn deserialize<T: Peek + Next>(
3772         tag_name: &str,
3773         stack: &mut T,
3774     ) -> Result<Vec<String>, XmlParseError> {
3775         let mut obj = vec![];
3776 
3777         loop {
3778             let consume_next_tag = match stack.peek() {
3779                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
3780                     name.local_name == tag_name
3781                 }
3782                 _ => false,
3783             };
3784 
3785             if consume_next_tag {
3786                 obj.push(ExposeHeaderDeserializer::deserialize(tag_name, stack)?);
3787             } else {
3788                 break;
3789             }
3790         }
3791 
3792         Ok(obj)
3793     }
3794 }
3795 
3796 pub struct ExposeHeadersSerializer;
3797 impl ExposeHeadersSerializer {
3798     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<String>, ) -> Result<(), xml::writer::Error> where W: Write,3799     pub fn serialize<W>(
3800         mut writer: &mut EventWriter<W>,
3801         name: &str,
3802         obj: &Vec<String>,
3803     ) -> Result<(), xml::writer::Error>
3804     where
3805         W: Write,
3806     {
3807         for element in obj {
3808             ExposeHeaderSerializer::serialize(writer, name, element)?;
3809         }
3810         Ok(())
3811     }
3812 }
3813 
3814 pub struct ExpressionSerializer;
3815 impl ExpressionSerializer {
3816     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3817     pub fn serialize<W>(
3818         mut writer: &mut EventWriter<W>,
3819         name: &str,
3820         obj: &String,
3821     ) -> Result<(), xml::writer::Error>
3822     where
3823         W: Write,
3824     {
3825         write_characters_element(writer, name, obj)
3826     }
3827 }
3828 
3829 pub struct ExpressionTypeSerializer;
3830 impl ExpressionTypeSerializer {
3831     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3832     pub fn serialize<W>(
3833         mut writer: &mut EventWriter<W>,
3834         name: &str,
3835         obj: &String,
3836     ) -> Result<(), xml::writer::Error>
3837     where
3838         W: Write,
3839     {
3840         write_characters_element(writer, name, obj)
3841     }
3842 }
3843 
3844 pub struct FetchOwnerSerializer;
3845 impl FetchOwnerSerializer {
3846     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,3847     pub fn serialize<W>(
3848         mut writer: &mut EventWriter<W>,
3849         name: &str,
3850         obj: &bool,
3851     ) -> Result<(), xml::writer::Error>
3852     where
3853         W: Write,
3854     {
3855         write_characters_element(writer, name, &obj.to_string())
3856     }
3857 }
3858 
3859 pub struct FieldDelimiterSerializer;
3860 impl FieldDelimiterSerializer {
3861     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3862     pub fn serialize<W>(
3863         mut writer: &mut EventWriter<W>,
3864         name: &str,
3865         obj: &String,
3866     ) -> Result<(), xml::writer::Error>
3867     where
3868         W: Write,
3869     {
3870         write_characters_element(writer, name, obj)
3871     }
3872 }
3873 
3874 pub struct FileHeaderInfoSerializer;
3875 impl FileHeaderInfoSerializer {
3876     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,3877     pub fn serialize<W>(
3878         mut writer: &mut EventWriter<W>,
3879         name: &str,
3880         obj: &String,
3881     ) -> Result<(), xml::writer::Error>
3882     where
3883         W: Write,
3884     {
3885         write_characters_element(writer, name, obj)
3886     }
3887 }
3888 
3889 /// <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>
3890 #[derive(Clone, Debug, Default, PartialEq)]
3891 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3892 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3893 pub struct FilterRule {
3894     /// <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 S3 User Guide</i>.</p>
3895     pub name: Option<String>,
3896     /// <p>The value that the filter searches for in object key names.</p>
3897     pub value: Option<String>,
3898 }
3899 
3900 #[allow(dead_code)]
3901 struct FilterRuleDeserializer;
3902 impl FilterRuleDeserializer {
3903     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<FilterRule, XmlParseError>3904     fn deserialize<T: Peek + Next>(
3905         tag_name: &str,
3906         stack: &mut T,
3907     ) -> Result<FilterRule, XmlParseError> {
3908         deserialize_elements::<_, FilterRule, _>(tag_name, stack, |name, stack, obj| {
3909             match name {
3910                 "Name" => {
3911                     obj.name = Some(FilterRuleNameDeserializer::deserialize("Name", stack)?);
3912                 }
3913                 "Value" => {
3914                     obj.value = Some(FilterRuleValueDeserializer::deserialize("Value", stack)?);
3915                 }
3916                 _ => skip_tree(stack),
3917             }
3918             Ok(())
3919         })
3920     }
3921 }
3922 
3923 pub struct FilterRuleSerializer;
3924 impl FilterRuleSerializer {
3925     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &FilterRule, ) -> Result<(), xml::writer::Error> where W: Write,3926     pub fn serialize<W>(
3927         mut writer: &mut EventWriter<W>,
3928         name: &str,
3929         obj: &FilterRule,
3930     ) -> Result<(), xml::writer::Error>
3931     where
3932         W: Write,
3933     {
3934         writer.write(xml::writer::XmlEvent::start_element(name))?;
3935         if let Some(ref value) = obj.name {
3936             write_characters_element(writer, "Name", &value)?;
3937         }
3938         if let Some(ref value) = obj.value {
3939             write_characters_element(writer, "Value", &value)?;
3940         }
3941         writer.write(xml::writer::XmlEvent::end_element())
3942     }
3943 }
3944 
3945 #[allow(dead_code)]
3946 struct FilterRuleListDeserializer;
3947 impl FilterRuleListDeserializer {
3948     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<FilterRule>, XmlParseError>3949     fn deserialize<T: Peek + Next>(
3950         tag_name: &str,
3951         stack: &mut T,
3952     ) -> Result<Vec<FilterRule>, XmlParseError> {
3953         let mut obj = vec![];
3954 
3955         loop {
3956             let consume_next_tag = match stack.peek() {
3957                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
3958                     name.local_name == tag_name
3959                 }
3960                 _ => false,
3961             };
3962 
3963             if consume_next_tag {
3964                 obj.push(FilterRuleDeserializer::deserialize(tag_name, stack)?);
3965             } else {
3966                 break;
3967             }
3968         }
3969 
3970         Ok(obj)
3971     }
3972 }
3973 
3974 pub struct FilterRuleListSerializer;
3975 impl FilterRuleListSerializer {
3976     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<FilterRule>, ) -> Result<(), xml::writer::Error> where W: Write,3977     pub fn serialize<W>(
3978         mut writer: &mut EventWriter<W>,
3979         name: &str,
3980         obj: &Vec<FilterRule>,
3981     ) -> Result<(), xml::writer::Error>
3982     where
3983         W: Write,
3984     {
3985         for element in obj {
3986             FilterRuleSerializer::serialize(writer, name, element)?;
3987         }
3988         Ok(())
3989     }
3990 }
3991 
3992 #[allow(dead_code)]
3993 struct FilterRuleNameDeserializer;
3994 impl FilterRuleNameDeserializer {
3995     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>3996     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3997         xml_util::deserialize_primitive(tag_name, stack, Ok)
3998     }
3999 }
4000 
4001 pub struct FilterRuleNameSerializer;
4002 impl FilterRuleNameSerializer {
4003     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,4004     pub fn serialize<W>(
4005         mut writer: &mut EventWriter<W>,
4006         name: &str,
4007         obj: &String,
4008     ) -> Result<(), xml::writer::Error>
4009     where
4010         W: Write,
4011     {
4012         write_characters_element(writer, name, obj)
4013     }
4014 }
4015 
4016 #[allow(dead_code)]
4017 struct FilterRuleValueDeserializer;
4018 impl FilterRuleValueDeserializer {
4019     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>4020     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4021         xml_util::deserialize_primitive(tag_name, stack, Ok)
4022     }
4023 }
4024 
4025 pub struct FilterRuleValueSerializer;
4026 impl FilterRuleValueSerializer {
4027     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,4028     pub fn serialize<W>(
4029         mut writer: &mut EventWriter<W>,
4030         name: &str,
4031         obj: &String,
4032     ) -> Result<(), xml::writer::Error>
4033     where
4034         W: Write,
4035     {
4036         write_characters_element(writer, name, obj)
4037     }
4038 }
4039 
4040 #[derive(Clone, Debug, Default, PartialEq)]
4041 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4042 pub struct GetBucketAccelerateConfigurationOutput {
4043     /// <p>The accelerate configuration of the bucket.</p>
4044     pub status: Option<String>,
4045 }
4046 
4047 #[allow(dead_code)]
4048 struct GetBucketAccelerateConfigurationOutputDeserializer;
4049 impl GetBucketAccelerateConfigurationOutputDeserializer {
4050     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketAccelerateConfigurationOutput, XmlParseError>4051     fn deserialize<T: Peek + Next>(
4052         tag_name: &str,
4053         stack: &mut T,
4054     ) -> Result<GetBucketAccelerateConfigurationOutput, XmlParseError> {
4055         deserialize_elements::<_, GetBucketAccelerateConfigurationOutput, _>(
4056             tag_name,
4057             stack,
4058             |name, stack, obj| {
4059                 match name {
4060                     "Status" => {
4061                         obj.status = Some(BucketAccelerateStatusDeserializer::deserialize(
4062                             "Status", stack,
4063                         )?);
4064                     }
4065                     _ => skip_tree(stack),
4066                 }
4067                 Ok(())
4068             },
4069         )
4070     }
4071 }
4072 #[derive(Clone, Debug, Default, PartialEq)]
4073 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4074 pub struct GetBucketAccelerateConfigurationRequest {
4075     /// <p>The name of the bucket for which the accelerate configuration is retrieved.</p>
4076     pub bucket: String,
4077     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4078     pub expected_bucket_owner: Option<String>,
4079 }
4080 
4081 #[derive(Clone, Debug, Default, PartialEq)]
4082 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4083 pub struct GetBucketAclOutput {
4084     /// <p>A list of grants.</p>
4085     pub grants: Option<Vec<Grant>>,
4086     /// <p>Container for the bucket owner's display name and ID.</p>
4087     pub owner: Option<Owner>,
4088 }
4089 
4090 #[allow(dead_code)]
4091 struct GetBucketAclOutputDeserializer;
4092 impl GetBucketAclOutputDeserializer {
4093     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketAclOutput, XmlParseError>4094     fn deserialize<T: Peek + Next>(
4095         tag_name: &str,
4096         stack: &mut T,
4097     ) -> Result<GetBucketAclOutput, XmlParseError> {
4098         deserialize_elements::<_, GetBucketAclOutput, _>(tag_name, stack, |name, stack, obj| {
4099             match name {
4100                 "AccessControlList" => {
4101                     obj.grants
4102                         .get_or_insert(vec![])
4103                         .extend(GrantsDeserializer::deserialize("AccessControlList", stack)?);
4104                 }
4105                 "Owner" => {
4106                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
4107                 }
4108                 _ => skip_tree(stack),
4109             }
4110             Ok(())
4111         })
4112     }
4113 }
4114 #[derive(Clone, Debug, Default, PartialEq)]
4115 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4116 pub struct GetBucketAclRequest {
4117     /// <p>Specifies the S3 bucket whose ACL is being requested.</p>
4118     pub bucket: String,
4119     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4120     pub expected_bucket_owner: Option<String>,
4121 }
4122 
4123 #[derive(Clone, Debug, Default, PartialEq)]
4124 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4125 pub struct GetBucketAnalyticsConfigurationOutput {
4126     /// <p>The configuration and any analyses for the analytics filter.</p>
4127     pub analytics_configuration: Option<AnalyticsConfiguration>,
4128 }
4129 
4130 #[allow(dead_code)]
4131 struct GetBucketAnalyticsConfigurationOutputDeserializer;
4132 impl GetBucketAnalyticsConfigurationOutputDeserializer {
4133     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketAnalyticsConfigurationOutput, XmlParseError>4134     fn deserialize<T: Peek + Next>(
4135         tag_name: &str,
4136         stack: &mut T,
4137     ) -> Result<GetBucketAnalyticsConfigurationOutput, XmlParseError> {
4138         Ok(GetBucketAnalyticsConfigurationOutput {
4139             analytics_configuration: Some(AnalyticsConfigurationDeserializer::deserialize(
4140                 "AnalyticsConfiguration",
4141                 stack,
4142             )?),
4143             ..GetBucketAnalyticsConfigurationOutput::default()
4144         })
4145     }
4146 }
4147 #[derive(Clone, Debug, Default, PartialEq)]
4148 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4149 pub struct GetBucketAnalyticsConfigurationRequest {
4150     /// <p>The name of the bucket from which an analytics configuration is retrieved.</p>
4151     pub bucket: String,
4152     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4153     pub expected_bucket_owner: Option<String>,
4154     /// <p>The ID that identifies the analytics configuration.</p>
4155     pub id: String,
4156 }
4157 
4158 #[derive(Clone, Debug, Default, PartialEq)]
4159 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4160 pub struct GetBucketCorsOutput {
4161     /// <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>
4162     pub cors_rules: Option<Vec<CORSRule>>,
4163 }
4164 
4165 #[allow(dead_code)]
4166 struct GetBucketCorsOutputDeserializer;
4167 impl GetBucketCorsOutputDeserializer {
4168     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketCorsOutput, XmlParseError>4169     fn deserialize<T: Peek + Next>(
4170         tag_name: &str,
4171         stack: &mut T,
4172     ) -> Result<GetBucketCorsOutput, XmlParseError> {
4173         deserialize_elements::<_, GetBucketCorsOutput, _>(tag_name, stack, |name, stack, obj| {
4174             match name {
4175                 "CORSRule" => {
4176                     obj.cors_rules
4177                         .get_or_insert(vec![])
4178                         .extend(CORSRulesDeserializer::deserialize("CORSRule", stack)?);
4179                 }
4180                 _ => skip_tree(stack),
4181             }
4182             Ok(())
4183         })
4184     }
4185 }
4186 #[derive(Clone, Debug, Default, PartialEq)]
4187 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4188 pub struct GetBucketCorsRequest {
4189     /// <p>The bucket name for which to get the cors configuration.</p>
4190     pub bucket: String,
4191     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4192     pub expected_bucket_owner: Option<String>,
4193 }
4194 
4195 #[derive(Clone, Debug, Default, PartialEq)]
4196 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4197 pub struct GetBucketEncryptionOutput {
4198     pub server_side_encryption_configuration: Option<ServerSideEncryptionConfiguration>,
4199 }
4200 
4201 #[allow(dead_code)]
4202 struct GetBucketEncryptionOutputDeserializer;
4203 impl GetBucketEncryptionOutputDeserializer {
4204     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketEncryptionOutput, XmlParseError>4205     fn deserialize<T: Peek + Next>(
4206         tag_name: &str,
4207         stack: &mut T,
4208     ) -> Result<GetBucketEncryptionOutput, XmlParseError> {
4209         Ok(GetBucketEncryptionOutput {
4210             server_side_encryption_configuration: Some(
4211                 ServerSideEncryptionConfigurationDeserializer::deserialize(
4212                     "ServerSideEncryptionConfiguration",
4213                     stack,
4214                 )?,
4215             ),
4216             ..GetBucketEncryptionOutput::default()
4217         })
4218     }
4219 }
4220 #[derive(Clone, Debug, Default, PartialEq)]
4221 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4222 pub struct GetBucketEncryptionRequest {
4223     /// <p>The name of the bucket from which the server-side encryption configuration is retrieved.</p>
4224     pub bucket: String,
4225     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4226     pub expected_bucket_owner: Option<String>,
4227 }
4228 
4229 #[derive(Clone, Debug, Default, PartialEq)]
4230 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4231 pub struct GetBucketIntelligentTieringConfigurationOutput {
4232     /// <p>Container for S3 Intelligent-Tiering configuration.</p>
4233     pub intelligent_tiering_configuration: Option<IntelligentTieringConfiguration>,
4234 }
4235 
4236 #[allow(dead_code)]
4237 struct GetBucketIntelligentTieringConfigurationOutputDeserializer;
4238 impl GetBucketIntelligentTieringConfigurationOutputDeserializer {
4239     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketIntelligentTieringConfigurationOutput, XmlParseError>4240     fn deserialize<T: Peek + Next>(
4241         tag_name: &str,
4242         stack: &mut T,
4243     ) -> Result<GetBucketIntelligentTieringConfigurationOutput, XmlParseError> {
4244         Ok(GetBucketIntelligentTieringConfigurationOutput {
4245             intelligent_tiering_configuration: Some(
4246                 IntelligentTieringConfigurationDeserializer::deserialize(
4247                     "IntelligentTieringConfiguration",
4248                     stack,
4249                 )?,
4250             ),
4251             ..GetBucketIntelligentTieringConfigurationOutput::default()
4252         })
4253     }
4254 }
4255 #[derive(Clone, Debug, Default, PartialEq)]
4256 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4257 pub struct GetBucketIntelligentTieringConfigurationRequest {
4258     /// <p>The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.</p>
4259     pub bucket: String,
4260     /// <p>The ID used to identify the S3 Intelligent-Tiering configuration.</p>
4261     pub id: String,
4262 }
4263 
4264 #[derive(Clone, Debug, Default, PartialEq)]
4265 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4266 pub struct GetBucketInventoryConfigurationOutput {
4267     /// <p>Specifies the inventory configuration.</p>
4268     pub inventory_configuration: Option<InventoryConfiguration>,
4269 }
4270 
4271 #[allow(dead_code)]
4272 struct GetBucketInventoryConfigurationOutputDeserializer;
4273 impl GetBucketInventoryConfigurationOutputDeserializer {
4274     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketInventoryConfigurationOutput, XmlParseError>4275     fn deserialize<T: Peek + Next>(
4276         tag_name: &str,
4277         stack: &mut T,
4278     ) -> Result<GetBucketInventoryConfigurationOutput, XmlParseError> {
4279         Ok(GetBucketInventoryConfigurationOutput {
4280             inventory_configuration: Some(InventoryConfigurationDeserializer::deserialize(
4281                 "InventoryConfiguration",
4282                 stack,
4283             )?),
4284             ..GetBucketInventoryConfigurationOutput::default()
4285         })
4286     }
4287 }
4288 #[derive(Clone, Debug, Default, PartialEq)]
4289 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4290 pub struct GetBucketInventoryConfigurationRequest {
4291     /// <p>The name of the bucket containing the inventory configuration to retrieve.</p>
4292     pub bucket: String,
4293     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4294     pub expected_bucket_owner: Option<String>,
4295     /// <p>The ID used to identify the inventory configuration.</p>
4296     pub id: String,
4297 }
4298 
4299 #[derive(Clone, Debug, Default, PartialEq)]
4300 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4301 pub struct GetBucketLifecycleConfigurationOutput {
4302     /// <p>Container for a lifecycle rule.</p>
4303     pub rules: Option<Vec<LifecycleRule>>,
4304 }
4305 
4306 #[allow(dead_code)]
4307 struct GetBucketLifecycleConfigurationOutputDeserializer;
4308 impl GetBucketLifecycleConfigurationOutputDeserializer {
4309     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketLifecycleConfigurationOutput, XmlParseError>4310     fn deserialize<T: Peek + Next>(
4311         tag_name: &str,
4312         stack: &mut T,
4313     ) -> Result<GetBucketLifecycleConfigurationOutput, XmlParseError> {
4314         deserialize_elements::<_, GetBucketLifecycleConfigurationOutput, _>(
4315             tag_name,
4316             stack,
4317             |name, stack, obj| {
4318                 match name {
4319                     "Rule" => {
4320                         obj.rules
4321                             .get_or_insert(vec![])
4322                             .extend(LifecycleRulesDeserializer::deserialize("Rule", stack)?);
4323                     }
4324                     _ => skip_tree(stack),
4325                 }
4326                 Ok(())
4327             },
4328         )
4329     }
4330 }
4331 #[derive(Clone, Debug, Default, PartialEq)]
4332 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4333 pub struct GetBucketLifecycleConfigurationRequest {
4334     /// <p>The name of the bucket for which to get the lifecycle information.</p>
4335     pub bucket: String,
4336     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4337     pub expected_bucket_owner: Option<String>,
4338 }
4339 
4340 #[derive(Clone, Debug, Default, PartialEq)]
4341 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4342 pub struct GetBucketLifecycleOutput {
4343     /// <p>Container for a lifecycle rule.</p>
4344     pub rules: Option<Vec<Rule>>,
4345 }
4346 
4347 #[allow(dead_code)]
4348 struct GetBucketLifecycleOutputDeserializer;
4349 impl GetBucketLifecycleOutputDeserializer {
4350     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketLifecycleOutput, XmlParseError>4351     fn deserialize<T: Peek + Next>(
4352         tag_name: &str,
4353         stack: &mut T,
4354     ) -> Result<GetBucketLifecycleOutput, XmlParseError> {
4355         deserialize_elements::<_, GetBucketLifecycleOutput, _>(
4356             tag_name,
4357             stack,
4358             |name, stack, obj| {
4359                 match name {
4360                     "Rule" => {
4361                         obj.rules
4362                             .get_or_insert(vec![])
4363                             .extend(RulesDeserializer::deserialize("Rule", stack)?);
4364                     }
4365                     _ => skip_tree(stack),
4366                 }
4367                 Ok(())
4368             },
4369         )
4370     }
4371 }
4372 #[derive(Clone, Debug, Default, PartialEq)]
4373 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4374 pub struct GetBucketLifecycleRequest {
4375     /// <p>The name of the bucket for which to get the lifecycle information.</p>
4376     pub bucket: String,
4377     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4378     pub expected_bucket_owner: Option<String>,
4379 }
4380 
4381 #[derive(Clone, Debug, Default, PartialEq)]
4382 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4383 pub struct GetBucketLocationOutput {
4384     /// <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>. Buckets in Region <code>us-east-1</code> have a LocationConstraint of <code>null</code>.</p>
4385     pub location_constraint: Option<String>,
4386 }
4387 
4388 #[allow(dead_code)]
4389 struct GetBucketLocationOutputDeserializer;
4390 impl GetBucketLocationOutputDeserializer {
4391     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketLocationOutput, XmlParseError>4392     fn deserialize<T: Peek + Next>(
4393         tag_name: &str,
4394         stack: &mut T,
4395     ) -> Result<GetBucketLocationOutput, XmlParseError> {
4396         let mut obj = GetBucketLocationOutput::default();
4397         obj.location_constraint = Some(BucketLocationConstraintDeserializer::deserialize(
4398             "LocationConstraint",
4399             stack,
4400         )?);
4401         Ok(obj)
4402     }
4403 }
4404 #[derive(Clone, Debug, Default, PartialEq)]
4405 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4406 pub struct GetBucketLocationRequest {
4407     /// <p>The name of the bucket for which to get the location.</p>
4408     pub bucket: String,
4409     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4410     pub expected_bucket_owner: Option<String>,
4411 }
4412 
4413 #[derive(Clone, Debug, Default, PartialEq)]
4414 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4415 pub struct GetBucketLoggingOutput {
4416     pub logging_enabled: Option<LoggingEnabled>,
4417 }
4418 
4419 #[allow(dead_code)]
4420 struct GetBucketLoggingOutputDeserializer;
4421 impl GetBucketLoggingOutputDeserializer {
4422     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketLoggingOutput, XmlParseError>4423     fn deserialize<T: Peek + Next>(
4424         tag_name: &str,
4425         stack: &mut T,
4426     ) -> Result<GetBucketLoggingOutput, XmlParseError> {
4427         deserialize_elements::<_, GetBucketLoggingOutput, _>(tag_name, stack, |name, stack, obj| {
4428             match name {
4429                 "LoggingEnabled" => {
4430                     obj.logging_enabled = Some(LoggingEnabledDeserializer::deserialize(
4431                         "LoggingEnabled",
4432                         stack,
4433                     )?);
4434                 }
4435                 _ => skip_tree(stack),
4436             }
4437             Ok(())
4438         })
4439     }
4440 }
4441 #[derive(Clone, Debug, Default, PartialEq)]
4442 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4443 pub struct GetBucketLoggingRequest {
4444     /// <p>The bucket name for which to get the logging information.</p>
4445     pub bucket: String,
4446     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4447     pub expected_bucket_owner: Option<String>,
4448 }
4449 
4450 #[derive(Clone, Debug, Default, PartialEq)]
4451 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4452 pub struct GetBucketMetricsConfigurationOutput {
4453     /// <p>Specifies the metrics configuration.</p>
4454     pub metrics_configuration: Option<MetricsConfiguration>,
4455 }
4456 
4457 #[allow(dead_code)]
4458 struct GetBucketMetricsConfigurationOutputDeserializer;
4459 impl GetBucketMetricsConfigurationOutputDeserializer {
4460     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketMetricsConfigurationOutput, XmlParseError>4461     fn deserialize<T: Peek + Next>(
4462         tag_name: &str,
4463         stack: &mut T,
4464     ) -> Result<GetBucketMetricsConfigurationOutput, XmlParseError> {
4465         Ok(GetBucketMetricsConfigurationOutput {
4466             metrics_configuration: Some(MetricsConfigurationDeserializer::deserialize(
4467                 "MetricsConfiguration",
4468                 stack,
4469             )?),
4470             ..GetBucketMetricsConfigurationOutput::default()
4471         })
4472     }
4473 }
4474 #[derive(Clone, Debug, Default, PartialEq)]
4475 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4476 pub struct GetBucketMetricsConfigurationRequest {
4477     /// <p>The name of the bucket containing the metrics configuration to retrieve.</p>
4478     pub bucket: String,
4479     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4480     pub expected_bucket_owner: Option<String>,
4481     /// <p>The ID used to identify the metrics configuration.</p>
4482     pub id: String,
4483 }
4484 
4485 #[derive(Clone, Debug, Default, PartialEq)]
4486 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4487 pub struct GetBucketNotificationConfigurationRequest {
4488     /// <p>The name of the bucket for which to get the notification configuration.</p>
4489     pub bucket: String,
4490     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4491     pub expected_bucket_owner: Option<String>,
4492 }
4493 
4494 #[derive(Clone, Debug, Default, PartialEq)]
4495 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4496 pub struct GetBucketOwnershipControlsOutput {
4497     /// <p>The <code>OwnershipControls</code> (BucketOwnerPreferred or ObjectWriter) currently in effect for this Amazon S3 bucket.</p>
4498     pub ownership_controls: Option<OwnershipControls>,
4499 }
4500 
4501 #[allow(dead_code)]
4502 struct GetBucketOwnershipControlsOutputDeserializer;
4503 impl GetBucketOwnershipControlsOutputDeserializer {
4504     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketOwnershipControlsOutput, XmlParseError>4505     fn deserialize<T: Peek + Next>(
4506         tag_name: &str,
4507         stack: &mut T,
4508     ) -> Result<GetBucketOwnershipControlsOutput, XmlParseError> {
4509         Ok(GetBucketOwnershipControlsOutput {
4510             ownership_controls: Some(OwnershipControlsDeserializer::deserialize(
4511                 "OwnershipControls",
4512                 stack,
4513             )?),
4514             ..GetBucketOwnershipControlsOutput::default()
4515         })
4516     }
4517 }
4518 #[derive(Clone, Debug, Default, PartialEq)]
4519 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4520 pub struct GetBucketOwnershipControlsRequest {
4521     /// <p>The name of the Amazon S3 bucket whose <code>OwnershipControls</code> you want to retrieve. </p>
4522     pub bucket: String,
4523     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4524     pub expected_bucket_owner: Option<String>,
4525 }
4526 
4527 #[derive(Clone, Debug, Default, PartialEq)]
4528 pub struct GetBucketPolicyOutput {
4529     /// <p>The bucket policy as a JSON document.</p>
4530     pub policy: Option<String>,
4531 }
4532 
4533 #[derive(Clone, Debug, Default, PartialEq)]
4534 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4535 pub struct GetBucketPolicyRequest {
4536     /// <p>The bucket name for which to get the bucket policy.</p>
4537     pub bucket: String,
4538     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4539     pub expected_bucket_owner: Option<String>,
4540 }
4541 
4542 #[derive(Clone, Debug, Default, PartialEq)]
4543 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4544 pub struct GetBucketPolicyStatusOutput {
4545     /// <p>The policy status for the specified bucket.</p>
4546     pub policy_status: Option<PolicyStatus>,
4547 }
4548 
4549 #[allow(dead_code)]
4550 struct GetBucketPolicyStatusOutputDeserializer;
4551 impl GetBucketPolicyStatusOutputDeserializer {
4552     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketPolicyStatusOutput, XmlParseError>4553     fn deserialize<T: Peek + Next>(
4554         tag_name: &str,
4555         stack: &mut T,
4556     ) -> Result<GetBucketPolicyStatusOutput, XmlParseError> {
4557         Ok(GetBucketPolicyStatusOutput {
4558             policy_status: Some(PolicyStatusDeserializer::deserialize(
4559                 "PolicyStatus",
4560                 stack,
4561             )?),
4562             ..GetBucketPolicyStatusOutput::default()
4563         })
4564     }
4565 }
4566 #[derive(Clone, Debug, Default, PartialEq)]
4567 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4568 pub struct GetBucketPolicyStatusRequest {
4569     /// <p>The name of the Amazon S3 bucket whose policy status you want to retrieve.</p>
4570     pub bucket: String,
4571     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4572     pub expected_bucket_owner: Option<String>,
4573 }
4574 
4575 #[derive(Clone, Debug, Default, PartialEq)]
4576 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4577 pub struct GetBucketReplicationOutput {
4578     pub replication_configuration: Option<ReplicationConfiguration>,
4579 }
4580 
4581 #[allow(dead_code)]
4582 struct GetBucketReplicationOutputDeserializer;
4583 impl GetBucketReplicationOutputDeserializer {
4584     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketReplicationOutput, XmlParseError>4585     fn deserialize<T: Peek + Next>(
4586         tag_name: &str,
4587         stack: &mut T,
4588     ) -> Result<GetBucketReplicationOutput, XmlParseError> {
4589         Ok(GetBucketReplicationOutput {
4590             replication_configuration: Some(ReplicationConfigurationDeserializer::deserialize(
4591                 "ReplicationConfiguration",
4592                 stack,
4593             )?),
4594             ..GetBucketReplicationOutput::default()
4595         })
4596     }
4597 }
4598 #[derive(Clone, Debug, Default, PartialEq)]
4599 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4600 pub struct GetBucketReplicationRequest {
4601     /// <p>The bucket name for which to get the replication information.</p>
4602     pub bucket: String,
4603     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4604     pub expected_bucket_owner: Option<String>,
4605 }
4606 
4607 #[derive(Clone, Debug, Default, PartialEq)]
4608 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4609 pub struct GetBucketRequestPaymentOutput {
4610     /// <p>Specifies who pays for the download and request fees.</p>
4611     pub payer: Option<String>,
4612 }
4613 
4614 #[allow(dead_code)]
4615 struct GetBucketRequestPaymentOutputDeserializer;
4616 impl GetBucketRequestPaymentOutputDeserializer {
4617     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketRequestPaymentOutput, XmlParseError>4618     fn deserialize<T: Peek + Next>(
4619         tag_name: &str,
4620         stack: &mut T,
4621     ) -> Result<GetBucketRequestPaymentOutput, XmlParseError> {
4622         deserialize_elements::<_, GetBucketRequestPaymentOutput, _>(
4623             tag_name,
4624             stack,
4625             |name, stack, obj| {
4626                 match name {
4627                     "Payer" => {
4628                         obj.payer = Some(PayerDeserializer::deserialize("Payer", stack)?);
4629                     }
4630                     _ => skip_tree(stack),
4631                 }
4632                 Ok(())
4633             },
4634         )
4635     }
4636 }
4637 #[derive(Clone, Debug, Default, PartialEq)]
4638 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4639 pub struct GetBucketRequestPaymentRequest {
4640     /// <p>The name of the bucket for which to get the payment request configuration</p>
4641     pub bucket: String,
4642     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4643     pub expected_bucket_owner: Option<String>,
4644 }
4645 
4646 #[derive(Clone, Debug, Default, PartialEq)]
4647 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4648 pub struct GetBucketTaggingOutput {
4649     /// <p>Contains the tag set.</p>
4650     pub tag_set: Vec<Tag>,
4651 }
4652 
4653 #[allow(dead_code)]
4654 struct GetBucketTaggingOutputDeserializer;
4655 impl GetBucketTaggingOutputDeserializer {
4656     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketTaggingOutput, XmlParseError>4657     fn deserialize<T: Peek + Next>(
4658         tag_name: &str,
4659         stack: &mut T,
4660     ) -> Result<GetBucketTaggingOutput, XmlParseError> {
4661         deserialize_elements::<_, GetBucketTaggingOutput, _>(tag_name, stack, |name, stack, obj| {
4662             match name {
4663                 "TagSet" => {
4664                     obj.tag_set
4665                         .extend(TagSetDeserializer::deserialize("TagSet", stack)?);
4666                 }
4667                 _ => skip_tree(stack),
4668             }
4669             Ok(())
4670         })
4671     }
4672 }
4673 #[derive(Clone, Debug, Default, PartialEq)]
4674 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4675 pub struct GetBucketTaggingRequest {
4676     /// <p>The name of the bucket for which to get the tagging information.</p>
4677     pub bucket: String,
4678     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4679     pub expected_bucket_owner: Option<String>,
4680 }
4681 
4682 #[derive(Clone, Debug, Default, PartialEq)]
4683 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4684 pub struct GetBucketVersioningOutput {
4685     /// <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>
4686     pub mfa_delete: Option<String>,
4687     /// <p>The versioning state of the bucket.</p>
4688     pub status: Option<String>,
4689 }
4690 
4691 #[allow(dead_code)]
4692 struct GetBucketVersioningOutputDeserializer;
4693 impl GetBucketVersioningOutputDeserializer {
4694     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketVersioningOutput, XmlParseError>4695     fn deserialize<T: Peek + Next>(
4696         tag_name: &str,
4697         stack: &mut T,
4698     ) -> Result<GetBucketVersioningOutput, XmlParseError> {
4699         deserialize_elements::<_, GetBucketVersioningOutput, _>(
4700             tag_name,
4701             stack,
4702             |name, stack, obj| {
4703                 match name {
4704                     "MfaDelete" => {
4705                         obj.mfa_delete = Some(MFADeleteStatusDeserializer::deserialize(
4706                             "MfaDelete",
4707                             stack,
4708                         )?);
4709                     }
4710                     "Status" => {
4711                         obj.status = Some(BucketVersioningStatusDeserializer::deserialize(
4712                             "Status", stack,
4713                         )?);
4714                     }
4715                     _ => skip_tree(stack),
4716                 }
4717                 Ok(())
4718             },
4719         )
4720     }
4721 }
4722 #[derive(Clone, Debug, Default, PartialEq)]
4723 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4724 pub struct GetBucketVersioningRequest {
4725     /// <p>The name of the bucket for which to get the versioning information.</p>
4726     pub bucket: String,
4727     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4728     pub expected_bucket_owner: Option<String>,
4729 }
4730 
4731 #[derive(Clone, Debug, Default, PartialEq)]
4732 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4733 pub struct GetBucketWebsiteOutput {
4734     /// <p>The object key name of the website error document to use for 4XX class errors.</p>
4735     pub error_document: Option<ErrorDocument>,
4736     /// <p>The name of the index document for the website (for example <code>index.html</code>).</p>
4737     pub index_document: Option<IndexDocument>,
4738     /// <p>Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 bucket.</p>
4739     pub redirect_all_requests_to: Option<RedirectAllRequestsTo>,
4740     /// <p>Rules that define when a redirect is applied and the redirect behavior.</p>
4741     pub routing_rules: Option<Vec<RoutingRule>>,
4742 }
4743 
4744 #[allow(dead_code)]
4745 struct GetBucketWebsiteOutputDeserializer;
4746 impl GetBucketWebsiteOutputDeserializer {
4747     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetBucketWebsiteOutput, XmlParseError>4748     fn deserialize<T: Peek + Next>(
4749         tag_name: &str,
4750         stack: &mut T,
4751     ) -> Result<GetBucketWebsiteOutput, XmlParseError> {
4752         deserialize_elements::<_, GetBucketWebsiteOutput, _>(tag_name, stack, |name, stack, obj| {
4753             match name {
4754                 "ErrorDocument" => {
4755                     obj.error_document = Some(ErrorDocumentDeserializer::deserialize(
4756                         "ErrorDocument",
4757                         stack,
4758                     )?);
4759                 }
4760                 "IndexDocument" => {
4761                     obj.index_document = Some(IndexDocumentDeserializer::deserialize(
4762                         "IndexDocument",
4763                         stack,
4764                     )?);
4765                 }
4766                 "RedirectAllRequestsTo" => {
4767                     obj.redirect_all_requests_to =
4768                         Some(RedirectAllRequestsToDeserializer::deserialize(
4769                             "RedirectAllRequestsTo",
4770                             stack,
4771                         )?);
4772                 }
4773                 "RoutingRules" => {
4774                     obj.routing_rules.get_or_insert(vec![]).extend(
4775                         RoutingRulesDeserializer::deserialize("RoutingRules", stack)?,
4776                     );
4777                 }
4778                 _ => skip_tree(stack),
4779             }
4780             Ok(())
4781         })
4782     }
4783 }
4784 #[derive(Clone, Debug, Default, PartialEq)]
4785 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4786 pub struct GetBucketWebsiteRequest {
4787     /// <p>The bucket name for which to get the website configuration.</p>
4788     pub bucket: String,
4789     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4790     pub expected_bucket_owner: Option<String>,
4791 }
4792 
4793 #[derive(Clone, Debug, Default, PartialEq)]
4794 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4795 pub struct GetObjectAclOutput {
4796     /// <p>A list of grants.</p>
4797     pub grants: Option<Vec<Grant>>,
4798     /// <p> Container for the bucket owner's display name and ID.</p>
4799     pub owner: Option<Owner>,
4800     pub request_charged: Option<String>,
4801 }
4802 
4803 #[allow(dead_code)]
4804 struct GetObjectAclOutputDeserializer;
4805 impl GetObjectAclOutputDeserializer {
4806     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetObjectAclOutput, XmlParseError>4807     fn deserialize<T: Peek + Next>(
4808         tag_name: &str,
4809         stack: &mut T,
4810     ) -> Result<GetObjectAclOutput, XmlParseError> {
4811         deserialize_elements::<_, GetObjectAclOutput, _>(tag_name, stack, |name, stack, obj| {
4812             match name {
4813                 "AccessControlList" => {
4814                     obj.grants
4815                         .get_or_insert(vec![])
4816                         .extend(GrantsDeserializer::deserialize("AccessControlList", stack)?);
4817                 }
4818                 "Owner" => {
4819                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
4820                 }
4821                 _ => skip_tree(stack),
4822             }
4823             Ok(())
4824         })
4825     }
4826 }
4827 #[derive(Clone, Debug, Default, PartialEq)]
4828 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4829 pub struct GetObjectAclRequest {
4830     /// <p>The bucket name that contains the object for which to get the ACL information. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
4831     pub bucket: String,
4832     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4833     pub expected_bucket_owner: Option<String>,
4834     /// <p>The key of the object for which to get the ACL information.</p>
4835     pub key: String,
4836     pub request_payer: Option<String>,
4837     /// <p>VersionId used to reference a specific version of the object.</p>
4838     pub version_id: Option<String>,
4839 }
4840 
4841 #[derive(Clone, Debug, Default, PartialEq)]
4842 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4843 pub struct GetObjectLegalHoldOutput {
4844     /// <p>The current Legal Hold status for the specified object.</p>
4845     pub legal_hold: Option<ObjectLockLegalHold>,
4846 }
4847 
4848 #[allow(dead_code)]
4849 struct GetObjectLegalHoldOutputDeserializer;
4850 impl GetObjectLegalHoldOutputDeserializer {
4851     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetObjectLegalHoldOutput, XmlParseError>4852     fn deserialize<T: Peek + Next>(
4853         tag_name: &str,
4854         stack: &mut T,
4855     ) -> Result<GetObjectLegalHoldOutput, XmlParseError> {
4856         Ok(GetObjectLegalHoldOutput {
4857             legal_hold: Some(ObjectLockLegalHoldDeserializer::deserialize(
4858                 "LegalHold",
4859                 stack,
4860             )?),
4861             ..GetObjectLegalHoldOutput::default()
4862         })
4863     }
4864 }
4865 #[derive(Clone, Debug, Default, PartialEq)]
4866 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4867 pub struct GetObjectLegalHoldRequest {
4868     /// <p>The bucket name containing the object whose Legal Hold status you want to retrieve. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
4869     pub bucket: String,
4870     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4871     pub expected_bucket_owner: Option<String>,
4872     /// <p>The key name for the object whose Legal Hold status you want to retrieve.</p>
4873     pub key: String,
4874     pub request_payer: Option<String>,
4875     /// <p>The version ID of the object whose Legal Hold status you want to retrieve.</p>
4876     pub version_id: Option<String>,
4877 }
4878 
4879 #[derive(Clone, Debug, Default, PartialEq)]
4880 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4881 pub struct GetObjectLockConfigurationOutput {
4882     /// <p>The specified bucket's Object Lock configuration.</p>
4883     pub object_lock_configuration: Option<ObjectLockConfiguration>,
4884 }
4885 
4886 #[allow(dead_code)]
4887 struct GetObjectLockConfigurationOutputDeserializer;
4888 impl GetObjectLockConfigurationOutputDeserializer {
4889     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetObjectLockConfigurationOutput, XmlParseError>4890     fn deserialize<T: Peek + Next>(
4891         tag_name: &str,
4892         stack: &mut T,
4893     ) -> Result<GetObjectLockConfigurationOutput, XmlParseError> {
4894         Ok(GetObjectLockConfigurationOutput {
4895             object_lock_configuration: Some(ObjectLockConfigurationDeserializer::deserialize(
4896                 "ObjectLockConfiguration",
4897                 stack,
4898             )?),
4899             ..GetObjectLockConfigurationOutput::default()
4900         })
4901     }
4902 }
4903 #[derive(Clone, Debug, Default, PartialEq)]
4904 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4905 pub struct GetObjectLockConfigurationRequest {
4906     /// <p>The bucket whose Object Lock configuration you want to retrieve.</p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
4907     pub bucket: String,
4908     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4909     pub expected_bucket_owner: Option<String>,
4910 }
4911 
4912 #[derive(Debug, Default)]
4913 pub struct GetObjectOutput {
4914     /// <p>Indicates that a range of bytes was specified.</p>
4915     pub accept_ranges: Option<String>,
4916     /// <p>Object data.</p>
4917     pub body: Option<StreamingBody>,
4918     /// <p>Indicates whether the object uses an S3 Bucket Key for server-side encryption with AWS KMS (SSE-KMS).</p>
4919     pub bucket_key_enabled: Option<bool>,
4920     /// <p>Specifies caching behavior along the request/reply chain.</p>
4921     pub cache_control: Option<String>,
4922     /// <p>Specifies presentational information for the object.</p>
4923     pub content_disposition: Option<String>,
4924     /// <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>
4925     pub content_encoding: Option<String>,
4926     /// <p>The language the content is in.</p>
4927     pub content_language: Option<String>,
4928     /// <p>Size of the body in bytes.</p>
4929     pub content_length: Option<i64>,
4930     /// <p>The portion of the object returned in the response.</p>
4931     pub content_range: Option<String>,
4932     /// <p>A standard MIME type describing the format of the object data.</p>
4933     pub content_type: Option<String>,
4934     /// <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>
4935     pub delete_marker: Option<bool>,
4936     /// <p>An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.</p>
4937     pub e_tag: Option<String>,
4938     /// <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>
4939     pub expiration: Option<String>,
4940     /// <p>The date and time at which the object is no longer cacheable.</p>
4941     pub expires: Option<String>,
4942     /// <p>Creation date of the object.</p>
4943     pub last_modified: Option<String>,
4944     /// <p>A map of metadata to store with the object in S3.</p>
4945     pub metadata: Option<::std::collections::HashMap<String, String>>,
4946     /// <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>
4947     pub missing_meta: Option<i64>,
4948     /// <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>
4949     pub object_lock_legal_hold_status: Option<String>,
4950     /// <p>The Object Lock mode currently in place for this object.</p>
4951     pub object_lock_mode: Option<String>,
4952     /// <p>The date and time when this object's Object Lock will expire.</p>
4953     pub object_lock_retain_until_date: Option<String>,
4954     /// <p>The count of parts this object has.</p>
4955     pub parts_count: Option<i64>,
4956     /// <p>Amazon S3 can return this if your request involves a bucket that is either a source or destination in a replication rule.</p>
4957     pub replication_status: Option<String>,
4958     pub request_charged: Option<String>,
4959     /// <p>Provides information about object restoration action and expiration time of the restored object copy.</p>
4960     pub restore: Option<String>,
4961     /// <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>
4962     pub sse_customer_algorithm: Option<String>,
4963     /// <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>
4964     pub sse_customer_key_md5: Option<String>,
4965     /// <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>
4966     pub ssekms_key_id: Option<String>,
4967     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
4968     pub server_side_encryption: Option<String>,
4969     /// <p>Provides storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.</p>
4970     pub storage_class: Option<String>,
4971     /// <p>The number of tags, if any, on the object.</p>
4972     pub tag_count: Option<i64>,
4973     /// <p>Version of the object.</p>
4974     pub version_id: Option<String>,
4975     /// <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>
4976     pub website_redirect_location: Option<String>,
4977 }
4978 
4979 #[derive(Clone, Debug, Default, PartialEq)]
4980 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4981 pub struct GetObjectRequest {
4982     /// <p>The bucket name containing the object. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
4983     pub bucket: String,
4984     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
4985     pub expected_bucket_owner: Option<String>,
4986     /// <p>Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).</p>
4987     pub if_match: Option<String>,
4988     /// <p>Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).</p>
4989     pub if_modified_since: Option<String>,
4990     /// <p>Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).</p>
4991     pub if_none_match: Option<String>,
4992     /// <p>Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).</p>
4993     pub if_unmodified_since: Option<String>,
4994     /// <p>Key of the object to get.</p>
4995     pub key: String,
4996     /// <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>
4997     pub part_number: Option<i64>,
4998     /// <p><p>Downloads the specified range bytes of an object. For more information about the HTTP Range header, see <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35">https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35</a>.</p> <note> <p>Amazon S3 doesn&#39;t support retrieving multiple ranges of data per <code>GET</code> request.</p> </note></p>
4999     pub range: Option<String>,
5000     pub request_payer: Option<String>,
5001     /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
5002     pub response_cache_control: Option<String>,
5003     /// <p>Sets the <code>Content-Disposition</code> header of the response</p>
5004     pub response_content_disposition: Option<String>,
5005     /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
5006     pub response_content_encoding: Option<String>,
5007     /// <p>Sets the <code>Content-Language</code> header of the response.</p>
5008     pub response_content_language: Option<String>,
5009     /// <p>Sets the <code>Content-Type</code> header of the response.</p>
5010     pub response_content_type: Option<String>,
5011     /// <p>Sets the <code>Expires</code> header of the response.</p>
5012     pub response_expires: Option<String>,
5013     /// <p>Specifies the algorithm to use to when decrypting the object (for example, AES256).</p>
5014     pub sse_customer_algorithm: Option<String>,
5015     /// <p>Specifies the customer-provided encryption key for Amazon S3 used to encrypt the data. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p>
5016     pub sse_customer_key: Option<String>,
5017     /// <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>
5018     pub sse_customer_key_md5: Option<String>,
5019     /// <p>VersionId used to reference a specific version of the object.</p>
5020     pub version_id: Option<String>,
5021 }
5022 
5023 #[derive(Clone, Debug, Default, PartialEq)]
5024 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5025 pub struct GetObjectRetentionOutput {
5026     /// <p>The container element for an object's retention settings.</p>
5027     pub retention: Option<ObjectLockRetention>,
5028 }
5029 
5030 #[allow(dead_code)]
5031 struct GetObjectRetentionOutputDeserializer;
5032 impl GetObjectRetentionOutputDeserializer {
5033     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetObjectRetentionOutput, XmlParseError>5034     fn deserialize<T: Peek + Next>(
5035         tag_name: &str,
5036         stack: &mut T,
5037     ) -> Result<GetObjectRetentionOutput, XmlParseError> {
5038         Ok(GetObjectRetentionOutput {
5039             retention: Some(ObjectLockRetentionDeserializer::deserialize(
5040                 "Retention",
5041                 stack,
5042             )?),
5043             ..GetObjectRetentionOutput::default()
5044         })
5045     }
5046 }
5047 #[derive(Clone, Debug, Default, PartialEq)]
5048 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5049 pub struct GetObjectRetentionRequest {
5050     /// <p>The bucket name containing the object whose retention settings you want to retrieve. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
5051     pub bucket: String,
5052     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
5053     pub expected_bucket_owner: Option<String>,
5054     /// <p>The key name for the object whose retention settings you want to retrieve.</p>
5055     pub key: String,
5056     pub request_payer: Option<String>,
5057     /// <p>The version ID for the object whose retention settings you want to retrieve.</p>
5058     pub version_id: Option<String>,
5059 }
5060 
5061 #[derive(Clone, Debug, Default, PartialEq)]
5062 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5063 pub struct GetObjectTaggingOutput {
5064     /// <p>Contains the tag set.</p>
5065     pub tag_set: Vec<Tag>,
5066     /// <p>The versionId of the object for which you got the tagging information.</p>
5067     pub version_id: Option<String>,
5068 }
5069 
5070 #[allow(dead_code)]
5071 struct GetObjectTaggingOutputDeserializer;
5072 impl GetObjectTaggingOutputDeserializer {
5073     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetObjectTaggingOutput, XmlParseError>5074     fn deserialize<T: Peek + Next>(
5075         tag_name: &str,
5076         stack: &mut T,
5077     ) -> Result<GetObjectTaggingOutput, XmlParseError> {
5078         deserialize_elements::<_, GetObjectTaggingOutput, _>(tag_name, stack, |name, stack, obj| {
5079             match name {
5080                 "TagSet" => {
5081                     obj.tag_set
5082                         .extend(TagSetDeserializer::deserialize("TagSet", stack)?);
5083                 }
5084                 _ => skip_tree(stack),
5085             }
5086             Ok(())
5087         })
5088     }
5089 }
5090 #[derive(Clone, Debug, Default, PartialEq)]
5091 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5092 pub struct GetObjectTaggingRequest {
5093     /// <p>The bucket name containing the object for which to get the tagging information. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
5094     pub bucket: String,
5095     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
5096     pub expected_bucket_owner: Option<String>,
5097     /// <p>Object key for which to get the tagging information.</p>
5098     pub key: String,
5099     pub request_payer: Option<String>,
5100     /// <p>The versionId of the object for which to get the tagging information.</p>
5101     pub version_id: Option<String>,
5102 }
5103 
5104 #[derive(Debug, Default)]
5105 pub struct GetObjectTorrentOutput {
5106     /// <p>A Bencoded dictionary as defined by the BitTorrent specification</p>
5107     pub body: Option<StreamingBody>,
5108     pub request_charged: Option<String>,
5109 }
5110 
5111 #[derive(Clone, Debug, Default, PartialEq)]
5112 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5113 pub struct GetObjectTorrentRequest {
5114     /// <p>The name of the bucket containing the object for which to get the torrent files.</p>
5115     pub bucket: String,
5116     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
5117     pub expected_bucket_owner: Option<String>,
5118     /// <p>The object key for which to get the information.</p>
5119     pub key: String,
5120     pub request_payer: Option<String>,
5121 }
5122 
5123 #[derive(Clone, Debug, Default, PartialEq)]
5124 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5125 pub struct GetPublicAccessBlockOutput {
5126     /// <p>The <code>PublicAccessBlock</code> configuration currently in effect for this Amazon S3 bucket.</p>
5127     pub public_access_block_configuration: Option<PublicAccessBlockConfiguration>,
5128 }
5129 
5130 #[allow(dead_code)]
5131 struct GetPublicAccessBlockOutputDeserializer;
5132 impl GetPublicAccessBlockOutputDeserializer {
5133     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<GetPublicAccessBlockOutput, XmlParseError>5134     fn deserialize<T: Peek + Next>(
5135         tag_name: &str,
5136         stack: &mut T,
5137     ) -> Result<GetPublicAccessBlockOutput, XmlParseError> {
5138         Ok(GetPublicAccessBlockOutput {
5139             public_access_block_configuration: Some(
5140                 PublicAccessBlockConfigurationDeserializer::deserialize(
5141                     "PublicAccessBlockConfiguration",
5142                     stack,
5143                 )?,
5144             ),
5145             ..GetPublicAccessBlockOutput::default()
5146         })
5147     }
5148 }
5149 #[derive(Clone, Debug, Default, PartialEq)]
5150 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5151 pub struct GetPublicAccessBlockRequest {
5152     /// <p>The name of the Amazon S3 bucket whose <code>PublicAccessBlock</code> configuration you want to retrieve. </p>
5153     pub bucket: String,
5154     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
5155     pub expected_bucket_owner: Option<String>,
5156 }
5157 
5158 /// <p>Container for S3 Glacier job parameters.</p>
5159 #[derive(Clone, Debug, Default, PartialEq)]
5160 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5161 pub struct GlacierJobParameters {
5162     /// <p>Retrieval tier at which the restore will be processed.</p>
5163     pub tier: String,
5164 }
5165 
5166 pub struct GlacierJobParametersSerializer;
5167 impl GlacierJobParametersSerializer {
5168     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &GlacierJobParameters, ) -> Result<(), xml::writer::Error> where W: Write,5169     pub fn serialize<W>(
5170         mut writer: &mut EventWriter<W>,
5171         name: &str,
5172         obj: &GlacierJobParameters,
5173     ) -> Result<(), xml::writer::Error>
5174     where
5175         W: Write,
5176     {
5177         writer.write(xml::writer::XmlEvent::start_element(name))?;
5178         write_characters_element(writer, "Tier", &obj.tier)?;
5179         writer.write(xml::writer::XmlEvent::end_element())
5180     }
5181 }
5182 
5183 /// <p>Container for grant information.</p>
5184 #[derive(Clone, Debug, Default, PartialEq)]
5185 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5186 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5187 pub struct Grant {
5188     /// <p>The person being granted permissions.</p>
5189     pub grantee: Option<Grantee>,
5190     /// <p>Specifies the permission given to the grantee.</p>
5191     pub permission: Option<String>,
5192 }
5193 
5194 #[allow(dead_code)]
5195 struct GrantDeserializer;
5196 impl GrantDeserializer {
5197     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Grant, XmlParseError>5198     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Grant, XmlParseError> {
5199         deserialize_elements::<_, Grant, _>(tag_name, stack, |name, stack, obj| {
5200             match name {
5201                 "Grantee" => {
5202                     obj.grantee = Some(GranteeDeserializer::deserialize("Grantee", stack)?);
5203                 }
5204                 "Permission" => {
5205                     obj.permission =
5206                         Some(PermissionDeserializer::deserialize("Permission", stack)?);
5207                 }
5208                 _ => skip_tree(stack),
5209             }
5210             Ok(())
5211         })
5212     }
5213 }
5214 
5215 pub struct GrantSerializer;
5216 impl GrantSerializer {
5217     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Grant, ) -> Result<(), xml::writer::Error> where W: Write,5218     pub fn serialize<W>(
5219         mut writer: &mut EventWriter<W>,
5220         name: &str,
5221         obj: &Grant,
5222     ) -> Result<(), xml::writer::Error>
5223     where
5224         W: Write,
5225     {
5226         writer.write(xml::writer::XmlEvent::start_element(name))?;
5227         if let Some(ref value) = obj.grantee {
5228             &GranteeSerializer::serialize(&mut writer, "Grantee", value)?;
5229         }
5230         if let Some(ref value) = obj.permission {
5231             write_characters_element(writer, "Permission", &value)?;
5232         }
5233         writer.write(xml::writer::XmlEvent::end_element())
5234     }
5235 }
5236 
5237 /// <p>Container for the person being granted permissions.</p>
5238 #[derive(Clone, Debug, Default, PartialEq)]
5239 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5240 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5241 pub struct Grantee {
5242     /// <p>Screen name of the grantee.</p>
5243     pub display_name: Option<String>,
5244     /// <p><p>Email address of the grantee.</p> <note> <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>Europe (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> </note></p>
5245     pub email_address: Option<String>,
5246     /// <p>The canonical user ID of the grantee.</p>
5247     pub id: Option<String>,
5248     /// <p>Type of grantee</p>
5249     pub type_: String,
5250     /// <p>URI of the grantee group.</p>
5251     pub uri: Option<String>,
5252 }
5253 
5254 #[allow(dead_code)]
5255 struct GranteeDeserializer;
5256 impl GranteeDeserializer {
5257     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Grantee, XmlParseError>5258     fn deserialize<T: Peek + Next>(
5259         tag_name: &str,
5260         stack: &mut T,
5261     ) -> Result<Grantee, XmlParseError> {
5262         deserialize_elements::<_, Grantee, _>(tag_name, stack, |name, stack, obj| {
5263             match name {
5264                 "DisplayName" => {
5265                     obj.display_name =
5266                         Some(DisplayNameDeserializer::deserialize("DisplayName", stack)?);
5267                 }
5268                 "EmailAddress" => {
5269                     obj.email_address = Some(EmailAddressDeserializer::deserialize(
5270                         "EmailAddress",
5271                         stack,
5272                     )?);
5273                 }
5274                 "ID" => {
5275                     obj.id = Some(IDDeserializer::deserialize("ID", stack)?);
5276                 }
5277                 "xsi:type" => {
5278                     obj.type_ = TypeDeserializer::deserialize("xsi:type", stack)?;
5279                 }
5280                 "URI" => {
5281                     obj.uri = Some(URIDeserializer::deserialize("URI", stack)?);
5282                 }
5283                 _ => skip_tree(stack),
5284             }
5285             Ok(())
5286         })
5287     }
5288 }
5289 
5290 pub struct GranteeSerializer;
5291 impl GranteeSerializer {
5292     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Grantee, ) -> Result<(), xml::writer::Error> where W: Write,5293     pub fn serialize<W>(
5294         mut writer: &mut EventWriter<W>,
5295         name: &str,
5296         obj: &Grantee,
5297     ) -> Result<(), xml::writer::Error>
5298     where
5299         W: Write,
5300     {
5301         writer.write(xml::writer::XmlEvent::start_element(name))?;
5302         if let Some(ref value) = obj.display_name {
5303             write_characters_element(writer, "DisplayName", &value)?;
5304         }
5305         if let Some(ref value) = obj.email_address {
5306             write_characters_element(writer, "EmailAddress", &value)?;
5307         }
5308         if let Some(ref value) = obj.id {
5309             write_characters_element(writer, "ID", &value)?;
5310         }
5311         write_characters_element(writer, "xsi:type", &obj.type_)?;
5312         if let Some(ref value) = obj.uri {
5313             write_characters_element(writer, "URI", &value)?;
5314         }
5315         writer.write(xml::writer::XmlEvent::end_element())
5316     }
5317 }
5318 
5319 #[allow(dead_code)]
5320 struct GrantsDeserializer;
5321 impl GrantsDeserializer {
5322     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Grant>, XmlParseError>5323     fn deserialize<T: Peek + Next>(
5324         tag_name: &str,
5325         stack: &mut T,
5326     ) -> Result<Vec<Grant>, XmlParseError> {
5327         deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
5328             if name == "Grant" {
5329                 obj.push(GrantDeserializer::deserialize("Grant", stack)?);
5330             } else {
5331                 skip_tree(stack);
5332             }
5333             Ok(())
5334         })
5335     }
5336 }
5337 
5338 pub struct GrantsSerializer;
5339 impl GrantsSerializer {
5340     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<Grant>, ) -> Result<(), xml::writer::Error> where W: Write,5341     pub fn serialize<W>(
5342         mut writer: &mut EventWriter<W>,
5343         name: &str,
5344         obj: &Vec<Grant>,
5345     ) -> Result<(), xml::writer::Error>
5346     where
5347         W: Write,
5348     {
5349         writer.write(xml::writer::XmlEvent::start_element(name))?;
5350         for element in obj {
5351             GrantSerializer::serialize(writer, "Grant", element)?;
5352         }
5353         writer.write(xml::writer::XmlEvent::end_element())?;
5354         Ok(())
5355     }
5356 }
5357 
5358 #[derive(Clone, Debug, Default, PartialEq)]
5359 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5360 pub struct HeadBucketRequest {
5361     /// <p>The bucket name.</p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
5362     pub bucket: String,
5363     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
5364     pub expected_bucket_owner: Option<String>,
5365 }
5366 
5367 #[derive(Clone, Debug, Default, PartialEq)]
5368 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5369 pub struct HeadObjectOutput {
5370     /// <p>Indicates that a range of bytes was specified.</p>
5371     pub accept_ranges: Option<String>,
5372     /// <p>The archive state of the head object.</p>
5373     pub archive_status: Option<String>,
5374     /// <p>Indicates whether the object uses an S3 Bucket Key for server-side encryption with AWS KMS (SSE-KMS).</p>
5375     pub bucket_key_enabled: Option<bool>,
5376     /// <p>Specifies caching behavior along the request/reply chain.</p>
5377     pub cache_control: Option<String>,
5378     /// <p>Specifies presentational information for the object.</p>
5379     pub content_disposition: Option<String>,
5380     /// <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>
5381     pub content_encoding: Option<String>,
5382     /// <p>The language the content is in.</p>
5383     pub content_language: Option<String>,
5384     /// <p>Size of the body in bytes.</p>
5385     pub content_length: Option<i64>,
5386     /// <p>A standard MIME type describing the format of the object data.</p>
5387     pub content_type: Option<String>,
5388     /// <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>
5389     pub delete_marker: Option<bool>,
5390     /// <p>An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.</p>
5391     pub e_tag: Option<String>,
5392     /// <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>
5393     pub expiration: Option<String>,
5394     /// <p>The date and time at which the object is no longer cacheable.</p>
5395     pub expires: Option<String>,
5396     /// <p>Creation date of the object.</p>
5397     pub last_modified: Option<String>,
5398     /// <p>A map of metadata to store with the object in S3.</p>
5399     pub metadata: Option<::std::collections::HashMap<String, String>>,
5400     /// <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>
5401     pub missing_meta: Option<i64>,
5402     /// <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>
5403     pub object_lock_legal_hold_status: Option<String>,
5404     /// <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>
5405     pub object_lock_mode: Option<String>,
5406     /// <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>
5407     pub object_lock_retain_until_date: Option<String>,
5408     /// <p>The count of parts this object has.</p>
5409     pub parts_count: Option<i64>,
5410     /// <p>Amazon S3 can return this header if your request involves a bucket that is either a source or a destination in a replication rule.</p> <p>In replication, you have a source bucket on which you configure replication and destination bucket or buckets 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 a 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 and there is no replica modification replication in progress.</p> </li> <li> <p>When replicating objects to multiple destination buckets the <code>x-amz-replication-status</code> header acts differently. The header of the source object will only return a value of COMPLETED when replication is successful to all destinations. The header will remain at value PENDING until replication has completed for all destinations. If one or more destinations fails replication the header will return FAILED. </p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html">Replication</a>.</p>
5411     pub replication_status: Option<String>,
5412     pub request_charged: Option<String>,
5413     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">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, 21 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>
5414     pub restore: Option<String>,
5415     /// <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>
5416     pub sse_customer_algorithm: Option<String>,
5417     /// <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>
5418     pub sse_customer_key_md5: Option<String>,
5419     /// <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>
5420     pub ssekms_key_id: Option<String>,
5421     /// <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>
5422     pub server_side_encryption: Option<String>,
5423     /// <p>Provides storage class information of the object. Amazon S3 returns this header for all objects except for S3 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>
5424     pub storage_class: Option<String>,
5425     /// <p>Version of the object.</p>
5426     pub version_id: Option<String>,
5427     /// <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>
5428     pub website_redirect_location: Option<String>,
5429 }
5430 
5431 #[allow(dead_code)]
5432 struct HeadObjectOutputDeserializer;
5433 impl HeadObjectOutputDeserializer {
5434     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<HeadObjectOutput, XmlParseError>5435     fn deserialize<T: Peek + Next>(
5436         tag_name: &str,
5437         stack: &mut T,
5438     ) -> Result<HeadObjectOutput, XmlParseError> {
5439         xml_util::start_element(tag_name, stack)?;
5440 
5441         let obj = HeadObjectOutput::default();
5442 
5443         xml_util::end_element(tag_name, stack)?;
5444 
5445         Ok(obj)
5446     }
5447 }
5448 #[derive(Clone, Debug, Default, PartialEq)]
5449 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5450 pub struct HeadObjectRequest {
5451     /// <p>The name of the bucket containing the object.</p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
5452     pub bucket: String,
5453     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
5454     pub expected_bucket_owner: Option<String>,
5455     /// <p>Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).</p>
5456     pub if_match: Option<String>,
5457     /// <p>Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).</p>
5458     pub if_modified_since: Option<String>,
5459     /// <p>Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).</p>
5460     pub if_none_match: Option<String>,
5461     /// <p>Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).</p>
5462     pub if_unmodified_since: Option<String>,
5463     /// <p>The object key.</p>
5464     pub key: String,
5465     /// <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>
5466     pub part_number: Option<i64>,
5467     /// <p><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">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35</a>.</p> <note> <p>Amazon S3 doesn&#39;t support retrieving multiple ranges of data per <code>GET</code> request.</p> </note></p>
5468     pub range: Option<String>,
5469     pub request_payer: Option<String>,
5470     /// <p>Specifies the algorithm to use to when encrypting the object (for example, AES256).</p>
5471     pub sse_customer_algorithm: Option<String>,
5472     /// <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>
5473     pub sse_customer_key: Option<String>,
5474     /// <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>
5475     pub sse_customer_key_md5: Option<String>,
5476     /// <p>VersionId used to reference a specific version of the object.</p>
5477     pub version_id: Option<String>,
5478 }
5479 
5480 #[allow(dead_code)]
5481 struct HostNameDeserializer;
5482 impl HostNameDeserializer {
5483     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>5484     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5485         xml_util::deserialize_primitive(tag_name, stack, Ok)
5486     }
5487 }
5488 
5489 pub struct HostNameSerializer;
5490 impl HostNameSerializer {
5491     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,5492     pub fn serialize<W>(
5493         mut writer: &mut EventWriter<W>,
5494         name: &str,
5495         obj: &String,
5496     ) -> Result<(), xml::writer::Error>
5497     where
5498         W: Write,
5499     {
5500         write_characters_element(writer, name, obj)
5501     }
5502 }
5503 
5504 #[allow(dead_code)]
5505 struct HttpErrorCodeReturnedEqualsDeserializer;
5506 impl HttpErrorCodeReturnedEqualsDeserializer {
5507     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>5508     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5509         xml_util::deserialize_primitive(tag_name, stack, Ok)
5510     }
5511 }
5512 
5513 pub struct HttpErrorCodeReturnedEqualsSerializer;
5514 impl HttpErrorCodeReturnedEqualsSerializer {
5515     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,5516     pub fn serialize<W>(
5517         mut writer: &mut EventWriter<W>,
5518         name: &str,
5519         obj: &String,
5520     ) -> Result<(), xml::writer::Error>
5521     where
5522         W: Write,
5523     {
5524         write_characters_element(writer, name, obj)
5525     }
5526 }
5527 
5528 #[allow(dead_code)]
5529 struct HttpRedirectCodeDeserializer;
5530 impl HttpRedirectCodeDeserializer {
5531     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>5532     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5533         xml_util::deserialize_primitive(tag_name, stack, Ok)
5534     }
5535 }
5536 
5537 pub struct HttpRedirectCodeSerializer;
5538 impl HttpRedirectCodeSerializer {
5539     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,5540     pub fn serialize<W>(
5541         mut writer: &mut EventWriter<W>,
5542         name: &str,
5543         obj: &String,
5544     ) -> Result<(), xml::writer::Error>
5545     where
5546         W: Write,
5547     {
5548         write_characters_element(writer, name, obj)
5549     }
5550 }
5551 
5552 #[allow(dead_code)]
5553 struct IDDeserializer;
5554 impl IDDeserializer {
5555     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>5556     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5557         xml_util::deserialize_primitive(tag_name, stack, Ok)
5558     }
5559 }
5560 
5561 pub struct IDSerializer;
5562 impl IDSerializer {
5563     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,5564     pub fn serialize<W>(
5565         mut writer: &mut EventWriter<W>,
5566         name: &str,
5567         obj: &String,
5568     ) -> Result<(), xml::writer::Error>
5569     where
5570         W: Write,
5571     {
5572         write_characters_element(writer, name, obj)
5573     }
5574 }
5575 
5576 /// <p>Container for the <code>Suffix</code> element.</p>
5577 #[derive(Clone, Debug, Default, PartialEq)]
5578 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5579 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5580 pub struct IndexDocument {
5581     /// <p><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> <important> <p>Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints"> XML related object key constraints</a>.</p> </important></p>
5582     pub suffix: String,
5583 }
5584 
5585 #[allow(dead_code)]
5586 struct IndexDocumentDeserializer;
5587 impl IndexDocumentDeserializer {
5588     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<IndexDocument, XmlParseError>5589     fn deserialize<T: Peek + Next>(
5590         tag_name: &str,
5591         stack: &mut T,
5592     ) -> Result<IndexDocument, XmlParseError> {
5593         deserialize_elements::<_, IndexDocument, _>(tag_name, stack, |name, stack, obj| {
5594             match name {
5595                 "Suffix" => {
5596                     obj.suffix = SuffixDeserializer::deserialize("Suffix", stack)?;
5597                 }
5598                 _ => skip_tree(stack),
5599             }
5600             Ok(())
5601         })
5602     }
5603 }
5604 
5605 pub struct IndexDocumentSerializer;
5606 impl IndexDocumentSerializer {
5607     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &IndexDocument, ) -> Result<(), xml::writer::Error> where W: Write,5608     pub fn serialize<W>(
5609         mut writer: &mut EventWriter<W>,
5610         name: &str,
5611         obj: &IndexDocument,
5612     ) -> Result<(), xml::writer::Error>
5613     where
5614         W: Write,
5615     {
5616         writer.write(xml::writer::XmlEvent::start_element(name))?;
5617         write_characters_element(writer, "Suffix", &obj.suffix)?;
5618         writer.write(xml::writer::XmlEvent::end_element())
5619     }
5620 }
5621 
5622 #[allow(dead_code)]
5623 struct InitiatedDeserializer;
5624 impl InitiatedDeserializer {
5625     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>5626     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5627         xml_util::deserialize_primitive(tag_name, stack, Ok)
5628     }
5629 }
5630 /// <p>Container element that identifies who initiated the multipart upload. </p>
5631 #[derive(Clone, Debug, Default, PartialEq)]
5632 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5633 pub struct Initiator {
5634     /// <p>Name of the Principal.</p>
5635     pub display_name: Option<String>,
5636     /// <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>
5637     pub id: Option<String>,
5638 }
5639 
5640 #[allow(dead_code)]
5641 struct InitiatorDeserializer;
5642 impl InitiatorDeserializer {
5643     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Initiator, XmlParseError>5644     fn deserialize<T: Peek + Next>(
5645         tag_name: &str,
5646         stack: &mut T,
5647     ) -> Result<Initiator, XmlParseError> {
5648         deserialize_elements::<_, Initiator, _>(tag_name, stack, |name, stack, obj| {
5649             match name {
5650                 "DisplayName" => {
5651                     obj.display_name =
5652                         Some(DisplayNameDeserializer::deserialize("DisplayName", stack)?);
5653                 }
5654                 "ID" => {
5655                     obj.id = Some(IDDeserializer::deserialize("ID", stack)?);
5656                 }
5657                 _ => skip_tree(stack),
5658             }
5659             Ok(())
5660         })
5661     }
5662 }
5663 /// <p>Describes the serialization format of the object.</p>
5664 #[derive(Clone, Debug, Default, PartialEq)]
5665 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5666 pub struct InputSerialization {
5667     /// <p>Describes the serialization of a CSV-encoded object.</p>
5668     pub csv: Option<CSVInput>,
5669     /// <p>Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value: NONE.</p>
5670     pub compression_type: Option<String>,
5671     /// <p>Specifies JSON as object's input serialization format.</p>
5672     pub json: Option<JSONInput>,
5673     /// <p>Specifies Parquet as object's input serialization format.</p>
5674     pub parquet: Option<ParquetInput>,
5675 }
5676 
5677 pub struct InputSerializationSerializer;
5678 impl InputSerializationSerializer {
5679     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &InputSerialization, ) -> Result<(), xml::writer::Error> where W: Write,5680     pub fn serialize<W>(
5681         mut writer: &mut EventWriter<W>,
5682         name: &str,
5683         obj: &InputSerialization,
5684     ) -> Result<(), xml::writer::Error>
5685     where
5686         W: Write,
5687     {
5688         writer.write(xml::writer::XmlEvent::start_element(name))?;
5689         if let Some(ref value) = obj.csv {
5690             &CSVInputSerializer::serialize(&mut writer, "CSV", value)?;
5691         }
5692         if let Some(ref value) = obj.compression_type {
5693             write_characters_element(writer, "CompressionType", &value)?;
5694         }
5695         if let Some(ref value) = obj.json {
5696             &JSONInputSerializer::serialize(&mut writer, "JSON", value)?;
5697         }
5698         if let Some(ref value) = obj.parquet {
5699             &ParquetInputSerializer::serialize(&mut writer, "Parquet", value)?;
5700         }
5701         writer.write(xml::writer::XmlEvent::end_element())
5702     }
5703 }
5704 
5705 #[allow(dead_code)]
5706 struct IntelligentTieringAccessTierDeserializer;
5707 impl IntelligentTieringAccessTierDeserializer {
5708     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>5709     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5710         xml_util::deserialize_primitive(tag_name, stack, Ok)
5711     }
5712 }
5713 
5714 pub struct IntelligentTieringAccessTierSerializer;
5715 impl IntelligentTieringAccessTierSerializer {
5716     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,5717     pub fn serialize<W>(
5718         mut writer: &mut EventWriter<W>,
5719         name: &str,
5720         obj: &String,
5721     ) -> Result<(), xml::writer::Error>
5722     where
5723         W: Write,
5724     {
5725         write_characters_element(writer, name, obj)
5726     }
5727 }
5728 
5729 /// <p>A container for specifying S3 Intelligent-Tiering filters. The filters determine the subset of objects to which the rule applies.</p>
5730 #[derive(Clone, Debug, Default, PartialEq)]
5731 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5732 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5733 pub struct IntelligentTieringAndOperator {
5734     /// <p>An object key name prefix that identifies the subset of objects to which the configuration applies.</p>
5735     pub prefix: Option<String>,
5736     /// <p>All of these tags must exist in the object's tag set in order for the configuration to apply.</p>
5737     pub tags: Option<Vec<Tag>>,
5738 }
5739 
5740 #[allow(dead_code)]
5741 struct IntelligentTieringAndOperatorDeserializer;
5742 impl IntelligentTieringAndOperatorDeserializer {
5743     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<IntelligentTieringAndOperator, XmlParseError>5744     fn deserialize<T: Peek + Next>(
5745         tag_name: &str,
5746         stack: &mut T,
5747     ) -> Result<IntelligentTieringAndOperator, XmlParseError> {
5748         deserialize_elements::<_, IntelligentTieringAndOperator, _>(
5749             tag_name,
5750             stack,
5751             |name, stack, obj| {
5752                 match name {
5753                     "Prefix" => {
5754                         obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
5755                     }
5756                     "Tag" => {
5757                         obj.tags
5758                             .get_or_insert(vec![])
5759                             .extend(TagSetDeserializer::deserialize("Tag", stack)?);
5760                     }
5761                     _ => skip_tree(stack),
5762                 }
5763                 Ok(())
5764             },
5765         )
5766     }
5767 }
5768 
5769 pub struct IntelligentTieringAndOperatorSerializer;
5770 impl IntelligentTieringAndOperatorSerializer {
5771     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &IntelligentTieringAndOperator, ) -> Result<(), xml::writer::Error> where W: Write,5772     pub fn serialize<W>(
5773         mut writer: &mut EventWriter<W>,
5774         name: &str,
5775         obj: &IntelligentTieringAndOperator,
5776     ) -> Result<(), xml::writer::Error>
5777     where
5778         W: Write,
5779     {
5780         writer.write(xml::writer::XmlEvent::start_element(name))?;
5781         if let Some(ref value) = obj.prefix {
5782             write_characters_element(writer, "Prefix", &value)?;
5783         }
5784         if let Some(ref value) = obj.tags {
5785             &TagSetSerializer::serialize(&mut writer, "Tag", value)?;
5786         }
5787         writer.write(xml::writer::XmlEvent::end_element())
5788     }
5789 }
5790 
5791 /// <p>Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.</p> <p>For information about the S3 Intelligent-Tiering storage class, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access">Storage class for automatically optimizing frequently and infrequently accessed objects</a>.</p>
5792 #[derive(Clone, Debug, Default, PartialEq)]
5793 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5794 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5795 pub struct IntelligentTieringConfiguration {
5796     /// <p>Specifies a bucket filter. The configuration only includes objects that meet the filter's criteria.</p>
5797     pub filter: Option<IntelligentTieringFilter>,
5798     /// <p>The ID used to identify the S3 Intelligent-Tiering configuration.</p>
5799     pub id: String,
5800     /// <p>Specifies the status of the configuration.</p>
5801     pub status: String,
5802     /// <p>Specifies the S3 Intelligent-Tiering storage class tier of the configuration.</p>
5803     pub tierings: Vec<Tiering>,
5804 }
5805 
5806 #[allow(dead_code)]
5807 struct IntelligentTieringConfigurationDeserializer;
5808 impl IntelligentTieringConfigurationDeserializer {
5809     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<IntelligentTieringConfiguration, XmlParseError>5810     fn deserialize<T: Peek + Next>(
5811         tag_name: &str,
5812         stack: &mut T,
5813     ) -> Result<IntelligentTieringConfiguration, XmlParseError> {
5814         deserialize_elements::<_, IntelligentTieringConfiguration, _>(
5815             tag_name,
5816             stack,
5817             |name, stack, obj| {
5818                 match name {
5819                     "Filter" => {
5820                         obj.filter = Some(IntelligentTieringFilterDeserializer::deserialize(
5821                             "Filter", stack,
5822                         )?);
5823                     }
5824                     "Id" => {
5825                         obj.id = IntelligentTieringIdDeserializer::deserialize("Id", stack)?;
5826                     }
5827                     "Status" => {
5828                         obj.status =
5829                             IntelligentTieringStatusDeserializer::deserialize("Status", stack)?;
5830                     }
5831                     "Tiering" => {
5832                         obj.tierings
5833                             .extend(TieringListDeserializer::deserialize("Tiering", stack)?);
5834                     }
5835                     _ => skip_tree(stack),
5836                 }
5837                 Ok(())
5838             },
5839         )
5840     }
5841 }
5842 
5843 pub struct IntelligentTieringConfigurationSerializer;
5844 impl IntelligentTieringConfigurationSerializer {
5845     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &IntelligentTieringConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,5846     pub fn serialize<W>(
5847         mut writer: &mut EventWriter<W>,
5848         name: &str,
5849         obj: &IntelligentTieringConfiguration,
5850     ) -> Result<(), xml::writer::Error>
5851     where
5852         W: Write,
5853     {
5854         writer.write(xml::writer::XmlEvent::start_element(name))?;
5855         if let Some(ref value) = obj.filter {
5856             &IntelligentTieringFilterSerializer::serialize(&mut writer, "Filter", value)?;
5857         }
5858         write_characters_element(writer, "Id", &obj.id)?;
5859         write_characters_element(writer, "Status", &obj.status)?;
5860         TieringListSerializer::serialize(&mut writer, "Tiering", &obj.tierings)?;
5861         writer.write(xml::writer::XmlEvent::end_element())
5862     }
5863 }
5864 
5865 #[allow(dead_code)]
5866 struct IntelligentTieringConfigurationListDeserializer;
5867 impl IntelligentTieringConfigurationListDeserializer {
5868     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<IntelligentTieringConfiguration>, XmlParseError>5869     fn deserialize<T: Peek + Next>(
5870         tag_name: &str,
5871         stack: &mut T,
5872     ) -> Result<Vec<IntelligentTieringConfiguration>, XmlParseError> {
5873         let mut obj = vec![];
5874 
5875         loop {
5876             let consume_next_tag = match stack.peek() {
5877                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
5878                     name.local_name == tag_name
5879                 }
5880                 _ => false,
5881             };
5882 
5883             if consume_next_tag {
5884                 obj.push(IntelligentTieringConfigurationDeserializer::deserialize(
5885                     tag_name, stack,
5886                 )?);
5887             } else {
5888                 break;
5889             }
5890         }
5891 
5892         Ok(obj)
5893     }
5894 }
5895 #[allow(dead_code)]
5896 struct IntelligentTieringDaysDeserializer;
5897 impl IntelligentTieringDaysDeserializer {
5898     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>5899     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
5900         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
5901     }
5902 }
5903 
5904 pub struct IntelligentTieringDaysSerializer;
5905 impl IntelligentTieringDaysSerializer {
5906     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,5907     pub fn serialize<W>(
5908         mut writer: &mut EventWriter<W>,
5909         name: &str,
5910         obj: &i64,
5911     ) -> Result<(), xml::writer::Error>
5912     where
5913         W: Write,
5914     {
5915         write_characters_element(writer, name, &obj.to_string())
5916     }
5917 }
5918 
5919 /// <p>The <code>Filter</code> is used to identify objects that the S3 Intelligent-Tiering configuration applies to.</p>
5920 #[derive(Clone, Debug, Default, PartialEq)]
5921 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5922 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5923 pub struct IntelligentTieringFilter {
5924     /// <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>
5925     pub and: Option<IntelligentTieringAndOperator>,
5926     /// <p><p>An object key name prefix that identifies the subset of objects to which the rule applies.</p> <important> <p>Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints"> XML related object key constraints</a>.</p> </important></p>
5927     pub prefix: Option<String>,
5928     pub tag: Option<Tag>,
5929 }
5930 
5931 #[allow(dead_code)]
5932 struct IntelligentTieringFilterDeserializer;
5933 impl IntelligentTieringFilterDeserializer {
5934     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<IntelligentTieringFilter, XmlParseError>5935     fn deserialize<T: Peek + Next>(
5936         tag_name: &str,
5937         stack: &mut T,
5938     ) -> Result<IntelligentTieringFilter, XmlParseError> {
5939         deserialize_elements::<_, IntelligentTieringFilter, _>(
5940             tag_name,
5941             stack,
5942             |name, stack, obj| {
5943                 match name {
5944                     "And" => {
5945                         obj.and = Some(IntelligentTieringAndOperatorDeserializer::deserialize(
5946                             "And", stack,
5947                         )?);
5948                     }
5949                     "Prefix" => {
5950                         obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
5951                     }
5952                     "Tag" => {
5953                         obj.tag = Some(TagDeserializer::deserialize("Tag", stack)?);
5954                     }
5955                     _ => skip_tree(stack),
5956                 }
5957                 Ok(())
5958             },
5959         )
5960     }
5961 }
5962 
5963 pub struct IntelligentTieringFilterSerializer;
5964 impl IntelligentTieringFilterSerializer {
5965     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &IntelligentTieringFilter, ) -> Result<(), xml::writer::Error> where W: Write,5966     pub fn serialize<W>(
5967         mut writer: &mut EventWriter<W>,
5968         name: &str,
5969         obj: &IntelligentTieringFilter,
5970     ) -> Result<(), xml::writer::Error>
5971     where
5972         W: Write,
5973     {
5974         writer.write(xml::writer::XmlEvent::start_element(name))?;
5975         if let Some(ref value) = obj.and {
5976             &IntelligentTieringAndOperatorSerializer::serialize(&mut writer, "And", value)?;
5977         }
5978         if let Some(ref value) = obj.prefix {
5979             write_characters_element(writer, "Prefix", &value)?;
5980         }
5981         if let Some(ref value) = obj.tag {
5982             &TagSerializer::serialize(&mut writer, "Tag", value)?;
5983         }
5984         writer.write(xml::writer::XmlEvent::end_element())
5985     }
5986 }
5987 
5988 #[allow(dead_code)]
5989 struct IntelligentTieringIdDeserializer;
5990 impl IntelligentTieringIdDeserializer {
5991     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>5992     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5993         xml_util::deserialize_primitive(tag_name, stack, Ok)
5994     }
5995 }
5996 
5997 pub struct IntelligentTieringIdSerializer;
5998 impl IntelligentTieringIdSerializer {
5999     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6000     pub fn serialize<W>(
6001         mut writer: &mut EventWriter<W>,
6002         name: &str,
6003         obj: &String,
6004     ) -> Result<(), xml::writer::Error>
6005     where
6006         W: Write,
6007     {
6008         write_characters_element(writer, name, obj)
6009     }
6010 }
6011 
6012 #[allow(dead_code)]
6013 struct IntelligentTieringStatusDeserializer;
6014 impl IntelligentTieringStatusDeserializer {
6015     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6016     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6017         xml_util::deserialize_primitive(tag_name, stack, Ok)
6018     }
6019 }
6020 
6021 pub struct IntelligentTieringStatusSerializer;
6022 impl IntelligentTieringStatusSerializer {
6023     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6024     pub fn serialize<W>(
6025         mut writer: &mut EventWriter<W>,
6026         name: &str,
6027         obj: &String,
6028     ) -> Result<(), xml::writer::Error>
6029     where
6030         W: Write,
6031     {
6032         write_characters_element(writer, name, obj)
6033     }
6034 }
6035 
6036 /// <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 S3 API Reference</i>. </p>
6037 #[derive(Clone, Debug, Default, PartialEq)]
6038 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6039 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6040 pub struct InventoryConfiguration {
6041     /// <p>Contains information about where to publish the inventory results.</p>
6042     pub destination: InventoryDestination,
6043     /// <p>Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria.</p>
6044     pub filter: Option<InventoryFilter>,
6045     /// <p>The ID used to identify the inventory configuration.</p>
6046     pub id: String,
6047     /// <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>
6048     pub included_object_versions: String,
6049     /// <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>
6050     pub is_enabled: bool,
6051     /// <p>Contains the optional fields that are included in the inventory results.</p>
6052     pub optional_fields: Option<Vec<String>>,
6053     /// <p>Specifies the schedule for generating inventory results.</p>
6054     pub schedule: InventorySchedule,
6055 }
6056 
6057 #[allow(dead_code)]
6058 struct InventoryConfigurationDeserializer;
6059 impl InventoryConfigurationDeserializer {
6060     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<InventoryConfiguration, XmlParseError>6061     fn deserialize<T: Peek + Next>(
6062         tag_name: &str,
6063         stack: &mut T,
6064     ) -> Result<InventoryConfiguration, XmlParseError> {
6065         deserialize_elements::<_, InventoryConfiguration, _>(tag_name, stack, |name, stack, obj| {
6066             match name {
6067                 "Destination" => {
6068                     obj.destination =
6069                         InventoryDestinationDeserializer::deserialize("Destination", stack)?;
6070                 }
6071                 "Filter" => {
6072                     obj.filter = Some(InventoryFilterDeserializer::deserialize("Filter", stack)?);
6073                 }
6074                 "Id" => {
6075                     obj.id = InventoryIdDeserializer::deserialize("Id", stack)?;
6076                 }
6077                 "IncludedObjectVersions" => {
6078                     obj.included_object_versions =
6079                         InventoryIncludedObjectVersionsDeserializer::deserialize(
6080                             "IncludedObjectVersions",
6081                             stack,
6082                         )?;
6083                 }
6084                 "IsEnabled" => {
6085                     obj.is_enabled = IsEnabledDeserializer::deserialize("IsEnabled", stack)?;
6086                 }
6087                 "OptionalFields" => {
6088                     obj.optional_fields.get_or_insert(vec![]).extend(
6089                         InventoryOptionalFieldsDeserializer::deserialize("OptionalFields", stack)?,
6090                     );
6091                 }
6092                 "Schedule" => {
6093                     obj.schedule = InventoryScheduleDeserializer::deserialize("Schedule", stack)?;
6094                 }
6095                 _ => skip_tree(stack),
6096             }
6097             Ok(())
6098         })
6099     }
6100 }
6101 
6102 pub struct InventoryConfigurationSerializer;
6103 impl InventoryConfigurationSerializer {
6104     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &InventoryConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,6105     pub fn serialize<W>(
6106         mut writer: &mut EventWriter<W>,
6107         name: &str,
6108         obj: &InventoryConfiguration,
6109     ) -> Result<(), xml::writer::Error>
6110     where
6111         W: Write,
6112     {
6113         writer.write(xml::writer::XmlEvent::start_element(name))?;
6114         InventoryDestinationSerializer::serialize(&mut writer, "Destination", &obj.destination)?;
6115         if let Some(ref value) = obj.filter {
6116             &InventoryFilterSerializer::serialize(&mut writer, "Filter", value)?;
6117         }
6118         write_characters_element(writer, "Id", &obj.id)?;
6119         write_characters_element(
6120             writer,
6121             "IncludedObjectVersions",
6122             &obj.included_object_versions,
6123         )?;
6124         write_characters_element(writer, "IsEnabled", &obj.is_enabled.to_string())?;
6125         if let Some(ref value) = obj.optional_fields {
6126             &InventoryOptionalFieldsSerializer::serialize(&mut writer, "OptionalFields", value)?;
6127         }
6128         InventoryScheduleSerializer::serialize(&mut writer, "Schedule", &obj.schedule)?;
6129         writer.write(xml::writer::XmlEvent::end_element())
6130     }
6131 }
6132 
6133 #[allow(dead_code)]
6134 struct InventoryConfigurationListDeserializer;
6135 impl InventoryConfigurationListDeserializer {
6136     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<InventoryConfiguration>, XmlParseError>6137     fn deserialize<T: Peek + Next>(
6138         tag_name: &str,
6139         stack: &mut T,
6140     ) -> Result<Vec<InventoryConfiguration>, XmlParseError> {
6141         let mut obj = vec![];
6142 
6143         loop {
6144             let consume_next_tag = match stack.peek() {
6145                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
6146                     name.local_name == tag_name
6147                 }
6148                 _ => false,
6149             };
6150 
6151             if consume_next_tag {
6152                 obj.push(InventoryConfigurationDeserializer::deserialize(
6153                     tag_name, stack,
6154                 )?);
6155             } else {
6156                 break;
6157             }
6158         }
6159 
6160         Ok(obj)
6161     }
6162 }
6163 /// <p>Specifies the inventory configuration for an Amazon S3 bucket.</p>
6164 #[derive(Clone, Debug, Default, PartialEq)]
6165 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6166 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6167 pub struct InventoryDestination {
6168     /// <p>Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.</p>
6169     pub s3_bucket_destination: InventoryS3BucketDestination,
6170 }
6171 
6172 #[allow(dead_code)]
6173 struct InventoryDestinationDeserializer;
6174 impl InventoryDestinationDeserializer {
6175     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<InventoryDestination, XmlParseError>6176     fn deserialize<T: Peek + Next>(
6177         tag_name: &str,
6178         stack: &mut T,
6179     ) -> Result<InventoryDestination, XmlParseError> {
6180         deserialize_elements::<_, InventoryDestination, _>(tag_name, stack, |name, stack, obj| {
6181             match name {
6182                 "S3BucketDestination" => {
6183                     obj.s3_bucket_destination =
6184                         InventoryS3BucketDestinationDeserializer::deserialize(
6185                             "S3BucketDestination",
6186                             stack,
6187                         )?;
6188                 }
6189                 _ => skip_tree(stack),
6190             }
6191             Ok(())
6192         })
6193     }
6194 }
6195 
6196 pub struct InventoryDestinationSerializer;
6197 impl InventoryDestinationSerializer {
6198     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &InventoryDestination, ) -> Result<(), xml::writer::Error> where W: Write,6199     pub fn serialize<W>(
6200         mut writer: &mut EventWriter<W>,
6201         name: &str,
6202         obj: &InventoryDestination,
6203     ) -> Result<(), xml::writer::Error>
6204     where
6205         W: Write,
6206     {
6207         writer.write(xml::writer::XmlEvent::start_element(name))?;
6208         InventoryS3BucketDestinationSerializer::serialize(
6209             &mut writer,
6210             "S3BucketDestination",
6211             &obj.s3_bucket_destination,
6212         )?;
6213         writer.write(xml::writer::XmlEvent::end_element())
6214     }
6215 }
6216 
6217 /// <p>Contains the type of server-side encryption used to encrypt the inventory results.</p>
6218 #[derive(Clone, Debug, Default, PartialEq)]
6219 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6220 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6221 pub struct InventoryEncryption {
6222     /// <p>Specifies the use of SSE-KMS to encrypt delivered inventory reports.</p>
6223     pub ssekms: Option<SSEKMS>,
6224     /// <p>Specifies the use of SSE-S3 to encrypt delivered inventory reports.</p>
6225     pub sses3: Option<SSES3>,
6226 }
6227 
6228 #[allow(dead_code)]
6229 struct InventoryEncryptionDeserializer;
6230 impl InventoryEncryptionDeserializer {
6231     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<InventoryEncryption, XmlParseError>6232     fn deserialize<T: Peek + Next>(
6233         tag_name: &str,
6234         stack: &mut T,
6235     ) -> Result<InventoryEncryption, XmlParseError> {
6236         deserialize_elements::<_, InventoryEncryption, _>(tag_name, stack, |name, stack, obj| {
6237             match name {
6238                 "SSE-KMS" => {
6239                     obj.ssekms = Some(SSEKMSDeserializer::deserialize("SSE-KMS", stack)?);
6240                 }
6241                 "SSE-S3" => {
6242                     obj.sses3 = Some(SSES3Deserializer::deserialize("SSE-S3", stack)?);
6243                 }
6244                 _ => skip_tree(stack),
6245             }
6246             Ok(())
6247         })
6248     }
6249 }
6250 
6251 pub struct InventoryEncryptionSerializer;
6252 impl InventoryEncryptionSerializer {
6253     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &InventoryEncryption, ) -> Result<(), xml::writer::Error> where W: Write,6254     pub fn serialize<W>(
6255         mut writer: &mut EventWriter<W>,
6256         name: &str,
6257         obj: &InventoryEncryption,
6258     ) -> Result<(), xml::writer::Error>
6259     where
6260         W: Write,
6261     {
6262         writer.write(xml::writer::XmlEvent::start_element(name))?;
6263         if let Some(ref value) = obj.ssekms {
6264             &SSEKMSSerializer::serialize(&mut writer, "SSE-KMS", value)?;
6265         }
6266         if let Some(ref value) = obj.sses3 {
6267             &SSES3Serializer::serialize(&mut writer, "SSE-S3", value)?;
6268         }
6269         writer.write(xml::writer::XmlEvent::end_element())
6270     }
6271 }
6272 
6273 /// <p>Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria.</p>
6274 #[derive(Clone, Debug, Default, PartialEq)]
6275 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6276 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6277 pub struct InventoryFilter {
6278     /// <p>The prefix that an object must have to be included in the inventory results.</p>
6279     pub prefix: String,
6280 }
6281 
6282 #[allow(dead_code)]
6283 struct InventoryFilterDeserializer;
6284 impl InventoryFilterDeserializer {
6285     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<InventoryFilter, XmlParseError>6286     fn deserialize<T: Peek + Next>(
6287         tag_name: &str,
6288         stack: &mut T,
6289     ) -> Result<InventoryFilter, XmlParseError> {
6290         deserialize_elements::<_, InventoryFilter, _>(tag_name, stack, |name, stack, obj| {
6291             match name {
6292                 "Prefix" => {
6293                     obj.prefix = PrefixDeserializer::deserialize("Prefix", stack)?;
6294                 }
6295                 _ => skip_tree(stack),
6296             }
6297             Ok(())
6298         })
6299     }
6300 }
6301 
6302 pub struct InventoryFilterSerializer;
6303 impl InventoryFilterSerializer {
6304     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &InventoryFilter, ) -> Result<(), xml::writer::Error> where W: Write,6305     pub fn serialize<W>(
6306         mut writer: &mut EventWriter<W>,
6307         name: &str,
6308         obj: &InventoryFilter,
6309     ) -> Result<(), xml::writer::Error>
6310     where
6311         W: Write,
6312     {
6313         writer.write(xml::writer::XmlEvent::start_element(name))?;
6314         write_characters_element(writer, "Prefix", &obj.prefix)?;
6315         writer.write(xml::writer::XmlEvent::end_element())
6316     }
6317 }
6318 
6319 #[allow(dead_code)]
6320 struct InventoryFormatDeserializer;
6321 impl InventoryFormatDeserializer {
6322     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6323     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6324         xml_util::deserialize_primitive(tag_name, stack, Ok)
6325     }
6326 }
6327 
6328 pub struct InventoryFormatSerializer;
6329 impl InventoryFormatSerializer {
6330     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6331     pub fn serialize<W>(
6332         mut writer: &mut EventWriter<W>,
6333         name: &str,
6334         obj: &String,
6335     ) -> Result<(), xml::writer::Error>
6336     where
6337         W: Write,
6338     {
6339         write_characters_element(writer, name, obj)
6340     }
6341 }
6342 
6343 #[allow(dead_code)]
6344 struct InventoryFrequencyDeserializer;
6345 impl InventoryFrequencyDeserializer {
6346     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6347     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6348         xml_util::deserialize_primitive(tag_name, stack, Ok)
6349     }
6350 }
6351 
6352 pub struct InventoryFrequencySerializer;
6353 impl InventoryFrequencySerializer {
6354     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6355     pub fn serialize<W>(
6356         mut writer: &mut EventWriter<W>,
6357         name: &str,
6358         obj: &String,
6359     ) -> Result<(), xml::writer::Error>
6360     where
6361         W: Write,
6362     {
6363         write_characters_element(writer, name, obj)
6364     }
6365 }
6366 
6367 #[allow(dead_code)]
6368 struct InventoryIdDeserializer;
6369 impl InventoryIdDeserializer {
6370     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6371     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6372         xml_util::deserialize_primitive(tag_name, stack, Ok)
6373     }
6374 }
6375 
6376 pub struct InventoryIdSerializer;
6377 impl InventoryIdSerializer {
6378     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6379     pub fn serialize<W>(
6380         mut writer: &mut EventWriter<W>,
6381         name: &str,
6382         obj: &String,
6383     ) -> Result<(), xml::writer::Error>
6384     where
6385         W: Write,
6386     {
6387         write_characters_element(writer, name, obj)
6388     }
6389 }
6390 
6391 #[allow(dead_code)]
6392 struct InventoryIncludedObjectVersionsDeserializer;
6393 impl InventoryIncludedObjectVersionsDeserializer {
6394     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6395     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6396         xml_util::deserialize_primitive(tag_name, stack, Ok)
6397     }
6398 }
6399 
6400 pub struct InventoryIncludedObjectVersionsSerializer;
6401 impl InventoryIncludedObjectVersionsSerializer {
6402     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6403     pub fn serialize<W>(
6404         mut writer: &mut EventWriter<W>,
6405         name: &str,
6406         obj: &String,
6407     ) -> Result<(), xml::writer::Error>
6408     where
6409         W: Write,
6410     {
6411         write_characters_element(writer, name, obj)
6412     }
6413 }
6414 
6415 #[allow(dead_code)]
6416 struct InventoryOptionalFieldDeserializer;
6417 impl InventoryOptionalFieldDeserializer {
6418     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6419     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6420         xml_util::deserialize_primitive(tag_name, stack, Ok)
6421     }
6422 }
6423 
6424 pub struct InventoryOptionalFieldSerializer;
6425 impl InventoryOptionalFieldSerializer {
6426     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6427     pub fn serialize<W>(
6428         mut writer: &mut EventWriter<W>,
6429         name: &str,
6430         obj: &String,
6431     ) -> Result<(), xml::writer::Error>
6432     where
6433         W: Write,
6434     {
6435         write_characters_element(writer, name, obj)
6436     }
6437 }
6438 
6439 #[allow(dead_code)]
6440 struct InventoryOptionalFieldsDeserializer;
6441 impl InventoryOptionalFieldsDeserializer {
6442     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<String>, XmlParseError>6443     fn deserialize<T: Peek + Next>(
6444         tag_name: &str,
6445         stack: &mut T,
6446     ) -> Result<Vec<String>, XmlParseError> {
6447         deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
6448             if name == "Field" {
6449                 obj.push(InventoryOptionalFieldDeserializer::deserialize(
6450                     "Field", stack,
6451                 )?);
6452             } else {
6453                 skip_tree(stack);
6454             }
6455             Ok(())
6456         })
6457     }
6458 }
6459 
6460 pub struct InventoryOptionalFieldsSerializer;
6461 impl InventoryOptionalFieldsSerializer {
6462     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<String>, ) -> Result<(), xml::writer::Error> where W: Write,6463     pub fn serialize<W>(
6464         mut writer: &mut EventWriter<W>,
6465         name: &str,
6466         obj: &Vec<String>,
6467     ) -> Result<(), xml::writer::Error>
6468     where
6469         W: Write,
6470     {
6471         writer.write(xml::writer::XmlEvent::start_element(name))?;
6472         for element in obj {
6473             InventoryOptionalFieldSerializer::serialize(writer, "Field", element)?;
6474         }
6475         writer.write(xml::writer::XmlEvent::end_element())?;
6476         Ok(())
6477     }
6478 }
6479 
6480 /// <p>Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.</p>
6481 #[derive(Clone, Debug, Default, PartialEq)]
6482 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6483 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6484 pub struct InventoryS3BucketDestination {
6485     /// <p><p>The account ID that owns the destination S3 bucket. If no account ID is provided, the owner is not validated before exporting data. </p> <note> <p> Although this value is optional, we strongly recommend that you set it to help prevent problems if the destination bucket ownership changes. </p> </note></p>
6486     pub account_id: Option<String>,
6487     /// <p>The Amazon Resource Name (ARN) of the bucket where inventory results will be published.</p>
6488     pub bucket: String,
6489     /// <p>Contains the type of server-side encryption used to encrypt the inventory results.</p>
6490     pub encryption: Option<InventoryEncryption>,
6491     /// <p>Specifies the output format of the inventory results.</p>
6492     pub format: String,
6493     /// <p>The prefix that is prepended to all inventory results.</p>
6494     pub prefix: Option<String>,
6495 }
6496 
6497 #[allow(dead_code)]
6498 struct InventoryS3BucketDestinationDeserializer;
6499 impl InventoryS3BucketDestinationDeserializer {
6500     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<InventoryS3BucketDestination, XmlParseError>6501     fn deserialize<T: Peek + Next>(
6502         tag_name: &str,
6503         stack: &mut T,
6504     ) -> Result<InventoryS3BucketDestination, XmlParseError> {
6505         deserialize_elements::<_, InventoryS3BucketDestination, _>(
6506             tag_name,
6507             stack,
6508             |name, stack, obj| {
6509                 match name {
6510                     "AccountId" => {
6511                         obj.account_id =
6512                             Some(AccountIdDeserializer::deserialize("AccountId", stack)?);
6513                     }
6514                     "Bucket" => {
6515                         obj.bucket = BucketNameDeserializer::deserialize("Bucket", stack)?;
6516                     }
6517                     "Encryption" => {
6518                         obj.encryption = Some(InventoryEncryptionDeserializer::deserialize(
6519                             "Encryption",
6520                             stack,
6521                         )?);
6522                     }
6523                     "Format" => {
6524                         obj.format = InventoryFormatDeserializer::deserialize("Format", stack)?;
6525                     }
6526                     "Prefix" => {
6527                         obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
6528                     }
6529                     _ => skip_tree(stack),
6530                 }
6531                 Ok(())
6532             },
6533         )
6534     }
6535 }
6536 
6537 pub struct InventoryS3BucketDestinationSerializer;
6538 impl InventoryS3BucketDestinationSerializer {
6539     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &InventoryS3BucketDestination, ) -> Result<(), xml::writer::Error> where W: Write,6540     pub fn serialize<W>(
6541         mut writer: &mut EventWriter<W>,
6542         name: &str,
6543         obj: &InventoryS3BucketDestination,
6544     ) -> Result<(), xml::writer::Error>
6545     where
6546         W: Write,
6547     {
6548         writer.write(xml::writer::XmlEvent::start_element(name))?;
6549         if let Some(ref value) = obj.account_id {
6550             write_characters_element(writer, "AccountId", &value)?;
6551         }
6552         write_characters_element(writer, "Bucket", &obj.bucket)?;
6553         if let Some(ref value) = obj.encryption {
6554             &InventoryEncryptionSerializer::serialize(&mut writer, "Encryption", value)?;
6555         }
6556         write_characters_element(writer, "Format", &obj.format)?;
6557         if let Some(ref value) = obj.prefix {
6558             write_characters_element(writer, "Prefix", &value)?;
6559         }
6560         writer.write(xml::writer::XmlEvent::end_element())
6561     }
6562 }
6563 
6564 /// <p>Specifies the schedule for generating inventory results.</p>
6565 #[derive(Clone, Debug, Default, PartialEq)]
6566 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6567 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6568 pub struct InventorySchedule {
6569     /// <p>Specifies how frequently inventory results are produced.</p>
6570     pub frequency: String,
6571 }
6572 
6573 #[allow(dead_code)]
6574 struct InventoryScheduleDeserializer;
6575 impl InventoryScheduleDeserializer {
6576     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<InventorySchedule, XmlParseError>6577     fn deserialize<T: Peek + Next>(
6578         tag_name: &str,
6579         stack: &mut T,
6580     ) -> Result<InventorySchedule, XmlParseError> {
6581         deserialize_elements::<_, InventorySchedule, _>(tag_name, stack, |name, stack, obj| {
6582             match name {
6583                 "Frequency" => {
6584                     obj.frequency =
6585                         InventoryFrequencyDeserializer::deserialize("Frequency", stack)?;
6586                 }
6587                 _ => skip_tree(stack),
6588             }
6589             Ok(())
6590         })
6591     }
6592 }
6593 
6594 pub struct InventoryScheduleSerializer;
6595 impl InventoryScheduleSerializer {
6596     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &InventorySchedule, ) -> Result<(), xml::writer::Error> where W: Write,6597     pub fn serialize<W>(
6598         mut writer: &mut EventWriter<W>,
6599         name: &str,
6600         obj: &InventorySchedule,
6601     ) -> Result<(), xml::writer::Error>
6602     where
6603         W: Write,
6604     {
6605         writer.write(xml::writer::XmlEvent::start_element(name))?;
6606         write_characters_element(writer, "Frequency", &obj.frequency)?;
6607         writer.write(xml::writer::XmlEvent::end_element())
6608     }
6609 }
6610 
6611 #[allow(dead_code)]
6612 struct IsEnabledDeserializer;
6613 impl IsEnabledDeserializer {
6614     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>6615     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
6616         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
6617     }
6618 }
6619 
6620 pub struct IsEnabledSerializer;
6621 impl IsEnabledSerializer {
6622     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,6623     pub fn serialize<W>(
6624         mut writer: &mut EventWriter<W>,
6625         name: &str,
6626         obj: &bool,
6627     ) -> Result<(), xml::writer::Error>
6628     where
6629         W: Write,
6630     {
6631         write_characters_element(writer, name, &obj.to_string())
6632     }
6633 }
6634 
6635 #[allow(dead_code)]
6636 struct IsLatestDeserializer;
6637 impl IsLatestDeserializer {
6638     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>6639     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
6640         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
6641     }
6642 }
6643 #[allow(dead_code)]
6644 struct IsPublicDeserializer;
6645 impl IsPublicDeserializer {
6646     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>6647     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
6648         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
6649     }
6650 }
6651 #[allow(dead_code)]
6652 struct IsTruncatedDeserializer;
6653 impl IsTruncatedDeserializer {
6654     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>6655     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
6656         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
6657     }
6658 }
6659 /// <p>Specifies JSON as object's input serialization format.</p>
6660 #[derive(Clone, Debug, Default, PartialEq)]
6661 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6662 pub struct JSONInput {
6663     /// <p>The type of JSON. Valid values: Document, Lines.</p>
6664     pub type_: Option<String>,
6665 }
6666 
6667 pub struct JSONInputSerializer;
6668 impl JSONInputSerializer {
6669     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &JSONInput, ) -> Result<(), xml::writer::Error> where W: Write,6670     pub fn serialize<W>(
6671         mut writer: &mut EventWriter<W>,
6672         name: &str,
6673         obj: &JSONInput,
6674     ) -> Result<(), xml::writer::Error>
6675     where
6676         W: Write,
6677     {
6678         writer.write(xml::writer::XmlEvent::start_element(name))?;
6679         if let Some(ref value) = obj.type_ {
6680             write_characters_element(writer, "Type", &value)?;
6681         }
6682         writer.write(xml::writer::XmlEvent::end_element())
6683     }
6684 }
6685 
6686 /// <p>Specifies JSON as request's output serialization format.</p>
6687 #[derive(Clone, Debug, Default, PartialEq)]
6688 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6689 pub struct JSONOutput {
6690     /// <p>The value used to separate individual records in the output. If no value is specified, Amazon S3 uses a newline character ('\n').</p>
6691     pub record_delimiter: Option<String>,
6692 }
6693 
6694 pub struct JSONOutputSerializer;
6695 impl JSONOutputSerializer {
6696     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &JSONOutput, ) -> Result<(), xml::writer::Error> where W: Write,6697     pub fn serialize<W>(
6698         mut writer: &mut EventWriter<W>,
6699         name: &str,
6700         obj: &JSONOutput,
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.record_delimiter {
6707             write_characters_element(writer, "RecordDelimiter", &value)?;
6708         }
6709         writer.write(xml::writer::XmlEvent::end_element())
6710     }
6711 }
6712 
6713 pub struct JSONTypeSerializer;
6714 impl JSONTypeSerializer {
6715     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6716     pub fn serialize<W>(
6717         mut writer: &mut EventWriter<W>,
6718         name: &str,
6719         obj: &String,
6720     ) -> Result<(), xml::writer::Error>
6721     where
6722         W: Write,
6723     {
6724         write_characters_element(writer, name, obj)
6725     }
6726 }
6727 
6728 pub struct KMSContextSerializer;
6729 impl KMSContextSerializer {
6730     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6731     pub fn serialize<W>(
6732         mut writer: &mut EventWriter<W>,
6733         name: &str,
6734         obj: &String,
6735     ) -> Result<(), xml::writer::Error>
6736     where
6737         W: Write,
6738     {
6739         write_characters_element(writer, name, obj)
6740     }
6741 }
6742 
6743 #[allow(dead_code)]
6744 struct KeyCountDeserializer;
6745 impl KeyCountDeserializer {
6746     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>6747     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
6748         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
6749     }
6750 }
6751 #[allow(dead_code)]
6752 struct KeyMarkerDeserializer;
6753 impl KeyMarkerDeserializer {
6754     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6755     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6756         xml_util::deserialize_primitive(tag_name, stack, Ok)
6757     }
6758 }
6759 
6760 pub struct KeyMarkerSerializer;
6761 impl KeyMarkerSerializer {
6762     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6763     pub fn serialize<W>(
6764         mut writer: &mut EventWriter<W>,
6765         name: &str,
6766         obj: &String,
6767     ) -> Result<(), xml::writer::Error>
6768     where
6769         W: Write,
6770     {
6771         write_characters_element(writer, name, obj)
6772     }
6773 }
6774 
6775 #[allow(dead_code)]
6776 struct KeyPrefixEqualsDeserializer;
6777 impl KeyPrefixEqualsDeserializer {
6778     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6779     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6780         xml_util::deserialize_primitive(tag_name, stack, Ok)
6781     }
6782 }
6783 
6784 pub struct KeyPrefixEqualsSerializer;
6785 impl KeyPrefixEqualsSerializer {
6786     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6787     pub fn serialize<W>(
6788         mut writer: &mut EventWriter<W>,
6789         name: &str,
6790         obj: &String,
6791     ) -> Result<(), xml::writer::Error>
6792     where
6793         W: Write,
6794     {
6795         write_characters_element(writer, name, obj)
6796     }
6797 }
6798 
6799 #[allow(dead_code)]
6800 struct LambdaFunctionArnDeserializer;
6801 impl LambdaFunctionArnDeserializer {
6802     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6803     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6804         xml_util::deserialize_primitive(tag_name, stack, Ok)
6805     }
6806 }
6807 
6808 pub struct LambdaFunctionArnSerializer;
6809 impl LambdaFunctionArnSerializer {
6810     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,6811     pub fn serialize<W>(
6812         mut writer: &mut EventWriter<W>,
6813         name: &str,
6814         obj: &String,
6815     ) -> Result<(), xml::writer::Error>
6816     where
6817         W: Write,
6818     {
6819         write_characters_element(writer, name, obj)
6820     }
6821 }
6822 
6823 /// <p>A container for specifying the configuration for AWS Lambda notifications.</p>
6824 #[derive(Clone, Debug, Default, PartialEq)]
6825 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6826 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6827 pub struct LambdaFunctionConfiguration {
6828     /// <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 S3 User Guide</i>.</p>
6829     pub events: Vec<String>,
6830     pub filter: Option<NotificationConfigurationFilter>,
6831     pub id: Option<String>,
6832     /// <p>The Amazon Resource Name (ARN) of the AWS Lambda function that Amazon S3 invokes when the specified event type occurs.</p>
6833     pub lambda_function_arn: String,
6834 }
6835 
6836 #[allow(dead_code)]
6837 struct LambdaFunctionConfigurationDeserializer;
6838 impl LambdaFunctionConfigurationDeserializer {
6839     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<LambdaFunctionConfiguration, XmlParseError>6840     fn deserialize<T: Peek + Next>(
6841         tag_name: &str,
6842         stack: &mut T,
6843     ) -> Result<LambdaFunctionConfiguration, XmlParseError> {
6844         deserialize_elements::<_, LambdaFunctionConfiguration, _>(
6845             tag_name,
6846             stack,
6847             |name, stack, obj| {
6848                 match name {
6849                     "Event" => {
6850                         obj.events
6851                             .extend(EventListDeserializer::deserialize("Event", stack)?);
6852                     }
6853                     "Filter" => {
6854                         obj.filter =
6855                             Some(NotificationConfigurationFilterDeserializer::deserialize(
6856                                 "Filter", stack,
6857                             )?);
6858                     }
6859                     "Id" => {
6860                         obj.id = Some(NotificationIdDeserializer::deserialize("Id", stack)?);
6861                     }
6862                     "CloudFunction" => {
6863                         obj.lambda_function_arn =
6864                             LambdaFunctionArnDeserializer::deserialize("CloudFunction", stack)?;
6865                     }
6866                     _ => skip_tree(stack),
6867                 }
6868                 Ok(())
6869             },
6870         )
6871     }
6872 }
6873 
6874 pub struct LambdaFunctionConfigurationSerializer;
6875 impl LambdaFunctionConfigurationSerializer {
6876     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &LambdaFunctionConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,6877     pub fn serialize<W>(
6878         mut writer: &mut EventWriter<W>,
6879         name: &str,
6880         obj: &LambdaFunctionConfiguration,
6881     ) -> Result<(), xml::writer::Error>
6882     where
6883         W: Write,
6884     {
6885         writer.write(xml::writer::XmlEvent::start_element(name))?;
6886         EventListSerializer::serialize(&mut writer, "Event", &obj.events)?;
6887         if let Some(ref value) = obj.filter {
6888             &NotificationConfigurationFilterSerializer::serialize(&mut writer, "Filter", value)?;
6889         }
6890         if let Some(ref value) = obj.id {
6891             write_characters_element(writer, "Id", &value)?;
6892         }
6893         write_characters_element(writer, "CloudFunction", &obj.lambda_function_arn)?;
6894         writer.write(xml::writer::XmlEvent::end_element())
6895     }
6896 }
6897 
6898 #[allow(dead_code)]
6899 struct LambdaFunctionConfigurationListDeserializer;
6900 impl LambdaFunctionConfigurationListDeserializer {
6901     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<LambdaFunctionConfiguration>, XmlParseError>6902     fn deserialize<T: Peek + Next>(
6903         tag_name: &str,
6904         stack: &mut T,
6905     ) -> Result<Vec<LambdaFunctionConfiguration>, XmlParseError> {
6906         let mut obj = vec![];
6907 
6908         loop {
6909             let consume_next_tag = match stack.peek() {
6910                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
6911                     name.local_name == tag_name
6912                 }
6913                 _ => false,
6914             };
6915 
6916             if consume_next_tag {
6917                 obj.push(LambdaFunctionConfigurationDeserializer::deserialize(
6918                     tag_name, stack,
6919                 )?);
6920             } else {
6921                 break;
6922             }
6923         }
6924 
6925         Ok(obj)
6926     }
6927 }
6928 
6929 pub struct LambdaFunctionConfigurationListSerializer;
6930 impl LambdaFunctionConfigurationListSerializer {
6931     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<LambdaFunctionConfiguration>, ) -> Result<(), xml::writer::Error> where W: Write,6932     pub fn serialize<W>(
6933         mut writer: &mut EventWriter<W>,
6934         name: &str,
6935         obj: &Vec<LambdaFunctionConfiguration>,
6936     ) -> Result<(), xml::writer::Error>
6937     where
6938         W: Write,
6939     {
6940         for element in obj {
6941             LambdaFunctionConfigurationSerializer::serialize(writer, name, element)?;
6942         }
6943         Ok(())
6944     }
6945 }
6946 
6947 #[allow(dead_code)]
6948 struct LastModifiedDeserializer;
6949 impl LastModifiedDeserializer {
6950     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>6951     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6952         xml_util::deserialize_primitive(tag_name, stack, Ok)
6953     }
6954 }
6955 /// <p>Container for lifecycle rules. You can add as many as 1000 rules.</p>
6956 #[derive(Clone, Debug, Default, PartialEq)]
6957 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6958 pub struct LifecycleConfiguration {
6959     /// <p>Specifies lifecycle configuration rules for an Amazon S3 bucket. </p>
6960     pub rules: Vec<Rule>,
6961 }
6962 
6963 pub struct LifecycleConfigurationSerializer;
6964 impl LifecycleConfigurationSerializer {
6965     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &LifecycleConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,6966     pub fn serialize<W>(
6967         mut writer: &mut EventWriter<W>,
6968         name: &str,
6969         obj: &LifecycleConfiguration,
6970     ) -> Result<(), xml::writer::Error>
6971     where
6972         W: Write,
6973     {
6974         writer.write(xml::writer::XmlEvent::start_element(name))?;
6975         RulesSerializer::serialize(&mut writer, "Rule", &obj.rules)?;
6976         writer.write(xml::writer::XmlEvent::end_element())
6977     }
6978 }
6979 
6980 /// <p>Container for the expiration for the lifecycle of the object.</p>
6981 #[derive(Clone, Debug, Default, PartialEq)]
6982 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6983 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6984 pub struct LifecycleExpiration {
6985     /// <p>Indicates at what date the object is to be moved or deleted. Should be in GMT ISO 8601 Format.</p>
6986     pub date: Option<String>,
6987     /// <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>
6988     pub days: Option<i64>,
6989     /// <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>
6990     pub expired_object_delete_marker: Option<bool>,
6991 }
6992 
6993 #[allow(dead_code)]
6994 struct LifecycleExpirationDeserializer;
6995 impl LifecycleExpirationDeserializer {
6996     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<LifecycleExpiration, XmlParseError>6997     fn deserialize<T: Peek + Next>(
6998         tag_name: &str,
6999         stack: &mut T,
7000     ) -> Result<LifecycleExpiration, XmlParseError> {
7001         deserialize_elements::<_, LifecycleExpiration, _>(tag_name, stack, |name, stack, obj| {
7002             match name {
7003                 "Date" => {
7004                     obj.date = Some(DateDeserializer::deserialize("Date", stack)?);
7005                 }
7006                 "Days" => {
7007                     obj.days = Some(DaysDeserializer::deserialize("Days", stack)?);
7008                 }
7009                 "ExpiredObjectDeleteMarker" => {
7010                     obj.expired_object_delete_marker =
7011                         Some(ExpiredObjectDeleteMarkerDeserializer::deserialize(
7012                             "ExpiredObjectDeleteMarker",
7013                             stack,
7014                         )?);
7015                 }
7016                 _ => skip_tree(stack),
7017             }
7018             Ok(())
7019         })
7020     }
7021 }
7022 
7023 pub struct LifecycleExpirationSerializer;
7024 impl LifecycleExpirationSerializer {
7025     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &LifecycleExpiration, ) -> Result<(), xml::writer::Error> where W: Write,7026     pub fn serialize<W>(
7027         mut writer: &mut EventWriter<W>,
7028         name: &str,
7029         obj: &LifecycleExpiration,
7030     ) -> Result<(), xml::writer::Error>
7031     where
7032         W: Write,
7033     {
7034         writer.write(xml::writer::XmlEvent::start_element(name))?;
7035         if let Some(ref value) = obj.date {
7036             write_characters_element(writer, "Date", &value.to_string())?;
7037         }
7038         if let Some(ref value) = obj.days {
7039             write_characters_element(writer, "Days", &value.to_string())?;
7040         }
7041         if let Some(ref value) = obj.expired_object_delete_marker {
7042             write_characters_element(writer, "ExpiredObjectDeleteMarker", &value.to_string())?;
7043         }
7044         writer.write(xml::writer::XmlEvent::end_element())
7045     }
7046 }
7047 
7048 /// <p>A lifecycle rule for individual objects in an Amazon S3 bucket.</p>
7049 #[derive(Clone, Debug, Default, PartialEq)]
7050 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7051 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7052 pub struct LifecycleRule {
7053     pub abort_incomplete_multipart_upload: Option<AbortIncompleteMultipartUpload>,
7054     /// <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>
7055     pub expiration: Option<LifecycleExpiration>,
7056     /// <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. <code>Filter</code> is required if the <code>LifecycleRule</code> does not containt a <code>Prefix</code> element.</p>
7057     pub filter: Option<LifecycleRuleFilter>,
7058     /// <p>Unique identifier for the rule. The value cannot be longer than 255 characters.</p>
7059     pub id: Option<String>,
7060     pub noncurrent_version_expiration: Option<NoncurrentVersionExpiration>,
7061     /// <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>
7062     pub noncurrent_version_transitions: Option<Vec<NoncurrentVersionTransition>>,
7063     /// <p>If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied.</p>
7064     pub status: String,
7065     /// <p>Specifies when an Amazon S3 object transitions to a specified storage class.</p>
7066     pub transitions: Option<Vec<Transition>>,
7067 }
7068 
7069 #[allow(dead_code)]
7070 struct LifecycleRuleDeserializer;
7071 impl LifecycleRuleDeserializer {
7072     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<LifecycleRule, XmlParseError>7073     fn deserialize<T: Peek + Next>(
7074         tag_name: &str,
7075         stack: &mut T,
7076     ) -> Result<LifecycleRule, XmlParseError> {
7077         deserialize_elements::<_, LifecycleRule, _>(tag_name, stack, |name, stack, obj| {
7078             match name {
7079                 "AbortIncompleteMultipartUpload" => {
7080                     obj.abort_incomplete_multipart_upload =
7081                         Some(AbortIncompleteMultipartUploadDeserializer::deserialize(
7082                             "AbortIncompleteMultipartUpload",
7083                             stack,
7084                         )?);
7085                 }
7086                 "Expiration" => {
7087                     obj.expiration = Some(LifecycleExpirationDeserializer::deserialize(
7088                         "Expiration",
7089                         stack,
7090                     )?);
7091                 }
7092                 "Filter" => {
7093                     obj.filter = Some(LifecycleRuleFilterDeserializer::deserialize(
7094                         "Filter", stack,
7095                     )?);
7096                 }
7097                 "ID" => {
7098                     obj.id = Some(IDDeserializer::deserialize("ID", stack)?);
7099                 }
7100                 "NoncurrentVersionExpiration" => {
7101                     obj.noncurrent_version_expiration =
7102                         Some(NoncurrentVersionExpirationDeserializer::deserialize(
7103                             "NoncurrentVersionExpiration",
7104                             stack,
7105                         )?);
7106                 }
7107                 "NoncurrentVersionTransition" => {
7108                     obj.noncurrent_version_transitions
7109                         .get_or_insert(vec![])
7110                         .extend(NoncurrentVersionTransitionListDeserializer::deserialize(
7111                             "NoncurrentVersionTransition",
7112                             stack,
7113                         )?);
7114                 }
7115                 "Status" => {
7116                     obj.status = ExpirationStatusDeserializer::deserialize("Status", stack)?;
7117                 }
7118                 "Transition" => {
7119                     obj.transitions.get_or_insert(vec![]).extend(
7120                         TransitionListDeserializer::deserialize("Transition", stack)?,
7121                     );
7122                 }
7123                 _ => skip_tree(stack),
7124             }
7125             Ok(())
7126         })
7127     }
7128 }
7129 
7130 pub struct LifecycleRuleSerializer;
7131 impl LifecycleRuleSerializer {
7132     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &LifecycleRule, ) -> Result<(), xml::writer::Error> where W: Write,7133     pub fn serialize<W>(
7134         mut writer: &mut EventWriter<W>,
7135         name: &str,
7136         obj: &LifecycleRule,
7137     ) -> Result<(), xml::writer::Error>
7138     where
7139         W: Write,
7140     {
7141         writer.write(xml::writer::XmlEvent::start_element(name))?;
7142         if let Some(ref value) = obj.abort_incomplete_multipart_upload {
7143             &AbortIncompleteMultipartUploadSerializer::serialize(
7144                 &mut writer,
7145                 "AbortIncompleteMultipartUpload",
7146                 value,
7147             )?;
7148         }
7149         if let Some(ref value) = obj.expiration {
7150             &LifecycleExpirationSerializer::serialize(&mut writer, "Expiration", value)?;
7151         }
7152         if let Some(ref value) = obj.filter {
7153             &LifecycleRuleFilterSerializer::serialize(&mut writer, "Filter", value)?;
7154         }
7155         if let Some(ref value) = obj.id {
7156             write_characters_element(writer, "ID", &value)?;
7157         }
7158         if let Some(ref value) = obj.noncurrent_version_expiration {
7159             &NoncurrentVersionExpirationSerializer::serialize(
7160                 &mut writer,
7161                 "NoncurrentVersionExpiration",
7162                 value,
7163             )?;
7164         }
7165         if let Some(ref value) = obj.noncurrent_version_transitions {
7166             &NoncurrentVersionTransitionListSerializer::serialize(
7167                 &mut writer,
7168                 "NoncurrentVersionTransition",
7169                 value,
7170             )?;
7171         }
7172         write_characters_element(writer, "Status", &obj.status)?;
7173         if let Some(ref value) = obj.transitions {
7174             &TransitionListSerializer::serialize(&mut writer, "Transition", value)?;
7175         }
7176         writer.write(xml::writer::XmlEvent::end_element())
7177     }
7178 }
7179 
7180 /// <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>
7181 #[derive(Clone, Debug, Default, PartialEq)]
7182 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7183 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7184 pub struct LifecycleRuleAndOperator {
7185     /// <p>Prefix identifying one or more objects to which the rule applies.</p>
7186     pub prefix: Option<String>,
7187     /// <p>All of these tags must exist in the object's tag set in order for the rule to apply.</p>
7188     pub tags: Option<Vec<Tag>>,
7189 }
7190 
7191 #[allow(dead_code)]
7192 struct LifecycleRuleAndOperatorDeserializer;
7193 impl LifecycleRuleAndOperatorDeserializer {
7194     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<LifecycleRuleAndOperator, XmlParseError>7195     fn deserialize<T: Peek + Next>(
7196         tag_name: &str,
7197         stack: &mut T,
7198     ) -> Result<LifecycleRuleAndOperator, XmlParseError> {
7199         deserialize_elements::<_, LifecycleRuleAndOperator, _>(
7200             tag_name,
7201             stack,
7202             |name, stack, obj| {
7203                 match name {
7204                     "Prefix" => {
7205                         obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
7206                     }
7207                     "Tag" => {
7208                         obj.tags
7209                             .get_or_insert(vec![])
7210                             .extend(TagSetDeserializer::deserialize("Tag", stack)?);
7211                     }
7212                     _ => skip_tree(stack),
7213                 }
7214                 Ok(())
7215             },
7216         )
7217     }
7218 }
7219 
7220 pub struct LifecycleRuleAndOperatorSerializer;
7221 impl LifecycleRuleAndOperatorSerializer {
7222     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &LifecycleRuleAndOperator, ) -> Result<(), xml::writer::Error> where W: Write,7223     pub fn serialize<W>(
7224         mut writer: &mut EventWriter<W>,
7225         name: &str,
7226         obj: &LifecycleRuleAndOperator,
7227     ) -> Result<(), xml::writer::Error>
7228     where
7229         W: Write,
7230     {
7231         writer.write(xml::writer::XmlEvent::start_element(name))?;
7232         if let Some(ref value) = obj.prefix {
7233             write_characters_element(writer, "Prefix", &value)?;
7234         }
7235         if let Some(ref value) = obj.tags {
7236             &TagSetSerializer::serialize(&mut writer, "Tag", value)?;
7237         }
7238         writer.write(xml::writer::XmlEvent::end_element())
7239     }
7240 }
7241 
7242 /// <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>
7243 #[derive(Clone, Debug, Default, PartialEq)]
7244 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7245 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7246 pub struct LifecycleRuleFilter {
7247     pub and: Option<LifecycleRuleAndOperator>,
7248     /// <p><p>Prefix identifying one or more objects to which the rule applies.</p> <important> <p>Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints"> XML related object key constraints</a>.</p> </important></p>
7249     pub prefix: Option<String>,
7250     /// <p>This tag must exist in the object's tag set in order for the rule to apply.</p>
7251     pub tag: Option<Tag>,
7252 }
7253 
7254 #[allow(dead_code)]
7255 struct LifecycleRuleFilterDeserializer;
7256 impl LifecycleRuleFilterDeserializer {
7257     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<LifecycleRuleFilter, XmlParseError>7258     fn deserialize<T: Peek + Next>(
7259         tag_name: &str,
7260         stack: &mut T,
7261     ) -> Result<LifecycleRuleFilter, XmlParseError> {
7262         deserialize_elements::<_, LifecycleRuleFilter, _>(tag_name, stack, |name, stack, obj| {
7263             match name {
7264                 "And" => {
7265                     obj.and = Some(LifecycleRuleAndOperatorDeserializer::deserialize(
7266                         "And", stack,
7267                     )?);
7268                 }
7269                 "Prefix" => {
7270                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
7271                 }
7272                 "Tag" => {
7273                     obj.tag = Some(TagDeserializer::deserialize("Tag", stack)?);
7274                 }
7275                 _ => skip_tree(stack),
7276             }
7277             Ok(())
7278         })
7279     }
7280 }
7281 
7282 pub struct LifecycleRuleFilterSerializer;
7283 impl LifecycleRuleFilterSerializer {
7284     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &LifecycleRuleFilter, ) -> Result<(), xml::writer::Error> where W: Write,7285     pub fn serialize<W>(
7286         mut writer: &mut EventWriter<W>,
7287         name: &str,
7288         obj: &LifecycleRuleFilter,
7289     ) -> Result<(), xml::writer::Error>
7290     where
7291         W: Write,
7292     {
7293         writer.write(xml::writer::XmlEvent::start_element(name))?;
7294         if let Some(ref value) = obj.and {
7295             &LifecycleRuleAndOperatorSerializer::serialize(&mut writer, "And", value)?;
7296         }
7297         if let Some(ref value) = obj.prefix {
7298             write_characters_element(writer, "Prefix", &value)?;
7299         }
7300         if let Some(ref value) = obj.tag {
7301             &TagSerializer::serialize(&mut writer, "Tag", value)?;
7302         }
7303         writer.write(xml::writer::XmlEvent::end_element())
7304     }
7305 }
7306 
7307 #[allow(dead_code)]
7308 struct LifecycleRulesDeserializer;
7309 impl LifecycleRulesDeserializer {
7310     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<LifecycleRule>, XmlParseError>7311     fn deserialize<T: Peek + Next>(
7312         tag_name: &str,
7313         stack: &mut T,
7314     ) -> Result<Vec<LifecycleRule>, XmlParseError> {
7315         let mut obj = vec![];
7316 
7317         loop {
7318             let consume_next_tag = match stack.peek() {
7319                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
7320                     name.local_name == tag_name
7321                 }
7322                 _ => false,
7323             };
7324 
7325             if consume_next_tag {
7326                 obj.push(LifecycleRuleDeserializer::deserialize(tag_name, stack)?);
7327             } else {
7328                 break;
7329             }
7330         }
7331 
7332         Ok(obj)
7333     }
7334 }
7335 
7336 pub struct LifecycleRulesSerializer;
7337 impl LifecycleRulesSerializer {
7338     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<LifecycleRule>, ) -> Result<(), xml::writer::Error> where W: Write,7339     pub fn serialize<W>(
7340         mut writer: &mut EventWriter<W>,
7341         name: &str,
7342         obj: &Vec<LifecycleRule>,
7343     ) -> Result<(), xml::writer::Error>
7344     where
7345         W: Write,
7346     {
7347         for element in obj {
7348             LifecycleRuleSerializer::serialize(writer, name, element)?;
7349         }
7350         Ok(())
7351     }
7352 }
7353 
7354 #[derive(Clone, Debug, Default, PartialEq)]
7355 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7356 pub struct ListBucketAnalyticsConfigurationsOutput {
7357     /// <p>The list of analytics configurations for a bucket.</p>
7358     pub analytics_configuration_list: Option<Vec<AnalyticsConfiguration>>,
7359     /// <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>
7360     pub continuation_token: Option<String>,
7361     /// <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>
7362     pub is_truncated: Option<bool>,
7363     /// <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>
7364     pub next_continuation_token: Option<String>,
7365 }
7366 
7367 #[allow(dead_code)]
7368 struct ListBucketAnalyticsConfigurationsOutputDeserializer;
7369 impl ListBucketAnalyticsConfigurationsOutputDeserializer {
7370     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListBucketAnalyticsConfigurationsOutput, XmlParseError>7371     fn deserialize<T: Peek + Next>(
7372         tag_name: &str,
7373         stack: &mut T,
7374     ) -> Result<ListBucketAnalyticsConfigurationsOutput, XmlParseError> {
7375         deserialize_elements::<_, ListBucketAnalyticsConfigurationsOutput, _>(
7376             tag_name,
7377             stack,
7378             |name, stack, obj| {
7379                 match name {
7380                     "AnalyticsConfiguration" => {
7381                         obj.analytics_configuration_list
7382                             .get_or_insert(vec![])
7383                             .extend(AnalyticsConfigurationListDeserializer::deserialize(
7384                                 "AnalyticsConfiguration",
7385                                 stack,
7386                             )?);
7387                     }
7388                     "ContinuationToken" => {
7389                         obj.continuation_token =
7390                             Some(TokenDeserializer::deserialize("ContinuationToken", stack)?);
7391                     }
7392                     "IsTruncated" => {
7393                         obj.is_truncated =
7394                             Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
7395                     }
7396                     "NextContinuationToken" => {
7397                         obj.next_continuation_token = Some(NextTokenDeserializer::deserialize(
7398                             "NextContinuationToken",
7399                             stack,
7400                         )?);
7401                     }
7402                     _ => skip_tree(stack),
7403                 }
7404                 Ok(())
7405             },
7406         )
7407     }
7408 }
7409 #[derive(Clone, Debug, Default, PartialEq)]
7410 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7411 pub struct ListBucketAnalyticsConfigurationsRequest {
7412     /// <p>The name of the bucket from which analytics configurations are retrieved.</p>
7413     pub bucket: String,
7414     /// <p>The ContinuationToken that represents a placeholder from where this request should begin.</p>
7415     pub continuation_token: Option<String>,
7416     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
7417     pub expected_bucket_owner: Option<String>,
7418 }
7419 
7420 #[derive(Clone, Debug, Default, PartialEq)]
7421 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7422 pub struct ListBucketIntelligentTieringConfigurationsOutput {
7423     /// <p>The ContinuationToken that represents a placeholder from where this request should begin.</p>
7424     pub continuation_token: Option<String>,
7425     /// <p>The list of S3 Intelligent-Tiering configurations for a bucket.</p>
7426     pub intelligent_tiering_configuration_list: Option<Vec<IntelligentTieringConfiguration>>,
7427     /// <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>
7428     pub is_truncated: Option<bool>,
7429     /// <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>
7430     pub next_continuation_token: Option<String>,
7431 }
7432 
7433 #[allow(dead_code)]
7434 struct ListBucketIntelligentTieringConfigurationsOutputDeserializer;
7435 impl ListBucketIntelligentTieringConfigurationsOutputDeserializer {
7436     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListBucketIntelligentTieringConfigurationsOutput, XmlParseError>7437     fn deserialize<T: Peek + Next>(
7438         tag_name: &str,
7439         stack: &mut T,
7440     ) -> Result<ListBucketIntelligentTieringConfigurationsOutput, XmlParseError> {
7441         deserialize_elements::<_, ListBucketIntelligentTieringConfigurationsOutput, _>(
7442             tag_name,
7443             stack,
7444             |name, stack, obj| {
7445                 match name {
7446                     "ContinuationToken" => {
7447                         obj.continuation_token =
7448                             Some(TokenDeserializer::deserialize("ContinuationToken", stack)?);
7449                     }
7450                     "IntelligentTieringConfiguration" => {
7451                         obj.intelligent_tiering_configuration_list
7452                             .get_or_insert(vec![])
7453                             .extend(
7454                                 IntelligentTieringConfigurationListDeserializer::deserialize(
7455                                     "IntelligentTieringConfiguration",
7456                                     stack,
7457                                 )?,
7458                             );
7459                     }
7460                     "IsTruncated" => {
7461                         obj.is_truncated =
7462                             Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
7463                     }
7464                     "NextContinuationToken" => {
7465                         obj.next_continuation_token = Some(NextTokenDeserializer::deserialize(
7466                             "NextContinuationToken",
7467                             stack,
7468                         )?);
7469                     }
7470                     _ => skip_tree(stack),
7471                 }
7472                 Ok(())
7473             },
7474         )
7475     }
7476 }
7477 #[derive(Clone, Debug, Default, PartialEq)]
7478 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7479 pub struct ListBucketIntelligentTieringConfigurationsRequest {
7480     /// <p>The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.</p>
7481     pub bucket: String,
7482     /// <p>The ContinuationToken that represents a placeholder from where this request should begin.</p>
7483     pub continuation_token: Option<String>,
7484 }
7485 
7486 #[derive(Clone, Debug, Default, PartialEq)]
7487 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7488 pub struct ListBucketInventoryConfigurationsOutput {
7489     /// <p>If sent in the request, the marker that is used as a starting point for this inventory configuration list response.</p>
7490     pub continuation_token: Option<String>,
7491     /// <p>The list of inventory configurations for a bucket.</p>
7492     pub inventory_configuration_list: Option<Vec<InventoryConfiguration>>,
7493     /// <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>
7494     pub is_truncated: Option<bool>,
7495     /// <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>
7496     pub next_continuation_token: Option<String>,
7497 }
7498 
7499 #[allow(dead_code)]
7500 struct ListBucketInventoryConfigurationsOutputDeserializer;
7501 impl ListBucketInventoryConfigurationsOutputDeserializer {
7502     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListBucketInventoryConfigurationsOutput, XmlParseError>7503     fn deserialize<T: Peek + Next>(
7504         tag_name: &str,
7505         stack: &mut T,
7506     ) -> Result<ListBucketInventoryConfigurationsOutput, XmlParseError> {
7507         deserialize_elements::<_, ListBucketInventoryConfigurationsOutput, _>(
7508             tag_name,
7509             stack,
7510             |name, stack, obj| {
7511                 match name {
7512                     "ContinuationToken" => {
7513                         obj.continuation_token =
7514                             Some(TokenDeserializer::deserialize("ContinuationToken", stack)?);
7515                     }
7516                     "InventoryConfiguration" => {
7517                         obj.inventory_configuration_list
7518                             .get_or_insert(vec![])
7519                             .extend(InventoryConfigurationListDeserializer::deserialize(
7520                                 "InventoryConfiguration",
7521                                 stack,
7522                             )?);
7523                     }
7524                     "IsTruncated" => {
7525                         obj.is_truncated =
7526                             Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
7527                     }
7528                     "NextContinuationToken" => {
7529                         obj.next_continuation_token = Some(NextTokenDeserializer::deserialize(
7530                             "NextContinuationToken",
7531                             stack,
7532                         )?);
7533                     }
7534                     _ => skip_tree(stack),
7535                 }
7536                 Ok(())
7537             },
7538         )
7539     }
7540 }
7541 #[derive(Clone, Debug, Default, PartialEq)]
7542 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7543 pub struct ListBucketInventoryConfigurationsRequest {
7544     /// <p>The name of the bucket containing the inventory configurations to retrieve.</p>
7545     pub bucket: String,
7546     /// <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>
7547     pub continuation_token: Option<String>,
7548     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
7549     pub expected_bucket_owner: Option<String>,
7550 }
7551 
7552 #[derive(Clone, Debug, Default, PartialEq)]
7553 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7554 pub struct ListBucketMetricsConfigurationsOutput {
7555     /// <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>
7556     pub continuation_token: Option<String>,
7557     /// <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>
7558     pub is_truncated: Option<bool>,
7559     /// <p>The list of metrics configurations for a bucket.</p>
7560     pub metrics_configuration_list: Option<Vec<MetricsConfiguration>>,
7561     /// <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>
7562     pub next_continuation_token: Option<String>,
7563 }
7564 
7565 #[allow(dead_code)]
7566 struct ListBucketMetricsConfigurationsOutputDeserializer;
7567 impl ListBucketMetricsConfigurationsOutputDeserializer {
7568     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListBucketMetricsConfigurationsOutput, XmlParseError>7569     fn deserialize<T: Peek + Next>(
7570         tag_name: &str,
7571         stack: &mut T,
7572     ) -> Result<ListBucketMetricsConfigurationsOutput, XmlParseError> {
7573         deserialize_elements::<_, ListBucketMetricsConfigurationsOutput, _>(
7574             tag_name,
7575             stack,
7576             |name, stack, obj| {
7577                 match name {
7578                     "ContinuationToken" => {
7579                         obj.continuation_token =
7580                             Some(TokenDeserializer::deserialize("ContinuationToken", stack)?);
7581                     }
7582                     "IsTruncated" => {
7583                         obj.is_truncated =
7584                             Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
7585                     }
7586                     "MetricsConfiguration" => {
7587                         obj.metrics_configuration_list.get_or_insert(vec![]).extend(
7588                             MetricsConfigurationListDeserializer::deserialize(
7589                                 "MetricsConfiguration",
7590                                 stack,
7591                             )?,
7592                         );
7593                     }
7594                     "NextContinuationToken" => {
7595                         obj.next_continuation_token = Some(NextTokenDeserializer::deserialize(
7596                             "NextContinuationToken",
7597                             stack,
7598                         )?);
7599                     }
7600                     _ => skip_tree(stack),
7601                 }
7602                 Ok(())
7603             },
7604         )
7605     }
7606 }
7607 #[derive(Clone, Debug, Default, PartialEq)]
7608 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7609 pub struct ListBucketMetricsConfigurationsRequest {
7610     /// <p>The name of the bucket containing the metrics configurations to retrieve.</p>
7611     pub bucket: String,
7612     /// <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>
7613     pub continuation_token: Option<String>,
7614     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
7615     pub expected_bucket_owner: Option<String>,
7616 }
7617 
7618 #[derive(Clone, Debug, Default, PartialEq)]
7619 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7620 pub struct ListBucketsOutput {
7621     /// <p>The list of buckets owned by the requestor.</p>
7622     pub buckets: Option<Vec<Bucket>>,
7623     /// <p>The owner of the buckets listed.</p>
7624     pub owner: Option<Owner>,
7625 }
7626 
7627 #[allow(dead_code)]
7628 struct ListBucketsOutputDeserializer;
7629 impl ListBucketsOutputDeserializer {
7630     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListBucketsOutput, XmlParseError>7631     fn deserialize<T: Peek + Next>(
7632         tag_name: &str,
7633         stack: &mut T,
7634     ) -> Result<ListBucketsOutput, XmlParseError> {
7635         deserialize_elements::<_, ListBucketsOutput, _>(tag_name, stack, |name, stack, obj| {
7636             match name {
7637                 "Buckets" => {
7638                     obj.buckets
7639                         .get_or_insert(vec![])
7640                         .extend(BucketsDeserializer::deserialize("Buckets", stack)?);
7641                 }
7642                 "Owner" => {
7643                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
7644                 }
7645                 _ => skip_tree(stack),
7646             }
7647             Ok(())
7648         })
7649     }
7650 }
7651 #[derive(Clone, Debug, Default, PartialEq)]
7652 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7653 pub struct ListMultipartUploadsOutput {
7654     /// <p>The name of the bucket to which the multipart upload was initiated.</p>
7655     pub bucket: Option<String>,
7656     /// <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>
7657     pub common_prefixes: Option<Vec<CommonPrefix>>,
7658     /// <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>
7659     pub delimiter: Option<String>,
7660     /// <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>
7661     pub encoding_type: Option<String>,
7662     /// <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>
7663     pub is_truncated: Option<bool>,
7664     /// <p>The key at or after which the listing began.</p>
7665     pub key_marker: Option<String>,
7666     /// <p>Maximum number of multipart uploads that could have been included in the response.</p>
7667     pub max_uploads: Option<i64>,
7668     /// <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>
7669     pub next_key_marker: Option<String>,
7670     /// <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>
7671     pub next_upload_id_marker: Option<String>,
7672     /// <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>
7673     pub prefix: Option<String>,
7674     /// <p>Upload ID after which listing began.</p>
7675     pub upload_id_marker: Option<String>,
7676     /// <p>Container for elements related to a particular multipart upload. A response can contain zero or more <code>Upload</code> elements.</p>
7677     pub uploads: Option<Vec<MultipartUpload>>,
7678 }
7679 
7680 #[allow(dead_code)]
7681 struct ListMultipartUploadsOutputDeserializer;
7682 impl ListMultipartUploadsOutputDeserializer {
7683     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListMultipartUploadsOutput, XmlParseError>7684     fn deserialize<T: Peek + Next>(
7685         tag_name: &str,
7686         stack: &mut T,
7687     ) -> Result<ListMultipartUploadsOutput, XmlParseError> {
7688         deserialize_elements::<_, ListMultipartUploadsOutput, _>(
7689             tag_name,
7690             stack,
7691             |name, stack, obj| {
7692                 match name {
7693                     "Bucket" => {
7694                         obj.bucket = Some(BucketNameDeserializer::deserialize("Bucket", stack)?);
7695                     }
7696                     "CommonPrefixes" => {
7697                         obj.common_prefixes.get_or_insert(vec![]).extend(
7698                             CommonPrefixListDeserializer::deserialize("CommonPrefixes", stack)?,
7699                         );
7700                     }
7701                     "Delimiter" => {
7702                         obj.delimiter =
7703                             Some(DelimiterDeserializer::deserialize("Delimiter", stack)?);
7704                     }
7705                     "EncodingType" => {
7706                         obj.encoding_type = Some(EncodingTypeDeserializer::deserialize(
7707                             "EncodingType",
7708                             stack,
7709                         )?);
7710                     }
7711                     "IsTruncated" => {
7712                         obj.is_truncated =
7713                             Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
7714                     }
7715                     "KeyMarker" => {
7716                         obj.key_marker =
7717                             Some(KeyMarkerDeserializer::deserialize("KeyMarker", stack)?);
7718                     }
7719                     "MaxUploads" => {
7720                         obj.max_uploads =
7721                             Some(MaxUploadsDeserializer::deserialize("MaxUploads", stack)?);
7722                     }
7723                     "NextKeyMarker" => {
7724                         obj.next_key_marker = Some(NextKeyMarkerDeserializer::deserialize(
7725                             "NextKeyMarker",
7726                             stack,
7727                         )?);
7728                     }
7729                     "NextUploadIdMarker" => {
7730                         obj.next_upload_id_marker =
7731                             Some(NextUploadIdMarkerDeserializer::deserialize(
7732                                 "NextUploadIdMarker",
7733                                 stack,
7734                             )?);
7735                     }
7736                     "Prefix" => {
7737                         obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
7738                     }
7739                     "UploadIdMarker" => {
7740                         obj.upload_id_marker = Some(UploadIdMarkerDeserializer::deserialize(
7741                             "UploadIdMarker",
7742                             stack,
7743                         )?);
7744                     }
7745                     "Upload" => {
7746                         obj.uploads.get_or_insert(vec![]).extend(
7747                             MultipartUploadListDeserializer::deserialize("Upload", stack)?,
7748                         );
7749                     }
7750                     _ => skip_tree(stack),
7751                 }
7752                 Ok(())
7753             },
7754         )
7755     }
7756 }
7757 #[derive(Clone, Debug, Default, PartialEq)]
7758 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7759 pub struct ListMultipartUploadsRequest {
7760     /// <p>The name of the bucket to which the multipart upload was initiated. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
7761     pub bucket: String,
7762     /// <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>
7763     pub delimiter: Option<String>,
7764     pub encoding_type: Option<String>,
7765     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
7766     pub expected_bucket_owner: Option<String>,
7767     /// <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>
7768     pub key_marker: Option<String>,
7769     /// <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>
7770     pub max_uploads: Option<i64>,
7771     /// <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>
7772     pub prefix: Option<String>,
7773     /// <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>
7774     pub upload_id_marker: Option<String>,
7775 }
7776 
7777 #[derive(Clone, Debug, Default, PartialEq)]
7778 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7779 pub struct ListObjectVersionsOutput {
7780     /// <p>All of the keys rolled up into a common prefix count as a single return when calculating the number of returns.</p>
7781     pub common_prefixes: Option<Vec<CommonPrefix>>,
7782     /// <p>Container for an object that is a delete marker.</p>
7783     pub delete_markers: Option<Vec<DeleteMarkerEntry>>,
7784     /// <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>
7785     pub delimiter: Option<String>,
7786     /// <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>
7787     pub encoding_type: Option<String>,
7788     /// <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>
7789     pub is_truncated: Option<bool>,
7790     /// <p>Marks the last key returned in a truncated response.</p>
7791     pub key_marker: Option<String>,
7792     /// <p>Specifies the maximum number of objects to return.</p>
7793     pub max_keys: Option<i64>,
7794     /// <p>The bucket name.</p>
7795     pub name: Option<String>,
7796     /// <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>
7797     pub next_key_marker: Option<String>,
7798     /// <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>
7799     pub next_version_id_marker: Option<String>,
7800     /// <p>Selects objects that start with the value supplied by this parameter.</p>
7801     pub prefix: Option<String>,
7802     /// <p>Marks the last version of the key returned in a truncated response.</p>
7803     pub version_id_marker: Option<String>,
7804     /// <p>Container for version information.</p>
7805     pub versions: Option<Vec<ObjectVersion>>,
7806 }
7807 
7808 #[allow(dead_code)]
7809 struct ListObjectVersionsOutputDeserializer;
7810 impl ListObjectVersionsOutputDeserializer {
7811     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListObjectVersionsOutput, XmlParseError>7812     fn deserialize<T: Peek + Next>(
7813         tag_name: &str,
7814         stack: &mut T,
7815     ) -> Result<ListObjectVersionsOutput, XmlParseError> {
7816         deserialize_elements::<_, ListObjectVersionsOutput, _>(
7817             tag_name,
7818             stack,
7819             |name, stack, obj| {
7820                 match name {
7821                     "CommonPrefixes" => {
7822                         obj.common_prefixes.get_or_insert(vec![]).extend(
7823                             CommonPrefixListDeserializer::deserialize("CommonPrefixes", stack)?,
7824                         );
7825                     }
7826                     "DeleteMarker" => {
7827                         obj.delete_markers.get_or_insert(vec![]).extend(
7828                             DeleteMarkersDeserializer::deserialize("DeleteMarker", stack)?,
7829                         );
7830                     }
7831                     "Delimiter" => {
7832                         obj.delimiter =
7833                             Some(DelimiterDeserializer::deserialize("Delimiter", stack)?);
7834                     }
7835                     "EncodingType" => {
7836                         obj.encoding_type = Some(EncodingTypeDeserializer::deserialize(
7837                             "EncodingType",
7838                             stack,
7839                         )?);
7840                     }
7841                     "IsTruncated" => {
7842                         obj.is_truncated =
7843                             Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
7844                     }
7845                     "KeyMarker" => {
7846                         obj.key_marker =
7847                             Some(KeyMarkerDeserializer::deserialize("KeyMarker", stack)?);
7848                     }
7849                     "MaxKeys" => {
7850                         obj.max_keys = Some(MaxKeysDeserializer::deserialize("MaxKeys", stack)?);
7851                     }
7852                     "Name" => {
7853                         obj.name = Some(BucketNameDeserializer::deserialize("Name", stack)?);
7854                     }
7855                     "NextKeyMarker" => {
7856                         obj.next_key_marker = Some(NextKeyMarkerDeserializer::deserialize(
7857                             "NextKeyMarker",
7858                             stack,
7859                         )?);
7860                     }
7861                     "NextVersionIdMarker" => {
7862                         obj.next_version_id_marker =
7863                             Some(NextVersionIdMarkerDeserializer::deserialize(
7864                                 "NextVersionIdMarker",
7865                                 stack,
7866                             )?);
7867                     }
7868                     "Prefix" => {
7869                         obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
7870                     }
7871                     "VersionIdMarker" => {
7872                         obj.version_id_marker = Some(VersionIdMarkerDeserializer::deserialize(
7873                             "VersionIdMarker",
7874                             stack,
7875                         )?);
7876                     }
7877                     "Version" => {
7878                         obj.versions.get_or_insert(vec![]).extend(
7879                             ObjectVersionListDeserializer::deserialize("Version", stack)?,
7880                         );
7881                     }
7882                     _ => skip_tree(stack),
7883                 }
7884                 Ok(())
7885             },
7886         )
7887     }
7888 }
7889 #[derive(Clone, Debug, Default, PartialEq)]
7890 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7891 pub struct ListObjectVersionsRequest {
7892     /// <p>The bucket name that contains the objects. </p>
7893     pub bucket: String,
7894     /// <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>
7895     pub delimiter: Option<String>,
7896     pub encoding_type: Option<String>,
7897     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
7898     pub expected_bucket_owner: Option<String>,
7899     /// <p>Specifies the key to start with when listing objects in a bucket.</p>
7900     pub key_marker: Option<String>,
7901     /// <p>Sets the maximum number of keys returned in the response. By default the action returns up to 1,000 key names. 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>
7902     pub max_keys: Option<i64>,
7903     /// <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>
7904     pub prefix: Option<String>,
7905     /// <p>Specifies the object version you want to start listing from.</p>
7906     pub version_id_marker: Option<String>,
7907 }
7908 
7909 #[derive(Clone, Debug, Default, PartialEq)]
7910 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7911 pub struct ListObjectsOutput {
7912     /// <p>All of the keys (up to 1,000) 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>
7913     pub common_prefixes: Option<Vec<CommonPrefix>>,
7914     /// <p>Metadata about each object returned.</p>
7915     pub contents: Option<Vec<Object>>,
7916     /// <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>
7917     pub delimiter: Option<String>,
7918     /// <p>Encoding type used by Amazon S3 to encode object keys in the response.</p>
7919     pub encoding_type: Option<String>,
7920     /// <p>A flag that indicates whether Amazon S3 returned all of the results that satisfied the search criteria.</p>
7921     pub is_truncated: Option<bool>,
7922     /// <p>Indicates where in the bucket listing begins. Marker is included in the response if it was sent with the request.</p>
7923     pub marker: Option<String>,
7924     /// <p>The maximum number of keys returned in the response body.</p>
7925     pub max_keys: Option<i64>,
7926     /// <p>The bucket name.</p>
7927     pub name: Option<String>,
7928     /// <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 NextMarker 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>
7929     pub next_marker: Option<String>,
7930     /// <p>Keys that begin with the indicated prefix.</p>
7931     pub prefix: Option<String>,
7932 }
7933 
7934 #[allow(dead_code)]
7935 struct ListObjectsOutputDeserializer;
7936 impl ListObjectsOutputDeserializer {
7937     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListObjectsOutput, XmlParseError>7938     fn deserialize<T: Peek + Next>(
7939         tag_name: &str,
7940         stack: &mut T,
7941     ) -> Result<ListObjectsOutput, XmlParseError> {
7942         deserialize_elements::<_, ListObjectsOutput, _>(tag_name, stack, |name, stack, obj| {
7943             match name {
7944                 "CommonPrefixes" => {
7945                     obj.common_prefixes.get_or_insert(vec![]).extend(
7946                         CommonPrefixListDeserializer::deserialize("CommonPrefixes", stack)?,
7947                     );
7948                 }
7949                 "Contents" => {
7950                     obj.contents
7951                         .get_or_insert(vec![])
7952                         .extend(ObjectListDeserializer::deserialize("Contents", stack)?);
7953                 }
7954                 "Delimiter" => {
7955                     obj.delimiter = Some(DelimiterDeserializer::deserialize("Delimiter", stack)?);
7956                 }
7957                 "EncodingType" => {
7958                     obj.encoding_type = Some(EncodingTypeDeserializer::deserialize(
7959                         "EncodingType",
7960                         stack,
7961                     )?);
7962                 }
7963                 "IsTruncated" => {
7964                     obj.is_truncated =
7965                         Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
7966                 }
7967                 "Marker" => {
7968                     obj.marker = Some(MarkerDeserializer::deserialize("Marker", stack)?);
7969                 }
7970                 "MaxKeys" => {
7971                     obj.max_keys = Some(MaxKeysDeserializer::deserialize("MaxKeys", stack)?);
7972                 }
7973                 "Name" => {
7974                     obj.name = Some(BucketNameDeserializer::deserialize("Name", stack)?);
7975                 }
7976                 "NextMarker" => {
7977                     obj.next_marker =
7978                         Some(NextMarkerDeserializer::deserialize("NextMarker", stack)?);
7979                 }
7980                 "Prefix" => {
7981                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
7982                 }
7983                 _ => skip_tree(stack),
7984             }
7985             Ok(())
7986         })
7987     }
7988 }
7989 #[derive(Clone, Debug, Default, PartialEq)]
7990 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7991 pub struct ListObjectsRequest {
7992     /// <p>The name of the bucket containing the objects.</p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
7993     pub bucket: String,
7994     /// <p>A delimiter is a character you use to group keys.</p>
7995     pub delimiter: Option<String>,
7996     pub encoding_type: Option<String>,
7997     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
7998     pub expected_bucket_owner: Option<String>,
7999     /// <p>Specifies the key to start with when listing objects in a bucket.</p>
8000     pub marker: Option<String>,
8001     /// <p>Sets the maximum number of keys returned in the response. By default the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more. </p>
8002     pub max_keys: Option<i64>,
8003     /// <p>Limits the response to keys that begin with the specified prefix.</p>
8004     pub prefix: Option<String>,
8005     /// <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>
8006     pub request_payer: Option<String>,
8007 }
8008 
8009 #[derive(Clone, Debug, Default, PartialEq)]
8010 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8011 pub struct ListObjectsV2Output {
8012     /// <p>All of the keys (up to 1,000) 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>
8013     pub common_prefixes: Option<Vec<CommonPrefix>>,
8014     /// <p>Metadata about each object returned.</p>
8015     pub contents: Option<Vec<Object>>,
8016     /// <p> If ContinuationToken was sent with the request, it is included in the response.</p>
8017     pub continuation_token: Option<String>,
8018     /// <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>
8019     pub delimiter: Option<String>,
8020     /// <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>
8021     pub encoding_type: Option<String>,
8022     /// <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>
8023     pub is_truncated: Option<bool>,
8024     /// <p>KeyCount is the number of keys returned with this request. KeyCount will always be less than or equals to MaxKeys field. Say you ask for 50 keys, your result will include less than equals 50 keys </p>
8025     pub key_count: Option<i64>,
8026     /// <p>Sets the maximum number of keys returned in the response. By default the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more.</p>
8027     pub max_keys: Option<i64>,
8028     /// <p>The bucket name.</p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
8029     pub name: Option<String>,
8030     /// <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>
8031     pub next_continuation_token: Option<String>,
8032     /// <p> Keys that begin with the indicated prefix.</p>
8033     pub prefix: Option<String>,
8034     /// <p>If StartAfter was sent with the request, it is included in the response.</p>
8035     pub start_after: Option<String>,
8036 }
8037 
8038 #[allow(dead_code)]
8039 struct ListObjectsV2OutputDeserializer;
8040 impl ListObjectsV2OutputDeserializer {
8041     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListObjectsV2Output, XmlParseError>8042     fn deserialize<T: Peek + Next>(
8043         tag_name: &str,
8044         stack: &mut T,
8045     ) -> Result<ListObjectsV2Output, XmlParseError> {
8046         deserialize_elements::<_, ListObjectsV2Output, _>(tag_name, stack, |name, stack, obj| {
8047             match name {
8048                 "CommonPrefixes" => {
8049                     obj.common_prefixes.get_or_insert(vec![]).extend(
8050                         CommonPrefixListDeserializer::deserialize("CommonPrefixes", stack)?,
8051                     );
8052                 }
8053                 "Contents" => {
8054                     obj.contents
8055                         .get_or_insert(vec![])
8056                         .extend(ObjectListDeserializer::deserialize("Contents", stack)?);
8057                 }
8058                 "ContinuationToken" => {
8059                     obj.continuation_token =
8060                         Some(TokenDeserializer::deserialize("ContinuationToken", stack)?);
8061                 }
8062                 "Delimiter" => {
8063                     obj.delimiter = 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                 "KeyCount" => {
8076                     obj.key_count = Some(KeyCountDeserializer::deserialize("KeyCount", stack)?);
8077                 }
8078                 "MaxKeys" => {
8079                     obj.max_keys = Some(MaxKeysDeserializer::deserialize("MaxKeys", stack)?);
8080                 }
8081                 "Name" => {
8082                     obj.name = Some(BucketNameDeserializer::deserialize("Name", stack)?);
8083                 }
8084                 "NextContinuationToken" => {
8085                     obj.next_continuation_token = Some(NextTokenDeserializer::deserialize(
8086                         "NextContinuationToken",
8087                         stack,
8088                     )?);
8089                 }
8090                 "Prefix" => {
8091                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
8092                 }
8093                 "StartAfter" => {
8094                     obj.start_after =
8095                         Some(StartAfterDeserializer::deserialize("StartAfter", stack)?);
8096                 }
8097                 _ => skip_tree(stack),
8098             }
8099             Ok(())
8100         })
8101     }
8102 }
8103 #[derive(Clone, Debug, Default, PartialEq)]
8104 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8105 pub struct ListObjectsV2Request {
8106     /// <p>Bucket name to list. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
8107     pub bucket: String,
8108     /// <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>
8109     pub continuation_token: Option<String>,
8110     /// <p>A delimiter is a character you use to group keys.</p>
8111     pub delimiter: Option<String>,
8112     /// <p>Encoding type used by Amazon S3 to encode object keys in the response.</p>
8113     pub encoding_type: Option<String>,
8114     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
8115     pub expected_bucket_owner: Option<String>,
8116     /// <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>
8117     pub fetch_owner: Option<bool>,
8118     /// <p>Sets the maximum number of keys returned in the response. By default the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more.</p>
8119     pub max_keys: Option<i64>,
8120     /// <p>Limits the response to keys that begin with the specified prefix.</p>
8121     pub prefix: Option<String>,
8122     /// <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>
8123     pub request_payer: Option<String>,
8124     /// <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>
8125     pub start_after: Option<String>,
8126 }
8127 
8128 #[derive(Clone, Debug, Default, PartialEq)]
8129 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8130 pub struct ListPartsOutput {
8131     /// <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>
8132     pub abort_date: Option<String>,
8133     /// <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>
8134     pub abort_rule_id: Option<String>,
8135     /// <p>The name of the bucket to which the multipart upload was initiated.</p>
8136     pub bucket: Option<String>,
8137     /// <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>
8138     pub initiator: Option<Initiator>,
8139     /// <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>
8140     pub is_truncated: Option<bool>,
8141     /// <p>Object key for which the multipart upload was initiated.</p>
8142     pub key: Option<String>,
8143     /// <p>Maximum number of parts that were allowed in the response.</p>
8144     pub max_parts: Option<i64>,
8145     /// <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>
8146     pub next_part_number_marker: Option<i64>,
8147     /// <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>
8148     pub owner: Option<Owner>,
8149     /// <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>
8150     pub part_number_marker: Option<i64>,
8151     /// <p> Container for elements related to a particular part. A response can contain zero or more <code>Part</code> elements.</p>
8152     pub parts: Option<Vec<Part>>,
8153     pub request_charged: Option<String>,
8154     /// <p>Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the uploaded object.</p>
8155     pub storage_class: Option<String>,
8156     /// <p>Upload ID identifying the multipart upload whose parts are being listed.</p>
8157     pub upload_id: Option<String>,
8158 }
8159 
8160 #[allow(dead_code)]
8161 struct ListPartsOutputDeserializer;
8162 impl ListPartsOutputDeserializer {
8163     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ListPartsOutput, XmlParseError>8164     fn deserialize<T: Peek + Next>(
8165         tag_name: &str,
8166         stack: &mut T,
8167     ) -> Result<ListPartsOutput, XmlParseError> {
8168         deserialize_elements::<_, ListPartsOutput, _>(tag_name, stack, |name, stack, obj| {
8169             match name {
8170                 "Bucket" => {
8171                     obj.bucket = Some(BucketNameDeserializer::deserialize("Bucket", stack)?);
8172                 }
8173                 "Initiator" => {
8174                     obj.initiator = Some(InitiatorDeserializer::deserialize("Initiator", stack)?);
8175                 }
8176                 "IsTruncated" => {
8177                     obj.is_truncated =
8178                         Some(IsTruncatedDeserializer::deserialize("IsTruncated", stack)?);
8179                 }
8180                 "Key" => {
8181                     obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
8182                 }
8183                 "MaxParts" => {
8184                     obj.max_parts = Some(MaxPartsDeserializer::deserialize("MaxParts", stack)?);
8185                 }
8186                 "NextPartNumberMarker" => {
8187                     obj.next_part_number_marker =
8188                         Some(NextPartNumberMarkerDeserializer::deserialize(
8189                             "NextPartNumberMarker",
8190                             stack,
8191                         )?);
8192                 }
8193                 "Owner" => {
8194                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
8195                 }
8196                 "PartNumberMarker" => {
8197                     obj.part_number_marker = Some(PartNumberMarkerDeserializer::deserialize(
8198                         "PartNumberMarker",
8199                         stack,
8200                     )?);
8201                 }
8202                 "Part" => {
8203                     obj.parts
8204                         .get_or_insert(vec![])
8205                         .extend(PartsDeserializer::deserialize("Part", stack)?);
8206                 }
8207                 "StorageClass" => {
8208                     obj.storage_class = Some(StorageClassDeserializer::deserialize(
8209                         "StorageClass",
8210                         stack,
8211                     )?);
8212                 }
8213                 "UploadId" => {
8214                     obj.upload_id = Some(MultipartUploadIdDeserializer::deserialize(
8215                         "UploadId", stack,
8216                     )?);
8217                 }
8218                 _ => skip_tree(stack),
8219             }
8220             Ok(())
8221         })
8222     }
8223 }
8224 #[derive(Clone, Debug, Default, PartialEq)]
8225 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8226 pub struct ListPartsRequest {
8227     /// <p>The name of the bucket to which the parts are being uploaded. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
8228     pub bucket: String,
8229     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
8230     pub expected_bucket_owner: Option<String>,
8231     /// <p>Object key for which the multipart upload was initiated.</p>
8232     pub key: String,
8233     /// <p>Sets the maximum number of parts to return.</p>
8234     pub max_parts: Option<i64>,
8235     /// <p>Specifies the part after which listing should begin. Only parts with higher part numbers will be listed.</p>
8236     pub part_number_marker: Option<i64>,
8237     pub request_payer: Option<String>,
8238     /// <p>Upload ID identifying the multipart upload whose parts are being listed.</p>
8239     pub upload_id: String,
8240 }
8241 
8242 #[allow(dead_code)]
8243 struct LocationDeserializer;
8244 impl LocationDeserializer {
8245     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>8246     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8247         xml_util::deserialize_primitive(tag_name, stack, Ok)
8248     }
8249 }
8250 
8251 pub struct LocationPrefixSerializer;
8252 impl LocationPrefixSerializer {
8253     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,8254     pub fn serialize<W>(
8255         mut writer: &mut EventWriter<W>,
8256         name: &str,
8257         obj: &String,
8258     ) -> Result<(), xml::writer::Error>
8259     where
8260         W: Write,
8261     {
8262         write_characters_element(writer, name, obj)
8263     }
8264 }
8265 
8266 /// <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 S3 API Reference</i>.</p>
8267 #[derive(Clone, Debug, Default, PartialEq)]
8268 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8269 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8270 pub struct LoggingEnabled {
8271     /// <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>
8272     pub target_bucket: String,
8273     /// <p>Container for granting information.</p>
8274     pub target_grants: Option<Vec<TargetGrant>>,
8275     /// <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>
8276     pub target_prefix: String,
8277 }
8278 
8279 #[allow(dead_code)]
8280 struct LoggingEnabledDeserializer;
8281 impl LoggingEnabledDeserializer {
8282     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<LoggingEnabled, XmlParseError>8283     fn deserialize<T: Peek + Next>(
8284         tag_name: &str,
8285         stack: &mut T,
8286     ) -> Result<LoggingEnabled, XmlParseError> {
8287         deserialize_elements::<_, LoggingEnabled, _>(tag_name, stack, |name, stack, obj| {
8288             match name {
8289                 "TargetBucket" => {
8290                     obj.target_bucket =
8291                         TargetBucketDeserializer::deserialize("TargetBucket", stack)?;
8292                 }
8293                 "TargetGrants" => {
8294                     obj.target_grants.get_or_insert(vec![]).extend(
8295                         TargetGrantsDeserializer::deserialize("TargetGrants", stack)?,
8296                     );
8297                 }
8298                 "TargetPrefix" => {
8299                     obj.target_prefix =
8300                         TargetPrefixDeserializer::deserialize("TargetPrefix", stack)?;
8301                 }
8302                 _ => skip_tree(stack),
8303             }
8304             Ok(())
8305         })
8306     }
8307 }
8308 
8309 pub struct LoggingEnabledSerializer;
8310 impl LoggingEnabledSerializer {
8311     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &LoggingEnabled, ) -> Result<(), xml::writer::Error> where W: Write,8312     pub fn serialize<W>(
8313         mut writer: &mut EventWriter<W>,
8314         name: &str,
8315         obj: &LoggingEnabled,
8316     ) -> Result<(), xml::writer::Error>
8317     where
8318         W: Write,
8319     {
8320         writer.write(xml::writer::XmlEvent::start_element(name))?;
8321         write_characters_element(writer, "TargetBucket", &obj.target_bucket)?;
8322         if let Some(ref value) = obj.target_grants {
8323             &TargetGrantsSerializer::serialize(&mut writer, "TargetGrants", value)?;
8324         }
8325         write_characters_element(writer, "TargetPrefix", &obj.target_prefix)?;
8326         writer.write(xml::writer::XmlEvent::end_element())
8327     }
8328 }
8329 
8330 pub struct MFADeleteSerializer;
8331 impl MFADeleteSerializer {
8332     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,8333     pub fn serialize<W>(
8334         mut writer: &mut EventWriter<W>,
8335         name: &str,
8336         obj: &String,
8337     ) -> Result<(), xml::writer::Error>
8338     where
8339         W: Write,
8340     {
8341         write_characters_element(writer, name, obj)
8342     }
8343 }
8344 
8345 #[allow(dead_code)]
8346 struct MFADeleteStatusDeserializer;
8347 impl MFADeleteStatusDeserializer {
8348     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>8349     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8350         xml_util::deserialize_primitive(tag_name, stack, Ok)
8351     }
8352 }
8353 #[allow(dead_code)]
8354 struct MarkerDeserializer;
8355 impl MarkerDeserializer {
8356     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>8357     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8358         xml_util::deserialize_primitive(tag_name, stack, Ok)
8359     }
8360 }
8361 
8362 pub struct MarkerSerializer;
8363 impl MarkerSerializer {
8364     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,8365     pub fn serialize<W>(
8366         mut writer: &mut EventWriter<W>,
8367         name: &str,
8368         obj: &String,
8369     ) -> Result<(), xml::writer::Error>
8370     where
8371         W: Write,
8372     {
8373         write_characters_element(writer, name, obj)
8374     }
8375 }
8376 
8377 #[allow(dead_code)]
8378 struct MaxAgeSecondsDeserializer;
8379 impl MaxAgeSecondsDeserializer {
8380     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>8381     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
8382         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
8383     }
8384 }
8385 
8386 pub struct MaxAgeSecondsSerializer;
8387 impl MaxAgeSecondsSerializer {
8388     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,8389     pub fn serialize<W>(
8390         mut writer: &mut EventWriter<W>,
8391         name: &str,
8392         obj: &i64,
8393     ) -> Result<(), xml::writer::Error>
8394     where
8395         W: Write,
8396     {
8397         write_characters_element(writer, name, &obj.to_string())
8398     }
8399 }
8400 
8401 #[allow(dead_code)]
8402 struct MaxKeysDeserializer;
8403 impl MaxKeysDeserializer {
8404     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>8405     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
8406         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
8407     }
8408 }
8409 
8410 pub struct MaxKeysSerializer;
8411 impl MaxKeysSerializer {
8412     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,8413     pub fn serialize<W>(
8414         mut writer: &mut EventWriter<W>,
8415         name: &str,
8416         obj: &i64,
8417     ) -> Result<(), xml::writer::Error>
8418     where
8419         W: Write,
8420     {
8421         write_characters_element(writer, name, &obj.to_string())
8422     }
8423 }
8424 
8425 #[allow(dead_code)]
8426 struct MaxPartsDeserializer;
8427 impl MaxPartsDeserializer {
8428     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>8429     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
8430         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
8431     }
8432 }
8433 
8434 pub struct MaxPartsSerializer;
8435 impl MaxPartsSerializer {
8436     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,8437     pub fn serialize<W>(
8438         mut writer: &mut EventWriter<W>,
8439         name: &str,
8440         obj: &i64,
8441     ) -> Result<(), xml::writer::Error>
8442     where
8443         W: Write,
8444     {
8445         write_characters_element(writer, name, &obj.to_string())
8446     }
8447 }
8448 
8449 #[allow(dead_code)]
8450 struct MaxUploadsDeserializer;
8451 impl MaxUploadsDeserializer {
8452     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>8453     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
8454         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
8455     }
8456 }
8457 
8458 pub struct MaxUploadsSerializer;
8459 impl MaxUploadsSerializer {
8460     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,8461     pub fn serialize<W>(
8462         mut writer: &mut EventWriter<W>,
8463         name: &str,
8464         obj: &i64,
8465     ) -> Result<(), xml::writer::Error>
8466     where
8467         W: Write,
8468     {
8469         write_characters_element(writer, name, &obj.to_string())
8470     }
8471 }
8472 
8473 #[allow(dead_code)]
8474 struct MessageDeserializer;
8475 impl MessageDeserializer {
8476     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>8477     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8478         xml_util::deserialize_primitive(tag_name, stack, Ok)
8479     }
8480 }
8481 /// <p>A metadata key-value pair to store with an object.</p>
8482 #[derive(Clone, Debug, Default, PartialEq)]
8483 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8484 pub struct MetadataEntry {
8485     /// <p>Name of the Object.</p>
8486     pub name: Option<String>,
8487     /// <p>Value of the Object.</p>
8488     pub value: Option<String>,
8489 }
8490 
8491 pub struct MetadataEntrySerializer;
8492 impl MetadataEntrySerializer {
8493     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &MetadataEntry, ) -> Result<(), xml::writer::Error> where W: Write,8494     pub fn serialize<W>(
8495         mut writer: &mut EventWriter<W>,
8496         name: &str,
8497         obj: &MetadataEntry,
8498     ) -> Result<(), xml::writer::Error>
8499     where
8500         W: Write,
8501     {
8502         writer.write(xml::writer::XmlEvent::start_element(name))?;
8503         if let Some(ref value) = obj.name {
8504             write_characters_element(writer, "Name", &value)?;
8505         }
8506         if let Some(ref value) = obj.value {
8507             write_characters_element(writer, "Value", &value)?;
8508         }
8509         writer.write(xml::writer::XmlEvent::end_element())
8510     }
8511 }
8512 
8513 pub struct MetadataKeySerializer;
8514 impl MetadataKeySerializer {
8515     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,8516     pub fn serialize<W>(
8517         mut writer: &mut EventWriter<W>,
8518         name: &str,
8519         obj: &String,
8520     ) -> Result<(), xml::writer::Error>
8521     where
8522         W: Write,
8523     {
8524         write_characters_element(writer, name, obj)
8525     }
8526 }
8527 
8528 pub struct MetadataValueSerializer;
8529 impl MetadataValueSerializer {
8530     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,8531     pub fn serialize<W>(
8532         mut writer: &mut EventWriter<W>,
8533         name: &str,
8534         obj: &String,
8535     ) -> Result<(), xml::writer::Error>
8536     where
8537         W: Write,
8538     {
8539         write_characters_element(writer, name, obj)
8540     }
8541 }
8542 
8543 /// <p> A container specifying replication metrics-related settings enabling replication metrics and events.</p>
8544 #[derive(Clone, Debug, Default, PartialEq)]
8545 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8546 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8547 pub struct Metrics {
8548     /// <p> A container specifying the time threshold for emitting the <code>s3:Replication:OperationMissedThreshold</code> event. </p>
8549     pub event_threshold: Option<ReplicationTimeValue>,
8550     /// <p> Specifies whether the replication metrics are enabled. </p>
8551     pub status: String,
8552 }
8553 
8554 #[allow(dead_code)]
8555 struct MetricsDeserializer;
8556 impl MetricsDeserializer {
8557     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Metrics, XmlParseError>8558     fn deserialize<T: Peek + Next>(
8559         tag_name: &str,
8560         stack: &mut T,
8561     ) -> Result<Metrics, XmlParseError> {
8562         deserialize_elements::<_, Metrics, _>(tag_name, stack, |name, stack, obj| {
8563             match name {
8564                 "EventThreshold" => {
8565                     obj.event_threshold = Some(ReplicationTimeValueDeserializer::deserialize(
8566                         "EventThreshold",
8567                         stack,
8568                     )?);
8569                 }
8570                 "Status" => {
8571                     obj.status = MetricsStatusDeserializer::deserialize("Status", stack)?;
8572                 }
8573                 _ => skip_tree(stack),
8574             }
8575             Ok(())
8576         })
8577     }
8578 }
8579 
8580 pub struct MetricsSerializer;
8581 impl MetricsSerializer {
8582     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Metrics, ) -> Result<(), xml::writer::Error> where W: Write,8583     pub fn serialize<W>(
8584         mut writer: &mut EventWriter<W>,
8585         name: &str,
8586         obj: &Metrics,
8587     ) -> Result<(), xml::writer::Error>
8588     where
8589         W: Write,
8590     {
8591         writer.write(xml::writer::XmlEvent::start_element(name))?;
8592         if let Some(ref value) = obj.event_threshold {
8593             &ReplicationTimeValueSerializer::serialize(&mut writer, "EventThreshold", value)?;
8594         }
8595         write_characters_element(writer, "Status", &obj.status)?;
8596         writer.write(xml::writer::XmlEvent::end_element())
8597     }
8598 }
8599 
8600 /// <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>
8601 #[derive(Clone, Debug, Default, PartialEq)]
8602 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8603 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8604 pub struct MetricsAndOperator {
8605     /// <p>The prefix used when evaluating an AND predicate.</p>
8606     pub prefix: Option<String>,
8607     /// <p>The list of tags used when evaluating an AND predicate.</p>
8608     pub tags: Option<Vec<Tag>>,
8609 }
8610 
8611 #[allow(dead_code)]
8612 struct MetricsAndOperatorDeserializer;
8613 impl MetricsAndOperatorDeserializer {
8614     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<MetricsAndOperator, XmlParseError>8615     fn deserialize<T: Peek + Next>(
8616         tag_name: &str,
8617         stack: &mut T,
8618     ) -> Result<MetricsAndOperator, XmlParseError> {
8619         deserialize_elements::<_, MetricsAndOperator, _>(tag_name, stack, |name, stack, obj| {
8620             match name {
8621                 "Prefix" => {
8622                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
8623                 }
8624                 "Tag" => {
8625                     obj.tags
8626                         .get_or_insert(vec![])
8627                         .extend(TagSetDeserializer::deserialize("Tag", stack)?);
8628                 }
8629                 _ => skip_tree(stack),
8630             }
8631             Ok(())
8632         })
8633     }
8634 }
8635 
8636 pub struct MetricsAndOperatorSerializer;
8637 impl MetricsAndOperatorSerializer {
8638     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &MetricsAndOperator, ) -> Result<(), xml::writer::Error> where W: Write,8639     pub fn serialize<W>(
8640         mut writer: &mut EventWriter<W>,
8641         name: &str,
8642         obj: &MetricsAndOperator,
8643     ) -> Result<(), xml::writer::Error>
8644     where
8645         W: Write,
8646     {
8647         writer.write(xml::writer::XmlEvent::start_element(name))?;
8648         if let Some(ref value) = obj.prefix {
8649             write_characters_element(writer, "Prefix", &value)?;
8650         }
8651         if let Some(ref value) = obj.tags {
8652             &TagSetSerializer::serialize(&mut writer, "Tag", value)?;
8653         }
8654         writer.write(xml::writer::XmlEvent::end_element())
8655     }
8656 }
8657 
8658 /// <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 S3 API Reference</i>.</p>
8659 #[derive(Clone, Debug, Default, PartialEq)]
8660 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8661 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8662 pub struct MetricsConfiguration {
8663     /// <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>
8664     pub filter: Option<MetricsFilter>,
8665     /// <p>The ID used to identify the metrics configuration.</p>
8666     pub id: String,
8667 }
8668 
8669 #[allow(dead_code)]
8670 struct MetricsConfigurationDeserializer;
8671 impl MetricsConfigurationDeserializer {
8672     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<MetricsConfiguration, XmlParseError>8673     fn deserialize<T: Peek + Next>(
8674         tag_name: &str,
8675         stack: &mut T,
8676     ) -> Result<MetricsConfiguration, XmlParseError> {
8677         deserialize_elements::<_, MetricsConfiguration, _>(tag_name, stack, |name, stack, obj| {
8678             match name {
8679                 "Filter" => {
8680                     obj.filter = Some(MetricsFilterDeserializer::deserialize("Filter", stack)?);
8681                 }
8682                 "Id" => {
8683                     obj.id = MetricsIdDeserializer::deserialize("Id", stack)?;
8684                 }
8685                 _ => skip_tree(stack),
8686             }
8687             Ok(())
8688         })
8689     }
8690 }
8691 
8692 pub struct MetricsConfigurationSerializer;
8693 impl MetricsConfigurationSerializer {
8694     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &MetricsConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,8695     pub fn serialize<W>(
8696         mut writer: &mut EventWriter<W>,
8697         name: &str,
8698         obj: &MetricsConfiguration,
8699     ) -> Result<(), xml::writer::Error>
8700     where
8701         W: Write,
8702     {
8703         writer.write(xml::writer::XmlEvent::start_element(name))?;
8704         if let Some(ref value) = obj.filter {
8705             &MetricsFilterSerializer::serialize(&mut writer, "Filter", value)?;
8706         }
8707         write_characters_element(writer, "Id", &obj.id)?;
8708         writer.write(xml::writer::XmlEvent::end_element())
8709     }
8710 }
8711 
8712 #[allow(dead_code)]
8713 struct MetricsConfigurationListDeserializer;
8714 impl MetricsConfigurationListDeserializer {
8715     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<MetricsConfiguration>, XmlParseError>8716     fn deserialize<T: Peek + Next>(
8717         tag_name: &str,
8718         stack: &mut T,
8719     ) -> Result<Vec<MetricsConfiguration>, XmlParseError> {
8720         let mut obj = vec![];
8721 
8722         loop {
8723             let consume_next_tag = match stack.peek() {
8724                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
8725                     name.local_name == tag_name
8726                 }
8727                 _ => false,
8728             };
8729 
8730             if consume_next_tag {
8731                 obj.push(MetricsConfigurationDeserializer::deserialize(
8732                     tag_name, stack,
8733                 )?);
8734             } else {
8735                 break;
8736             }
8737         }
8738 
8739         Ok(obj)
8740     }
8741 }
8742 /// <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>
8743 #[derive(Clone, Debug, Default, PartialEq)]
8744 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8745 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8746 pub struct MetricsFilter {
8747     /// <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>
8748     pub and: Option<MetricsAndOperator>,
8749     /// <p>The prefix used when evaluating a metrics filter.</p>
8750     pub prefix: Option<String>,
8751     /// <p>The tag used when evaluating a metrics filter.</p>
8752     pub tag: Option<Tag>,
8753 }
8754 
8755 #[allow(dead_code)]
8756 struct MetricsFilterDeserializer;
8757 impl MetricsFilterDeserializer {
8758     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<MetricsFilter, XmlParseError>8759     fn deserialize<T: Peek + Next>(
8760         tag_name: &str,
8761         stack: &mut T,
8762     ) -> Result<MetricsFilter, XmlParseError> {
8763         deserialize_elements::<_, MetricsFilter, _>(tag_name, stack, |name, stack, obj| {
8764             match name {
8765                 "And" => {
8766                     obj.and = Some(MetricsAndOperatorDeserializer::deserialize("And", stack)?);
8767                 }
8768                 "Prefix" => {
8769                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
8770                 }
8771                 "Tag" => {
8772                     obj.tag = Some(TagDeserializer::deserialize("Tag", stack)?);
8773                 }
8774                 _ => skip_tree(stack),
8775             }
8776             Ok(())
8777         })
8778     }
8779 }
8780 
8781 pub struct MetricsFilterSerializer;
8782 impl MetricsFilterSerializer {
8783     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &MetricsFilter, ) -> Result<(), xml::writer::Error> where W: Write,8784     pub fn serialize<W>(
8785         mut writer: &mut EventWriter<W>,
8786         name: &str,
8787         obj: &MetricsFilter,
8788     ) -> Result<(), xml::writer::Error>
8789     where
8790         W: Write,
8791     {
8792         writer.write(xml::writer::XmlEvent::start_element(name))?;
8793         if let Some(ref value) = obj.and {
8794             &MetricsAndOperatorSerializer::serialize(&mut writer, "And", value)?;
8795         }
8796         if let Some(ref value) = obj.prefix {
8797             write_characters_element(writer, "Prefix", &value)?;
8798         }
8799         if let Some(ref value) = obj.tag {
8800             &TagSerializer::serialize(&mut writer, "Tag", value)?;
8801         }
8802         writer.write(xml::writer::XmlEvent::end_element())
8803     }
8804 }
8805 
8806 #[allow(dead_code)]
8807 struct MetricsIdDeserializer;
8808 impl MetricsIdDeserializer {
8809     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>8810     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8811         xml_util::deserialize_primitive(tag_name, stack, Ok)
8812     }
8813 }
8814 
8815 pub struct MetricsIdSerializer;
8816 impl MetricsIdSerializer {
8817     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,8818     pub fn serialize<W>(
8819         mut writer: &mut EventWriter<W>,
8820         name: &str,
8821         obj: &String,
8822     ) -> Result<(), xml::writer::Error>
8823     where
8824         W: Write,
8825     {
8826         write_characters_element(writer, name, obj)
8827     }
8828 }
8829 
8830 #[allow(dead_code)]
8831 struct MetricsStatusDeserializer;
8832 impl MetricsStatusDeserializer {
8833     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>8834     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8835         xml_util::deserialize_primitive(tag_name, stack, Ok)
8836     }
8837 }
8838 
8839 pub struct MetricsStatusSerializer;
8840 impl MetricsStatusSerializer {
8841     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,8842     pub fn serialize<W>(
8843         mut writer: &mut EventWriter<W>,
8844         name: &str,
8845         obj: &String,
8846     ) -> Result<(), xml::writer::Error>
8847     where
8848         W: Write,
8849     {
8850         write_characters_element(writer, name, obj)
8851     }
8852 }
8853 
8854 #[allow(dead_code)]
8855 struct MinutesDeserializer;
8856 impl MinutesDeserializer {
8857     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>8858     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
8859         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
8860     }
8861 }
8862 
8863 pub struct MinutesSerializer;
8864 impl MinutesSerializer {
8865     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,8866     pub fn serialize<W>(
8867         mut writer: &mut EventWriter<W>,
8868         name: &str,
8869         obj: &i64,
8870     ) -> Result<(), xml::writer::Error>
8871     where
8872         W: Write,
8873     {
8874         write_characters_element(writer, name, &obj.to_string())
8875     }
8876 }
8877 
8878 /// <p>Container for the <code>MultipartUpload</code> for the Amazon S3 object.</p>
8879 #[derive(Clone, Debug, Default, PartialEq)]
8880 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8881 pub struct MultipartUpload {
8882     /// <p>Date and time at which the multipart upload was initiated.</p>
8883     pub initiated: Option<String>,
8884     /// <p>Identifies who initiated the multipart upload.</p>
8885     pub initiator: Option<Initiator>,
8886     /// <p>Key of the object for which the multipart upload was initiated.</p>
8887     pub key: Option<String>,
8888     /// <p>Specifies the owner of the object that is part of the multipart upload. </p>
8889     pub owner: Option<Owner>,
8890     /// <p>The class of storage used to store the object.</p>
8891     pub storage_class: Option<String>,
8892     /// <p>Upload ID that identifies the multipart upload.</p>
8893     pub upload_id: Option<String>,
8894 }
8895 
8896 #[allow(dead_code)]
8897 struct MultipartUploadDeserializer;
8898 impl MultipartUploadDeserializer {
8899     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<MultipartUpload, XmlParseError>8900     fn deserialize<T: Peek + Next>(
8901         tag_name: &str,
8902         stack: &mut T,
8903     ) -> Result<MultipartUpload, XmlParseError> {
8904         deserialize_elements::<_, MultipartUpload, _>(tag_name, stack, |name, stack, obj| {
8905             match name {
8906                 "Initiated" => {
8907                     obj.initiated = Some(InitiatedDeserializer::deserialize("Initiated", stack)?);
8908                 }
8909                 "Initiator" => {
8910                     obj.initiator = Some(InitiatorDeserializer::deserialize("Initiator", stack)?);
8911                 }
8912                 "Key" => {
8913                     obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
8914                 }
8915                 "Owner" => {
8916                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
8917                 }
8918                 "StorageClass" => {
8919                     obj.storage_class = Some(StorageClassDeserializer::deserialize(
8920                         "StorageClass",
8921                         stack,
8922                     )?);
8923                 }
8924                 "UploadId" => {
8925                     obj.upload_id = Some(MultipartUploadIdDeserializer::deserialize(
8926                         "UploadId", stack,
8927                     )?);
8928                 }
8929                 _ => skip_tree(stack),
8930             }
8931             Ok(())
8932         })
8933     }
8934 }
8935 #[allow(dead_code)]
8936 struct MultipartUploadIdDeserializer;
8937 impl MultipartUploadIdDeserializer {
8938     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>8939     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8940         xml_util::deserialize_primitive(tag_name, stack, Ok)
8941     }
8942 }
8943 
8944 pub struct MultipartUploadIdSerializer;
8945 impl MultipartUploadIdSerializer {
8946     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,8947     pub fn serialize<W>(
8948         mut writer: &mut EventWriter<W>,
8949         name: &str,
8950         obj: &String,
8951     ) -> Result<(), xml::writer::Error>
8952     where
8953         W: Write,
8954     {
8955         write_characters_element(writer, name, obj)
8956     }
8957 }
8958 
8959 #[allow(dead_code)]
8960 struct MultipartUploadListDeserializer;
8961 impl MultipartUploadListDeserializer {
8962     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<MultipartUpload>, XmlParseError>8963     fn deserialize<T: Peek + Next>(
8964         tag_name: &str,
8965         stack: &mut T,
8966     ) -> Result<Vec<MultipartUpload>, XmlParseError> {
8967         let mut obj = vec![];
8968 
8969         loop {
8970             let consume_next_tag = match stack.peek() {
8971                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
8972                     name.local_name == tag_name
8973                 }
8974                 _ => false,
8975             };
8976 
8977             if consume_next_tag {
8978                 obj.push(MultipartUploadDeserializer::deserialize(tag_name, stack)?);
8979             } else {
8980                 break;
8981             }
8982         }
8983 
8984         Ok(obj)
8985     }
8986 }
8987 #[allow(dead_code)]
8988 struct NextKeyMarkerDeserializer;
8989 impl NextKeyMarkerDeserializer {
8990     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>8991     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8992         xml_util::deserialize_primitive(tag_name, stack, Ok)
8993     }
8994 }
8995 #[allow(dead_code)]
8996 struct NextMarkerDeserializer;
8997 impl NextMarkerDeserializer {
8998     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>8999     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9000         xml_util::deserialize_primitive(tag_name, stack, Ok)
9001     }
9002 }
9003 #[allow(dead_code)]
9004 struct NextPartNumberMarkerDeserializer;
9005 impl NextPartNumberMarkerDeserializer {
9006     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>9007     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
9008         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
9009     }
9010 }
9011 #[allow(dead_code)]
9012 struct NextTokenDeserializer;
9013 impl NextTokenDeserializer {
9014     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9015     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9016         xml_util::deserialize_primitive(tag_name, stack, Ok)
9017     }
9018 }
9019 #[allow(dead_code)]
9020 struct NextUploadIdMarkerDeserializer;
9021 impl NextUploadIdMarkerDeserializer {
9022     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9023     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9024         xml_util::deserialize_primitive(tag_name, stack, Ok)
9025     }
9026 }
9027 #[allow(dead_code)]
9028 struct NextVersionIdMarkerDeserializer;
9029 impl NextVersionIdMarkerDeserializer {
9030     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9031     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9032         xml_util::deserialize_primitive(tag_name, stack, Ok)
9033     }
9034 }
9035 /// <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>
9036 #[derive(Clone, Debug, Default, PartialEq)]
9037 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9038 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9039 pub struct NoncurrentVersionExpiration {
9040     /// <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 S3 User Guide</i>.</p>
9041     pub noncurrent_days: Option<i64>,
9042 }
9043 
9044 #[allow(dead_code)]
9045 struct NoncurrentVersionExpirationDeserializer;
9046 impl NoncurrentVersionExpirationDeserializer {
9047     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<NoncurrentVersionExpiration, XmlParseError>9048     fn deserialize<T: Peek + Next>(
9049         tag_name: &str,
9050         stack: &mut T,
9051     ) -> Result<NoncurrentVersionExpiration, XmlParseError> {
9052         deserialize_elements::<_, NoncurrentVersionExpiration, _>(
9053             tag_name,
9054             stack,
9055             |name, stack, obj| {
9056                 match name {
9057                     "NoncurrentDays" => {
9058                         obj.noncurrent_days =
9059                             Some(DaysDeserializer::deserialize("NoncurrentDays", stack)?);
9060                     }
9061                     _ => skip_tree(stack),
9062                 }
9063                 Ok(())
9064             },
9065         )
9066     }
9067 }
9068 
9069 pub struct NoncurrentVersionExpirationSerializer;
9070 impl NoncurrentVersionExpirationSerializer {
9071     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &NoncurrentVersionExpiration, ) -> Result<(), xml::writer::Error> where W: Write,9072     pub fn serialize<W>(
9073         mut writer: &mut EventWriter<W>,
9074         name: &str,
9075         obj: &NoncurrentVersionExpiration,
9076     ) -> Result<(), xml::writer::Error>
9077     where
9078         W: Write,
9079     {
9080         writer.write(xml::writer::XmlEvent::start_element(name))?;
9081         if let Some(ref value) = obj.noncurrent_days {
9082             write_characters_element(writer, "NoncurrentDays", &value.to_string())?;
9083         }
9084         writer.write(xml::writer::XmlEvent::end_element())
9085     }
9086 }
9087 
9088 /// <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>
9089 #[derive(Clone, Debug, Default, PartialEq)]
9090 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9091 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9092 pub struct NoncurrentVersionTransition {
9093     /// <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 S3 User Guide</i>.</p>
9094     pub noncurrent_days: Option<i64>,
9095     /// <p>The class of storage used to store the object.</p>
9096     pub storage_class: Option<String>,
9097 }
9098 
9099 #[allow(dead_code)]
9100 struct NoncurrentVersionTransitionDeserializer;
9101 impl NoncurrentVersionTransitionDeserializer {
9102     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<NoncurrentVersionTransition, XmlParseError>9103     fn deserialize<T: Peek + Next>(
9104         tag_name: &str,
9105         stack: &mut T,
9106     ) -> Result<NoncurrentVersionTransition, XmlParseError> {
9107         deserialize_elements::<_, NoncurrentVersionTransition, _>(
9108             tag_name,
9109             stack,
9110             |name, stack, obj| {
9111                 match name {
9112                     "NoncurrentDays" => {
9113                         obj.noncurrent_days =
9114                             Some(DaysDeserializer::deserialize("NoncurrentDays", stack)?);
9115                     }
9116                     "StorageClass" => {
9117                         obj.storage_class = Some(TransitionStorageClassDeserializer::deserialize(
9118                             "StorageClass",
9119                             stack,
9120                         )?);
9121                     }
9122                     _ => skip_tree(stack),
9123                 }
9124                 Ok(())
9125             },
9126         )
9127     }
9128 }
9129 
9130 pub struct NoncurrentVersionTransitionSerializer;
9131 impl NoncurrentVersionTransitionSerializer {
9132     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &NoncurrentVersionTransition, ) -> Result<(), xml::writer::Error> where W: Write,9133     pub fn serialize<W>(
9134         mut writer: &mut EventWriter<W>,
9135         name: &str,
9136         obj: &NoncurrentVersionTransition,
9137     ) -> Result<(), xml::writer::Error>
9138     where
9139         W: Write,
9140     {
9141         writer.write(xml::writer::XmlEvent::start_element(name))?;
9142         if let Some(ref value) = obj.noncurrent_days {
9143             write_characters_element(writer, "NoncurrentDays", &value.to_string())?;
9144         }
9145         if let Some(ref value) = obj.storage_class {
9146             write_characters_element(writer, "StorageClass", &value)?;
9147         }
9148         writer.write(xml::writer::XmlEvent::end_element())
9149     }
9150 }
9151 
9152 #[allow(dead_code)]
9153 struct NoncurrentVersionTransitionListDeserializer;
9154 impl NoncurrentVersionTransitionListDeserializer {
9155     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<NoncurrentVersionTransition>, XmlParseError>9156     fn deserialize<T: Peek + Next>(
9157         tag_name: &str,
9158         stack: &mut T,
9159     ) -> Result<Vec<NoncurrentVersionTransition>, XmlParseError> {
9160         let mut obj = vec![];
9161 
9162         loop {
9163             let consume_next_tag = match stack.peek() {
9164                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
9165                     name.local_name == tag_name
9166                 }
9167                 _ => false,
9168             };
9169 
9170             if consume_next_tag {
9171                 obj.push(NoncurrentVersionTransitionDeserializer::deserialize(
9172                     tag_name, stack,
9173                 )?);
9174             } else {
9175                 break;
9176             }
9177         }
9178 
9179         Ok(obj)
9180     }
9181 }
9182 
9183 pub struct NoncurrentVersionTransitionListSerializer;
9184 impl NoncurrentVersionTransitionListSerializer {
9185     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<NoncurrentVersionTransition>, ) -> Result<(), xml::writer::Error> where W: Write,9186     pub fn serialize<W>(
9187         mut writer: &mut EventWriter<W>,
9188         name: &str,
9189         obj: &Vec<NoncurrentVersionTransition>,
9190     ) -> Result<(), xml::writer::Error>
9191     where
9192         W: Write,
9193     {
9194         for element in obj {
9195             NoncurrentVersionTransitionSerializer::serialize(writer, name, element)?;
9196         }
9197         Ok(())
9198     }
9199 }
9200 
9201 /// <p>A container for specifying the notification configuration of the bucket. If this element is empty, notifications are turned off for the bucket.</p>
9202 #[derive(Clone, Debug, Default, PartialEq)]
9203 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9204 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9205 pub struct NotificationConfiguration {
9206     /// <p>Describes the AWS Lambda functions to invoke and the events for which to invoke them.</p>
9207     pub lambda_function_configurations: Option<Vec<LambdaFunctionConfiguration>>,
9208     /// <p>The Amazon Simple Queue Service queues to publish messages to and the events for which to publish messages.</p>
9209     pub queue_configurations: Option<Vec<QueueConfiguration>>,
9210     /// <p>The topic to which notifications are sent and the events for which notifications are generated.</p>
9211     pub topic_configurations: Option<Vec<TopicConfiguration>>,
9212 }
9213 
9214 #[allow(dead_code)]
9215 struct NotificationConfigurationDeserializer;
9216 impl NotificationConfigurationDeserializer {
9217     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<NotificationConfiguration, XmlParseError>9218     fn deserialize<T: Peek + Next>(
9219         tag_name: &str,
9220         stack: &mut T,
9221     ) -> Result<NotificationConfiguration, XmlParseError> {
9222         deserialize_elements::<_, NotificationConfiguration, _>(
9223             tag_name,
9224             stack,
9225             |name, stack, obj| {
9226                 match name {
9227                     "CloudFunctionConfiguration" => {
9228                         obj.lambda_function_configurations
9229                             .get_or_insert(vec![])
9230                             .extend(LambdaFunctionConfigurationListDeserializer::deserialize(
9231                                 "CloudFunctionConfiguration",
9232                                 stack,
9233                             )?);
9234                     }
9235                     "QueueConfiguration" => {
9236                         obj.queue_configurations.get_or_insert(vec![]).extend(
9237                             QueueConfigurationListDeserializer::deserialize(
9238                                 "QueueConfiguration",
9239                                 stack,
9240                             )?,
9241                         );
9242                     }
9243                     "TopicConfiguration" => {
9244                         obj.topic_configurations.get_or_insert(vec![]).extend(
9245                             TopicConfigurationListDeserializer::deserialize(
9246                                 "TopicConfiguration",
9247                                 stack,
9248                             )?,
9249                         );
9250                     }
9251                     _ => skip_tree(stack),
9252                 }
9253                 Ok(())
9254             },
9255         )
9256     }
9257 }
9258 
9259 pub struct NotificationConfigurationSerializer;
9260 impl NotificationConfigurationSerializer {
9261     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &NotificationConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,9262     pub fn serialize<W>(
9263         mut writer: &mut EventWriter<W>,
9264         name: &str,
9265         obj: &NotificationConfiguration,
9266     ) -> Result<(), xml::writer::Error>
9267     where
9268         W: Write,
9269     {
9270         writer.write(xml::writer::XmlEvent::start_element(name))?;
9271         if let Some(ref value) = obj.lambda_function_configurations {
9272             &LambdaFunctionConfigurationListSerializer::serialize(
9273                 &mut writer,
9274                 "CloudFunctionConfiguration",
9275                 value,
9276             )?;
9277         }
9278         if let Some(ref value) = obj.queue_configurations {
9279             &QueueConfigurationListSerializer::serialize(&mut writer, "QueueConfiguration", value)?;
9280         }
9281         if let Some(ref value) = obj.topic_configurations {
9282             &TopicConfigurationListSerializer::serialize(&mut writer, "TopicConfiguration", value)?;
9283         }
9284         writer.write(xml::writer::XmlEvent::end_element())
9285     }
9286 }
9287 
9288 #[derive(Clone, Debug, Default, PartialEq)]
9289 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9290 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9291 pub struct NotificationConfigurationDeprecated {
9292     /// <p>Container for specifying the AWS Lambda notification configuration.</p>
9293     pub cloud_function_configuration: Option<CloudFunctionConfiguration>,
9294     /// <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>
9295     pub queue_configuration: Option<QueueConfigurationDeprecated>,
9296     /// <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>
9297     pub topic_configuration: Option<TopicConfigurationDeprecated>,
9298 }
9299 
9300 #[allow(dead_code)]
9301 struct NotificationConfigurationDeprecatedDeserializer;
9302 impl NotificationConfigurationDeprecatedDeserializer {
9303     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<NotificationConfigurationDeprecated, XmlParseError>9304     fn deserialize<T: Peek + Next>(
9305         tag_name: &str,
9306         stack: &mut T,
9307     ) -> Result<NotificationConfigurationDeprecated, XmlParseError> {
9308         deserialize_elements::<_, NotificationConfigurationDeprecated, _>(
9309             tag_name,
9310             stack,
9311             |name, stack, obj| {
9312                 match name {
9313                     "CloudFunctionConfiguration" => {
9314                         obj.cloud_function_configuration =
9315                             Some(CloudFunctionConfigurationDeserializer::deserialize(
9316                                 "CloudFunctionConfiguration",
9317                                 stack,
9318                             )?);
9319                     }
9320                     "QueueConfiguration" => {
9321                         obj.queue_configuration =
9322                             Some(QueueConfigurationDeprecatedDeserializer::deserialize(
9323                                 "QueueConfiguration",
9324                                 stack,
9325                             )?);
9326                     }
9327                     "TopicConfiguration" => {
9328                         obj.topic_configuration =
9329                             Some(TopicConfigurationDeprecatedDeserializer::deserialize(
9330                                 "TopicConfiguration",
9331                                 stack,
9332                             )?);
9333                     }
9334                     _ => skip_tree(stack),
9335                 }
9336                 Ok(())
9337             },
9338         )
9339     }
9340 }
9341 
9342 pub struct NotificationConfigurationDeprecatedSerializer;
9343 impl NotificationConfigurationDeprecatedSerializer {
9344     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &NotificationConfigurationDeprecated, ) -> Result<(), xml::writer::Error> where W: Write,9345     pub fn serialize<W>(
9346         mut writer: &mut EventWriter<W>,
9347         name: &str,
9348         obj: &NotificationConfigurationDeprecated,
9349     ) -> Result<(), xml::writer::Error>
9350     where
9351         W: Write,
9352     {
9353         writer.write(xml::writer::XmlEvent::start_element(name))?;
9354         if let Some(ref value) = obj.cloud_function_configuration {
9355             &CloudFunctionConfigurationSerializer::serialize(
9356                 &mut writer,
9357                 "CloudFunctionConfiguration",
9358                 value,
9359             )?;
9360         }
9361         if let Some(ref value) = obj.queue_configuration {
9362             &QueueConfigurationDeprecatedSerializer::serialize(
9363                 &mut writer,
9364                 "QueueConfiguration",
9365                 value,
9366             )?;
9367         }
9368         if let Some(ref value) = obj.topic_configuration {
9369             &TopicConfigurationDeprecatedSerializer::serialize(
9370                 &mut writer,
9371                 "TopicConfiguration",
9372                 value,
9373             )?;
9374         }
9375         writer.write(xml::writer::XmlEvent::end_element())
9376     }
9377 }
9378 
9379 /// <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 S3 User Guide</i>.</p>
9380 #[derive(Clone, Debug, Default, PartialEq)]
9381 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9382 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9383 pub struct NotificationConfigurationFilter {
9384     pub key: Option<S3KeyFilter>,
9385 }
9386 
9387 #[allow(dead_code)]
9388 struct NotificationConfigurationFilterDeserializer;
9389 impl NotificationConfigurationFilterDeserializer {
9390     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<NotificationConfigurationFilter, XmlParseError>9391     fn deserialize<T: Peek + Next>(
9392         tag_name: &str,
9393         stack: &mut T,
9394     ) -> Result<NotificationConfigurationFilter, XmlParseError> {
9395         deserialize_elements::<_, NotificationConfigurationFilter, _>(
9396             tag_name,
9397             stack,
9398             |name, stack, obj| {
9399                 match name {
9400                     "S3Key" => {
9401                         obj.key = Some(S3KeyFilterDeserializer::deserialize("S3Key", stack)?);
9402                     }
9403                     _ => skip_tree(stack),
9404                 }
9405                 Ok(())
9406             },
9407         )
9408     }
9409 }
9410 
9411 pub struct NotificationConfigurationFilterSerializer;
9412 impl NotificationConfigurationFilterSerializer {
9413     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &NotificationConfigurationFilter, ) -> Result<(), xml::writer::Error> where W: Write,9414     pub fn serialize<W>(
9415         mut writer: &mut EventWriter<W>,
9416         name: &str,
9417         obj: &NotificationConfigurationFilter,
9418     ) -> Result<(), xml::writer::Error>
9419     where
9420         W: Write,
9421     {
9422         writer.write(xml::writer::XmlEvent::start_element(name))?;
9423         if let Some(ref value) = obj.key {
9424             &S3KeyFilterSerializer::serialize(&mut writer, "S3Key", value)?;
9425         }
9426         writer.write(xml::writer::XmlEvent::end_element())
9427     }
9428 }
9429 
9430 #[allow(dead_code)]
9431 struct NotificationIdDeserializer;
9432 impl NotificationIdDeserializer {
9433     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9434     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9435         xml_util::deserialize_primitive(tag_name, stack, Ok)
9436     }
9437 }
9438 
9439 pub struct NotificationIdSerializer;
9440 impl NotificationIdSerializer {
9441     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,9442     pub fn serialize<W>(
9443         mut writer: &mut EventWriter<W>,
9444         name: &str,
9445         obj: &String,
9446     ) -> Result<(), xml::writer::Error>
9447     where
9448         W: Write,
9449     {
9450         write_characters_element(writer, name, obj)
9451     }
9452 }
9453 
9454 /// <p>An object consists of data and its descriptive metadata.</p>
9455 #[derive(Clone, Debug, Default, PartialEq)]
9456 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9457 pub struct Object {
9458     /// <p><p>The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted as described below:</p> <ul> <li> <p>Objects created by the PUT Object, POST Object, or Copy operation, or through the AWS Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.</p> </li> <li> <p>Objects created by the PUT Object, POST Object, or Copy operation, or through the AWS Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.</p> </li> <li> <p>If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption.</p> </li> </ul></p>
9459     pub e_tag: Option<String>,
9460     /// <p>The name that you assign to an object. You use the object key to retrieve the object.</p>
9461     pub key: Option<String>,
9462     /// <p>Creation date of the object.</p>
9463     pub last_modified: Option<String>,
9464     /// <p>The owner of the object</p>
9465     pub owner: Option<Owner>,
9466     /// <p>Size in bytes of the object</p>
9467     pub size: Option<i64>,
9468     /// <p>The class of storage used to store the object.</p>
9469     pub storage_class: Option<String>,
9470 }
9471 
9472 #[allow(dead_code)]
9473 struct ObjectDeserializer;
9474 impl ObjectDeserializer {
9475     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Object, XmlParseError>9476     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Object, XmlParseError> {
9477         deserialize_elements::<_, Object, _>(tag_name, stack, |name, stack, obj| {
9478             match name {
9479                 "ETag" => {
9480                     obj.e_tag = Some(ETagDeserializer::deserialize("ETag", stack)?);
9481                 }
9482                 "Key" => {
9483                     obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
9484                 }
9485                 "LastModified" => {
9486                     obj.last_modified = Some(LastModifiedDeserializer::deserialize(
9487                         "LastModified",
9488                         stack,
9489                     )?);
9490                 }
9491                 "Owner" => {
9492                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
9493                 }
9494                 "Size" => {
9495                     obj.size = Some(SizeDeserializer::deserialize("Size", stack)?);
9496                 }
9497                 "StorageClass" => {
9498                     obj.storage_class = Some(ObjectStorageClassDeserializer::deserialize(
9499                         "StorageClass",
9500                         stack,
9501                     )?);
9502                 }
9503                 _ => skip_tree(stack),
9504             }
9505             Ok(())
9506         })
9507     }
9508 }
9509 
9510 pub struct ObjectCannedACLSerializer;
9511 impl ObjectCannedACLSerializer {
9512     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,9513     pub fn serialize<W>(
9514         mut writer: &mut EventWriter<W>,
9515         name: &str,
9516         obj: &String,
9517     ) -> Result<(), xml::writer::Error>
9518     where
9519         W: Write,
9520     {
9521         write_characters_element(writer, name, obj)
9522     }
9523 }
9524 
9525 /// <p>Object Identifier is unique value to identify objects.</p>
9526 #[derive(Clone, Debug, Default, PartialEq)]
9527 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9528 pub struct ObjectIdentifier {
9529     /// <p><p>Key name of the object.</p> <important> <p>Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints"> XML related object key constraints</a>.</p> </important></p>
9530     pub key: String,
9531     /// <p>VersionId for the specific version of the object to delete.</p>
9532     pub version_id: Option<String>,
9533 }
9534 
9535 pub struct ObjectIdentifierSerializer;
9536 impl ObjectIdentifierSerializer {
9537     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ObjectIdentifier, ) -> Result<(), xml::writer::Error> where W: Write,9538     pub fn serialize<W>(
9539         mut writer: &mut EventWriter<W>,
9540         name: &str,
9541         obj: &ObjectIdentifier,
9542     ) -> Result<(), xml::writer::Error>
9543     where
9544         W: Write,
9545     {
9546         writer.write(xml::writer::XmlEvent::start_element(name))?;
9547         write_characters_element(writer, "Key", &obj.key)?;
9548         if let Some(ref value) = obj.version_id {
9549             write_characters_element(writer, "VersionId", &value)?;
9550         }
9551         writer.write(xml::writer::XmlEvent::end_element())
9552     }
9553 }
9554 
9555 pub struct ObjectIdentifierListSerializer;
9556 impl ObjectIdentifierListSerializer {
9557     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<ObjectIdentifier>, ) -> Result<(), xml::writer::Error> where W: Write,9558     pub fn serialize<W>(
9559         mut writer: &mut EventWriter<W>,
9560         name: &str,
9561         obj: &Vec<ObjectIdentifier>,
9562     ) -> Result<(), xml::writer::Error>
9563     where
9564         W: Write,
9565     {
9566         for element in obj {
9567             ObjectIdentifierSerializer::serialize(writer, name, element)?;
9568         }
9569         Ok(())
9570     }
9571 }
9572 
9573 #[allow(dead_code)]
9574 struct ObjectKeyDeserializer;
9575 impl ObjectKeyDeserializer {
9576     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9577     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9578         xml_util::deserialize_primitive(tag_name, stack, Ok)
9579     }
9580 }
9581 
9582 pub struct ObjectKeySerializer;
9583 impl ObjectKeySerializer {
9584     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,9585     pub fn serialize<W>(
9586         mut writer: &mut EventWriter<W>,
9587         name: &str,
9588         obj: &String,
9589     ) -> Result<(), xml::writer::Error>
9590     where
9591         W: Write,
9592     {
9593         write_characters_element(writer, name, obj)
9594     }
9595 }
9596 
9597 #[allow(dead_code)]
9598 struct ObjectListDeserializer;
9599 impl ObjectListDeserializer {
9600     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Object>, XmlParseError>9601     fn deserialize<T: Peek + Next>(
9602         tag_name: &str,
9603         stack: &mut T,
9604     ) -> Result<Vec<Object>, XmlParseError> {
9605         let mut obj = vec![];
9606 
9607         loop {
9608             let consume_next_tag = match stack.peek() {
9609                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
9610                     name.local_name == tag_name
9611                 }
9612                 _ => false,
9613             };
9614 
9615             if consume_next_tag {
9616                 obj.push(ObjectDeserializer::deserialize(tag_name, stack)?);
9617             } else {
9618                 break;
9619             }
9620         }
9621 
9622         Ok(obj)
9623     }
9624 }
9625 /// <p>The container element for Object Lock configuration parameters.</p>
9626 #[derive(Clone, Debug, Default, PartialEq)]
9627 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9628 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9629 pub struct ObjectLockConfiguration {
9630     /// <p>Indicates whether this bucket has an Object Lock configuration enabled. Enable <code>ObjectLockEnabled</code> when you apply <code>ObjectLockConfiguration</code> to a bucket. </p>
9631     pub object_lock_enabled: Option<String>,
9632     /// <p>Specifies the Object Lock rule for the specified object. Enable the this rule when you apply <code>ObjectLockConfiguration</code> to a bucket. Bucket settings require both a mode and a period. The period can be either <code>Days</code> or <code>Years</code> but you must select one. You cannot specify <code>Days</code> and <code>Years</code> at the same time.</p>
9633     pub rule: Option<ObjectLockRule>,
9634 }
9635 
9636 #[allow(dead_code)]
9637 struct ObjectLockConfigurationDeserializer;
9638 impl ObjectLockConfigurationDeserializer {
9639     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ObjectLockConfiguration, XmlParseError>9640     fn deserialize<T: Peek + Next>(
9641         tag_name: &str,
9642         stack: &mut T,
9643     ) -> Result<ObjectLockConfiguration, XmlParseError> {
9644         deserialize_elements::<_, ObjectLockConfiguration, _>(
9645             tag_name,
9646             stack,
9647             |name, stack, obj| {
9648                 match name {
9649                     "ObjectLockEnabled" => {
9650                         obj.object_lock_enabled = Some(ObjectLockEnabledDeserializer::deserialize(
9651                             "ObjectLockEnabled",
9652                             stack,
9653                         )?);
9654                     }
9655                     "Rule" => {
9656                         obj.rule = Some(ObjectLockRuleDeserializer::deserialize("Rule", stack)?);
9657                     }
9658                     _ => skip_tree(stack),
9659                 }
9660                 Ok(())
9661             },
9662         )
9663     }
9664 }
9665 
9666 pub struct ObjectLockConfigurationSerializer;
9667 impl ObjectLockConfigurationSerializer {
9668     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ObjectLockConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,9669     pub fn serialize<W>(
9670         mut writer: &mut EventWriter<W>,
9671         name: &str,
9672         obj: &ObjectLockConfiguration,
9673     ) -> Result<(), xml::writer::Error>
9674     where
9675         W: Write,
9676     {
9677         writer.write(xml::writer::XmlEvent::start_element(name))?;
9678         if let Some(ref value) = obj.object_lock_enabled {
9679             write_characters_element(writer, "ObjectLockEnabled", &value)?;
9680         }
9681         if let Some(ref value) = obj.rule {
9682             &ObjectLockRuleSerializer::serialize(&mut writer, "Rule", value)?;
9683         }
9684         writer.write(xml::writer::XmlEvent::end_element())
9685     }
9686 }
9687 
9688 #[allow(dead_code)]
9689 struct ObjectLockEnabledDeserializer;
9690 impl ObjectLockEnabledDeserializer {
9691     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9692     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9693         xml_util::deserialize_primitive(tag_name, stack, Ok)
9694     }
9695 }
9696 
9697 pub struct ObjectLockEnabledSerializer;
9698 impl ObjectLockEnabledSerializer {
9699     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,9700     pub fn serialize<W>(
9701         mut writer: &mut EventWriter<W>,
9702         name: &str,
9703         obj: &String,
9704     ) -> Result<(), xml::writer::Error>
9705     where
9706         W: Write,
9707     {
9708         write_characters_element(writer, name, obj)
9709     }
9710 }
9711 
9712 /// <p>A Legal Hold configuration for an object.</p>
9713 #[derive(Clone, Debug, Default, PartialEq)]
9714 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9715 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9716 pub struct ObjectLockLegalHold {
9717     /// <p>Indicates whether the specified object has a Legal Hold in place.</p>
9718     pub status: Option<String>,
9719 }
9720 
9721 #[allow(dead_code)]
9722 struct ObjectLockLegalHoldDeserializer;
9723 impl ObjectLockLegalHoldDeserializer {
9724     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ObjectLockLegalHold, XmlParseError>9725     fn deserialize<T: Peek + Next>(
9726         tag_name: &str,
9727         stack: &mut T,
9728     ) -> Result<ObjectLockLegalHold, XmlParseError> {
9729         deserialize_elements::<_, ObjectLockLegalHold, _>(tag_name, stack, |name, stack, obj| {
9730             match name {
9731                 "Status" => {
9732                     obj.status = Some(ObjectLockLegalHoldStatusDeserializer::deserialize(
9733                         "Status", stack,
9734                     )?);
9735                 }
9736                 _ => skip_tree(stack),
9737             }
9738             Ok(())
9739         })
9740     }
9741 }
9742 
9743 pub struct ObjectLockLegalHoldSerializer;
9744 impl ObjectLockLegalHoldSerializer {
9745     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ObjectLockLegalHold, ) -> Result<(), xml::writer::Error> where W: Write,9746     pub fn serialize<W>(
9747         mut writer: &mut EventWriter<W>,
9748         name: &str,
9749         obj: &ObjectLockLegalHold,
9750     ) -> Result<(), xml::writer::Error>
9751     where
9752         W: Write,
9753     {
9754         writer.write(xml::writer::XmlEvent::start_element(name))?;
9755         if let Some(ref value) = obj.status {
9756             write_characters_element(writer, "Status", &value)?;
9757         }
9758         writer.write(xml::writer::XmlEvent::end_element())
9759     }
9760 }
9761 
9762 #[allow(dead_code)]
9763 struct ObjectLockLegalHoldStatusDeserializer;
9764 impl ObjectLockLegalHoldStatusDeserializer {
9765     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9766     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9767         xml_util::deserialize_primitive(tag_name, stack, Ok)
9768     }
9769 }
9770 
9771 pub struct ObjectLockLegalHoldStatusSerializer;
9772 impl ObjectLockLegalHoldStatusSerializer {
9773     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,9774     pub fn serialize<W>(
9775         mut writer: &mut EventWriter<W>,
9776         name: &str,
9777         obj: &String,
9778     ) -> Result<(), xml::writer::Error>
9779     where
9780         W: Write,
9781     {
9782         write_characters_element(writer, name, obj)
9783     }
9784 }
9785 
9786 /// <p>A Retention configuration for an object.</p>
9787 #[derive(Clone, Debug, Default, PartialEq)]
9788 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9789 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9790 pub struct ObjectLockRetention {
9791     /// <p>Indicates the Retention mode for the specified object.</p>
9792     pub mode: Option<String>,
9793     /// <p>The date on which this Object Lock Retention will expire.</p>
9794     pub retain_until_date: Option<String>,
9795 }
9796 
9797 #[allow(dead_code)]
9798 struct ObjectLockRetentionDeserializer;
9799 impl ObjectLockRetentionDeserializer {
9800     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ObjectLockRetention, XmlParseError>9801     fn deserialize<T: Peek + Next>(
9802         tag_name: &str,
9803         stack: &mut T,
9804     ) -> Result<ObjectLockRetention, XmlParseError> {
9805         deserialize_elements::<_, ObjectLockRetention, _>(tag_name, stack, |name, stack, obj| {
9806             match name {
9807                 "Mode" => {
9808                     obj.mode = Some(ObjectLockRetentionModeDeserializer::deserialize(
9809                         "Mode", stack,
9810                     )?);
9811                 }
9812                 "RetainUntilDate" => {
9813                     obj.retain_until_date =
9814                         Some(DateDeserializer::deserialize("RetainUntilDate", stack)?);
9815                 }
9816                 _ => skip_tree(stack),
9817             }
9818             Ok(())
9819         })
9820     }
9821 }
9822 
9823 pub struct ObjectLockRetentionSerializer;
9824 impl ObjectLockRetentionSerializer {
9825     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ObjectLockRetention, ) -> Result<(), xml::writer::Error> where W: Write,9826     pub fn serialize<W>(
9827         mut writer: &mut EventWriter<W>,
9828         name: &str,
9829         obj: &ObjectLockRetention,
9830     ) -> Result<(), xml::writer::Error>
9831     where
9832         W: Write,
9833     {
9834         writer.write(xml::writer::XmlEvent::start_element(name))?;
9835         if let Some(ref value) = obj.mode {
9836             write_characters_element(writer, "Mode", &value)?;
9837         }
9838         if let Some(ref value) = obj.retain_until_date {
9839             write_characters_element(writer, "RetainUntilDate", &value.to_string())?;
9840         }
9841         writer.write(xml::writer::XmlEvent::end_element())
9842     }
9843 }
9844 
9845 #[allow(dead_code)]
9846 struct ObjectLockRetentionModeDeserializer;
9847 impl ObjectLockRetentionModeDeserializer {
9848     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9849     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9850         xml_util::deserialize_primitive(tag_name, stack, Ok)
9851     }
9852 }
9853 
9854 pub struct ObjectLockRetentionModeSerializer;
9855 impl ObjectLockRetentionModeSerializer {
9856     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,9857     pub fn serialize<W>(
9858         mut writer: &mut EventWriter<W>,
9859         name: &str,
9860         obj: &String,
9861     ) -> Result<(), xml::writer::Error>
9862     where
9863         W: Write,
9864     {
9865         write_characters_element(writer, name, obj)
9866     }
9867 }
9868 
9869 /// <p>The container element for an Object Lock rule.</p>
9870 #[derive(Clone, Debug, Default, PartialEq)]
9871 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9872 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
9873 pub struct ObjectLockRule {
9874     /// <p>The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket. Bucket settings require both a mode and a period. The period can be either <code>Days</code> or <code>Years</code> but you must select one. You cannot specify <code>Days</code> and <code>Years</code> at the same time.</p>
9875     pub default_retention: Option<DefaultRetention>,
9876 }
9877 
9878 #[allow(dead_code)]
9879 struct ObjectLockRuleDeserializer;
9880 impl ObjectLockRuleDeserializer {
9881     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ObjectLockRule, XmlParseError>9882     fn deserialize<T: Peek + Next>(
9883         tag_name: &str,
9884         stack: &mut T,
9885     ) -> Result<ObjectLockRule, XmlParseError> {
9886         deserialize_elements::<_, ObjectLockRule, _>(tag_name, stack, |name, stack, obj| {
9887             match name {
9888                 "DefaultRetention" => {
9889                     obj.default_retention = Some(DefaultRetentionDeserializer::deserialize(
9890                         "DefaultRetention",
9891                         stack,
9892                     )?);
9893                 }
9894                 _ => skip_tree(stack),
9895             }
9896             Ok(())
9897         })
9898     }
9899 }
9900 
9901 pub struct ObjectLockRuleSerializer;
9902 impl ObjectLockRuleSerializer {
9903     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ObjectLockRule, ) -> Result<(), xml::writer::Error> where W: Write,9904     pub fn serialize<W>(
9905         mut writer: &mut EventWriter<W>,
9906         name: &str,
9907         obj: &ObjectLockRule,
9908     ) -> Result<(), xml::writer::Error>
9909     where
9910         W: Write,
9911     {
9912         writer.write(xml::writer::XmlEvent::start_element(name))?;
9913         if let Some(ref value) = obj.default_retention {
9914             &DefaultRetentionSerializer::serialize(&mut writer, "DefaultRetention", value)?;
9915         }
9916         writer.write(xml::writer::XmlEvent::end_element())
9917     }
9918 }
9919 
9920 #[allow(dead_code)]
9921 struct ObjectOwnershipDeserializer;
9922 impl ObjectOwnershipDeserializer {
9923     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9924     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9925         xml_util::deserialize_primitive(tag_name, stack, Ok)
9926     }
9927 }
9928 
9929 pub struct ObjectOwnershipSerializer;
9930 impl ObjectOwnershipSerializer {
9931     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,9932     pub fn serialize<W>(
9933         mut writer: &mut EventWriter<W>,
9934         name: &str,
9935         obj: &String,
9936     ) -> Result<(), xml::writer::Error>
9937     where
9938         W: Write,
9939     {
9940         write_characters_element(writer, name, obj)
9941     }
9942 }
9943 
9944 #[allow(dead_code)]
9945 struct ObjectStorageClassDeserializer;
9946 impl ObjectStorageClassDeserializer {
9947     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>9948     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
9949         xml_util::deserialize_primitive(tag_name, stack, Ok)
9950     }
9951 }
9952 /// <p>The version of an object.</p>
9953 #[derive(Clone, Debug, Default, PartialEq)]
9954 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
9955 pub struct ObjectVersion {
9956     /// <p>The entity tag is an MD5 hash of that version of the object.</p>
9957     pub e_tag: Option<String>,
9958     /// <p>Specifies whether the object is (true) or is not (false) the latest version of an object.</p>
9959     pub is_latest: Option<bool>,
9960     /// <p>The object key.</p>
9961     pub key: Option<String>,
9962     /// <p>Date and time the object was last modified.</p>
9963     pub last_modified: Option<String>,
9964     /// <p>Specifies the owner of the object.</p>
9965     pub owner: Option<Owner>,
9966     /// <p>Size in bytes of the object.</p>
9967     pub size: Option<i64>,
9968     /// <p>The class of storage used to store the object.</p>
9969     pub storage_class: Option<String>,
9970     /// <p>Version ID of an object.</p>
9971     pub version_id: Option<String>,
9972 }
9973 
9974 #[allow(dead_code)]
9975 struct ObjectVersionDeserializer;
9976 impl ObjectVersionDeserializer {
9977     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ObjectVersion, XmlParseError>9978     fn deserialize<T: Peek + Next>(
9979         tag_name: &str,
9980         stack: &mut T,
9981     ) -> Result<ObjectVersion, XmlParseError> {
9982         deserialize_elements::<_, ObjectVersion, _>(tag_name, stack, |name, stack, obj| {
9983             match name {
9984                 "ETag" => {
9985                     obj.e_tag = Some(ETagDeserializer::deserialize("ETag", stack)?);
9986                 }
9987                 "IsLatest" => {
9988                     obj.is_latest = Some(IsLatestDeserializer::deserialize("IsLatest", stack)?);
9989                 }
9990                 "Key" => {
9991                     obj.key = Some(ObjectKeyDeserializer::deserialize("Key", stack)?);
9992                 }
9993                 "LastModified" => {
9994                     obj.last_modified = Some(LastModifiedDeserializer::deserialize(
9995                         "LastModified",
9996                         stack,
9997                     )?);
9998                 }
9999                 "Owner" => {
10000                     obj.owner = Some(OwnerDeserializer::deserialize("Owner", stack)?);
10001                 }
10002                 "Size" => {
10003                     obj.size = Some(SizeDeserializer::deserialize("Size", stack)?);
10004                 }
10005                 "StorageClass" => {
10006                     obj.storage_class = Some(ObjectVersionStorageClassDeserializer::deserialize(
10007                         "StorageClass",
10008                         stack,
10009                     )?);
10010                 }
10011                 "VersionId" => {
10012                     obj.version_id = Some(ObjectVersionIdDeserializer::deserialize(
10013                         "VersionId",
10014                         stack,
10015                     )?);
10016                 }
10017                 _ => skip_tree(stack),
10018             }
10019             Ok(())
10020         })
10021     }
10022 }
10023 #[allow(dead_code)]
10024 struct ObjectVersionIdDeserializer;
10025 impl ObjectVersionIdDeserializer {
10026     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10027     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10028         xml_util::deserialize_primitive(tag_name, stack, Ok)
10029     }
10030 }
10031 
10032 pub struct ObjectVersionIdSerializer;
10033 impl ObjectVersionIdSerializer {
10034     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10035     pub fn serialize<W>(
10036         mut writer: &mut EventWriter<W>,
10037         name: &str,
10038         obj: &String,
10039     ) -> Result<(), xml::writer::Error>
10040     where
10041         W: Write,
10042     {
10043         write_characters_element(writer, name, obj)
10044     }
10045 }
10046 
10047 #[allow(dead_code)]
10048 struct ObjectVersionListDeserializer;
10049 impl ObjectVersionListDeserializer {
10050     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<ObjectVersion>, XmlParseError>10051     fn deserialize<T: Peek + Next>(
10052         tag_name: &str,
10053         stack: &mut T,
10054     ) -> Result<Vec<ObjectVersion>, XmlParseError> {
10055         let mut obj = vec![];
10056 
10057         loop {
10058             let consume_next_tag = match stack.peek() {
10059                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
10060                     name.local_name == tag_name
10061                 }
10062                 _ => false,
10063             };
10064 
10065             if consume_next_tag {
10066                 obj.push(ObjectVersionDeserializer::deserialize(tag_name, stack)?);
10067             } else {
10068                 break;
10069             }
10070         }
10071 
10072         Ok(obj)
10073     }
10074 }
10075 #[allow(dead_code)]
10076 struct ObjectVersionStorageClassDeserializer;
10077 impl ObjectVersionStorageClassDeserializer {
10078     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10079     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10080         xml_util::deserialize_primitive(tag_name, stack, Ok)
10081     }
10082 }
10083 /// <p>Describes the location where the restore job's output is stored.</p>
10084 #[derive(Clone, Debug, Default, PartialEq)]
10085 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10086 pub struct OutputLocation {
10087     /// <p>Describes an S3 location that will receive the results of the restore request.</p>
10088     pub s3: Option<S3Location>,
10089 }
10090 
10091 pub struct OutputLocationSerializer;
10092 impl OutputLocationSerializer {
10093     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &OutputLocation, ) -> Result<(), xml::writer::Error> where W: Write,10094     pub fn serialize<W>(
10095         mut writer: &mut EventWriter<W>,
10096         name: &str,
10097         obj: &OutputLocation,
10098     ) -> Result<(), xml::writer::Error>
10099     where
10100         W: Write,
10101     {
10102         writer.write(xml::writer::XmlEvent::start_element(name))?;
10103         if let Some(ref value) = obj.s3 {
10104             &S3LocationSerializer::serialize(&mut writer, "S3", value)?;
10105         }
10106         writer.write(xml::writer::XmlEvent::end_element())
10107     }
10108 }
10109 
10110 /// <p>Describes how results of the Select job are serialized.</p>
10111 #[derive(Clone, Debug, Default, PartialEq)]
10112 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10113 pub struct OutputSerialization {
10114     /// <p>Describes the serialization of CSV-encoded Select results.</p>
10115     pub csv: Option<CSVOutput>,
10116     /// <p>Specifies JSON as request's output serialization format.</p>
10117     pub json: Option<JSONOutput>,
10118 }
10119 
10120 pub struct OutputSerializationSerializer;
10121 impl OutputSerializationSerializer {
10122     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &OutputSerialization, ) -> Result<(), xml::writer::Error> where W: Write,10123     pub fn serialize<W>(
10124         mut writer: &mut EventWriter<W>,
10125         name: &str,
10126         obj: &OutputSerialization,
10127     ) -> Result<(), xml::writer::Error>
10128     where
10129         W: Write,
10130     {
10131         writer.write(xml::writer::XmlEvent::start_element(name))?;
10132         if let Some(ref value) = obj.csv {
10133             &CSVOutputSerializer::serialize(&mut writer, "CSV", value)?;
10134         }
10135         if let Some(ref value) = obj.json {
10136             &JSONOutputSerializer::serialize(&mut writer, "JSON", value)?;
10137         }
10138         writer.write(xml::writer::XmlEvent::end_element())
10139     }
10140 }
10141 
10142 /// <p>Container for the owner's display name and ID.</p>
10143 #[derive(Clone, Debug, Default, PartialEq)]
10144 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10145 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10146 pub struct Owner {
10147     /// <p>Container for the display name of the owner.</p>
10148     pub display_name: Option<String>,
10149     /// <p>Container for the ID of the owner.</p>
10150     pub id: Option<String>,
10151 }
10152 
10153 #[allow(dead_code)]
10154 struct OwnerDeserializer;
10155 impl OwnerDeserializer {
10156     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Owner, XmlParseError>10157     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Owner, XmlParseError> {
10158         deserialize_elements::<_, Owner, _>(tag_name, stack, |name, stack, obj| {
10159             match name {
10160                 "DisplayName" => {
10161                     obj.display_name =
10162                         Some(DisplayNameDeserializer::deserialize("DisplayName", stack)?);
10163                 }
10164                 "ID" => {
10165                     obj.id = Some(IDDeserializer::deserialize("ID", stack)?);
10166                 }
10167                 _ => skip_tree(stack),
10168             }
10169             Ok(())
10170         })
10171     }
10172 }
10173 
10174 pub struct OwnerSerializer;
10175 impl OwnerSerializer {
10176     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Owner, ) -> Result<(), xml::writer::Error> where W: Write,10177     pub fn serialize<W>(
10178         mut writer: &mut EventWriter<W>,
10179         name: &str,
10180         obj: &Owner,
10181     ) -> Result<(), xml::writer::Error>
10182     where
10183         W: Write,
10184     {
10185         writer.write(xml::writer::XmlEvent::start_element(name))?;
10186         if let Some(ref value) = obj.display_name {
10187             write_characters_element(writer, "DisplayName", &value)?;
10188         }
10189         if let Some(ref value) = obj.id {
10190             write_characters_element(writer, "ID", &value)?;
10191         }
10192         writer.write(xml::writer::XmlEvent::end_element())
10193     }
10194 }
10195 
10196 #[allow(dead_code)]
10197 struct OwnerOverrideDeserializer;
10198 impl OwnerOverrideDeserializer {
10199     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10200     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10201         xml_util::deserialize_primitive(tag_name, stack, Ok)
10202     }
10203 }
10204 
10205 pub struct OwnerOverrideSerializer;
10206 impl OwnerOverrideSerializer {
10207     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10208     pub fn serialize<W>(
10209         mut writer: &mut EventWriter<W>,
10210         name: &str,
10211         obj: &String,
10212     ) -> Result<(), xml::writer::Error>
10213     where
10214         W: Write,
10215     {
10216         write_characters_element(writer, name, obj)
10217     }
10218 }
10219 
10220 /// <p>The container element for a bucket's ownership controls.</p>
10221 #[derive(Clone, Debug, Default, PartialEq)]
10222 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10223 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10224 pub struct OwnershipControls {
10225     /// <p>The container element for an ownership control rule.</p>
10226     pub rules: Vec<OwnershipControlsRule>,
10227 }
10228 
10229 #[allow(dead_code)]
10230 struct OwnershipControlsDeserializer;
10231 impl OwnershipControlsDeserializer {
10232     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<OwnershipControls, XmlParseError>10233     fn deserialize<T: Peek + Next>(
10234         tag_name: &str,
10235         stack: &mut T,
10236     ) -> Result<OwnershipControls, XmlParseError> {
10237         deserialize_elements::<_, OwnershipControls, _>(tag_name, stack, |name, stack, obj| {
10238             match name {
10239                 "Rule" => {
10240                     obj.rules
10241                         .extend(OwnershipControlsRulesDeserializer::deserialize(
10242                             "Rule", stack,
10243                         )?);
10244                 }
10245                 _ => skip_tree(stack),
10246             }
10247             Ok(())
10248         })
10249     }
10250 }
10251 
10252 pub struct OwnershipControlsSerializer;
10253 impl OwnershipControlsSerializer {
10254     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &OwnershipControls, ) -> Result<(), xml::writer::Error> where W: Write,10255     pub fn serialize<W>(
10256         mut writer: &mut EventWriter<W>,
10257         name: &str,
10258         obj: &OwnershipControls,
10259     ) -> Result<(), xml::writer::Error>
10260     where
10261         W: Write,
10262     {
10263         writer.write(xml::writer::XmlEvent::start_element(name))?;
10264         OwnershipControlsRulesSerializer::serialize(&mut writer, "Rule", &obj.rules)?;
10265         writer.write(xml::writer::XmlEvent::end_element())
10266     }
10267 }
10268 
10269 /// <p>The container element for an ownership control rule.</p>
10270 #[derive(Clone, Debug, Default, PartialEq)]
10271 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10272 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10273 pub struct OwnershipControlsRule {
10274     pub object_ownership: String,
10275 }
10276 
10277 #[allow(dead_code)]
10278 struct OwnershipControlsRuleDeserializer;
10279 impl OwnershipControlsRuleDeserializer {
10280     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<OwnershipControlsRule, XmlParseError>10281     fn deserialize<T: Peek + Next>(
10282         tag_name: &str,
10283         stack: &mut T,
10284     ) -> Result<OwnershipControlsRule, XmlParseError> {
10285         deserialize_elements::<_, OwnershipControlsRule, _>(tag_name, stack, |name, stack, obj| {
10286             match name {
10287                 "ObjectOwnership" => {
10288                     obj.object_ownership =
10289                         ObjectOwnershipDeserializer::deserialize("ObjectOwnership", stack)?;
10290                 }
10291                 _ => skip_tree(stack),
10292             }
10293             Ok(())
10294         })
10295     }
10296 }
10297 
10298 pub struct OwnershipControlsRuleSerializer;
10299 impl OwnershipControlsRuleSerializer {
10300     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &OwnershipControlsRule, ) -> Result<(), xml::writer::Error> where W: Write,10301     pub fn serialize<W>(
10302         mut writer: &mut EventWriter<W>,
10303         name: &str,
10304         obj: &OwnershipControlsRule,
10305     ) -> Result<(), xml::writer::Error>
10306     where
10307         W: Write,
10308     {
10309         writer.write(xml::writer::XmlEvent::start_element(name))?;
10310         write_characters_element(writer, "ObjectOwnership", &obj.object_ownership)?;
10311         writer.write(xml::writer::XmlEvent::end_element())
10312     }
10313 }
10314 
10315 #[allow(dead_code)]
10316 struct OwnershipControlsRulesDeserializer;
10317 impl OwnershipControlsRulesDeserializer {
10318     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<OwnershipControlsRule>, XmlParseError>10319     fn deserialize<T: Peek + Next>(
10320         tag_name: &str,
10321         stack: &mut T,
10322     ) -> Result<Vec<OwnershipControlsRule>, XmlParseError> {
10323         let mut obj = vec![];
10324 
10325         loop {
10326             let consume_next_tag = match stack.peek() {
10327                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
10328                     name.local_name == tag_name
10329                 }
10330                 _ => false,
10331             };
10332 
10333             if consume_next_tag {
10334                 obj.push(OwnershipControlsRuleDeserializer::deserialize(
10335                     tag_name, stack,
10336                 )?);
10337             } else {
10338                 break;
10339             }
10340         }
10341 
10342         Ok(obj)
10343     }
10344 }
10345 
10346 pub struct OwnershipControlsRulesSerializer;
10347 impl OwnershipControlsRulesSerializer {
10348     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<OwnershipControlsRule>, ) -> Result<(), xml::writer::Error> where W: Write,10349     pub fn serialize<W>(
10350         mut writer: &mut EventWriter<W>,
10351         name: &str,
10352         obj: &Vec<OwnershipControlsRule>,
10353     ) -> Result<(), xml::writer::Error>
10354     where
10355         W: Write,
10356     {
10357         for element in obj {
10358             OwnershipControlsRuleSerializer::serialize(writer, name, element)?;
10359         }
10360         Ok(())
10361     }
10362 }
10363 
10364 /// <p>Container for Parquet.</p>
10365 #[derive(Clone, Debug, Default, PartialEq)]
10366 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10367 pub struct ParquetInput {}
10368 
10369 pub struct ParquetInputSerializer;
10370 impl ParquetInputSerializer {
10371     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ParquetInput, ) -> Result<(), xml::writer::Error> where W: Write,10372     pub fn serialize<W>(
10373         mut writer: &mut EventWriter<W>,
10374         name: &str,
10375         obj: &ParquetInput,
10376     ) -> Result<(), xml::writer::Error>
10377     where
10378         W: Write,
10379     {
10380         writer.write(xml::writer::XmlEvent::start_element(name))?;
10381         writer.write(xml::writer::XmlEvent::end_element())
10382     }
10383 }
10384 
10385 /// <p>Container for elements related to a part.</p>
10386 #[derive(Clone, Debug, Default, PartialEq)]
10387 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10388 pub struct Part {
10389     /// <p>Entity tag returned when the part was uploaded.</p>
10390     pub e_tag: Option<String>,
10391     /// <p>Date and time at which the part was uploaded.</p>
10392     pub last_modified: Option<String>,
10393     /// <p>Part number identifying the part. This is a positive integer between 1 and 10,000.</p>
10394     pub part_number: Option<i64>,
10395     /// <p>Size in bytes of the uploaded part data.</p>
10396     pub size: Option<i64>,
10397 }
10398 
10399 #[allow(dead_code)]
10400 struct PartDeserializer;
10401 impl PartDeserializer {
10402     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Part, XmlParseError>10403     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Part, XmlParseError> {
10404         deserialize_elements::<_, Part, _>(tag_name, stack, |name, stack, obj| {
10405             match name {
10406                 "ETag" => {
10407                     obj.e_tag = Some(ETagDeserializer::deserialize("ETag", stack)?);
10408                 }
10409                 "LastModified" => {
10410                     obj.last_modified = Some(LastModifiedDeserializer::deserialize(
10411                         "LastModified",
10412                         stack,
10413                     )?);
10414                 }
10415                 "PartNumber" => {
10416                     obj.part_number =
10417                         Some(PartNumberDeserializer::deserialize("PartNumber", stack)?);
10418                 }
10419                 "Size" => {
10420                     obj.size = Some(SizeDeserializer::deserialize("Size", stack)?);
10421                 }
10422                 _ => skip_tree(stack),
10423             }
10424             Ok(())
10425         })
10426     }
10427 }
10428 #[allow(dead_code)]
10429 struct PartNumberDeserializer;
10430 impl PartNumberDeserializer {
10431     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>10432     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
10433         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
10434     }
10435 }
10436 
10437 pub struct PartNumberSerializer;
10438 impl PartNumberSerializer {
10439     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,10440     pub fn serialize<W>(
10441         mut writer: &mut EventWriter<W>,
10442         name: &str,
10443         obj: &i64,
10444     ) -> Result<(), xml::writer::Error>
10445     where
10446         W: Write,
10447     {
10448         write_characters_element(writer, name, &obj.to_string())
10449     }
10450 }
10451 
10452 #[allow(dead_code)]
10453 struct PartNumberMarkerDeserializer;
10454 impl PartNumberMarkerDeserializer {
10455     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>10456     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
10457         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
10458     }
10459 }
10460 
10461 pub struct PartNumberMarkerSerializer;
10462 impl PartNumberMarkerSerializer {
10463     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,10464     pub fn serialize<W>(
10465         mut writer: &mut EventWriter<W>,
10466         name: &str,
10467         obj: &i64,
10468     ) -> Result<(), xml::writer::Error>
10469     where
10470         W: Write,
10471     {
10472         write_characters_element(writer, name, &obj.to_string())
10473     }
10474 }
10475 
10476 #[allow(dead_code)]
10477 struct PartsDeserializer;
10478 impl PartsDeserializer {
10479     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Part>, XmlParseError>10480     fn deserialize<T: Peek + Next>(
10481         tag_name: &str,
10482         stack: &mut T,
10483     ) -> Result<Vec<Part>, XmlParseError> {
10484         let mut obj = vec![];
10485 
10486         loop {
10487             let consume_next_tag = match stack.peek() {
10488                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
10489                     name.local_name == tag_name
10490                 }
10491                 _ => false,
10492             };
10493 
10494             if consume_next_tag {
10495                 obj.push(PartDeserializer::deserialize(tag_name, stack)?);
10496             } else {
10497                 break;
10498             }
10499         }
10500 
10501         Ok(obj)
10502     }
10503 }
10504 #[allow(dead_code)]
10505 struct PayerDeserializer;
10506 impl PayerDeserializer {
10507     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10508     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10509         xml_util::deserialize_primitive(tag_name, stack, Ok)
10510     }
10511 }
10512 
10513 pub struct PayerSerializer;
10514 impl PayerSerializer {
10515     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10516     pub fn serialize<W>(
10517         mut writer: &mut EventWriter<W>,
10518         name: &str,
10519         obj: &String,
10520     ) -> Result<(), xml::writer::Error>
10521     where
10522         W: Write,
10523     {
10524         write_characters_element(writer, name, obj)
10525     }
10526 }
10527 
10528 #[allow(dead_code)]
10529 struct PermissionDeserializer;
10530 impl PermissionDeserializer {
10531     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10532     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10533         xml_util::deserialize_primitive(tag_name, stack, Ok)
10534     }
10535 }
10536 
10537 pub struct PermissionSerializer;
10538 impl PermissionSerializer {
10539     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10540     pub fn serialize<W>(
10541         mut writer: &mut EventWriter<W>,
10542         name: &str,
10543         obj: &String,
10544     ) -> Result<(), xml::writer::Error>
10545     where
10546         W: Write,
10547     {
10548         write_characters_element(writer, name, obj)
10549     }
10550 }
10551 
10552 /// <p>The container element for a bucket's policy status.</p>
10553 #[derive(Clone, Debug, Default, PartialEq)]
10554 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10555 pub struct PolicyStatus {
10556     /// <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>
10557     pub is_public: Option<bool>,
10558 }
10559 
10560 #[allow(dead_code)]
10561 struct PolicyStatusDeserializer;
10562 impl PolicyStatusDeserializer {
10563     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PolicyStatus, XmlParseError>10564     fn deserialize<T: Peek + Next>(
10565         tag_name: &str,
10566         stack: &mut T,
10567     ) -> Result<PolicyStatus, XmlParseError> {
10568         deserialize_elements::<_, PolicyStatus, _>(tag_name, stack, |name, stack, obj| {
10569             match name {
10570                 "IsPublic" => {
10571                     obj.is_public = Some(IsPublicDeserializer::deserialize("IsPublic", stack)?);
10572                 }
10573                 _ => skip_tree(stack),
10574             }
10575             Ok(())
10576         })
10577     }
10578 }
10579 #[allow(dead_code)]
10580 struct PrefixDeserializer;
10581 impl PrefixDeserializer {
10582     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10583     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10584         xml_util::deserialize_primitive(tag_name, stack, Ok)
10585     }
10586 }
10587 
10588 pub struct PrefixSerializer;
10589 impl PrefixSerializer {
10590     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10591     pub fn serialize<W>(
10592         mut writer: &mut EventWriter<W>,
10593         name: &str,
10594         obj: &String,
10595     ) -> Result<(), xml::writer::Error>
10596     where
10597         W: Write,
10598     {
10599         write_characters_element(writer, name, obj)
10600     }
10601 }
10602 
10603 #[allow(dead_code)]
10604 struct PriorityDeserializer;
10605 impl PriorityDeserializer {
10606     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>10607     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
10608         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
10609     }
10610 }
10611 
10612 pub struct PrioritySerializer;
10613 impl PrioritySerializer {
10614     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,10615     pub fn serialize<W>(
10616         mut writer: &mut EventWriter<W>,
10617         name: &str,
10618         obj: &i64,
10619     ) -> Result<(), xml::writer::Error>
10620     where
10621         W: Write,
10622     {
10623         write_characters_element(writer, name, &obj.to_string())
10624     }
10625 }
10626 
10627 /// <p>This data type contains information about progress of an operation.</p>
10628 #[derive(Clone, Debug, Default, PartialEq)]
10629 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10630 pub struct Progress {
10631     /// <p>The current number of uncompressed object bytes processed.</p>
10632     pub bytes_processed: Option<i64>,
10633     /// <p>The current number of bytes of records payload data returned.</p>
10634     pub bytes_returned: Option<i64>,
10635     /// <p>The current number of object bytes scanned.</p>
10636     pub bytes_scanned: Option<i64>,
10637 }
10638 
10639 #[allow(dead_code)]
10640 struct ProgressDeserializer;
10641 impl ProgressDeserializer {
10642     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Progress, XmlParseError>10643     fn deserialize<T: Peek + Next>(
10644         tag_name: &str,
10645         stack: &mut T,
10646     ) -> Result<Progress, XmlParseError> {
10647         deserialize_elements::<_, Progress, _>(tag_name, stack, |name, stack, obj| {
10648             match name {
10649                 "BytesProcessed" => {
10650                     obj.bytes_processed = Some(BytesProcessedDeserializer::deserialize(
10651                         "BytesProcessed",
10652                         stack,
10653                     )?);
10654                 }
10655                 "BytesReturned" => {
10656                     obj.bytes_returned = Some(BytesReturnedDeserializer::deserialize(
10657                         "BytesReturned",
10658                         stack,
10659                     )?);
10660                 }
10661                 "BytesScanned" => {
10662                     obj.bytes_scanned = Some(BytesScannedDeserializer::deserialize(
10663                         "BytesScanned",
10664                         stack,
10665                     )?);
10666                 }
10667                 _ => skip_tree(stack),
10668             }
10669             Ok(())
10670         })
10671     }
10672 }
10673 /// <p>This data type contains information about the progress event of an operation.</p>
10674 #[derive(Clone, Debug, Default, PartialEq)]
10675 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10676 pub struct ProgressEvent {
10677     /// <p>The Progress event details.</p>
10678     pub details: Option<Progress>,
10679 }
10680 
10681 #[allow(dead_code)]
10682 struct ProgressEventDeserializer;
10683 impl ProgressEventDeserializer {
10684     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ProgressEvent, XmlParseError>10685     fn deserialize<T: Peek + Next>(
10686         tag_name: &str,
10687         stack: &mut T,
10688     ) -> Result<ProgressEvent, XmlParseError> {
10689         deserialize_elements::<_, ProgressEvent, _>(tag_name, stack, |name, stack, obj| {
10690             match name {
10691                 "Details" => {
10692                     obj.details = Some(ProgressDeserializer::deserialize("Details", stack)?);
10693                 }
10694                 _ => skip_tree(stack),
10695             }
10696             Ok(())
10697         })
10698     }
10699 }
10700 #[allow(dead_code)]
10701 struct ProtocolDeserializer;
10702 impl ProtocolDeserializer {
10703     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>10704     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
10705         xml_util::deserialize_primitive(tag_name, stack, Ok)
10706     }
10707 }
10708 
10709 pub struct ProtocolSerializer;
10710 impl ProtocolSerializer {
10711     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,10712     pub fn serialize<W>(
10713         mut writer: &mut EventWriter<W>,
10714         name: &str,
10715         obj: &String,
10716     ) -> Result<(), xml::writer::Error>
10717     where
10718         W: Write,
10719     {
10720         write_characters_element(writer, name, obj)
10721     }
10722 }
10723 
10724 /// <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 S3 User Guide</i>. </p>
10725 #[derive(Clone, Debug, Default, PartialEq)]
10726 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
10727 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10728 pub struct PublicAccessBlockConfiguration {
10729     /// <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>
10730     pub block_public_acls: Option<bool>,
10731     /// <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>
10732     pub block_public_policy: Option<bool>,
10733     /// <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>
10734     pub ignore_public_acls: Option<bool>,
10735     /// <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 service principals 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>
10736     pub restrict_public_buckets: Option<bool>,
10737 }
10738 
10739 #[allow(dead_code)]
10740 struct PublicAccessBlockConfigurationDeserializer;
10741 impl PublicAccessBlockConfigurationDeserializer {
10742     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PublicAccessBlockConfiguration, XmlParseError>10743     fn deserialize<T: Peek + Next>(
10744         tag_name: &str,
10745         stack: &mut T,
10746     ) -> Result<PublicAccessBlockConfiguration, XmlParseError> {
10747         deserialize_elements::<_, PublicAccessBlockConfiguration, _>(
10748             tag_name,
10749             stack,
10750             |name, stack, obj| {
10751                 match name {
10752                     "BlockPublicAcls" => {
10753                         obj.block_public_acls =
10754                             Some(SettingDeserializer::deserialize("BlockPublicAcls", stack)?);
10755                     }
10756                     "BlockPublicPolicy" => {
10757                         obj.block_public_policy = Some(SettingDeserializer::deserialize(
10758                             "BlockPublicPolicy",
10759                             stack,
10760                         )?);
10761                     }
10762                     "IgnorePublicAcls" => {
10763                         obj.ignore_public_acls =
10764                             Some(SettingDeserializer::deserialize("IgnorePublicAcls", stack)?);
10765                     }
10766                     "RestrictPublicBuckets" => {
10767                         obj.restrict_public_buckets = Some(SettingDeserializer::deserialize(
10768                             "RestrictPublicBuckets",
10769                             stack,
10770                         )?);
10771                     }
10772                     _ => skip_tree(stack),
10773                 }
10774                 Ok(())
10775             },
10776         )
10777     }
10778 }
10779 
10780 pub struct PublicAccessBlockConfigurationSerializer;
10781 impl PublicAccessBlockConfigurationSerializer {
10782     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &PublicAccessBlockConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,10783     pub fn serialize<W>(
10784         mut writer: &mut EventWriter<W>,
10785         name: &str,
10786         obj: &PublicAccessBlockConfiguration,
10787     ) -> Result<(), xml::writer::Error>
10788     where
10789         W: Write,
10790     {
10791         writer.write(xml::writer::XmlEvent::start_element(name))?;
10792         if let Some(ref value) = obj.block_public_acls {
10793             write_characters_element(writer, "BlockPublicAcls", &value.to_string())?;
10794         }
10795         if let Some(ref value) = obj.block_public_policy {
10796             write_characters_element(writer, "BlockPublicPolicy", &value.to_string())?;
10797         }
10798         if let Some(ref value) = obj.ignore_public_acls {
10799             write_characters_element(writer, "IgnorePublicAcls", &value.to_string())?;
10800         }
10801         if let Some(ref value) = obj.restrict_public_buckets {
10802             write_characters_element(writer, "RestrictPublicBuckets", &value.to_string())?;
10803         }
10804         writer.write(xml::writer::XmlEvent::end_element())
10805     }
10806 }
10807 
10808 #[derive(Clone, Debug, Default, PartialEq)]
10809 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10810 pub struct PutBucketAccelerateConfigurationRequest {
10811     /// <p>Container for setting the transfer acceleration state.</p>
10812     pub accelerate_configuration: AccelerateConfiguration,
10813     /// <p>The name of the bucket for which the accelerate configuration is set.</p>
10814     pub bucket: String,
10815     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
10816     pub expected_bucket_owner: Option<String>,
10817 }
10818 
10819 #[derive(Clone, Debug, Default, PartialEq)]
10820 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10821 pub struct PutBucketAclRequest {
10822     /// <p>The canned ACL to apply to the bucket.</p>
10823     pub acl: Option<String>,
10824     /// <p>Contains the elements that set the ACL permissions for an object per grantee.</p>
10825     pub access_control_policy: Option<AccessControlPolicy>,
10826     /// <p>The bucket to which to apply the ACL.</p>
10827     pub bucket: String,
10828     /// <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> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
10829     pub content_md5: Option<String>,
10830     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
10831     pub expected_bucket_owner: Option<String>,
10832     /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p>
10833     pub grant_full_control: Option<String>,
10834     /// <p>Allows grantee to list the objects in the bucket.</p>
10835     pub grant_read: Option<String>,
10836     /// <p>Allows grantee to read the bucket ACL.</p>
10837     pub grant_read_acp: Option<String>,
10838     /// <p>Allows grantee to create new objects in the bucket.</p> <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p>
10839     pub grant_write: Option<String>,
10840     /// <p>Allows grantee to write the ACL for the applicable bucket.</p>
10841     pub grant_write_acp: Option<String>,
10842 }
10843 
10844 #[derive(Clone, Debug, Default, PartialEq)]
10845 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10846 pub struct PutBucketAnalyticsConfigurationRequest {
10847     /// <p>The configuration and any analyses for the analytics filter.</p>
10848     pub analytics_configuration: AnalyticsConfiguration,
10849     /// <p>The name of the bucket to which an analytics configuration is stored.</p>
10850     pub bucket: String,
10851     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
10852     pub expected_bucket_owner: Option<String>,
10853     /// <p>The ID that identifies the analytics configuration.</p>
10854     pub id: String,
10855 }
10856 
10857 #[derive(Clone, Debug, Default, PartialEq)]
10858 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10859 pub struct PutBucketCorsRequest {
10860     /// <p>Specifies the bucket impacted by the <code>cors</code>configuration.</p>
10861     pub bucket: String,
10862     /// <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 S3 User Guide</i>.</p>
10863     pub cors_configuration: CORSConfiguration,
10864     /// <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> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
10865     pub content_md5: Option<String>,
10866     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
10867     pub expected_bucket_owner: Option<String>,
10868 }
10869 
10870 #[derive(Clone, Debug, Default, PartialEq)]
10871 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10872 pub struct PutBucketEncryptionRequest {
10873     /// <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 S3 User Guide</i>.</p>
10874     pub bucket: String,
10875     /// <p>The base64-encoded 128-bit MD5 digest of the server-side encryption configuration.</p> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
10876     pub content_md5: Option<String>,
10877     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
10878     pub expected_bucket_owner: Option<String>,
10879     pub server_side_encryption_configuration: ServerSideEncryptionConfiguration,
10880 }
10881 
10882 #[derive(Clone, Debug, Default, PartialEq)]
10883 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10884 pub struct PutBucketIntelligentTieringConfigurationRequest {
10885     /// <p>The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.</p>
10886     pub bucket: String,
10887     /// <p>The ID used to identify the S3 Intelligent-Tiering configuration.</p>
10888     pub id: String,
10889     /// <p>Container for S3 Intelligent-Tiering configuration.</p>
10890     pub intelligent_tiering_configuration: IntelligentTieringConfiguration,
10891 }
10892 
10893 #[derive(Clone, Debug, Default, PartialEq)]
10894 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10895 pub struct PutBucketInventoryConfigurationRequest {
10896     /// <p>The name of the bucket where the inventory configuration will be stored.</p>
10897     pub bucket: String,
10898     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
10899     pub expected_bucket_owner: Option<String>,
10900     /// <p>The ID used to identify the inventory configuration.</p>
10901     pub id: String,
10902     /// <p>Specifies the inventory configuration.</p>
10903     pub inventory_configuration: InventoryConfiguration,
10904 }
10905 
10906 #[derive(Clone, Debug, Default, PartialEq)]
10907 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10908 pub struct PutBucketLifecycleConfigurationRequest {
10909     /// <p>The name of the bucket for which to set the configuration.</p>
10910     pub bucket: String,
10911     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
10912     pub expected_bucket_owner: Option<String>,
10913     /// <p>Container for lifecycle rules. You can add as many as 1,000 rules.</p>
10914     pub lifecycle_configuration: Option<BucketLifecycleConfiguration>,
10915 }
10916 
10917 #[derive(Clone, Debug, Default, PartialEq)]
10918 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10919 pub struct PutBucketLifecycleRequest {
10920     /// <p><p/></p>
10921     pub bucket: String,
10922     /// <p><p/> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p></p>
10923     pub content_md5: Option<String>,
10924     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
10925     pub expected_bucket_owner: Option<String>,
10926     /// <p><p/></p>
10927     pub lifecycle_configuration: Option<LifecycleConfiguration>,
10928 }
10929 
10930 #[derive(Clone, Debug, Default, PartialEq)]
10931 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10932 pub struct PutBucketLoggingRequest {
10933     /// <p>The name of the bucket for which to set the logging parameters.</p>
10934     pub bucket: String,
10935     /// <p>Container for logging status information.</p>
10936     pub bucket_logging_status: BucketLoggingStatus,
10937     /// <p>The MD5 hash of the <code>PutBucketLogging</code> request body.</p> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
10938     pub content_md5: Option<String>,
10939     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
10940     pub expected_bucket_owner: Option<String>,
10941 }
10942 
10943 #[derive(Clone, Debug, Default, PartialEq)]
10944 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10945 pub struct PutBucketMetricsConfigurationRequest {
10946     /// <p>The name of the bucket for which the metrics configuration is set.</p>
10947     pub bucket: String,
10948     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
10949     pub expected_bucket_owner: Option<String>,
10950     /// <p>The ID used to identify the metrics configuration.</p>
10951     pub id: String,
10952     /// <p>Specifies the metrics configuration.</p>
10953     pub metrics_configuration: MetricsConfiguration,
10954 }
10955 
10956 #[derive(Clone, Debug, Default, PartialEq)]
10957 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10958 pub struct PutBucketNotificationConfigurationRequest {
10959     /// <p>The name of the bucket.</p>
10960     pub bucket: String,
10961     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
10962     pub expected_bucket_owner: Option<String>,
10963     pub notification_configuration: NotificationConfiguration,
10964 }
10965 
10966 #[derive(Clone, Debug, Default, PartialEq)]
10967 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10968 pub struct PutBucketNotificationRequest {
10969     /// <p>The name of the bucket.</p>
10970     pub bucket: String,
10971     /// <p>The MD5 hash of the <code>PutPublicAccessBlock</code> request body.</p> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
10972     pub content_md5: Option<String>,
10973     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
10974     pub expected_bucket_owner: Option<String>,
10975     /// <p>The container for the configuration.</p>
10976     pub notification_configuration: NotificationConfigurationDeprecated,
10977 }
10978 
10979 #[derive(Clone, Debug, Default, PartialEq)]
10980 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10981 pub struct PutBucketOwnershipControlsRequest {
10982     /// <p>The name of the Amazon S3 bucket whose <code>OwnershipControls</code> you want to set.</p>
10983     pub bucket: String,
10984     /// <p>The MD5 hash of the <code>OwnershipControls</code> request body. </p> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
10985     pub content_md5: Option<String>,
10986     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
10987     pub expected_bucket_owner: Option<String>,
10988     /// <p>The <code>OwnershipControls</code> (BucketOwnerPreferred or ObjectWriter) that you want to apply to this Amazon S3 bucket.</p>
10989     pub ownership_controls: OwnershipControls,
10990 }
10991 
10992 #[derive(Clone, Debug, Default, PartialEq)]
10993 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
10994 pub struct PutBucketPolicyRequest {
10995     /// <p>The name of the bucket.</p>
10996     pub bucket: String,
10997     /// <p>Set this parameter to true to confirm that you want to remove your permissions to change this bucket policy in the future.</p>
10998     pub confirm_remove_self_bucket_access: Option<bool>,
10999     /// <p>The MD5 hash of the request body.</p> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
11000     pub content_md5: Option<String>,
11001     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
11002     pub expected_bucket_owner: Option<String>,
11003     /// <p>The bucket policy as a JSON document.</p>
11004     pub policy: String,
11005 }
11006 
11007 #[derive(Clone, Debug, Default, PartialEq)]
11008 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11009 pub struct PutBucketReplicationRequest {
11010     /// <p>The name of the bucket</p>
11011     pub bucket: String,
11012     /// <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> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
11013     pub content_md5: Option<String>,
11014     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
11015     pub expected_bucket_owner: Option<String>,
11016     pub replication_configuration: ReplicationConfiguration,
11017     /// <p>A token to allow Object Lock to be enabled for an existing bucket.</p>
11018     pub token: Option<String>,
11019 }
11020 
11021 #[derive(Clone, Debug, Default, PartialEq)]
11022 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11023 pub struct PutBucketRequestPaymentRequest {
11024     /// <p>The bucket name.</p>
11025     pub bucket: String,
11026     /// <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> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
11027     pub content_md5: Option<String>,
11028     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
11029     pub expected_bucket_owner: Option<String>,
11030     /// <p>Container for Payer.</p>
11031     pub request_payment_configuration: RequestPaymentConfiguration,
11032 }
11033 
11034 #[derive(Clone, Debug, Default, PartialEq)]
11035 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11036 pub struct PutBucketTaggingRequest {
11037     /// <p>The bucket name.</p>
11038     pub bucket: String,
11039     /// <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> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
11040     pub content_md5: Option<String>,
11041     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
11042     pub expected_bucket_owner: Option<String>,
11043     /// <p>Container for the <code>TagSet</code> and <code>Tag</code> elements.</p>
11044     pub tagging: Tagging,
11045 }
11046 
11047 #[derive(Clone, Debug, Default, PartialEq)]
11048 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11049 pub struct PutBucketVersioningRequest {
11050     /// <p>The bucket name.</p>
11051     pub bucket: String,
11052     /// <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> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
11053     pub content_md5: Option<String>,
11054     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
11055     pub expected_bucket_owner: Option<String>,
11056     /// <p>The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.</p>
11057     pub mfa: Option<String>,
11058     /// <p>Container for setting the versioning state.</p>
11059     pub versioning_configuration: VersioningConfiguration,
11060 }
11061 
11062 #[derive(Clone, Debug, Default, PartialEq)]
11063 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11064 pub struct PutBucketWebsiteRequest {
11065     /// <p>The bucket name.</p>
11066     pub bucket: String,
11067     /// <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> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
11068     pub content_md5: Option<String>,
11069     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
11070     pub expected_bucket_owner: Option<String>,
11071     /// <p>Container for the request.</p>
11072     pub website_configuration: WebsiteConfiguration,
11073 }
11074 
11075 #[derive(Clone, Debug, Default, PartialEq)]
11076 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11077 pub struct PutObjectAclOutput {
11078     pub request_charged: Option<String>,
11079 }
11080 
11081 #[allow(dead_code)]
11082 struct PutObjectAclOutputDeserializer;
11083 impl PutObjectAclOutputDeserializer {
11084     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PutObjectAclOutput, XmlParseError>11085     fn deserialize<T: Peek + Next>(
11086         tag_name: &str,
11087         stack: &mut T,
11088     ) -> Result<PutObjectAclOutput, XmlParseError> {
11089         xml_util::start_element(tag_name, stack)?;
11090 
11091         let obj = PutObjectAclOutput::default();
11092 
11093         xml_util::end_element(tag_name, stack)?;
11094 
11095         Ok(obj)
11096     }
11097 }
11098 #[derive(Clone, Debug, Default, PartialEq)]
11099 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11100 pub struct PutObjectAclRequest {
11101     /// <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>
11102     pub acl: Option<String>,
11103     /// <p>Contains the elements that set the ACL permissions for an object per grantee.</p>
11104     pub access_control_policy: Option<AccessControlPolicy>,
11105     /// <p>The bucket name that contains the object to which you want to attach the ACL. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
11106     pub bucket: String,
11107     /// <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> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
11108     pub content_md5: Option<String>,
11109     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
11110     pub expected_bucket_owner: Option<String>,
11111     /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
11112     pub grant_full_control: Option<String>,
11113     /// <p>Allows grantee to list the objects in the bucket.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
11114     pub grant_read: Option<String>,
11115     /// <p>Allows grantee to read the bucket ACL.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
11116     pub grant_read_acp: Option<String>,
11117     /// <p>Allows grantee to create new objects in the bucket.</p> <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p>
11118     pub grant_write: Option<String>,
11119     /// <p>Allows grantee to write the ACL for the applicable bucket.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
11120     pub grant_write_acp: Option<String>,
11121     /// <p>Key for which the PUT action was initiated.</p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
11122     pub key: String,
11123     pub request_payer: Option<String>,
11124     /// <p>VersionId used to reference a specific version of the object.</p>
11125     pub version_id: Option<String>,
11126 }
11127 
11128 #[derive(Clone, Debug, Default, PartialEq)]
11129 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11130 pub struct PutObjectLegalHoldOutput {
11131     pub request_charged: Option<String>,
11132 }
11133 
11134 #[allow(dead_code)]
11135 struct PutObjectLegalHoldOutputDeserializer;
11136 impl PutObjectLegalHoldOutputDeserializer {
11137     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PutObjectLegalHoldOutput, XmlParseError>11138     fn deserialize<T: Peek + Next>(
11139         tag_name: &str,
11140         stack: &mut T,
11141     ) -> Result<PutObjectLegalHoldOutput, XmlParseError> {
11142         xml_util::start_element(tag_name, stack)?;
11143 
11144         let obj = PutObjectLegalHoldOutput::default();
11145 
11146         xml_util::end_element(tag_name, stack)?;
11147 
11148         Ok(obj)
11149     }
11150 }
11151 #[derive(Clone, Debug, Default, PartialEq)]
11152 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11153 pub struct PutObjectLegalHoldRequest {
11154     /// <p>The bucket name containing the object that you want to place a Legal Hold on. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
11155     pub bucket: String,
11156     /// <p>The MD5 hash for the request body.</p> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
11157     pub content_md5: Option<String>,
11158     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
11159     pub expected_bucket_owner: Option<String>,
11160     /// <p>The key name for the object that you want to place a Legal Hold on.</p>
11161     pub key: String,
11162     /// <p>Container element for the Legal Hold configuration you want to apply to the specified object.</p>
11163     pub legal_hold: Option<ObjectLockLegalHold>,
11164     pub request_payer: Option<String>,
11165     /// <p>The version ID of the object that you want to place a Legal Hold on.</p>
11166     pub version_id: Option<String>,
11167 }
11168 
11169 #[derive(Clone, Debug, Default, PartialEq)]
11170 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11171 pub struct PutObjectLockConfigurationOutput {
11172     pub request_charged: Option<String>,
11173 }
11174 
11175 #[allow(dead_code)]
11176 struct PutObjectLockConfigurationOutputDeserializer;
11177 impl PutObjectLockConfigurationOutputDeserializer {
11178     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PutObjectLockConfigurationOutput, XmlParseError>11179     fn deserialize<T: Peek + Next>(
11180         tag_name: &str,
11181         stack: &mut T,
11182     ) -> Result<PutObjectLockConfigurationOutput, XmlParseError> {
11183         xml_util::start_element(tag_name, stack)?;
11184 
11185         let obj = PutObjectLockConfigurationOutput::default();
11186 
11187         xml_util::end_element(tag_name, stack)?;
11188 
11189         Ok(obj)
11190     }
11191 }
11192 #[derive(Clone, Debug, Default, PartialEq)]
11193 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11194 pub struct PutObjectLockConfigurationRequest {
11195     /// <p>The bucket whose Object Lock configuration you want to create or replace.</p>
11196     pub bucket: String,
11197     /// <p>The MD5 hash for the request body.</p> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
11198     pub content_md5: Option<String>,
11199     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
11200     pub expected_bucket_owner: Option<String>,
11201     /// <p>The Object Lock configuration that you want to apply to the specified bucket.</p>
11202     pub object_lock_configuration: Option<ObjectLockConfiguration>,
11203     pub request_payer: Option<String>,
11204     /// <p>A token to allow Object Lock to be enabled for an existing bucket.</p>
11205     pub token: Option<String>,
11206 }
11207 
11208 #[derive(Clone, Debug, Default, PartialEq)]
11209 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11210 pub struct PutObjectOutput {
11211     /// <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with AWS KMS (SSE-KMS).</p>
11212     pub bucket_key_enabled: Option<bool>,
11213     /// <p>Entity tag for the uploaded object.</p>
11214     pub e_tag: Option<String>,
11215     /// <p> If the expiration is configured for the object (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">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>
11216     pub expiration: Option<String>,
11217     pub request_charged: Option<String>,
11218     /// <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>
11219     pub sse_customer_algorithm: Option<String>,
11220     /// <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>
11221     pub sse_customer_key_md5: Option<String>,
11222     /// <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>
11223     pub ssekms_encryption_context: Option<String>,
11224     /// <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>
11225     pub ssekms_key_id: Option<String>,
11226     /// <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>
11227     pub server_side_encryption: Option<String>,
11228     /// <p>Version of the object.</p>
11229     pub version_id: Option<String>,
11230 }
11231 
11232 #[allow(dead_code)]
11233 struct PutObjectOutputDeserializer;
11234 impl PutObjectOutputDeserializer {
11235     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PutObjectOutput, XmlParseError>11236     fn deserialize<T: Peek + Next>(
11237         tag_name: &str,
11238         stack: &mut T,
11239     ) -> Result<PutObjectOutput, XmlParseError> {
11240         xml_util::start_element(tag_name, stack)?;
11241 
11242         let obj = PutObjectOutput::default();
11243 
11244         xml_util::end_element(tag_name, stack)?;
11245 
11246         Ok(obj)
11247     }
11248 }
11249 #[derive(Debug, Default)]
11250 pub struct PutObjectRequest {
11251     /// <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> <p>This action is not supported by Amazon S3 on Outposts.</p>
11252     pub acl: Option<String>,
11253     /// <p>Object data.</p>
11254     pub body: Option<StreamingBody>,
11255     /// <p>The bucket name to which the PUT action was initiated. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
11256     pub bucket: String,
11257     /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using AWS KMS (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p> <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p>
11258     pub bucket_key_enabled: Option<bool>,
11259     /// <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>
11260     pub cache_control: Option<String>,
11261     /// <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>
11262     pub content_disposition: Option<String>,
11263     /// <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>
11264     pub content_encoding: Option<String>,
11265     /// <p>The language the content is in.</p>
11266     pub content_language: Option<String>,
11267     /// <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>
11268     pub content_length: Option<i64>,
11269     /// <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>
11270     pub content_md5: Option<String>,
11271     /// <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>
11272     pub content_type: Option<String>,
11273     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
11274     pub expected_bucket_owner: Option<String>,
11275     /// <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>
11276     pub expires: Option<String>,
11277     /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
11278     pub grant_full_control: Option<String>,
11279     /// <p>Allows grantee to read the object data and its metadata.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
11280     pub grant_read: Option<String>,
11281     /// <p>Allows grantee to read the object ACL.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
11282     pub grant_read_acp: Option<String>,
11283     /// <p>Allows grantee to write the ACL for the applicable object.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
11284     pub grant_write_acp: Option<String>,
11285     /// <p>Object key for which the PUT action was initiated.</p>
11286     pub key: String,
11287     /// <p>A map of metadata to store with the object in S3.</p>
11288     pub metadata: Option<::std::collections::HashMap<String, String>>,
11289     /// <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>
11290     pub object_lock_legal_hold_status: Option<String>,
11291     /// <p>The Object Lock mode that you want to apply to this object.</p>
11292     pub object_lock_mode: Option<String>,
11293     /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p>
11294     pub object_lock_retain_until_date: Option<String>,
11295     pub request_payer: Option<String>,
11296     /// <p>Specifies the algorithm to use to when encrypting the object (for example, AES256).</p>
11297     pub sse_customer_algorithm: Option<String>,
11298     /// <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>
11299     pub sse_customer_key: Option<String>,
11300     /// <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>
11301     pub sse_customer_key_md5: Option<String>,
11302     /// <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>
11303     pub ssekms_encryption_context: Option<String>,
11304     /// <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. 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. If the KMS key does not exist in the same account issuing the command, you must use the full ARN and not just the ID. </p>
11305     pub ssekms_key_id: Option<String>,
11306     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
11307     pub server_side_encryption: Option<String>,
11308     /// <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. Depending on performance needs, you can specify a different Storage Class. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p>
11309     pub storage_class: Option<String>,
11310     /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p>
11311     pub tagging: Option<String>,
11312     /// <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>
11313     pub website_redirect_location: Option<String>,
11314 }
11315 
11316 #[derive(Clone, Debug, Default, PartialEq)]
11317 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11318 pub struct PutObjectRetentionOutput {
11319     pub request_charged: Option<String>,
11320 }
11321 
11322 #[allow(dead_code)]
11323 struct PutObjectRetentionOutputDeserializer;
11324 impl PutObjectRetentionOutputDeserializer {
11325     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PutObjectRetentionOutput, XmlParseError>11326     fn deserialize<T: Peek + Next>(
11327         tag_name: &str,
11328         stack: &mut T,
11329     ) -> Result<PutObjectRetentionOutput, XmlParseError> {
11330         xml_util::start_element(tag_name, stack)?;
11331 
11332         let obj = PutObjectRetentionOutput::default();
11333 
11334         xml_util::end_element(tag_name, stack)?;
11335 
11336         Ok(obj)
11337     }
11338 }
11339 #[derive(Clone, Debug, Default, PartialEq)]
11340 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11341 pub struct PutObjectRetentionRequest {
11342     /// <p>The bucket name that contains the object you want to apply this Object Retention configuration to. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
11343     pub bucket: String,
11344     /// <p>Indicates whether this action should bypass Governance-mode restrictions.</p>
11345     pub bypass_governance_retention: Option<bool>,
11346     /// <p>The MD5 hash for the request body.</p> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
11347     pub content_md5: Option<String>,
11348     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
11349     pub expected_bucket_owner: Option<String>,
11350     /// <p>The key name for the object that you want to apply this Object Retention configuration to.</p>
11351     pub key: String,
11352     pub request_payer: Option<String>,
11353     /// <p>The container element for the Object Retention configuration.</p>
11354     pub retention: Option<ObjectLockRetention>,
11355     /// <p>The version ID for the object that you want to apply this Object Retention configuration to.</p>
11356     pub version_id: Option<String>,
11357 }
11358 
11359 #[derive(Clone, Debug, Default, PartialEq)]
11360 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11361 pub struct PutObjectTaggingOutput {
11362     /// <p>The versionId of the object the tag-set was added to.</p>
11363     pub version_id: Option<String>,
11364 }
11365 
11366 #[allow(dead_code)]
11367 struct PutObjectTaggingOutputDeserializer;
11368 impl PutObjectTaggingOutputDeserializer {
11369     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<PutObjectTaggingOutput, XmlParseError>11370     fn deserialize<T: Peek + Next>(
11371         tag_name: &str,
11372         stack: &mut T,
11373     ) -> Result<PutObjectTaggingOutput, XmlParseError> {
11374         xml_util::start_element(tag_name, stack)?;
11375 
11376         let obj = PutObjectTaggingOutput::default();
11377 
11378         xml_util::end_element(tag_name, stack)?;
11379 
11380         Ok(obj)
11381     }
11382 }
11383 #[derive(Clone, Debug, Default, PartialEq)]
11384 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11385 pub struct PutObjectTaggingRequest {
11386     /// <p>The bucket name containing the object. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
11387     pub bucket: String,
11388     /// <p>The MD5 hash for the request body.</p> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
11389     pub content_md5: Option<String>,
11390     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
11391     pub expected_bucket_owner: Option<String>,
11392     /// <p>Name of the object key.</p>
11393     pub key: String,
11394     pub request_payer: Option<String>,
11395     /// <p>Container for the <code>TagSet</code> and <code>Tag</code> elements</p>
11396     pub tagging: Tagging,
11397     /// <p>The versionId of the object that the tag-set will be added to.</p>
11398     pub version_id: Option<String>,
11399 }
11400 
11401 #[derive(Clone, Debug, Default, PartialEq)]
11402 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11403 pub struct PutPublicAccessBlockRequest {
11404     /// <p>The name of the Amazon S3 bucket whose <code>PublicAccessBlock</code> configuration you want to set.</p>
11405     pub bucket: String,
11406     /// <p>The MD5 hash of the <code>PutPublicAccessBlock</code> request body. </p> <p>For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.</p>
11407     pub content_md5: Option<String>,
11408     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
11409     pub expected_bucket_owner: Option<String>,
11410     /// <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 S3 User Guide</i>.</p>
11411     pub public_access_block_configuration: PublicAccessBlockConfiguration,
11412 }
11413 
11414 #[allow(dead_code)]
11415 struct QueueArnDeserializer;
11416 impl QueueArnDeserializer {
11417     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>11418     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
11419         xml_util::deserialize_primitive(tag_name, stack, Ok)
11420     }
11421 }
11422 
11423 pub struct QueueArnSerializer;
11424 impl QueueArnSerializer {
11425     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,11426     pub fn serialize<W>(
11427         mut writer: &mut EventWriter<W>,
11428         name: &str,
11429         obj: &String,
11430     ) -> Result<(), xml::writer::Error>
11431     where
11432         W: Write,
11433     {
11434         write_characters_element(writer, name, obj)
11435     }
11436 }
11437 
11438 /// <p>Specifies the configuration for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue when Amazon S3 detects specified events.</p>
11439 #[derive(Clone, Debug, Default, PartialEq)]
11440 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11441 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11442 pub struct QueueConfiguration {
11443     /// <p>A collection of bucket events for which to send notifications</p>
11444     pub events: Vec<String>,
11445     pub filter: Option<NotificationConfigurationFilter>,
11446     pub id: Option<String>,
11447     /// <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>
11448     pub queue_arn: String,
11449 }
11450 
11451 #[allow(dead_code)]
11452 struct QueueConfigurationDeserializer;
11453 impl QueueConfigurationDeserializer {
11454     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<QueueConfiguration, XmlParseError>11455     fn deserialize<T: Peek + Next>(
11456         tag_name: &str,
11457         stack: &mut T,
11458     ) -> Result<QueueConfiguration, XmlParseError> {
11459         deserialize_elements::<_, QueueConfiguration, _>(tag_name, stack, |name, stack, obj| {
11460             match name {
11461                 "Event" => {
11462                     obj.events
11463                         .extend(EventListDeserializer::deserialize("Event", stack)?);
11464                 }
11465                 "Filter" => {
11466                     obj.filter = Some(NotificationConfigurationFilterDeserializer::deserialize(
11467                         "Filter", stack,
11468                     )?);
11469                 }
11470                 "Id" => {
11471                     obj.id = Some(NotificationIdDeserializer::deserialize("Id", stack)?);
11472                 }
11473                 "Queue" => {
11474                     obj.queue_arn = QueueArnDeserializer::deserialize("Queue", stack)?;
11475                 }
11476                 _ => skip_tree(stack),
11477             }
11478             Ok(())
11479         })
11480     }
11481 }
11482 
11483 pub struct QueueConfigurationSerializer;
11484 impl QueueConfigurationSerializer {
11485     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &QueueConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,11486     pub fn serialize<W>(
11487         mut writer: &mut EventWriter<W>,
11488         name: &str,
11489         obj: &QueueConfiguration,
11490     ) -> Result<(), xml::writer::Error>
11491     where
11492         W: Write,
11493     {
11494         writer.write(xml::writer::XmlEvent::start_element(name))?;
11495         EventListSerializer::serialize(&mut writer, "Event", &obj.events)?;
11496         if let Some(ref value) = obj.filter {
11497             &NotificationConfigurationFilterSerializer::serialize(&mut writer, "Filter", value)?;
11498         }
11499         if let Some(ref value) = obj.id {
11500             write_characters_element(writer, "Id", &value)?;
11501         }
11502         write_characters_element(writer, "Queue", &obj.queue_arn)?;
11503         writer.write(xml::writer::XmlEvent::end_element())
11504     }
11505 }
11506 
11507 /// <p>This data type is deprecated. Use <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_QueueConfiguration.html">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>
11508 #[derive(Clone, Debug, Default, PartialEq)]
11509 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11510 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11511 pub struct QueueConfigurationDeprecated {
11512     /// <p>A collection of bucket events for which to send notifications.</p>
11513     pub events: Option<Vec<String>>,
11514     pub id: Option<String>,
11515     /// <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>
11516     pub queue: Option<String>,
11517 }
11518 
11519 #[allow(dead_code)]
11520 struct QueueConfigurationDeprecatedDeserializer;
11521 impl QueueConfigurationDeprecatedDeserializer {
11522     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<QueueConfigurationDeprecated, XmlParseError>11523     fn deserialize<T: Peek + Next>(
11524         tag_name: &str,
11525         stack: &mut T,
11526     ) -> Result<QueueConfigurationDeprecated, XmlParseError> {
11527         deserialize_elements::<_, QueueConfigurationDeprecated, _>(
11528             tag_name,
11529             stack,
11530             |name, stack, obj| {
11531                 match name {
11532                     "Event" => {
11533                         obj.events
11534                             .get_or_insert(vec![])
11535                             .extend(EventListDeserializer::deserialize("Event", stack)?);
11536                     }
11537                     "Id" => {
11538                         obj.id = Some(NotificationIdDeserializer::deserialize("Id", stack)?);
11539                     }
11540                     "Queue" => {
11541                         obj.queue = Some(QueueArnDeserializer::deserialize("Queue", stack)?);
11542                     }
11543                     _ => skip_tree(stack),
11544                 }
11545                 Ok(())
11546             },
11547         )
11548     }
11549 }
11550 
11551 pub struct QueueConfigurationDeprecatedSerializer;
11552 impl QueueConfigurationDeprecatedSerializer {
11553     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &QueueConfigurationDeprecated, ) -> Result<(), xml::writer::Error> where W: Write,11554     pub fn serialize<W>(
11555         mut writer: &mut EventWriter<W>,
11556         name: &str,
11557         obj: &QueueConfigurationDeprecated,
11558     ) -> Result<(), xml::writer::Error>
11559     where
11560         W: Write,
11561     {
11562         writer.write(xml::writer::XmlEvent::start_element(name))?;
11563         if let Some(ref value) = obj.events {
11564             &EventListSerializer::serialize(&mut writer, "Event", value)?;
11565         }
11566         if let Some(ref value) = obj.id {
11567             write_characters_element(writer, "Id", &value)?;
11568         }
11569         if let Some(ref value) = obj.queue {
11570             write_characters_element(writer, "Queue", &value)?;
11571         }
11572         writer.write(xml::writer::XmlEvent::end_element())
11573     }
11574 }
11575 
11576 #[allow(dead_code)]
11577 struct QueueConfigurationListDeserializer;
11578 impl QueueConfigurationListDeserializer {
11579     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<QueueConfiguration>, XmlParseError>11580     fn deserialize<T: Peek + Next>(
11581         tag_name: &str,
11582         stack: &mut T,
11583     ) -> Result<Vec<QueueConfiguration>, XmlParseError> {
11584         let mut obj = vec![];
11585 
11586         loop {
11587             let consume_next_tag = match stack.peek() {
11588                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
11589                     name.local_name == tag_name
11590                 }
11591                 _ => false,
11592             };
11593 
11594             if consume_next_tag {
11595                 obj.push(QueueConfigurationDeserializer::deserialize(
11596                     tag_name, stack,
11597                 )?);
11598             } else {
11599                 break;
11600             }
11601         }
11602 
11603         Ok(obj)
11604     }
11605 }
11606 
11607 pub struct QueueConfigurationListSerializer;
11608 impl QueueConfigurationListSerializer {
11609     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<QueueConfiguration>, ) -> Result<(), xml::writer::Error> where W: Write,11610     pub fn serialize<W>(
11611         mut writer: &mut EventWriter<W>,
11612         name: &str,
11613         obj: &Vec<QueueConfiguration>,
11614     ) -> Result<(), xml::writer::Error>
11615     where
11616         W: Write,
11617     {
11618         for element in obj {
11619             QueueConfigurationSerializer::serialize(writer, name, element)?;
11620         }
11621         Ok(())
11622     }
11623 }
11624 
11625 pub struct QuietSerializer;
11626 impl QuietSerializer {
11627     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,11628     pub fn serialize<W>(
11629         mut writer: &mut EventWriter<W>,
11630         name: &str,
11631         obj: &bool,
11632     ) -> Result<(), xml::writer::Error>
11633     where
11634         W: Write,
11635     {
11636         write_characters_element(writer, name, &obj.to_string())
11637     }
11638 }
11639 
11640 pub struct QuoteCharacterSerializer;
11641 impl QuoteCharacterSerializer {
11642     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,11643     pub fn serialize<W>(
11644         mut writer: &mut EventWriter<W>,
11645         name: &str,
11646         obj: &String,
11647     ) -> Result<(), xml::writer::Error>
11648     where
11649         W: Write,
11650     {
11651         write_characters_element(writer, name, obj)
11652     }
11653 }
11654 
11655 pub struct QuoteEscapeCharacterSerializer;
11656 impl QuoteEscapeCharacterSerializer {
11657     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,11658     pub fn serialize<W>(
11659         mut writer: &mut EventWriter<W>,
11660         name: &str,
11661         obj: &String,
11662     ) -> Result<(), xml::writer::Error>
11663     where
11664         W: Write,
11665     {
11666         write_characters_element(writer, name, obj)
11667     }
11668 }
11669 
11670 pub struct QuoteFieldsSerializer;
11671 impl QuoteFieldsSerializer {
11672     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,11673     pub fn serialize<W>(
11674         mut writer: &mut EventWriter<W>,
11675         name: &str,
11676         obj: &String,
11677     ) -> Result<(), xml::writer::Error>
11678     where
11679         W: Write,
11680     {
11681         write_characters_element(writer, name, obj)
11682     }
11683 }
11684 
11685 pub struct RecordDelimiterSerializer;
11686 impl RecordDelimiterSerializer {
11687     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,11688     pub fn serialize<W>(
11689         mut writer: &mut EventWriter<W>,
11690         name: &str,
11691         obj: &String,
11692     ) -> Result<(), xml::writer::Error>
11693     where
11694         W: Write,
11695     {
11696         write_characters_element(writer, name, obj)
11697     }
11698 }
11699 
11700 /// <p>The container for the records event.</p>
11701 #[derive(Clone, Debug, Default, PartialEq)]
11702 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11703 pub struct RecordsEvent {
11704     /// <p>The byte array of partial, one or more result records.</p>
11705     pub payload: Option<bytes::Bytes>,
11706 }
11707 
11708 #[allow(dead_code)]
11709 struct RecordsEventDeserializer;
11710 impl RecordsEventDeserializer {
11711     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<RecordsEvent, XmlParseError>11712     fn deserialize<T: Peek + Next>(
11713         tag_name: &str,
11714         stack: &mut T,
11715     ) -> Result<RecordsEvent, XmlParseError> {
11716         deserialize_elements::<_, RecordsEvent, _>(tag_name, stack, |name, stack, obj| {
11717             match name {
11718                 "Payload" => {
11719                     obj.payload = Some(BodyDeserializer::deserialize("Payload", stack)?);
11720                 }
11721                 _ => skip_tree(stack),
11722             }
11723             Ok(())
11724         })
11725     }
11726 }
11727 /// <p>Specifies how requests are redirected. In the event of an error, you can specify a different error code to return.</p>
11728 #[derive(Clone, Debug, Default, PartialEq)]
11729 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11730 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11731 pub struct Redirect {
11732     /// <p>The host name to use in the redirect request.</p>
11733     pub host_name: Option<String>,
11734     /// <p>The HTTP redirect code to use on the response. Not required if one of the siblings is present.</p>
11735     pub http_redirect_code: Option<String>,
11736     /// <p>Protocol to use when redirecting requests. The default is the protocol that is used in the original request.</p>
11737     pub protocol: Option<String>,
11738     /// <p><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> <important> <p>Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints"> XML related object key constraints</a>.</p> </important></p>
11739     pub replace_key_prefix_with: Option<String>,
11740     /// <p><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> <important> <p>Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints"> XML related object key constraints</a>.</p> </important></p>
11741     pub replace_key_with: Option<String>,
11742 }
11743 
11744 #[allow(dead_code)]
11745 struct RedirectDeserializer;
11746 impl RedirectDeserializer {
11747     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Redirect, XmlParseError>11748     fn deserialize<T: Peek + Next>(
11749         tag_name: &str,
11750         stack: &mut T,
11751     ) -> Result<Redirect, XmlParseError> {
11752         deserialize_elements::<_, Redirect, _>(tag_name, stack, |name, stack, obj| {
11753             match name {
11754                 "HostName" => {
11755                     obj.host_name = Some(HostNameDeserializer::deserialize("HostName", stack)?);
11756                 }
11757                 "HttpRedirectCode" => {
11758                     obj.http_redirect_code = Some(HttpRedirectCodeDeserializer::deserialize(
11759                         "HttpRedirectCode",
11760                         stack,
11761                     )?);
11762                 }
11763                 "Protocol" => {
11764                     obj.protocol = Some(ProtocolDeserializer::deserialize("Protocol", stack)?);
11765                 }
11766                 "ReplaceKeyPrefixWith" => {
11767                     obj.replace_key_prefix_with =
11768                         Some(ReplaceKeyPrefixWithDeserializer::deserialize(
11769                             "ReplaceKeyPrefixWith",
11770                             stack,
11771                         )?);
11772                 }
11773                 "ReplaceKeyWith" => {
11774                     obj.replace_key_with = Some(ReplaceKeyWithDeserializer::deserialize(
11775                         "ReplaceKeyWith",
11776                         stack,
11777                     )?);
11778                 }
11779                 _ => skip_tree(stack),
11780             }
11781             Ok(())
11782         })
11783     }
11784 }
11785 
11786 pub struct RedirectSerializer;
11787 impl RedirectSerializer {
11788     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Redirect, ) -> Result<(), xml::writer::Error> where W: Write,11789     pub fn serialize<W>(
11790         mut writer: &mut EventWriter<W>,
11791         name: &str,
11792         obj: &Redirect,
11793     ) -> Result<(), xml::writer::Error>
11794     where
11795         W: Write,
11796     {
11797         writer.write(xml::writer::XmlEvent::start_element(name))?;
11798         if let Some(ref value) = obj.host_name {
11799             write_characters_element(writer, "HostName", &value)?;
11800         }
11801         if let Some(ref value) = obj.http_redirect_code {
11802             write_characters_element(writer, "HttpRedirectCode", &value)?;
11803         }
11804         if let Some(ref value) = obj.protocol {
11805             write_characters_element(writer, "Protocol", &value)?;
11806         }
11807         if let Some(ref value) = obj.replace_key_prefix_with {
11808             write_characters_element(writer, "ReplaceKeyPrefixWith", &value)?;
11809         }
11810         if let Some(ref value) = obj.replace_key_with {
11811             write_characters_element(writer, "ReplaceKeyWith", &value)?;
11812         }
11813         writer.write(xml::writer::XmlEvent::end_element())
11814     }
11815 }
11816 
11817 /// <p>Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 bucket.</p>
11818 #[derive(Clone, Debug, Default, PartialEq)]
11819 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11820 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11821 pub struct RedirectAllRequestsTo {
11822     /// <p>Name of the host where requests are redirected.</p>
11823     pub host_name: String,
11824     /// <p>Protocol to use when redirecting requests. The default is the protocol that is used in the original request.</p>
11825     pub protocol: Option<String>,
11826 }
11827 
11828 #[allow(dead_code)]
11829 struct RedirectAllRequestsToDeserializer;
11830 impl RedirectAllRequestsToDeserializer {
11831     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<RedirectAllRequestsTo, XmlParseError>11832     fn deserialize<T: Peek + Next>(
11833         tag_name: &str,
11834         stack: &mut T,
11835     ) -> Result<RedirectAllRequestsTo, XmlParseError> {
11836         deserialize_elements::<_, RedirectAllRequestsTo, _>(tag_name, stack, |name, stack, obj| {
11837             match name {
11838                 "HostName" => {
11839                     obj.host_name = HostNameDeserializer::deserialize("HostName", stack)?;
11840                 }
11841                 "Protocol" => {
11842                     obj.protocol = Some(ProtocolDeserializer::deserialize("Protocol", stack)?);
11843                 }
11844                 _ => skip_tree(stack),
11845             }
11846             Ok(())
11847         })
11848     }
11849 }
11850 
11851 pub struct RedirectAllRequestsToSerializer;
11852 impl RedirectAllRequestsToSerializer {
11853     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &RedirectAllRequestsTo, ) -> Result<(), xml::writer::Error> where W: Write,11854     pub fn serialize<W>(
11855         mut writer: &mut EventWriter<W>,
11856         name: &str,
11857         obj: &RedirectAllRequestsTo,
11858     ) -> Result<(), xml::writer::Error>
11859     where
11860         W: Write,
11861     {
11862         writer.write(xml::writer::XmlEvent::start_element(name))?;
11863         write_characters_element(writer, "HostName", &obj.host_name)?;
11864         if let Some(ref value) = obj.protocol {
11865             write_characters_element(writer, "Protocol", &value)?;
11866         }
11867         writer.write(xml::writer::XmlEvent::end_element())
11868     }
11869 }
11870 
11871 #[allow(dead_code)]
11872 struct ReplaceKeyPrefixWithDeserializer;
11873 impl ReplaceKeyPrefixWithDeserializer {
11874     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>11875     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
11876         xml_util::deserialize_primitive(tag_name, stack, Ok)
11877     }
11878 }
11879 
11880 pub struct ReplaceKeyPrefixWithSerializer;
11881 impl ReplaceKeyPrefixWithSerializer {
11882     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,11883     pub fn serialize<W>(
11884         mut writer: &mut EventWriter<W>,
11885         name: &str,
11886         obj: &String,
11887     ) -> Result<(), xml::writer::Error>
11888     where
11889         W: Write,
11890     {
11891         write_characters_element(writer, name, obj)
11892     }
11893 }
11894 
11895 #[allow(dead_code)]
11896 struct ReplaceKeyWithDeserializer;
11897 impl ReplaceKeyWithDeserializer {
11898     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>11899     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
11900         xml_util::deserialize_primitive(tag_name, stack, Ok)
11901     }
11902 }
11903 
11904 pub struct ReplaceKeyWithSerializer;
11905 impl ReplaceKeyWithSerializer {
11906     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,11907     pub fn serialize<W>(
11908         mut writer: &mut EventWriter<W>,
11909         name: &str,
11910         obj: &String,
11911     ) -> Result<(), xml::writer::Error>
11912     where
11913         W: Write,
11914     {
11915         write_characters_element(writer, name, obj)
11916     }
11917 }
11918 
11919 #[allow(dead_code)]
11920 struct ReplicaKmsKeyIDDeserializer;
11921 impl ReplicaKmsKeyIDDeserializer {
11922     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>11923     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
11924         xml_util::deserialize_primitive(tag_name, stack, Ok)
11925     }
11926 }
11927 
11928 pub struct ReplicaKmsKeyIDSerializer;
11929 impl ReplicaKmsKeyIDSerializer {
11930     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,11931     pub fn serialize<W>(
11932         mut writer: &mut EventWriter<W>,
11933         name: &str,
11934         obj: &String,
11935     ) -> Result<(), xml::writer::Error>
11936     where
11937         W: Write,
11938     {
11939         write_characters_element(writer, name, obj)
11940     }
11941 }
11942 
11943 /// <p><p>A filter that you can specify for selection for modifications on replicas. Amazon S3 doesn&#39;t replicate replica modifications by default. In the latest version of replication configuration (when <code>Filter</code> is specified), you can specify this element and set the status to <code>Enabled</code> to replicate modifications on replicas. </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, this element is not allowed.</p> </note></p>
11944 #[derive(Clone, Debug, Default, PartialEq)]
11945 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
11946 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
11947 pub struct ReplicaModifications {
11948     /// <p>Specifies whether Amazon S3 replicates modifications on replicas.</p>
11949     pub status: String,
11950 }
11951 
11952 #[allow(dead_code)]
11953 struct ReplicaModificationsDeserializer;
11954 impl ReplicaModificationsDeserializer {
11955     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ReplicaModifications, XmlParseError>11956     fn deserialize<T: Peek + Next>(
11957         tag_name: &str,
11958         stack: &mut T,
11959     ) -> Result<ReplicaModifications, XmlParseError> {
11960         deserialize_elements::<_, ReplicaModifications, _>(tag_name, stack, |name, stack, obj| {
11961             match name {
11962                 "Status" => {
11963                     obj.status =
11964                         ReplicaModificationsStatusDeserializer::deserialize("Status", stack)?;
11965                 }
11966                 _ => skip_tree(stack),
11967             }
11968             Ok(())
11969         })
11970     }
11971 }
11972 
11973 pub struct ReplicaModificationsSerializer;
11974 impl ReplicaModificationsSerializer {
11975     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ReplicaModifications, ) -> Result<(), xml::writer::Error> where W: Write,11976     pub fn serialize<W>(
11977         mut writer: &mut EventWriter<W>,
11978         name: &str,
11979         obj: &ReplicaModifications,
11980     ) -> Result<(), xml::writer::Error>
11981     where
11982         W: Write,
11983     {
11984         writer.write(xml::writer::XmlEvent::start_element(name))?;
11985         write_characters_element(writer, "Status", &obj.status)?;
11986         writer.write(xml::writer::XmlEvent::end_element())
11987     }
11988 }
11989 
11990 #[allow(dead_code)]
11991 struct ReplicaModificationsStatusDeserializer;
11992 impl ReplicaModificationsStatusDeserializer {
11993     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>11994     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
11995         xml_util::deserialize_primitive(tag_name, stack, Ok)
11996     }
11997 }
11998 
11999 pub struct ReplicaModificationsStatusSerializer;
12000 impl ReplicaModificationsStatusSerializer {
12001     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12002     pub fn serialize<W>(
12003         mut writer: &mut EventWriter<W>,
12004         name: &str,
12005         obj: &String,
12006     ) -> Result<(), xml::writer::Error>
12007     where
12008         W: Write,
12009     {
12010         write_characters_element(writer, name, obj)
12011     }
12012 }
12013 
12014 /// <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>
12015 #[derive(Clone, Debug, Default, PartialEq)]
12016 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12017 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12018 pub struct ReplicationConfiguration {
12019     /// <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 S3 User Guide</i>.</p>
12020     pub role: String,
12021     /// <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>
12022     pub rules: Vec<ReplicationRule>,
12023 }
12024 
12025 #[allow(dead_code)]
12026 struct ReplicationConfigurationDeserializer;
12027 impl ReplicationConfigurationDeserializer {
12028     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ReplicationConfiguration, XmlParseError>12029     fn deserialize<T: Peek + Next>(
12030         tag_name: &str,
12031         stack: &mut T,
12032     ) -> Result<ReplicationConfiguration, XmlParseError> {
12033         deserialize_elements::<_, ReplicationConfiguration, _>(
12034             tag_name,
12035             stack,
12036             |name, stack, obj| {
12037                 match name {
12038                     "Role" => {
12039                         obj.role = RoleDeserializer::deserialize("Role", stack)?;
12040                     }
12041                     "Rule" => {
12042                         obj.rules
12043                             .extend(ReplicationRulesDeserializer::deserialize("Rule", stack)?);
12044                     }
12045                     _ => skip_tree(stack),
12046                 }
12047                 Ok(())
12048             },
12049         )
12050     }
12051 }
12052 
12053 pub struct ReplicationConfigurationSerializer;
12054 impl ReplicationConfigurationSerializer {
12055     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ReplicationConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,12056     pub fn serialize<W>(
12057         mut writer: &mut EventWriter<W>,
12058         name: &str,
12059         obj: &ReplicationConfiguration,
12060     ) -> Result<(), xml::writer::Error>
12061     where
12062         W: Write,
12063     {
12064         writer.write(xml::writer::XmlEvent::start_element(name))?;
12065         write_characters_element(writer, "Role", &obj.role)?;
12066         ReplicationRulesSerializer::serialize(&mut writer, "Rule", &obj.rules)?;
12067         writer.write(xml::writer::XmlEvent::end_element())
12068     }
12069 }
12070 
12071 /// <p>Specifies which Amazon S3 objects to replicate and where to store the replicas.</p>
12072 #[derive(Clone, Debug, Default, PartialEq)]
12073 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12074 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12075 pub struct ReplicationRule {
12076     pub delete_marker_replication: Option<DeleteMarkerReplication>,
12077     /// <p>A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).</p>
12078     pub destination: Destination,
12079     /// <p><p/></p>
12080     pub existing_object_replication: Option<ExistingObjectReplication>,
12081     pub filter: Option<ReplicationRuleFilter>,
12082     /// <p>A unique identifier for the rule. The maximum value is 255 characters.</p>
12083     pub id: Option<String>,
12084     /// <p>The priority indicates which rule has precedence whenever two or more replication rules conflict. Amazon S3 will attempt to replicate objects according to all replication rules. However, if there are two or more rules with the same destination bucket, then objects will be replicated according to the rule with the highest priority. The higher the number, the higher the priority. </p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html">Replication</a> in the <i>Amazon S3 User Guide</i>.</p>
12085     pub priority: Option<i64>,
12086     /// <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>
12087     pub source_selection_criteria: Option<SourceSelectionCriteria>,
12088     /// <p>Specifies whether the rule is enabled.</p>
12089     pub status: String,
12090 }
12091 
12092 #[allow(dead_code)]
12093 struct ReplicationRuleDeserializer;
12094 impl ReplicationRuleDeserializer {
12095     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ReplicationRule, XmlParseError>12096     fn deserialize<T: Peek + Next>(
12097         tag_name: &str,
12098         stack: &mut T,
12099     ) -> Result<ReplicationRule, XmlParseError> {
12100         deserialize_elements::<_, ReplicationRule, _>(tag_name, stack, |name, stack, obj| {
12101             match name {
12102                 "DeleteMarkerReplication" => {
12103                     obj.delete_marker_replication =
12104                         Some(DeleteMarkerReplicationDeserializer::deserialize(
12105                             "DeleteMarkerReplication",
12106                             stack,
12107                         )?);
12108                 }
12109                 "Destination" => {
12110                     obj.destination = DestinationDeserializer::deserialize("Destination", stack)?;
12111                 }
12112                 "ExistingObjectReplication" => {
12113                     obj.existing_object_replication =
12114                         Some(ExistingObjectReplicationDeserializer::deserialize(
12115                             "ExistingObjectReplication",
12116                             stack,
12117                         )?);
12118                 }
12119                 "Filter" => {
12120                     obj.filter = Some(ReplicationRuleFilterDeserializer::deserialize(
12121                         "Filter", stack,
12122                     )?);
12123                 }
12124                 "ID" => {
12125                     obj.id = Some(IDDeserializer::deserialize("ID", stack)?);
12126                 }
12127                 "Priority" => {
12128                     obj.priority = Some(PriorityDeserializer::deserialize("Priority", stack)?);
12129                 }
12130                 "SourceSelectionCriteria" => {
12131                     obj.source_selection_criteria =
12132                         Some(SourceSelectionCriteriaDeserializer::deserialize(
12133                             "SourceSelectionCriteria",
12134                             stack,
12135                         )?);
12136                 }
12137                 "Status" => {
12138                     obj.status = ReplicationRuleStatusDeserializer::deserialize("Status", stack)?;
12139                 }
12140                 _ => skip_tree(stack),
12141             }
12142             Ok(())
12143         })
12144     }
12145 }
12146 
12147 pub struct ReplicationRuleSerializer;
12148 impl ReplicationRuleSerializer {
12149     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ReplicationRule, ) -> Result<(), xml::writer::Error> where W: Write,12150     pub fn serialize<W>(
12151         mut writer: &mut EventWriter<W>,
12152         name: &str,
12153         obj: &ReplicationRule,
12154     ) -> Result<(), xml::writer::Error>
12155     where
12156         W: Write,
12157     {
12158         writer.write(xml::writer::XmlEvent::start_element(name))?;
12159         if let Some(ref value) = obj.delete_marker_replication {
12160             &DeleteMarkerReplicationSerializer::serialize(
12161                 &mut writer,
12162                 "DeleteMarkerReplication",
12163                 value,
12164             )?;
12165         }
12166         DestinationSerializer::serialize(&mut writer, "Destination", &obj.destination)?;
12167         if let Some(ref value) = obj.existing_object_replication {
12168             &ExistingObjectReplicationSerializer::serialize(
12169                 &mut writer,
12170                 "ExistingObjectReplication",
12171                 value,
12172             )?;
12173         }
12174         if let Some(ref value) = obj.filter {
12175             &ReplicationRuleFilterSerializer::serialize(&mut writer, "Filter", value)?;
12176         }
12177         if let Some(ref value) = obj.id {
12178             write_characters_element(writer, "ID", &value)?;
12179         }
12180         if let Some(ref value) = obj.priority {
12181             write_characters_element(writer, "Priority", &value.to_string())?;
12182         }
12183         if let Some(ref value) = obj.source_selection_criteria {
12184             &SourceSelectionCriteriaSerializer::serialize(
12185                 &mut writer,
12186                 "SourceSelectionCriteria",
12187                 value,
12188             )?;
12189         }
12190         write_characters_element(writer, "Status", &obj.status)?;
12191         writer.write(xml::writer::XmlEvent::end_element())
12192     }
12193 }
12194 
12195 /// <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>
12196 #[derive(Clone, Debug, Default, PartialEq)]
12197 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12198 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12199 pub struct ReplicationRuleAndOperator {
12200     /// <p>An object key name prefix that identifies the subset of objects to which the rule applies.</p>
12201     pub prefix: Option<String>,
12202     /// <p>An array of tags containing key and value pairs.</p>
12203     pub tags: Option<Vec<Tag>>,
12204 }
12205 
12206 #[allow(dead_code)]
12207 struct ReplicationRuleAndOperatorDeserializer;
12208 impl ReplicationRuleAndOperatorDeserializer {
12209     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ReplicationRuleAndOperator, XmlParseError>12210     fn deserialize<T: Peek + Next>(
12211         tag_name: &str,
12212         stack: &mut T,
12213     ) -> Result<ReplicationRuleAndOperator, XmlParseError> {
12214         deserialize_elements::<_, ReplicationRuleAndOperator, _>(
12215             tag_name,
12216             stack,
12217             |name, stack, obj| {
12218                 match name {
12219                     "Prefix" => {
12220                         obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
12221                     }
12222                     "Tag" => {
12223                         obj.tags
12224                             .get_or_insert(vec![])
12225                             .extend(TagSetDeserializer::deserialize("Tag", stack)?);
12226                     }
12227                     _ => skip_tree(stack),
12228                 }
12229                 Ok(())
12230             },
12231         )
12232     }
12233 }
12234 
12235 pub struct ReplicationRuleAndOperatorSerializer;
12236 impl ReplicationRuleAndOperatorSerializer {
12237     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ReplicationRuleAndOperator, ) -> Result<(), xml::writer::Error> where W: Write,12238     pub fn serialize<W>(
12239         mut writer: &mut EventWriter<W>,
12240         name: &str,
12241         obj: &ReplicationRuleAndOperator,
12242     ) -> Result<(), xml::writer::Error>
12243     where
12244         W: Write,
12245     {
12246         writer.write(xml::writer::XmlEvent::start_element(name))?;
12247         if let Some(ref value) = obj.prefix {
12248             write_characters_element(writer, "Prefix", &value)?;
12249         }
12250         if let Some(ref value) = obj.tags {
12251             &TagSetSerializer::serialize(&mut writer, "Tag", value)?;
12252         }
12253         writer.write(xml::writer::XmlEvent::end_element())
12254     }
12255 }
12256 
12257 /// <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>
12258 #[derive(Clone, Debug, Default, PartialEq)]
12259 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12260 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12261 pub struct ReplicationRuleFilter {
12262     /// <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>
12263     pub and: Option<ReplicationRuleAndOperator>,
12264     /// <p><p>An object key name prefix that identifies the subset of objects to which the rule applies.</p> <important> <p>Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints"> XML related object key constraints</a>.</p> </important></p>
12265     pub prefix: Option<String>,
12266     /// <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>
12267     pub tag: Option<Tag>,
12268 }
12269 
12270 #[allow(dead_code)]
12271 struct ReplicationRuleFilterDeserializer;
12272 impl ReplicationRuleFilterDeserializer {
12273     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ReplicationRuleFilter, XmlParseError>12274     fn deserialize<T: Peek + Next>(
12275         tag_name: &str,
12276         stack: &mut T,
12277     ) -> Result<ReplicationRuleFilter, XmlParseError> {
12278         deserialize_elements::<_, ReplicationRuleFilter, _>(tag_name, stack, |name, stack, obj| {
12279             match name {
12280                 "And" => {
12281                     obj.and = Some(ReplicationRuleAndOperatorDeserializer::deserialize(
12282                         "And", stack,
12283                     )?);
12284                 }
12285                 "Prefix" => {
12286                     obj.prefix = Some(PrefixDeserializer::deserialize("Prefix", stack)?);
12287                 }
12288                 "Tag" => {
12289                     obj.tag = Some(TagDeserializer::deserialize("Tag", stack)?);
12290                 }
12291                 _ => skip_tree(stack),
12292             }
12293             Ok(())
12294         })
12295     }
12296 }
12297 
12298 pub struct ReplicationRuleFilterSerializer;
12299 impl ReplicationRuleFilterSerializer {
12300     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ReplicationRuleFilter, ) -> Result<(), xml::writer::Error> where W: Write,12301     pub fn serialize<W>(
12302         mut writer: &mut EventWriter<W>,
12303         name: &str,
12304         obj: &ReplicationRuleFilter,
12305     ) -> Result<(), xml::writer::Error>
12306     where
12307         W: Write,
12308     {
12309         writer.write(xml::writer::XmlEvent::start_element(name))?;
12310         if let Some(ref value) = obj.and {
12311             &ReplicationRuleAndOperatorSerializer::serialize(&mut writer, "And", value)?;
12312         }
12313         if let Some(ref value) = obj.prefix {
12314             write_characters_element(writer, "Prefix", &value)?;
12315         }
12316         if let Some(ref value) = obj.tag {
12317             &TagSerializer::serialize(&mut writer, "Tag", value)?;
12318         }
12319         writer.write(xml::writer::XmlEvent::end_element())
12320     }
12321 }
12322 
12323 #[allow(dead_code)]
12324 struct ReplicationRuleStatusDeserializer;
12325 impl ReplicationRuleStatusDeserializer {
12326     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>12327     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
12328         xml_util::deserialize_primitive(tag_name, stack, Ok)
12329     }
12330 }
12331 
12332 pub struct ReplicationRuleStatusSerializer;
12333 impl ReplicationRuleStatusSerializer {
12334     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12335     pub fn serialize<W>(
12336         mut writer: &mut EventWriter<W>,
12337         name: &str,
12338         obj: &String,
12339     ) -> Result<(), xml::writer::Error>
12340     where
12341         W: Write,
12342     {
12343         write_characters_element(writer, name, obj)
12344     }
12345 }
12346 
12347 #[allow(dead_code)]
12348 struct ReplicationRulesDeserializer;
12349 impl ReplicationRulesDeserializer {
12350     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<ReplicationRule>, XmlParseError>12351     fn deserialize<T: Peek + Next>(
12352         tag_name: &str,
12353         stack: &mut T,
12354     ) -> Result<Vec<ReplicationRule>, XmlParseError> {
12355         let mut obj = vec![];
12356 
12357         loop {
12358             let consume_next_tag = match stack.peek() {
12359                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
12360                     name.local_name == tag_name
12361                 }
12362                 _ => false,
12363             };
12364 
12365             if consume_next_tag {
12366                 obj.push(ReplicationRuleDeserializer::deserialize(tag_name, stack)?);
12367             } else {
12368                 break;
12369             }
12370         }
12371 
12372         Ok(obj)
12373     }
12374 }
12375 
12376 pub struct ReplicationRulesSerializer;
12377 impl ReplicationRulesSerializer {
12378     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<ReplicationRule>, ) -> Result<(), xml::writer::Error> where W: Write,12379     pub fn serialize<W>(
12380         mut writer: &mut EventWriter<W>,
12381         name: &str,
12382         obj: &Vec<ReplicationRule>,
12383     ) -> Result<(), xml::writer::Error>
12384     where
12385         W: Write,
12386     {
12387         for element in obj {
12388             ReplicationRuleSerializer::serialize(writer, name, element)?;
12389         }
12390         Ok(())
12391     }
12392 }
12393 
12394 /// <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>
12395 #[derive(Clone, Debug, Default, PartialEq)]
12396 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12397 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12398 pub struct ReplicationTime {
12399     /// <p> Specifies whether the replication time is enabled. </p>
12400     pub status: String,
12401     /// <p> A container specifying the time by which replication should be complete for all objects and operations on objects. </p>
12402     pub time: ReplicationTimeValue,
12403 }
12404 
12405 #[allow(dead_code)]
12406 struct ReplicationTimeDeserializer;
12407 impl ReplicationTimeDeserializer {
12408     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ReplicationTime, XmlParseError>12409     fn deserialize<T: Peek + Next>(
12410         tag_name: &str,
12411         stack: &mut T,
12412     ) -> Result<ReplicationTime, XmlParseError> {
12413         deserialize_elements::<_, ReplicationTime, _>(tag_name, stack, |name, stack, obj| {
12414             match name {
12415                 "Status" => {
12416                     obj.status = ReplicationTimeStatusDeserializer::deserialize("Status", stack)?;
12417                 }
12418                 "Time" => {
12419                     obj.time = ReplicationTimeValueDeserializer::deserialize("Time", stack)?;
12420                 }
12421                 _ => skip_tree(stack),
12422             }
12423             Ok(())
12424         })
12425     }
12426 }
12427 
12428 pub struct ReplicationTimeSerializer;
12429 impl ReplicationTimeSerializer {
12430     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ReplicationTime, ) -> Result<(), xml::writer::Error> where W: Write,12431     pub fn serialize<W>(
12432         mut writer: &mut EventWriter<W>,
12433         name: &str,
12434         obj: &ReplicationTime,
12435     ) -> Result<(), xml::writer::Error>
12436     where
12437         W: Write,
12438     {
12439         writer.write(xml::writer::XmlEvent::start_element(name))?;
12440         write_characters_element(writer, "Status", &obj.status)?;
12441         ReplicationTimeValueSerializer::serialize(&mut writer, "Time", &obj.time)?;
12442         writer.write(xml::writer::XmlEvent::end_element())
12443     }
12444 }
12445 
12446 #[allow(dead_code)]
12447 struct ReplicationTimeStatusDeserializer;
12448 impl ReplicationTimeStatusDeserializer {
12449     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>12450     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
12451         xml_util::deserialize_primitive(tag_name, stack, Ok)
12452     }
12453 }
12454 
12455 pub struct ReplicationTimeStatusSerializer;
12456 impl ReplicationTimeStatusSerializer {
12457     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12458     pub fn serialize<W>(
12459         mut writer: &mut EventWriter<W>,
12460         name: &str,
12461         obj: &String,
12462     ) -> Result<(), xml::writer::Error>
12463     where
12464         W: Write,
12465     {
12466         write_characters_element(writer, name, obj)
12467     }
12468 }
12469 
12470 /// <p> A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics <code>EventThreshold</code>. </p>
12471 #[derive(Clone, Debug, Default, PartialEq)]
12472 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12473 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12474 pub struct ReplicationTimeValue {
12475     /// <p> Contains an integer specifying time in minutes. </p> <p> Valid values: 15 minutes. </p>
12476     pub minutes: Option<i64>,
12477 }
12478 
12479 #[allow(dead_code)]
12480 struct ReplicationTimeValueDeserializer;
12481 impl ReplicationTimeValueDeserializer {
12482     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ReplicationTimeValue, XmlParseError>12483     fn deserialize<T: Peek + Next>(
12484         tag_name: &str,
12485         stack: &mut T,
12486     ) -> Result<ReplicationTimeValue, XmlParseError> {
12487         deserialize_elements::<_, ReplicationTimeValue, _>(tag_name, stack, |name, stack, obj| {
12488             match name {
12489                 "Minutes" => {
12490                     obj.minutes = Some(MinutesDeserializer::deserialize("Minutes", stack)?);
12491                 }
12492                 _ => skip_tree(stack),
12493             }
12494             Ok(())
12495         })
12496     }
12497 }
12498 
12499 pub struct ReplicationTimeValueSerializer;
12500 impl ReplicationTimeValueSerializer {
12501     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ReplicationTimeValue, ) -> Result<(), xml::writer::Error> where W: Write,12502     pub fn serialize<W>(
12503         mut writer: &mut EventWriter<W>,
12504         name: &str,
12505         obj: &ReplicationTimeValue,
12506     ) -> Result<(), xml::writer::Error>
12507     where
12508         W: Write,
12509     {
12510         writer.write(xml::writer::XmlEvent::start_element(name))?;
12511         if let Some(ref value) = obj.minutes {
12512             write_characters_element(writer, "Minutes", &value.to_string())?;
12513         }
12514         writer.write(xml::writer::XmlEvent::end_element())
12515     }
12516 }
12517 
12518 /// <p>Container for Payer.</p>
12519 #[derive(Clone, Debug, Default, PartialEq)]
12520 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12521 pub struct RequestPaymentConfiguration {
12522     /// <p>Specifies who pays for the download and request fees.</p>
12523     pub payer: String,
12524 }
12525 
12526 pub struct RequestPaymentConfigurationSerializer;
12527 impl RequestPaymentConfigurationSerializer {
12528     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &RequestPaymentConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,12529     pub fn serialize<W>(
12530         mut writer: &mut EventWriter<W>,
12531         name: &str,
12532         obj: &RequestPaymentConfiguration,
12533     ) -> Result<(), xml::writer::Error>
12534     where
12535         W: Write,
12536     {
12537         writer.write(xml::writer::XmlEvent::start_element(name))?;
12538         write_characters_element(writer, "Payer", &obj.payer)?;
12539         writer.write(xml::writer::XmlEvent::end_element())
12540     }
12541 }
12542 
12543 /// <p>Container for specifying if periodic <code>QueryProgress</code> messages should be sent.</p>
12544 #[derive(Clone, Debug, Default, PartialEq)]
12545 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12546 pub struct RequestProgress {
12547     /// <p>Specifies whether periodic QueryProgress frames should be sent. Valid values: TRUE, FALSE. Default value: FALSE.</p>
12548     pub enabled: Option<bool>,
12549 }
12550 
12551 pub struct RequestProgressSerializer;
12552 impl RequestProgressSerializer {
12553     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &RequestProgress, ) -> Result<(), xml::writer::Error> where W: Write,12554     pub fn serialize<W>(
12555         mut writer: &mut EventWriter<W>,
12556         name: &str,
12557         obj: &RequestProgress,
12558     ) -> Result<(), xml::writer::Error>
12559     where
12560         W: Write,
12561     {
12562         writer.write(xml::writer::XmlEvent::start_element(name))?;
12563         if let Some(ref value) = obj.enabled {
12564             write_characters_element(writer, "Enabled", &value.to_string())?;
12565         }
12566         writer.write(xml::writer::XmlEvent::end_element())
12567     }
12568 }
12569 
12570 pub struct ResponseCacheControlSerializer;
12571 impl ResponseCacheControlSerializer {
12572     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12573     pub fn serialize<W>(
12574         mut writer: &mut EventWriter<W>,
12575         name: &str,
12576         obj: &String,
12577     ) -> Result<(), xml::writer::Error>
12578     where
12579         W: Write,
12580     {
12581         write_characters_element(writer, name, obj)
12582     }
12583 }
12584 
12585 pub struct ResponseContentDispositionSerializer;
12586 impl ResponseContentDispositionSerializer {
12587     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12588     pub fn serialize<W>(
12589         mut writer: &mut EventWriter<W>,
12590         name: &str,
12591         obj: &String,
12592     ) -> Result<(), xml::writer::Error>
12593     where
12594         W: Write,
12595     {
12596         write_characters_element(writer, name, obj)
12597     }
12598 }
12599 
12600 pub struct ResponseContentEncodingSerializer;
12601 impl ResponseContentEncodingSerializer {
12602     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12603     pub fn serialize<W>(
12604         mut writer: &mut EventWriter<W>,
12605         name: &str,
12606         obj: &String,
12607     ) -> Result<(), xml::writer::Error>
12608     where
12609         W: Write,
12610     {
12611         write_characters_element(writer, name, obj)
12612     }
12613 }
12614 
12615 pub struct ResponseContentLanguageSerializer;
12616 impl ResponseContentLanguageSerializer {
12617     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12618     pub fn serialize<W>(
12619         mut writer: &mut EventWriter<W>,
12620         name: &str,
12621         obj: &String,
12622     ) -> Result<(), xml::writer::Error>
12623     where
12624         W: Write,
12625     {
12626         write_characters_element(writer, name, obj)
12627     }
12628 }
12629 
12630 pub struct ResponseContentTypeSerializer;
12631 impl ResponseContentTypeSerializer {
12632     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12633     pub fn serialize<W>(
12634         mut writer: &mut EventWriter<W>,
12635         name: &str,
12636         obj: &String,
12637     ) -> Result<(), xml::writer::Error>
12638     where
12639         W: Write,
12640     {
12641         write_characters_element(writer, name, obj)
12642     }
12643 }
12644 
12645 pub struct ResponseExpiresSerializer;
12646 impl ResponseExpiresSerializer {
12647     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12648     pub fn serialize<W>(
12649         mut writer: &mut EventWriter<W>,
12650         name: &str,
12651         obj: &String,
12652     ) -> Result<(), xml::writer::Error>
12653     where
12654         W: Write,
12655     {
12656         write_characters_element(writer, name, obj)
12657     }
12658 }
12659 
12660 #[derive(Clone, Debug, Default, PartialEq)]
12661 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12662 pub struct RestoreObjectOutput {
12663     pub request_charged: Option<String>,
12664     /// <p>Indicates the path in the provided S3 output location where Select results will be restored to.</p>
12665     pub restore_output_path: Option<String>,
12666 }
12667 
12668 #[allow(dead_code)]
12669 struct RestoreObjectOutputDeserializer;
12670 impl RestoreObjectOutputDeserializer {
12671     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<RestoreObjectOutput, XmlParseError>12672     fn deserialize<T: Peek + Next>(
12673         tag_name: &str,
12674         stack: &mut T,
12675     ) -> Result<RestoreObjectOutput, XmlParseError> {
12676         xml_util::start_element(tag_name, stack)?;
12677 
12678         let obj = RestoreObjectOutput::default();
12679 
12680         xml_util::end_element(tag_name, stack)?;
12681 
12682         Ok(obj)
12683     }
12684 }
12685 #[derive(Clone, Debug, Default, PartialEq)]
12686 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12687 pub struct RestoreObjectRequest {
12688     /// <p>The bucket name containing the object to restore. </p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
12689     pub bucket: String,
12690     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
12691     pub expected_bucket_owner: Option<String>,
12692     /// <p>Object key for which the action was initiated.</p>
12693     pub key: String,
12694     pub request_payer: Option<String>,
12695     pub restore_request: Option<RestoreRequest>,
12696     /// <p>VersionId used to reference a specific version of the object.</p>
12697     pub version_id: Option<String>,
12698 }
12699 
12700 /// <p>Container for restore job parameters.</p>
12701 #[derive(Clone, Debug, Default, PartialEq)]
12702 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12703 pub struct RestoreRequest {
12704     /// <p>Lifetime of the active copy in days. Do not use with restores that specify <code>OutputLocation</code>.</p> <p>The Days element is required for regular restores, and must not be provided for select requests.</p>
12705     pub days: Option<i64>,
12706     /// <p>The optional description for the job.</p>
12707     pub description: Option<String>,
12708     /// <p>S3 Glacier related parameters pertaining to this job. Do not use with restores that specify <code>OutputLocation</code>.</p>
12709     pub glacier_job_parameters: Option<GlacierJobParameters>,
12710     /// <p>Describes the location where the restore job's output is stored.</p>
12711     pub output_location: Option<OutputLocation>,
12712     /// <p>Describes the parameters for Select job types.</p>
12713     pub select_parameters: Option<SelectParameters>,
12714     /// <p>Retrieval tier at which the restore will be processed.</p>
12715     pub tier: Option<String>,
12716     /// <p>Type of restore request.</p>
12717     pub type_: Option<String>,
12718 }
12719 
12720 pub struct RestoreRequestSerializer;
12721 impl RestoreRequestSerializer {
12722     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &RestoreRequest, ) -> Result<(), xml::writer::Error> where W: Write,12723     pub fn serialize<W>(
12724         mut writer: &mut EventWriter<W>,
12725         name: &str,
12726         obj: &RestoreRequest,
12727     ) -> Result<(), xml::writer::Error>
12728     where
12729         W: Write,
12730     {
12731         writer.write(xml::writer::XmlEvent::start_element(name))?;
12732         if let Some(ref value) = obj.days {
12733             write_characters_element(writer, "Days", &value.to_string())?;
12734         }
12735         if let Some(ref value) = obj.description {
12736             write_characters_element(writer, "Description", &value)?;
12737         }
12738         if let Some(ref value) = obj.glacier_job_parameters {
12739             &GlacierJobParametersSerializer::serialize(&mut writer, "GlacierJobParameters", value)?;
12740         }
12741         if let Some(ref value) = obj.output_location {
12742             &OutputLocationSerializer::serialize(&mut writer, "OutputLocation", value)?;
12743         }
12744         if let Some(ref value) = obj.select_parameters {
12745             &SelectParametersSerializer::serialize(&mut writer, "SelectParameters", value)?;
12746         }
12747         if let Some(ref value) = obj.tier {
12748             write_characters_element(writer, "Tier", &value)?;
12749         }
12750         if let Some(ref value) = obj.type_ {
12751             write_characters_element(writer, "Type", &value)?;
12752         }
12753         writer.write(xml::writer::XmlEvent::end_element())
12754     }
12755 }
12756 
12757 pub struct RestoreRequestTypeSerializer;
12758 impl RestoreRequestTypeSerializer {
12759     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12760     pub fn serialize<W>(
12761         mut writer: &mut EventWriter<W>,
12762         name: &str,
12763         obj: &String,
12764     ) -> Result<(), xml::writer::Error>
12765     where
12766         W: Write,
12767     {
12768         write_characters_element(writer, name, obj)
12769     }
12770 }
12771 
12772 #[allow(dead_code)]
12773 struct RoleDeserializer;
12774 impl RoleDeserializer {
12775     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>12776     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
12777         xml_util::deserialize_primitive(tag_name, stack, Ok)
12778     }
12779 }
12780 
12781 pub struct RoleSerializer;
12782 impl RoleSerializer {
12783     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,12784     pub fn serialize<W>(
12785         mut writer: &mut EventWriter<W>,
12786         name: &str,
12787         obj: &String,
12788     ) -> Result<(), xml::writer::Error>
12789     where
12790         W: Write,
12791     {
12792         write_characters_element(writer, name, obj)
12793     }
12794 }
12795 
12796 /// <p>Specifies the redirect behavior and when a redirect is applied. For more information about routing rules, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html#advanced-conditional-redirects">Configuring advanced conditional redirects</a> in the <i>Amazon S3 User Guide</i>.</p>
12797 #[derive(Clone, Debug, Default, PartialEq)]
12798 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12799 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12800 pub struct RoutingRule {
12801     /// <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>
12802     pub condition: Option<Condition>,
12803     /// <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>
12804     pub redirect: Redirect,
12805 }
12806 
12807 #[allow(dead_code)]
12808 struct RoutingRuleDeserializer;
12809 impl RoutingRuleDeserializer {
12810     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<RoutingRule, XmlParseError>12811     fn deserialize<T: Peek + Next>(
12812         tag_name: &str,
12813         stack: &mut T,
12814     ) -> Result<RoutingRule, XmlParseError> {
12815         deserialize_elements::<_, RoutingRule, _>(tag_name, stack, |name, stack, obj| {
12816             match name {
12817                 "Condition" => {
12818                     obj.condition = Some(ConditionDeserializer::deserialize("Condition", stack)?);
12819                 }
12820                 "Redirect" => {
12821                     obj.redirect = RedirectDeserializer::deserialize("Redirect", stack)?;
12822                 }
12823                 _ => skip_tree(stack),
12824             }
12825             Ok(())
12826         })
12827     }
12828 }
12829 
12830 pub struct RoutingRuleSerializer;
12831 impl RoutingRuleSerializer {
12832     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &RoutingRule, ) -> Result<(), xml::writer::Error> where W: Write,12833     pub fn serialize<W>(
12834         mut writer: &mut EventWriter<W>,
12835         name: &str,
12836         obj: &RoutingRule,
12837     ) -> Result<(), xml::writer::Error>
12838     where
12839         W: Write,
12840     {
12841         writer.write(xml::writer::XmlEvent::start_element(name))?;
12842         if let Some(ref value) = obj.condition {
12843             &ConditionSerializer::serialize(&mut writer, "Condition", value)?;
12844         }
12845         RedirectSerializer::serialize(&mut writer, "Redirect", &obj.redirect)?;
12846         writer.write(xml::writer::XmlEvent::end_element())
12847     }
12848 }
12849 
12850 #[allow(dead_code)]
12851 struct RoutingRulesDeserializer;
12852 impl RoutingRulesDeserializer {
12853     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<RoutingRule>, XmlParseError>12854     fn deserialize<T: Peek + Next>(
12855         tag_name: &str,
12856         stack: &mut T,
12857     ) -> Result<Vec<RoutingRule>, XmlParseError> {
12858         deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
12859             if name == "RoutingRule" {
12860                 obj.push(RoutingRuleDeserializer::deserialize("RoutingRule", stack)?);
12861             } else {
12862                 skip_tree(stack);
12863             }
12864             Ok(())
12865         })
12866     }
12867 }
12868 
12869 pub struct RoutingRulesSerializer;
12870 impl RoutingRulesSerializer {
12871     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<RoutingRule>, ) -> Result<(), xml::writer::Error> where W: Write,12872     pub fn serialize<W>(
12873         mut writer: &mut EventWriter<W>,
12874         name: &str,
12875         obj: &Vec<RoutingRule>,
12876     ) -> Result<(), xml::writer::Error>
12877     where
12878         W: Write,
12879     {
12880         writer.write(xml::writer::XmlEvent::start_element(name))?;
12881         for element in obj {
12882             RoutingRuleSerializer::serialize(writer, "RoutingRule", element)?;
12883         }
12884         writer.write(xml::writer::XmlEvent::end_element())?;
12885         Ok(())
12886     }
12887 }
12888 
12889 /// <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 Configuration</a> in the <i>Amazon S3 API Reference</i>. For examples, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html#API_PutBucketLifecycleConfiguration_Examples">Put Bucket Lifecycle Configuration Examples</a>.</p>
12890 #[derive(Clone, Debug, Default, PartialEq)]
12891 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
12892 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
12893 pub struct Rule {
12894     pub abort_incomplete_multipart_upload: Option<AbortIncompleteMultipartUpload>,
12895     /// <p>Specifies the expiration for the lifecycle of the object.</p>
12896     pub expiration: Option<LifecycleExpiration>,
12897     /// <p>Unique identifier for the rule. The value can't be longer than 255 characters.</p>
12898     pub id: Option<String>,
12899     pub noncurrent_version_expiration: Option<NoncurrentVersionExpiration>,
12900     pub noncurrent_version_transition: Option<NoncurrentVersionTransition>,
12901     /// <p><p>Object key prefix that identifies one or more objects to which this rule applies.</p> <important> <p>Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints"> XML related object key constraints</a>.</p> </important></p>
12902     pub prefix: String,
12903     /// <p>If <code>Enabled</code>, the rule is currently being applied. If <code>Disabled</code>, the rule is not currently being applied.</p>
12904     pub status: String,
12905     /// <p>Specifies when an object transitions to a specified storage class. For more information about Amazon S3 lifecycle configuration rules, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html">Transitioning Objects Using Amazon S3 Lifecycle</a> in the <i>Amazon S3 User Guide</i>.</p>
12906     pub transition: Option<Transition>,
12907 }
12908 
12909 #[allow(dead_code)]
12910 struct RuleDeserializer;
12911 impl RuleDeserializer {
12912     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Rule, XmlParseError>12913     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Rule, XmlParseError> {
12914         deserialize_elements::<_, Rule, _>(tag_name, stack, |name, stack, obj| {
12915             match name {
12916                 "AbortIncompleteMultipartUpload" => {
12917                     obj.abort_incomplete_multipart_upload =
12918                         Some(AbortIncompleteMultipartUploadDeserializer::deserialize(
12919                             "AbortIncompleteMultipartUpload",
12920                             stack,
12921                         )?);
12922                 }
12923                 "Expiration" => {
12924                     obj.expiration = Some(LifecycleExpirationDeserializer::deserialize(
12925                         "Expiration",
12926                         stack,
12927                     )?);
12928                 }
12929                 "ID" => {
12930                     obj.id = Some(IDDeserializer::deserialize("ID", stack)?);
12931                 }
12932                 "NoncurrentVersionExpiration" => {
12933                     obj.noncurrent_version_expiration =
12934                         Some(NoncurrentVersionExpirationDeserializer::deserialize(
12935                             "NoncurrentVersionExpiration",
12936                             stack,
12937                         )?);
12938                 }
12939                 "NoncurrentVersionTransition" => {
12940                     obj.noncurrent_version_transition =
12941                         Some(NoncurrentVersionTransitionDeserializer::deserialize(
12942                             "NoncurrentVersionTransition",
12943                             stack,
12944                         )?);
12945                 }
12946                 "Prefix" => {
12947                     obj.prefix = PrefixDeserializer::deserialize("Prefix", stack)?;
12948                 }
12949                 "Status" => {
12950                     obj.status = ExpirationStatusDeserializer::deserialize("Status", stack)?;
12951                 }
12952                 "Transition" => {
12953                     obj.transition =
12954                         Some(TransitionDeserializer::deserialize("Transition", stack)?);
12955                 }
12956                 _ => skip_tree(stack),
12957             }
12958             Ok(())
12959         })
12960     }
12961 }
12962 
12963 pub struct RuleSerializer;
12964 impl RuleSerializer {
12965     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Rule, ) -> Result<(), xml::writer::Error> where W: Write,12966     pub fn serialize<W>(
12967         mut writer: &mut EventWriter<W>,
12968         name: &str,
12969         obj: &Rule,
12970     ) -> Result<(), xml::writer::Error>
12971     where
12972         W: Write,
12973     {
12974         writer.write(xml::writer::XmlEvent::start_element(name))?;
12975         if let Some(ref value) = obj.abort_incomplete_multipart_upload {
12976             &AbortIncompleteMultipartUploadSerializer::serialize(
12977                 &mut writer,
12978                 "AbortIncompleteMultipartUpload",
12979                 value,
12980             )?;
12981         }
12982         if let Some(ref value) = obj.expiration {
12983             &LifecycleExpirationSerializer::serialize(&mut writer, "Expiration", value)?;
12984         }
12985         if let Some(ref value) = obj.id {
12986             write_characters_element(writer, "ID", &value)?;
12987         }
12988         if let Some(ref value) = obj.noncurrent_version_expiration {
12989             &NoncurrentVersionExpirationSerializer::serialize(
12990                 &mut writer,
12991                 "NoncurrentVersionExpiration",
12992                 value,
12993             )?;
12994         }
12995         if let Some(ref value) = obj.noncurrent_version_transition {
12996             &NoncurrentVersionTransitionSerializer::serialize(
12997                 &mut writer,
12998                 "NoncurrentVersionTransition",
12999                 value,
13000             )?;
13001         }
13002         write_characters_element(writer, "Prefix", &obj.prefix)?;
13003         write_characters_element(writer, "Status", &obj.status)?;
13004         if let Some(ref value) = obj.transition {
13005             &TransitionSerializer::serialize(&mut writer, "Transition", value)?;
13006         }
13007         writer.write(xml::writer::XmlEvent::end_element())
13008     }
13009 }
13010 
13011 #[allow(dead_code)]
13012 struct RulesDeserializer;
13013 impl RulesDeserializer {
13014     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Rule>, XmlParseError>13015     fn deserialize<T: Peek + Next>(
13016         tag_name: &str,
13017         stack: &mut T,
13018     ) -> Result<Vec<Rule>, XmlParseError> {
13019         let mut obj = vec![];
13020 
13021         loop {
13022             let consume_next_tag = match stack.peek() {
13023                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
13024                     name.local_name == tag_name
13025                 }
13026                 _ => false,
13027             };
13028 
13029             if consume_next_tag {
13030                 obj.push(RuleDeserializer::deserialize(tag_name, stack)?);
13031             } else {
13032                 break;
13033             }
13034         }
13035 
13036         Ok(obj)
13037     }
13038 }
13039 
13040 pub struct RulesSerializer;
13041 impl RulesSerializer {
13042     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<Rule>, ) -> Result<(), xml::writer::Error> where W: Write,13043     pub fn serialize<W>(
13044         mut writer: &mut EventWriter<W>,
13045         name: &str,
13046         obj: &Vec<Rule>,
13047     ) -> Result<(), xml::writer::Error>
13048     where
13049         W: Write,
13050     {
13051         for element in obj {
13052             RuleSerializer::serialize(writer, name, element)?;
13053         }
13054         Ok(())
13055     }
13056 }
13057 
13058 /// <p>A container for object key name prefix and suffix filtering rules.</p>
13059 #[derive(Clone, Debug, Default, PartialEq)]
13060 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13061 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13062 pub struct S3KeyFilter {
13063     pub filter_rules: Option<Vec<FilterRule>>,
13064 }
13065 
13066 #[allow(dead_code)]
13067 struct S3KeyFilterDeserializer;
13068 impl S3KeyFilterDeserializer {
13069     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<S3KeyFilter, XmlParseError>13070     fn deserialize<T: Peek + Next>(
13071         tag_name: &str,
13072         stack: &mut T,
13073     ) -> Result<S3KeyFilter, XmlParseError> {
13074         deserialize_elements::<_, S3KeyFilter, _>(tag_name, stack, |name, stack, obj| {
13075             match name {
13076                 "FilterRule" => {
13077                     obj.filter_rules.get_or_insert(vec![]).extend(
13078                         FilterRuleListDeserializer::deserialize("FilterRule", stack)?,
13079                     );
13080                 }
13081                 _ => skip_tree(stack),
13082             }
13083             Ok(())
13084         })
13085     }
13086 }
13087 
13088 pub struct S3KeyFilterSerializer;
13089 impl S3KeyFilterSerializer {
13090     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &S3KeyFilter, ) -> Result<(), xml::writer::Error> where W: Write,13091     pub fn serialize<W>(
13092         mut writer: &mut EventWriter<W>,
13093         name: &str,
13094         obj: &S3KeyFilter,
13095     ) -> Result<(), xml::writer::Error>
13096     where
13097         W: Write,
13098     {
13099         writer.write(xml::writer::XmlEvent::start_element(name))?;
13100         if let Some(ref value) = obj.filter_rules {
13101             &FilterRuleListSerializer::serialize(&mut writer, "FilterRule", value)?;
13102         }
13103         writer.write(xml::writer::XmlEvent::end_element())
13104     }
13105 }
13106 
13107 /// <p>Describes an Amazon S3 location that will receive the results of the restore request.</p>
13108 #[derive(Clone, Debug, Default, PartialEq)]
13109 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13110 pub struct S3Location {
13111     /// <p>A list of grants that control access to the staged results.</p>
13112     pub access_control_list: Option<Vec<Grant>>,
13113     /// <p>The name of the bucket where the restore results will be placed.</p>
13114     pub bucket_name: String,
13115     /// <p>The canned ACL to apply to the restore results.</p>
13116     pub canned_acl: Option<String>,
13117     pub encryption: Option<Encryption>,
13118     /// <p>The prefix that is prepended to the restore results for this request.</p>
13119     pub prefix: String,
13120     /// <p>The class of storage used to store the restore results.</p>
13121     pub storage_class: Option<String>,
13122     /// <p>The tag-set that is applied to the restore results.</p>
13123     pub tagging: Option<Tagging>,
13124     /// <p>A list of metadata to store with the restore results in S3.</p>
13125     pub user_metadata: Option<Vec<MetadataEntry>>,
13126 }
13127 
13128 pub struct S3LocationSerializer;
13129 impl S3LocationSerializer {
13130     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &S3Location, ) -> Result<(), xml::writer::Error> where W: Write,13131     pub fn serialize<W>(
13132         mut writer: &mut EventWriter<W>,
13133         name: &str,
13134         obj: &S3Location,
13135     ) -> Result<(), xml::writer::Error>
13136     where
13137         W: Write,
13138     {
13139         writer.write(xml::writer::XmlEvent::start_element(name))?;
13140         if let Some(ref value) = obj.access_control_list {
13141             &GrantsSerializer::serialize(&mut writer, "AccessControlList", value)?;
13142         }
13143         write_characters_element(writer, "BucketName", &obj.bucket_name)?;
13144         if let Some(ref value) = obj.canned_acl {
13145             write_characters_element(writer, "CannedACL", &value)?;
13146         }
13147         if let Some(ref value) = obj.encryption {
13148             &EncryptionSerializer::serialize(&mut writer, "Encryption", value)?;
13149         }
13150         write_characters_element(writer, "Prefix", &obj.prefix)?;
13151         if let Some(ref value) = obj.storage_class {
13152             write_characters_element(writer, "StorageClass", &value)?;
13153         }
13154         if let Some(ref value) = obj.tagging {
13155             &TaggingSerializer::serialize(&mut writer, "Tagging", value)?;
13156         }
13157         if let Some(ref value) = obj.user_metadata {
13158             &UserMetadataSerializer::serialize(&mut writer, "UserMetadata", value)?;
13159         }
13160         writer.write(xml::writer::XmlEvent::end_element())
13161     }
13162 }
13163 
13164 /// <p>Specifies the use of SSE-KMS to encrypt delivered inventory reports.</p>
13165 #[derive(Clone, Debug, Default, PartialEq)]
13166 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13167 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13168 pub struct SSEKMS {
13169     /// <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>
13170     pub key_id: String,
13171 }
13172 
13173 #[allow(dead_code)]
13174 struct SSEKMSDeserializer;
13175 impl SSEKMSDeserializer {
13176     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<SSEKMS, XmlParseError>13177     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<SSEKMS, XmlParseError> {
13178         deserialize_elements::<_, SSEKMS, _>(tag_name, stack, |name, stack, obj| {
13179             match name {
13180                 "KeyId" => {
13181                     obj.key_id = SSEKMSKeyIdDeserializer::deserialize("KeyId", stack)?;
13182                 }
13183                 _ => skip_tree(stack),
13184             }
13185             Ok(())
13186         })
13187     }
13188 }
13189 
13190 pub struct SSEKMSSerializer;
13191 impl SSEKMSSerializer {
13192     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &SSEKMS, ) -> Result<(), xml::writer::Error> where W: Write,13193     pub fn serialize<W>(
13194         mut writer: &mut EventWriter<W>,
13195         name: &str,
13196         obj: &SSEKMS,
13197     ) -> Result<(), xml::writer::Error>
13198     where
13199         W: Write,
13200     {
13201         writer.write(xml::writer::XmlEvent::start_element(name))?;
13202         write_characters_element(writer, "KeyId", &obj.key_id)?;
13203         writer.write(xml::writer::XmlEvent::end_element())
13204     }
13205 }
13206 
13207 #[allow(dead_code)]
13208 struct SSEKMSKeyIdDeserializer;
13209 impl SSEKMSKeyIdDeserializer {
13210     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>13211     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
13212         xml_util::deserialize_primitive(tag_name, stack, Ok)
13213     }
13214 }
13215 
13216 pub struct SSEKMSKeyIdSerializer;
13217 impl SSEKMSKeyIdSerializer {
13218     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,13219     pub fn serialize<W>(
13220         mut writer: &mut EventWriter<W>,
13221         name: &str,
13222         obj: &String,
13223     ) -> Result<(), xml::writer::Error>
13224     where
13225         W: Write,
13226     {
13227         write_characters_element(writer, name, obj)
13228     }
13229 }
13230 
13231 /// <p>Specifies the use of SSE-S3 to encrypt delivered inventory reports.</p>
13232 #[derive(Clone, Debug, Default, PartialEq)]
13233 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13234 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13235 pub struct SSES3 {}
13236 
13237 #[allow(dead_code)]
13238 struct SSES3Deserializer;
13239 impl SSES3Deserializer {
13240     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<SSES3, XmlParseError>13241     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<SSES3, XmlParseError> {
13242         xml_util::start_element(tag_name, stack)?;
13243 
13244         let obj = SSES3::default();
13245 
13246         xml_util::end_element(tag_name, stack)?;
13247 
13248         Ok(obj)
13249     }
13250 }
13251 
13252 pub struct SSES3Serializer;
13253 impl SSES3Serializer {
13254     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &SSES3, ) -> Result<(), xml::writer::Error> where W: Write,13255     pub fn serialize<W>(
13256         mut writer: &mut EventWriter<W>,
13257         name: &str,
13258         obj: &SSES3,
13259     ) -> Result<(), xml::writer::Error>
13260     where
13261         W: Write,
13262     {
13263         writer.write(xml::writer::XmlEvent::start_element(name))?;
13264         writer.write(xml::writer::XmlEvent::end_element())
13265     }
13266 }
13267 
13268 /// <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>
13269 #[derive(Clone, Debug, Default, PartialEq)]
13270 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13271 pub struct ScanRange {
13272     /// <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>
13273     pub end: Option<i64>,
13274     /// <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>
13275     pub start: Option<i64>,
13276 }
13277 
13278 pub struct ScanRangeSerializer;
13279 impl ScanRangeSerializer {
13280     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ScanRange, ) -> Result<(), xml::writer::Error> where W: Write,13281     pub fn serialize<W>(
13282         mut writer: &mut EventWriter<W>,
13283         name: &str,
13284         obj: &ScanRange,
13285     ) -> Result<(), xml::writer::Error>
13286     where
13287         W: Write,
13288     {
13289         writer.write(xml::writer::XmlEvent::start_element(name))?;
13290         if let Some(ref value) = obj.end {
13291             write_characters_element(writer, "End", &value.to_string())?;
13292         }
13293         if let Some(ref value) = obj.start {
13294             write_characters_element(writer, "Start", &value.to_string())?;
13295         }
13296         writer.write(xml::writer::XmlEvent::end_element())
13297     }
13298 }
13299 
13300 /// <p>The container for selecting objects from a content event stream.</p>
13301 #[derive(Debug, Clone, PartialEq)]
13302 pub enum SelectObjectContentEventStreamItem {
13303     /// <p>The Continuation Event.</p>
13304     Cont(ContinuationEvent),
13305     /// <p>The End Event.</p>
13306     End(EndEvent),
13307     /// <p>The Progress Event.</p>
13308     Progress(ProgressEvent),
13309     /// <p>The Records Event.</p>
13310     Records(RecordsEvent),
13311     /// <p>The Stats Event.</p>
13312     Stats(StatsEvent),
13313 }
13314 
13315 impl DeserializeEvent for SelectObjectContentEventStreamItem {
deserialize_event(_event_type: &str, _data: &[u8]) -> Result<Self, RusotoError<()>>13316     fn deserialize_event(_event_type: &str, _data: &[u8]) -> Result<Self, RusotoError<()>> {
13317         unimplemented!()
13318     }
13319 }
13320 
13321 #[derive(Debug)]
13322 pub struct SelectObjectContentOutput {
13323     /// <p>The array of results.</p>
13324     pub payload: Option<EventStream<SelectObjectContentEventStreamItem>>,
13325 }
13326 
13327 /// <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>
13328 #[derive(Clone, Debug, Default, PartialEq)]
13329 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13330 pub struct SelectObjectContentRequest {
13331     /// <p>The S3 bucket.</p>
13332     pub bucket: String,
13333     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
13334     pub expected_bucket_owner: Option<String>,
13335     /// <p>The expression that is used to query the object.</p>
13336     pub expression: String,
13337     /// <p>The type of the provided expression (for example, SQL).</p>
13338     pub expression_type: String,
13339     /// <p>Describes the format of the data in the object that is being queried.</p>
13340     pub input_serialization: InputSerialization,
13341     /// <p>The object key.</p>
13342     pub key: String,
13343     /// <p>Describes the format of the data that you want Amazon S3 to return in response.</p>
13344     pub output_serialization: OutputSerialization,
13345     /// <p>Specifies if periodic request progress information should be enabled.</p>
13346     pub request_progress: Option<RequestProgress>,
13347     /// <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>
13348     pub sse_customer_algorithm: Option<String>,
13349     /// <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>
13350     pub sse_customer_key: Option<String>,
13351     /// <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>
13352     pub sse_customer_key_md5: Option<String>,
13353     /// <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>
13354     pub scan_range: Option<ScanRange>,
13355 }
13356 
13357 pub struct SelectObjectContentRequestSerializer;
13358 impl SelectObjectContentRequestSerializer {
13359     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &SelectObjectContentRequest, xmlns: &str, ) -> Result<(), xml::writer::Error> where W: Write,13360     pub fn serialize<W>(
13361         mut writer: &mut EventWriter<W>,
13362         name: &str,
13363         obj: &SelectObjectContentRequest,
13364         xmlns: &str,
13365     ) -> Result<(), xml::writer::Error>
13366     where
13367         W: Write,
13368     {
13369         writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
13370         ExpressionSerializer::serialize(&mut writer, "Expression", &obj.expression)?;
13371         ExpressionTypeSerializer::serialize(&mut writer, "ExpressionType", &obj.expression_type)?;
13372         InputSerializationSerializer::serialize(
13373             &mut writer,
13374             "InputSerialization",
13375             &obj.input_serialization,
13376         )?;
13377         OutputSerializationSerializer::serialize(
13378             &mut writer,
13379             "OutputSerialization",
13380             &obj.output_serialization,
13381         )?;
13382         if let Some(ref value) = obj.request_progress {
13383             &RequestProgressSerializer::serialize(&mut writer, "RequestProgress", value)?;
13384         }
13385         if let Some(ref value) = obj.scan_range {
13386             &ScanRangeSerializer::serialize(&mut writer, "ScanRange", value)?;
13387         }
13388         writer.write(xml::writer::XmlEvent::end_element())
13389     }
13390 }
13391 /// <p>Describes the parameters for Select job types.</p>
13392 #[derive(Clone, Debug, Default, PartialEq)]
13393 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13394 pub struct SelectParameters {
13395     /// <p>The expression that is used to query the object.</p>
13396     pub expression: String,
13397     /// <p>The type of the provided expression (for example, SQL).</p>
13398     pub expression_type: String,
13399     /// <p>Describes the serialization format of the object.</p>
13400     pub input_serialization: InputSerialization,
13401     /// <p>Describes how the results of the Select job are serialized.</p>
13402     pub output_serialization: OutputSerialization,
13403 }
13404 
13405 pub struct SelectParametersSerializer;
13406 impl SelectParametersSerializer {
13407     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &SelectParameters, ) -> Result<(), xml::writer::Error> where W: Write,13408     pub fn serialize<W>(
13409         mut writer: &mut EventWriter<W>,
13410         name: &str,
13411         obj: &SelectParameters,
13412     ) -> Result<(), xml::writer::Error>
13413     where
13414         W: Write,
13415     {
13416         writer.write(xml::writer::XmlEvent::start_element(name))?;
13417         write_characters_element(writer, "Expression", &obj.expression)?;
13418         write_characters_element(writer, "ExpressionType", &obj.expression_type)?;
13419         InputSerializationSerializer::serialize(
13420             &mut writer,
13421             "InputSerialization",
13422             &obj.input_serialization,
13423         )?;
13424         OutputSerializationSerializer::serialize(
13425             &mut writer,
13426             "OutputSerialization",
13427             &obj.output_serialization,
13428         )?;
13429         writer.write(xml::writer::XmlEvent::end_element())
13430     }
13431 }
13432 
13433 #[allow(dead_code)]
13434 struct ServerSideEncryptionDeserializer;
13435 impl ServerSideEncryptionDeserializer {
13436     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>13437     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
13438         xml_util::deserialize_primitive(tag_name, stack, Ok)
13439     }
13440 }
13441 
13442 pub struct ServerSideEncryptionSerializer;
13443 impl ServerSideEncryptionSerializer {
13444     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,13445     pub fn serialize<W>(
13446         mut writer: &mut EventWriter<W>,
13447         name: &str,
13448         obj: &String,
13449     ) -> Result<(), xml::writer::Error>
13450     where
13451         W: Write,
13452     {
13453         write_characters_element(writer, name, obj)
13454     }
13455 }
13456 
13457 /// <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 S3 API Reference</i>.</p>
13458 #[derive(Clone, Debug, Default, PartialEq)]
13459 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13460 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13461 pub struct ServerSideEncryptionByDefault {
13462     /// <p><p>AWS Key Management Service (KMS) customer AWS KMS 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> <p>You can specify the key ID or the Amazon Resource Name (ARN) of the KMS key. However, if you are using encryption with cross-account operations, you must use a fully qualified KMS key ARN. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html#bucket-encryption-update-bucket-policy">Using encryption for cross-account operations</a>. </p> <p> <b>For example:</b> </p> <ul> <li> <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li> <li> <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li> </ul> <important> <p>Amazon S3 only supports symmetric KMS keys and not asymmetric KMS keys. 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> </important></p>
13463     pub kms_master_key_id: Option<String>,
13464     /// <p>Server-side encryption algorithm to use for the default encryption.</p>
13465     pub sse_algorithm: String,
13466 }
13467 
13468 #[allow(dead_code)]
13469 struct ServerSideEncryptionByDefaultDeserializer;
13470 impl ServerSideEncryptionByDefaultDeserializer {
13471     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ServerSideEncryptionByDefault, XmlParseError>13472     fn deserialize<T: Peek + Next>(
13473         tag_name: &str,
13474         stack: &mut T,
13475     ) -> Result<ServerSideEncryptionByDefault, XmlParseError> {
13476         deserialize_elements::<_, ServerSideEncryptionByDefault, _>(
13477             tag_name,
13478             stack,
13479             |name, stack, obj| {
13480                 match name {
13481                     "KMSMasterKeyID" => {
13482                         obj.kms_master_key_id = Some(SSEKMSKeyIdDeserializer::deserialize(
13483                             "KMSMasterKeyID",
13484                             stack,
13485                         )?);
13486                     }
13487                     "SSEAlgorithm" => {
13488                         obj.sse_algorithm =
13489                             ServerSideEncryptionDeserializer::deserialize("SSEAlgorithm", stack)?;
13490                     }
13491                     _ => skip_tree(stack),
13492                 }
13493                 Ok(())
13494             },
13495         )
13496     }
13497 }
13498 
13499 pub struct ServerSideEncryptionByDefaultSerializer;
13500 impl ServerSideEncryptionByDefaultSerializer {
13501     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ServerSideEncryptionByDefault, ) -> Result<(), xml::writer::Error> where W: Write,13502     pub fn serialize<W>(
13503         mut writer: &mut EventWriter<W>,
13504         name: &str,
13505         obj: &ServerSideEncryptionByDefault,
13506     ) -> Result<(), xml::writer::Error>
13507     where
13508         W: Write,
13509     {
13510         writer.write(xml::writer::XmlEvent::start_element(name))?;
13511         if let Some(ref value) = obj.kms_master_key_id {
13512             write_characters_element(writer, "KMSMasterKeyID", &value)?;
13513         }
13514         write_characters_element(writer, "SSEAlgorithm", &obj.sse_algorithm)?;
13515         writer.write(xml::writer::XmlEvent::end_element())
13516     }
13517 }
13518 
13519 /// <p>Specifies the default server-side-encryption configuration.</p>
13520 #[derive(Clone, Debug, Default, PartialEq)]
13521 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13522 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13523 pub struct ServerSideEncryptionConfiguration {
13524     /// <p>Container for information about a particular server-side encryption configuration rule.</p>
13525     pub rules: Vec<ServerSideEncryptionRule>,
13526 }
13527 
13528 #[allow(dead_code)]
13529 struct ServerSideEncryptionConfigurationDeserializer;
13530 impl ServerSideEncryptionConfigurationDeserializer {
13531     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ServerSideEncryptionConfiguration, XmlParseError>13532     fn deserialize<T: Peek + Next>(
13533         tag_name: &str,
13534         stack: &mut T,
13535     ) -> Result<ServerSideEncryptionConfiguration, XmlParseError> {
13536         deserialize_elements::<_, ServerSideEncryptionConfiguration, _>(
13537             tag_name,
13538             stack,
13539             |name, stack, obj| {
13540                 match name {
13541                     "Rule" => {
13542                         obj.rules
13543                             .extend(ServerSideEncryptionRulesDeserializer::deserialize(
13544                                 "Rule", stack,
13545                             )?);
13546                     }
13547                     _ => skip_tree(stack),
13548                 }
13549                 Ok(())
13550             },
13551         )
13552     }
13553 }
13554 
13555 pub struct ServerSideEncryptionConfigurationSerializer;
13556 impl ServerSideEncryptionConfigurationSerializer {
13557     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ServerSideEncryptionConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,13558     pub fn serialize<W>(
13559         mut writer: &mut EventWriter<W>,
13560         name: &str,
13561         obj: &ServerSideEncryptionConfiguration,
13562     ) -> Result<(), xml::writer::Error>
13563     where
13564         W: Write,
13565     {
13566         writer.write(xml::writer::XmlEvent::start_element(name))?;
13567         ServerSideEncryptionRulesSerializer::serialize(&mut writer, "Rule", &obj.rules)?;
13568         writer.write(xml::writer::XmlEvent::end_element())
13569     }
13570 }
13571 
13572 /// <p>Specifies the default server-side encryption configuration.</p>
13573 #[derive(Clone, Debug, Default, PartialEq)]
13574 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13575 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13576 pub struct ServerSideEncryptionRule {
13577     /// <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>
13578     pub apply_server_side_encryption_by_default: Option<ServerSideEncryptionByDefault>,
13579     /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting the <code>BucketKeyEnabled</code> element to <code>true</code> causes Amazon S3 to use an S3 Bucket Key. By default, S3 Bucket Key is not enabled.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p>
13580     pub bucket_key_enabled: Option<bool>,
13581 }
13582 
13583 #[allow(dead_code)]
13584 struct ServerSideEncryptionRuleDeserializer;
13585 impl ServerSideEncryptionRuleDeserializer {
13586     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<ServerSideEncryptionRule, XmlParseError>13587     fn deserialize<T: Peek + Next>(
13588         tag_name: &str,
13589         stack: &mut T,
13590     ) -> Result<ServerSideEncryptionRule, XmlParseError> {
13591         deserialize_elements::<_, ServerSideEncryptionRule, _>(
13592             tag_name,
13593             stack,
13594             |name, stack, obj| {
13595                 match name {
13596                     "ApplyServerSideEncryptionByDefault" => {
13597                         obj.apply_server_side_encryption_by_default =
13598                             Some(ServerSideEncryptionByDefaultDeserializer::deserialize(
13599                                 "ApplyServerSideEncryptionByDefault",
13600                                 stack,
13601                             )?);
13602                     }
13603                     "BucketKeyEnabled" => {
13604                         obj.bucket_key_enabled = Some(BucketKeyEnabledDeserializer::deserialize(
13605                             "BucketKeyEnabled",
13606                             stack,
13607                         )?);
13608                     }
13609                     _ => skip_tree(stack),
13610                 }
13611                 Ok(())
13612             },
13613         )
13614     }
13615 }
13616 
13617 pub struct ServerSideEncryptionRuleSerializer;
13618 impl ServerSideEncryptionRuleSerializer {
13619     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &ServerSideEncryptionRule, ) -> Result<(), xml::writer::Error> where W: Write,13620     pub fn serialize<W>(
13621         mut writer: &mut EventWriter<W>,
13622         name: &str,
13623         obj: &ServerSideEncryptionRule,
13624     ) -> Result<(), xml::writer::Error>
13625     where
13626         W: Write,
13627     {
13628         writer.write(xml::writer::XmlEvent::start_element(name))?;
13629         if let Some(ref value) = obj.apply_server_side_encryption_by_default {
13630             &ServerSideEncryptionByDefaultSerializer::serialize(
13631                 &mut writer,
13632                 "ApplyServerSideEncryptionByDefault",
13633                 value,
13634             )?;
13635         }
13636         if let Some(ref value) = obj.bucket_key_enabled {
13637             write_characters_element(writer, "BucketKeyEnabled", &value.to_string())?;
13638         }
13639         writer.write(xml::writer::XmlEvent::end_element())
13640     }
13641 }
13642 
13643 #[allow(dead_code)]
13644 struct ServerSideEncryptionRulesDeserializer;
13645 impl ServerSideEncryptionRulesDeserializer {
13646     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<ServerSideEncryptionRule>, XmlParseError>13647     fn deserialize<T: Peek + Next>(
13648         tag_name: &str,
13649         stack: &mut T,
13650     ) -> Result<Vec<ServerSideEncryptionRule>, XmlParseError> {
13651         let mut obj = vec![];
13652 
13653         loop {
13654             let consume_next_tag = match stack.peek() {
13655                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
13656                     name.local_name == tag_name
13657                 }
13658                 _ => false,
13659             };
13660 
13661             if consume_next_tag {
13662                 obj.push(ServerSideEncryptionRuleDeserializer::deserialize(
13663                     tag_name, stack,
13664                 )?);
13665             } else {
13666                 break;
13667             }
13668         }
13669 
13670         Ok(obj)
13671     }
13672 }
13673 
13674 pub struct ServerSideEncryptionRulesSerializer;
13675 impl ServerSideEncryptionRulesSerializer {
13676     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<ServerSideEncryptionRule>, ) -> Result<(), xml::writer::Error> where W: Write,13677     pub fn serialize<W>(
13678         mut writer: &mut EventWriter<W>,
13679         name: &str,
13680         obj: &Vec<ServerSideEncryptionRule>,
13681     ) -> Result<(), xml::writer::Error>
13682     where
13683         W: Write,
13684     {
13685         for element in obj {
13686             ServerSideEncryptionRuleSerializer::serialize(writer, name, element)?;
13687         }
13688         Ok(())
13689     }
13690 }
13691 
13692 #[allow(dead_code)]
13693 struct SettingDeserializer;
13694 impl SettingDeserializer {
13695     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError>13696     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
13697         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
13698     }
13699 }
13700 
13701 pub struct SettingSerializer;
13702 impl SettingSerializer {
13703     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &bool, ) -> Result<(), xml::writer::Error> where W: Write,13704     pub fn serialize<W>(
13705         mut writer: &mut EventWriter<W>,
13706         name: &str,
13707         obj: &bool,
13708     ) -> Result<(), xml::writer::Error>
13709     where
13710         W: Write,
13711     {
13712         write_characters_element(writer, name, &obj.to_string())
13713     }
13714 }
13715 
13716 #[allow(dead_code)]
13717 struct SizeDeserializer;
13718 impl SizeDeserializer {
13719     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>13720     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
13721         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
13722     }
13723 }
13724 /// <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>
13725 #[derive(Clone, Debug, Default, PartialEq)]
13726 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13727 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13728 pub struct SourceSelectionCriteria {
13729     /// <p><p>A filter that you can specify for selections for modifications on replicas. Amazon S3 doesn&#39;t replicate replica modifications by default. In the latest version of replication configuration (when <code>Filter</code> is specified), you can specify this element and set the status to <code>Enabled</code> to replicate modifications on replicas. </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, this element is not allowed</p> </note></p>
13730     pub replica_modifications: Option<ReplicaModifications>,
13731     /// <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>
13732     pub sse_kms_encrypted_objects: Option<SseKmsEncryptedObjects>,
13733 }
13734 
13735 #[allow(dead_code)]
13736 struct SourceSelectionCriteriaDeserializer;
13737 impl SourceSelectionCriteriaDeserializer {
13738     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<SourceSelectionCriteria, XmlParseError>13739     fn deserialize<T: Peek + Next>(
13740         tag_name: &str,
13741         stack: &mut T,
13742     ) -> Result<SourceSelectionCriteria, XmlParseError> {
13743         deserialize_elements::<_, SourceSelectionCriteria, _>(
13744             tag_name,
13745             stack,
13746             |name, stack, obj| {
13747                 match name {
13748                     "ReplicaModifications" => {
13749                         obj.replica_modifications =
13750                             Some(ReplicaModificationsDeserializer::deserialize(
13751                                 "ReplicaModifications",
13752                                 stack,
13753                             )?);
13754                     }
13755                     "SseKmsEncryptedObjects" => {
13756                         obj.sse_kms_encrypted_objects =
13757                             Some(SseKmsEncryptedObjectsDeserializer::deserialize(
13758                                 "SseKmsEncryptedObjects",
13759                                 stack,
13760                             )?);
13761                     }
13762                     _ => skip_tree(stack),
13763                 }
13764                 Ok(())
13765             },
13766         )
13767     }
13768 }
13769 
13770 pub struct SourceSelectionCriteriaSerializer;
13771 impl SourceSelectionCriteriaSerializer {
13772     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &SourceSelectionCriteria, ) -> Result<(), xml::writer::Error> where W: Write,13773     pub fn serialize<W>(
13774         mut writer: &mut EventWriter<W>,
13775         name: &str,
13776         obj: &SourceSelectionCriteria,
13777     ) -> Result<(), xml::writer::Error>
13778     where
13779         W: Write,
13780     {
13781         writer.write(xml::writer::XmlEvent::start_element(name))?;
13782         if let Some(ref value) = obj.replica_modifications {
13783             &ReplicaModificationsSerializer::serialize(&mut writer, "ReplicaModifications", value)?;
13784         }
13785         if let Some(ref value) = obj.sse_kms_encrypted_objects {
13786             &SseKmsEncryptedObjectsSerializer::serialize(
13787                 &mut writer,
13788                 "SseKmsEncryptedObjects",
13789                 value,
13790             )?;
13791         }
13792         writer.write(xml::writer::XmlEvent::end_element())
13793     }
13794 }
13795 
13796 /// <p>A container for filter information for the selection of S3 objects encrypted with AWS KMS.</p>
13797 #[derive(Clone, Debug, Default, PartialEq)]
13798 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13799 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
13800 pub struct SseKmsEncryptedObjects {
13801     /// <p>Specifies whether Amazon S3 replicates objects created with server-side encryption using an AWS KMS key stored in AWS Key Management Service.</p>
13802     pub status: String,
13803 }
13804 
13805 #[allow(dead_code)]
13806 struct SseKmsEncryptedObjectsDeserializer;
13807 impl SseKmsEncryptedObjectsDeserializer {
13808     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<SseKmsEncryptedObjects, XmlParseError>13809     fn deserialize<T: Peek + Next>(
13810         tag_name: &str,
13811         stack: &mut T,
13812     ) -> Result<SseKmsEncryptedObjects, XmlParseError> {
13813         deserialize_elements::<_, SseKmsEncryptedObjects, _>(tag_name, stack, |name, stack, obj| {
13814             match name {
13815                 "Status" => {
13816                     obj.status =
13817                         SseKmsEncryptedObjectsStatusDeserializer::deserialize("Status", stack)?;
13818                 }
13819                 _ => skip_tree(stack),
13820             }
13821             Ok(())
13822         })
13823     }
13824 }
13825 
13826 pub struct SseKmsEncryptedObjectsSerializer;
13827 impl SseKmsEncryptedObjectsSerializer {
13828     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &SseKmsEncryptedObjects, ) -> Result<(), xml::writer::Error> where W: Write,13829     pub fn serialize<W>(
13830         mut writer: &mut EventWriter<W>,
13831         name: &str,
13832         obj: &SseKmsEncryptedObjects,
13833     ) -> Result<(), xml::writer::Error>
13834     where
13835         W: Write,
13836     {
13837         writer.write(xml::writer::XmlEvent::start_element(name))?;
13838         write_characters_element(writer, "Status", &obj.status)?;
13839         writer.write(xml::writer::XmlEvent::end_element())
13840     }
13841 }
13842 
13843 #[allow(dead_code)]
13844 struct SseKmsEncryptedObjectsStatusDeserializer;
13845 impl SseKmsEncryptedObjectsStatusDeserializer {
13846     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>13847     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
13848         xml_util::deserialize_primitive(tag_name, stack, Ok)
13849     }
13850 }
13851 
13852 pub struct SseKmsEncryptedObjectsStatusSerializer;
13853 impl SseKmsEncryptedObjectsStatusSerializer {
13854     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,13855     pub fn serialize<W>(
13856         mut writer: &mut EventWriter<W>,
13857         name: &str,
13858         obj: &String,
13859     ) -> Result<(), xml::writer::Error>
13860     where
13861         W: Write,
13862     {
13863         write_characters_element(writer, name, obj)
13864     }
13865 }
13866 
13867 pub struct StartSerializer;
13868 impl StartSerializer {
13869     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,13870     pub fn serialize<W>(
13871         mut writer: &mut EventWriter<W>,
13872         name: &str,
13873         obj: &i64,
13874     ) -> Result<(), xml::writer::Error>
13875     where
13876         W: Write,
13877     {
13878         write_characters_element(writer, name, &obj.to_string())
13879     }
13880 }
13881 
13882 #[allow(dead_code)]
13883 struct StartAfterDeserializer;
13884 impl StartAfterDeserializer {
13885     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>13886     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
13887         xml_util::deserialize_primitive(tag_name, stack, Ok)
13888     }
13889 }
13890 
13891 pub struct StartAfterSerializer;
13892 impl StartAfterSerializer {
13893     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,13894     pub fn serialize<W>(
13895         mut writer: &mut EventWriter<W>,
13896         name: &str,
13897         obj: &String,
13898     ) -> Result<(), xml::writer::Error>
13899     where
13900         W: Write,
13901     {
13902         write_characters_element(writer, name, obj)
13903     }
13904 }
13905 
13906 /// <p>Container for the stats details.</p>
13907 #[derive(Clone, Debug, Default, PartialEq)]
13908 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13909 pub struct Stats {
13910     /// <p>The total number of uncompressed object bytes processed.</p>
13911     pub bytes_processed: Option<i64>,
13912     /// <p>The total number of bytes of records payload data returned.</p>
13913     pub bytes_returned: Option<i64>,
13914     /// <p>The total number of object bytes scanned.</p>
13915     pub bytes_scanned: Option<i64>,
13916 }
13917 
13918 #[allow(dead_code)]
13919 struct StatsDeserializer;
13920 impl StatsDeserializer {
13921     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Stats, XmlParseError>13922     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Stats, XmlParseError> {
13923         deserialize_elements::<_, Stats, _>(tag_name, stack, |name, stack, obj| {
13924             match name {
13925                 "BytesProcessed" => {
13926                     obj.bytes_processed = Some(BytesProcessedDeserializer::deserialize(
13927                         "BytesProcessed",
13928                         stack,
13929                     )?);
13930                 }
13931                 "BytesReturned" => {
13932                     obj.bytes_returned = Some(BytesReturnedDeserializer::deserialize(
13933                         "BytesReturned",
13934                         stack,
13935                     )?);
13936                 }
13937                 "BytesScanned" => {
13938                     obj.bytes_scanned = Some(BytesScannedDeserializer::deserialize(
13939                         "BytesScanned",
13940                         stack,
13941                     )?);
13942                 }
13943                 _ => skip_tree(stack),
13944             }
13945             Ok(())
13946         })
13947     }
13948 }
13949 /// <p>Container for the Stats Event.</p>
13950 #[derive(Clone, Debug, Default, PartialEq)]
13951 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
13952 pub struct StatsEvent {
13953     /// <p>The Stats event details.</p>
13954     pub details: Option<Stats>,
13955 }
13956 
13957 #[allow(dead_code)]
13958 struct StatsEventDeserializer;
13959 impl StatsEventDeserializer {
13960     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<StatsEvent, XmlParseError>13961     fn deserialize<T: Peek + Next>(
13962         tag_name: &str,
13963         stack: &mut T,
13964     ) -> Result<StatsEvent, XmlParseError> {
13965         deserialize_elements::<_, StatsEvent, _>(tag_name, stack, |name, stack, obj| {
13966             match name {
13967                 "Details" => {
13968                     obj.details = Some(StatsDeserializer::deserialize("Details", stack)?);
13969                 }
13970                 _ => skip_tree(stack),
13971             }
13972             Ok(())
13973         })
13974     }
13975 }
13976 #[allow(dead_code)]
13977 struct StorageClassDeserializer;
13978 impl StorageClassDeserializer {
13979     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>13980     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
13981         xml_util::deserialize_primitive(tag_name, stack, Ok)
13982     }
13983 }
13984 
13985 pub struct StorageClassSerializer;
13986 impl StorageClassSerializer {
13987     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,13988     pub fn serialize<W>(
13989         mut writer: &mut EventWriter<W>,
13990         name: &str,
13991         obj: &String,
13992     ) -> Result<(), xml::writer::Error>
13993     where
13994         W: Write,
13995     {
13996         write_characters_element(writer, name, obj)
13997     }
13998 }
13999 
14000 /// <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>
14001 #[derive(Clone, Debug, Default, PartialEq)]
14002 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14003 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14004 pub struct StorageClassAnalysis {
14005     /// <p>Specifies how data related to the storage class analysis for an Amazon S3 bucket should be exported.</p>
14006     pub data_export: Option<StorageClassAnalysisDataExport>,
14007 }
14008 
14009 #[allow(dead_code)]
14010 struct StorageClassAnalysisDeserializer;
14011 impl StorageClassAnalysisDeserializer {
14012     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<StorageClassAnalysis, XmlParseError>14013     fn deserialize<T: Peek + Next>(
14014         tag_name: &str,
14015         stack: &mut T,
14016     ) -> Result<StorageClassAnalysis, XmlParseError> {
14017         deserialize_elements::<_, StorageClassAnalysis, _>(tag_name, stack, |name, stack, obj| {
14018             match name {
14019                 "DataExport" => {
14020                     obj.data_export =
14021                         Some(StorageClassAnalysisDataExportDeserializer::deserialize(
14022                             "DataExport",
14023                             stack,
14024                         )?);
14025                 }
14026                 _ => skip_tree(stack),
14027             }
14028             Ok(())
14029         })
14030     }
14031 }
14032 
14033 pub struct StorageClassAnalysisSerializer;
14034 impl StorageClassAnalysisSerializer {
14035     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &StorageClassAnalysis, ) -> Result<(), xml::writer::Error> where W: Write,14036     pub fn serialize<W>(
14037         mut writer: &mut EventWriter<W>,
14038         name: &str,
14039         obj: &StorageClassAnalysis,
14040     ) -> Result<(), xml::writer::Error>
14041     where
14042         W: Write,
14043     {
14044         writer.write(xml::writer::XmlEvent::start_element(name))?;
14045         if let Some(ref value) = obj.data_export {
14046             &StorageClassAnalysisDataExportSerializer::serialize(&mut writer, "DataExport", value)?;
14047         }
14048         writer.write(xml::writer::XmlEvent::end_element())
14049     }
14050 }
14051 
14052 /// <p>Container for data related to the storage class analysis for an Amazon S3 bucket for export.</p>
14053 #[derive(Clone, Debug, Default, PartialEq)]
14054 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14055 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14056 pub struct StorageClassAnalysisDataExport {
14057     /// <p>The place to store the data for an analysis.</p>
14058     pub destination: AnalyticsExportDestination,
14059     /// <p>The version of the output schema to use when exporting data. Must be <code>V_1</code>.</p>
14060     pub output_schema_version: String,
14061 }
14062 
14063 #[allow(dead_code)]
14064 struct StorageClassAnalysisDataExportDeserializer;
14065 impl StorageClassAnalysisDataExportDeserializer {
14066     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<StorageClassAnalysisDataExport, XmlParseError>14067     fn deserialize<T: Peek + Next>(
14068         tag_name: &str,
14069         stack: &mut T,
14070     ) -> Result<StorageClassAnalysisDataExport, XmlParseError> {
14071         deserialize_elements::<_, StorageClassAnalysisDataExport, _>(
14072             tag_name,
14073             stack,
14074             |name, stack, obj| {
14075                 match name {
14076                     "Destination" => {
14077                         obj.destination = AnalyticsExportDestinationDeserializer::deserialize(
14078                             "Destination",
14079                             stack,
14080                         )?;
14081                     }
14082                     "OutputSchemaVersion" => {
14083                         obj.output_schema_version =
14084                             StorageClassAnalysisSchemaVersionDeserializer::deserialize(
14085                                 "OutputSchemaVersion",
14086                                 stack,
14087                             )?;
14088                     }
14089                     _ => skip_tree(stack),
14090                 }
14091                 Ok(())
14092             },
14093         )
14094     }
14095 }
14096 
14097 pub struct StorageClassAnalysisDataExportSerializer;
14098 impl StorageClassAnalysisDataExportSerializer {
14099     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &StorageClassAnalysisDataExport, ) -> Result<(), xml::writer::Error> where W: Write,14100     pub fn serialize<W>(
14101         mut writer: &mut EventWriter<W>,
14102         name: &str,
14103         obj: &StorageClassAnalysisDataExport,
14104     ) -> Result<(), xml::writer::Error>
14105     where
14106         W: Write,
14107     {
14108         writer.write(xml::writer::XmlEvent::start_element(name))?;
14109         AnalyticsExportDestinationSerializer::serialize(
14110             &mut writer,
14111             "Destination",
14112             &obj.destination,
14113         )?;
14114         write_characters_element(writer, "OutputSchemaVersion", &obj.output_schema_version)?;
14115         writer.write(xml::writer::XmlEvent::end_element())
14116     }
14117 }
14118 
14119 #[allow(dead_code)]
14120 struct StorageClassAnalysisSchemaVersionDeserializer;
14121 impl StorageClassAnalysisSchemaVersionDeserializer {
14122     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14123     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14124         xml_util::deserialize_primitive(tag_name, stack, Ok)
14125     }
14126 }
14127 
14128 pub struct StorageClassAnalysisSchemaVersionSerializer;
14129 impl StorageClassAnalysisSchemaVersionSerializer {
14130     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14131     pub fn serialize<W>(
14132         mut writer: &mut EventWriter<W>,
14133         name: &str,
14134         obj: &String,
14135     ) -> Result<(), xml::writer::Error>
14136     where
14137         W: Write,
14138     {
14139         write_characters_element(writer, name, obj)
14140     }
14141 }
14142 
14143 #[allow(dead_code)]
14144 struct SuffixDeserializer;
14145 impl SuffixDeserializer {
14146     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14147     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14148         xml_util::deserialize_primitive(tag_name, stack, Ok)
14149     }
14150 }
14151 
14152 pub struct SuffixSerializer;
14153 impl SuffixSerializer {
14154     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14155     pub fn serialize<W>(
14156         mut writer: &mut EventWriter<W>,
14157         name: &str,
14158         obj: &String,
14159     ) -> Result<(), xml::writer::Error>
14160     where
14161         W: Write,
14162     {
14163         write_characters_element(writer, name, obj)
14164     }
14165 }
14166 
14167 /// <p>A container of a key value name pair.</p>
14168 #[derive(Clone, Debug, Default, PartialEq)]
14169 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14170 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14171 pub struct Tag {
14172     /// <p>Name of the object key.</p>
14173     pub key: String,
14174     /// <p>Value of the tag.</p>
14175     pub value: String,
14176 }
14177 
14178 #[allow(dead_code)]
14179 struct TagDeserializer;
14180 impl TagDeserializer {
14181     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Tag, XmlParseError>14182     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Tag, XmlParseError> {
14183         deserialize_elements::<_, Tag, _>(tag_name, stack, |name, stack, obj| {
14184             match name {
14185                 "Key" => {
14186                     obj.key = ObjectKeyDeserializer::deserialize("Key", stack)?;
14187                 }
14188                 "Value" => {
14189                     obj.value = ValueDeserializer::deserialize("Value", stack)?;
14190                 }
14191                 _ => skip_tree(stack),
14192             }
14193             Ok(())
14194         })
14195     }
14196 }
14197 
14198 pub struct TagSerializer;
14199 impl TagSerializer {
14200     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Tag, ) -> Result<(), xml::writer::Error> where W: Write,14201     pub fn serialize<W>(
14202         mut writer: &mut EventWriter<W>,
14203         name: &str,
14204         obj: &Tag,
14205     ) -> Result<(), xml::writer::Error>
14206     where
14207         W: Write,
14208     {
14209         writer.write(xml::writer::XmlEvent::start_element(name))?;
14210         write_characters_element(writer, "Key", &obj.key)?;
14211         write_characters_element(writer, "Value", &obj.value)?;
14212         writer.write(xml::writer::XmlEvent::end_element())
14213     }
14214 }
14215 
14216 #[allow(dead_code)]
14217 struct TagSetDeserializer;
14218 impl TagSetDeserializer {
14219     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Tag>, XmlParseError>14220     fn deserialize<T: Peek + Next>(
14221         tag_name: &str,
14222         stack: &mut T,
14223     ) -> Result<Vec<Tag>, XmlParseError> {
14224         deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
14225             if name == "Tag" {
14226                 obj.push(TagDeserializer::deserialize("Tag", stack)?);
14227             } else {
14228                 skip_tree(stack);
14229             }
14230             Ok(())
14231         })
14232     }
14233 }
14234 
14235 pub struct TagSetSerializer;
14236 impl TagSetSerializer {
14237     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<Tag>, ) -> Result<(), xml::writer::Error> where W: Write,14238     pub fn serialize<W>(
14239         mut writer: &mut EventWriter<W>,
14240         name: &str,
14241         obj: &Vec<Tag>,
14242     ) -> Result<(), xml::writer::Error>
14243     where
14244         W: Write,
14245     {
14246         writer.write(xml::writer::XmlEvent::start_element(name))?;
14247         for element in obj {
14248             TagSerializer::serialize(writer, "Tag", element)?;
14249         }
14250         writer.write(xml::writer::XmlEvent::end_element())?;
14251         Ok(())
14252     }
14253 }
14254 
14255 /// <p>Container for <code>TagSet</code> elements.</p>
14256 #[derive(Clone, Debug, Default, PartialEq)]
14257 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14258 pub struct Tagging {
14259     /// <p>A collection for a set of tags</p>
14260     pub tag_set: Vec<Tag>,
14261 }
14262 
14263 pub struct TaggingSerializer;
14264 impl TaggingSerializer {
14265     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Tagging, ) -> Result<(), xml::writer::Error> where W: Write,14266     pub fn serialize<W>(
14267         mut writer: &mut EventWriter<W>,
14268         name: &str,
14269         obj: &Tagging,
14270     ) -> Result<(), xml::writer::Error>
14271     where
14272         W: Write,
14273     {
14274         writer.write(xml::writer::XmlEvent::start_element(name))?;
14275         TagSetSerializer::serialize(&mut writer, "TagSet", &obj.tag_set)?;
14276         writer.write(xml::writer::XmlEvent::end_element())
14277     }
14278 }
14279 
14280 #[allow(dead_code)]
14281 struct TargetBucketDeserializer;
14282 impl TargetBucketDeserializer {
14283     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14284     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14285         xml_util::deserialize_primitive(tag_name, stack, Ok)
14286     }
14287 }
14288 
14289 pub struct TargetBucketSerializer;
14290 impl TargetBucketSerializer {
14291     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14292     pub fn serialize<W>(
14293         mut writer: &mut EventWriter<W>,
14294         name: &str,
14295         obj: &String,
14296     ) -> Result<(), xml::writer::Error>
14297     where
14298         W: Write,
14299     {
14300         write_characters_element(writer, name, obj)
14301     }
14302 }
14303 
14304 /// <p>Container for granting information.</p>
14305 #[derive(Clone, Debug, Default, PartialEq)]
14306 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14307 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14308 pub struct TargetGrant {
14309     /// <p>Container for the person being granted permissions.</p>
14310     pub grantee: Option<Grantee>,
14311     /// <p>Logging permissions assigned to the grantee for the bucket.</p>
14312     pub permission: Option<String>,
14313 }
14314 
14315 #[allow(dead_code)]
14316 struct TargetGrantDeserializer;
14317 impl TargetGrantDeserializer {
14318     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<TargetGrant, XmlParseError>14319     fn deserialize<T: Peek + Next>(
14320         tag_name: &str,
14321         stack: &mut T,
14322     ) -> Result<TargetGrant, XmlParseError> {
14323         deserialize_elements::<_, TargetGrant, _>(tag_name, stack, |name, stack, obj| {
14324             match name {
14325                 "Grantee" => {
14326                     obj.grantee = Some(GranteeDeserializer::deserialize("Grantee", stack)?);
14327                 }
14328                 "Permission" => {
14329                     obj.permission = Some(BucketLogsPermissionDeserializer::deserialize(
14330                         "Permission",
14331                         stack,
14332                     )?);
14333                 }
14334                 _ => skip_tree(stack),
14335             }
14336             Ok(())
14337         })
14338     }
14339 }
14340 
14341 pub struct TargetGrantSerializer;
14342 impl TargetGrantSerializer {
14343     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &TargetGrant, ) -> Result<(), xml::writer::Error> where W: Write,14344     pub fn serialize<W>(
14345         mut writer: &mut EventWriter<W>,
14346         name: &str,
14347         obj: &TargetGrant,
14348     ) -> Result<(), xml::writer::Error>
14349     where
14350         W: Write,
14351     {
14352         writer.write(xml::writer::XmlEvent::start_element(name))?;
14353         if let Some(ref value) = obj.grantee {
14354             &GranteeSerializer::serialize(&mut writer, "Grantee", value)?;
14355         }
14356         if let Some(ref value) = obj.permission {
14357             write_characters_element(writer, "Permission", &value)?;
14358         }
14359         writer.write(xml::writer::XmlEvent::end_element())
14360     }
14361 }
14362 
14363 #[allow(dead_code)]
14364 struct TargetGrantsDeserializer;
14365 impl TargetGrantsDeserializer {
14366     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<TargetGrant>, XmlParseError>14367     fn deserialize<T: Peek + Next>(
14368         tag_name: &str,
14369         stack: &mut T,
14370     ) -> Result<Vec<TargetGrant>, XmlParseError> {
14371         deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
14372             if name == "Grant" {
14373                 obj.push(TargetGrantDeserializer::deserialize("Grant", stack)?);
14374             } else {
14375                 skip_tree(stack);
14376             }
14377             Ok(())
14378         })
14379     }
14380 }
14381 
14382 pub struct TargetGrantsSerializer;
14383 impl TargetGrantsSerializer {
14384     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<TargetGrant>, ) -> Result<(), xml::writer::Error> where W: Write,14385     pub fn serialize<W>(
14386         mut writer: &mut EventWriter<W>,
14387         name: &str,
14388         obj: &Vec<TargetGrant>,
14389     ) -> Result<(), xml::writer::Error>
14390     where
14391         W: Write,
14392     {
14393         writer.write(xml::writer::XmlEvent::start_element(name))?;
14394         for element in obj {
14395             TargetGrantSerializer::serialize(writer, "Grant", element)?;
14396         }
14397         writer.write(xml::writer::XmlEvent::end_element())?;
14398         Ok(())
14399     }
14400 }
14401 
14402 #[allow(dead_code)]
14403 struct TargetPrefixDeserializer;
14404 impl TargetPrefixDeserializer {
14405     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14406     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14407         xml_util::deserialize_primitive(tag_name, stack, Ok)
14408     }
14409 }
14410 
14411 pub struct TargetPrefixSerializer;
14412 impl TargetPrefixSerializer {
14413     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14414     pub fn serialize<W>(
14415         mut writer: &mut EventWriter<W>,
14416         name: &str,
14417         obj: &String,
14418     ) -> Result<(), xml::writer::Error>
14419     where
14420         W: Write,
14421     {
14422         write_characters_element(writer, name, obj)
14423     }
14424 }
14425 
14426 pub struct TierSerializer;
14427 impl TierSerializer {
14428     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14429     pub fn serialize<W>(
14430         mut writer: &mut EventWriter<W>,
14431         name: &str,
14432         obj: &String,
14433     ) -> Result<(), xml::writer::Error>
14434     where
14435         W: Write,
14436     {
14437         write_characters_element(writer, name, obj)
14438     }
14439 }
14440 
14441 /// <p>The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without additional operational overhead.</p>
14442 #[derive(Clone, Debug, Default, PartialEq)]
14443 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14444 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14445 pub struct Tiering {
14446     /// <p>S3 Intelligent-Tiering access tier. See <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access">Storage class for automatically optimizing frequently and infrequently accessed objects</a> for a list of access tiers in the S3 Intelligent-Tiering storage class.</p>
14447     pub access_tier: String,
14448     /// <p>The number of consecutive days of no access after which an object will be eligible to be transitioned to the corresponding tier. The minimum number of days specified for Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least 180 days. The maximum can be up to 2 years (730 days).</p>
14449     pub days: i64,
14450 }
14451 
14452 #[allow(dead_code)]
14453 struct TieringDeserializer;
14454 impl TieringDeserializer {
14455     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Tiering, XmlParseError>14456     fn deserialize<T: Peek + Next>(
14457         tag_name: &str,
14458         stack: &mut T,
14459     ) -> Result<Tiering, XmlParseError> {
14460         deserialize_elements::<_, Tiering, _>(tag_name, stack, |name, stack, obj| {
14461             match name {
14462                 "AccessTier" => {
14463                     obj.access_tier =
14464                         IntelligentTieringAccessTierDeserializer::deserialize("AccessTier", stack)?;
14465                 }
14466                 "Days" => {
14467                     obj.days = IntelligentTieringDaysDeserializer::deserialize("Days", stack)?;
14468                 }
14469                 _ => skip_tree(stack),
14470             }
14471             Ok(())
14472         })
14473     }
14474 }
14475 
14476 pub struct TieringSerializer;
14477 impl TieringSerializer {
14478     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Tiering, ) -> Result<(), xml::writer::Error> where W: Write,14479     pub fn serialize<W>(
14480         mut writer: &mut EventWriter<W>,
14481         name: &str,
14482         obj: &Tiering,
14483     ) -> Result<(), xml::writer::Error>
14484     where
14485         W: Write,
14486     {
14487         writer.write(xml::writer::XmlEvent::start_element(name))?;
14488         write_characters_element(writer, "AccessTier", &obj.access_tier)?;
14489         write_characters_element(writer, "Days", &obj.days.to_string())?;
14490         writer.write(xml::writer::XmlEvent::end_element())
14491     }
14492 }
14493 
14494 #[allow(dead_code)]
14495 struct TieringListDeserializer;
14496 impl TieringListDeserializer {
14497     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Tiering>, XmlParseError>14498     fn deserialize<T: Peek + Next>(
14499         tag_name: &str,
14500         stack: &mut T,
14501     ) -> Result<Vec<Tiering>, XmlParseError> {
14502         let mut obj = vec![];
14503 
14504         loop {
14505             let consume_next_tag = match stack.peek() {
14506                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
14507                     name.local_name == tag_name
14508                 }
14509                 _ => false,
14510             };
14511 
14512             if consume_next_tag {
14513                 obj.push(TieringDeserializer::deserialize(tag_name, stack)?);
14514             } else {
14515                 break;
14516             }
14517         }
14518 
14519         Ok(obj)
14520     }
14521 }
14522 
14523 pub struct TieringListSerializer;
14524 impl TieringListSerializer {
14525     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<Tiering>, ) -> Result<(), xml::writer::Error> where W: Write,14526     pub fn serialize<W>(
14527         mut writer: &mut EventWriter<W>,
14528         name: &str,
14529         obj: &Vec<Tiering>,
14530     ) -> Result<(), xml::writer::Error>
14531     where
14532         W: Write,
14533     {
14534         for element in obj {
14535             TieringSerializer::serialize(writer, name, element)?;
14536         }
14537         Ok(())
14538     }
14539 }
14540 
14541 #[allow(dead_code)]
14542 struct TokenDeserializer;
14543 impl TokenDeserializer {
14544     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14545     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14546         xml_util::deserialize_primitive(tag_name, stack, Ok)
14547     }
14548 }
14549 
14550 pub struct TokenSerializer;
14551 impl TokenSerializer {
14552     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14553     pub fn serialize<W>(
14554         mut writer: &mut EventWriter<W>,
14555         name: &str,
14556         obj: &String,
14557     ) -> Result<(), xml::writer::Error>
14558     where
14559         W: Write,
14560     {
14561         write_characters_element(writer, name, obj)
14562     }
14563 }
14564 
14565 #[allow(dead_code)]
14566 struct TopicArnDeserializer;
14567 impl TopicArnDeserializer {
14568     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14569     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14570         xml_util::deserialize_primitive(tag_name, stack, Ok)
14571     }
14572 }
14573 
14574 pub struct TopicArnSerializer;
14575 impl TopicArnSerializer {
14576     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14577     pub fn serialize<W>(
14578         mut writer: &mut EventWriter<W>,
14579         name: &str,
14580         obj: &String,
14581     ) -> Result<(), xml::writer::Error>
14582     where
14583         W: Write,
14584     {
14585         write_characters_element(writer, name, obj)
14586     }
14587 }
14588 
14589 /// <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>
14590 #[derive(Clone, Debug, Default, PartialEq)]
14591 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14592 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14593 pub struct TopicConfiguration {
14594     /// <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 S3 User Guide</i>.</p>
14595     pub events: Vec<String>,
14596     pub filter: Option<NotificationConfigurationFilter>,
14597     pub id: Option<String>,
14598     /// <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>
14599     pub topic_arn: String,
14600 }
14601 
14602 #[allow(dead_code)]
14603 struct TopicConfigurationDeserializer;
14604 impl TopicConfigurationDeserializer {
14605     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<TopicConfiguration, XmlParseError>14606     fn deserialize<T: Peek + Next>(
14607         tag_name: &str,
14608         stack: &mut T,
14609     ) -> Result<TopicConfiguration, XmlParseError> {
14610         deserialize_elements::<_, TopicConfiguration, _>(tag_name, stack, |name, stack, obj| {
14611             match name {
14612                 "Event" => {
14613                     obj.events
14614                         .extend(EventListDeserializer::deserialize("Event", stack)?);
14615                 }
14616                 "Filter" => {
14617                     obj.filter = Some(NotificationConfigurationFilterDeserializer::deserialize(
14618                         "Filter", stack,
14619                     )?);
14620                 }
14621                 "Id" => {
14622                     obj.id = Some(NotificationIdDeserializer::deserialize("Id", stack)?);
14623                 }
14624                 "Topic" => {
14625                     obj.topic_arn = TopicArnDeserializer::deserialize("Topic", stack)?;
14626                 }
14627                 _ => skip_tree(stack),
14628             }
14629             Ok(())
14630         })
14631     }
14632 }
14633 
14634 pub struct TopicConfigurationSerializer;
14635 impl TopicConfigurationSerializer {
14636     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &TopicConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,14637     pub fn serialize<W>(
14638         mut writer: &mut EventWriter<W>,
14639         name: &str,
14640         obj: &TopicConfiguration,
14641     ) -> Result<(), xml::writer::Error>
14642     where
14643         W: Write,
14644     {
14645         writer.write(xml::writer::XmlEvent::start_element(name))?;
14646         EventListSerializer::serialize(&mut writer, "Event", &obj.events)?;
14647         if let Some(ref value) = obj.filter {
14648             &NotificationConfigurationFilterSerializer::serialize(&mut writer, "Filter", value)?;
14649         }
14650         if let Some(ref value) = obj.id {
14651             write_characters_element(writer, "Id", &value)?;
14652         }
14653         write_characters_element(writer, "Topic", &obj.topic_arn)?;
14654         writer.write(xml::writer::XmlEvent::end_element())
14655     }
14656 }
14657 
14658 /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_TopicConfiguration.html">TopicConfiguration</a> instead.</p>
14659 #[derive(Clone, Debug, Default, PartialEq)]
14660 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14661 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14662 pub struct TopicConfigurationDeprecated {
14663     /// <p>A collection of events related to objects</p>
14664     pub events: Option<Vec<String>>,
14665     pub id: Option<String>,
14666     /// <p>Amazon SNS topic to which Amazon S3 will publish a message to report the specified events for the bucket.</p>
14667     pub topic: Option<String>,
14668 }
14669 
14670 #[allow(dead_code)]
14671 struct TopicConfigurationDeprecatedDeserializer;
14672 impl TopicConfigurationDeprecatedDeserializer {
14673     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<TopicConfigurationDeprecated, XmlParseError>14674     fn deserialize<T: Peek + Next>(
14675         tag_name: &str,
14676         stack: &mut T,
14677     ) -> Result<TopicConfigurationDeprecated, XmlParseError> {
14678         deserialize_elements::<_, TopicConfigurationDeprecated, _>(
14679             tag_name,
14680             stack,
14681             |name, stack, obj| {
14682                 match name {
14683                     "Event" => {
14684                         obj.events
14685                             .get_or_insert(vec![])
14686                             .extend(EventListDeserializer::deserialize("Event", stack)?);
14687                     }
14688                     "Id" => {
14689                         obj.id = Some(NotificationIdDeserializer::deserialize("Id", stack)?);
14690                     }
14691                     "Topic" => {
14692                         obj.topic = Some(TopicArnDeserializer::deserialize("Topic", stack)?);
14693                     }
14694                     _ => skip_tree(stack),
14695                 }
14696                 Ok(())
14697             },
14698         )
14699     }
14700 }
14701 
14702 pub struct TopicConfigurationDeprecatedSerializer;
14703 impl TopicConfigurationDeprecatedSerializer {
14704     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &TopicConfigurationDeprecated, ) -> Result<(), xml::writer::Error> where W: Write,14705     pub fn serialize<W>(
14706         mut writer: &mut EventWriter<W>,
14707         name: &str,
14708         obj: &TopicConfigurationDeprecated,
14709     ) -> Result<(), xml::writer::Error>
14710     where
14711         W: Write,
14712     {
14713         writer.write(xml::writer::XmlEvent::start_element(name))?;
14714         if let Some(ref value) = obj.events {
14715             &EventListSerializer::serialize(&mut writer, "Event", value)?;
14716         }
14717         if let Some(ref value) = obj.id {
14718             write_characters_element(writer, "Id", &value)?;
14719         }
14720         if let Some(ref value) = obj.topic {
14721             write_characters_element(writer, "Topic", &value)?;
14722         }
14723         writer.write(xml::writer::XmlEvent::end_element())
14724     }
14725 }
14726 
14727 #[allow(dead_code)]
14728 struct TopicConfigurationListDeserializer;
14729 impl TopicConfigurationListDeserializer {
14730     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<TopicConfiguration>, XmlParseError>14731     fn deserialize<T: Peek + Next>(
14732         tag_name: &str,
14733         stack: &mut T,
14734     ) -> Result<Vec<TopicConfiguration>, XmlParseError> {
14735         let mut obj = vec![];
14736 
14737         loop {
14738             let consume_next_tag = match stack.peek() {
14739                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
14740                     name.local_name == tag_name
14741                 }
14742                 _ => false,
14743             };
14744 
14745             if consume_next_tag {
14746                 obj.push(TopicConfigurationDeserializer::deserialize(
14747                     tag_name, stack,
14748                 )?);
14749             } else {
14750                 break;
14751             }
14752         }
14753 
14754         Ok(obj)
14755     }
14756 }
14757 
14758 pub struct TopicConfigurationListSerializer;
14759 impl TopicConfigurationListSerializer {
14760     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<TopicConfiguration>, ) -> Result<(), xml::writer::Error> where W: Write,14761     pub fn serialize<W>(
14762         mut writer: &mut EventWriter<W>,
14763         name: &str,
14764         obj: &Vec<TopicConfiguration>,
14765     ) -> Result<(), xml::writer::Error>
14766     where
14767         W: Write,
14768     {
14769         for element in obj {
14770             TopicConfigurationSerializer::serialize(writer, name, element)?;
14771         }
14772         Ok(())
14773     }
14774 }
14775 
14776 /// <p>Specifies when an object transitions to a specified storage class. For more information about Amazon S3 lifecycle configuration rules, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html">Transitioning Objects Using Amazon S3 Lifecycle</a> in the <i>Amazon S3 User Guide</i>.</p>
14777 #[derive(Clone, Debug, Default, PartialEq)]
14778 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14779 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
14780 pub struct Transition {
14781     /// <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>
14782     pub date: Option<String>,
14783     /// <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>
14784     pub days: Option<i64>,
14785     /// <p>The storage class to which you want the object to transition.</p>
14786     pub storage_class: Option<String>,
14787 }
14788 
14789 #[allow(dead_code)]
14790 struct TransitionDeserializer;
14791 impl TransitionDeserializer {
14792     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Transition, XmlParseError>14793     fn deserialize<T: Peek + Next>(
14794         tag_name: &str,
14795         stack: &mut T,
14796     ) -> Result<Transition, XmlParseError> {
14797         deserialize_elements::<_, Transition, _>(tag_name, stack, |name, stack, obj| {
14798             match name {
14799                 "Date" => {
14800                     obj.date = Some(DateDeserializer::deserialize("Date", stack)?);
14801                 }
14802                 "Days" => {
14803                     obj.days = Some(DaysDeserializer::deserialize("Days", stack)?);
14804                 }
14805                 "StorageClass" => {
14806                     obj.storage_class = Some(TransitionStorageClassDeserializer::deserialize(
14807                         "StorageClass",
14808                         stack,
14809                     )?);
14810                 }
14811                 _ => skip_tree(stack),
14812             }
14813             Ok(())
14814         })
14815     }
14816 }
14817 
14818 pub struct TransitionSerializer;
14819 impl TransitionSerializer {
14820     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Transition, ) -> Result<(), xml::writer::Error> where W: Write,14821     pub fn serialize<W>(
14822         mut writer: &mut EventWriter<W>,
14823         name: &str,
14824         obj: &Transition,
14825     ) -> Result<(), xml::writer::Error>
14826     where
14827         W: Write,
14828     {
14829         writer.write(xml::writer::XmlEvent::start_element(name))?;
14830         if let Some(ref value) = obj.date {
14831             write_characters_element(writer, "Date", &value.to_string())?;
14832         }
14833         if let Some(ref value) = obj.days {
14834             write_characters_element(writer, "Days", &value.to_string())?;
14835         }
14836         if let Some(ref value) = obj.storage_class {
14837             write_characters_element(writer, "StorageClass", &value)?;
14838         }
14839         writer.write(xml::writer::XmlEvent::end_element())
14840     }
14841 }
14842 
14843 #[allow(dead_code)]
14844 struct TransitionListDeserializer;
14845 impl TransitionListDeserializer {
14846     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<Vec<Transition>, XmlParseError>14847     fn deserialize<T: Peek + Next>(
14848         tag_name: &str,
14849         stack: &mut T,
14850     ) -> Result<Vec<Transition>, XmlParseError> {
14851         let mut obj = vec![];
14852 
14853         loop {
14854             let consume_next_tag = match stack.peek() {
14855                 Some(&Ok(xml::reader::XmlEvent::StartElement { ref name, .. })) => {
14856                     name.local_name == tag_name
14857                 }
14858                 _ => false,
14859             };
14860 
14861             if consume_next_tag {
14862                 obj.push(TransitionDeserializer::deserialize(tag_name, stack)?);
14863             } else {
14864                 break;
14865             }
14866         }
14867 
14868         Ok(obj)
14869     }
14870 }
14871 
14872 pub struct TransitionListSerializer;
14873 impl TransitionListSerializer {
14874     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<Transition>, ) -> Result<(), xml::writer::Error> where W: Write,14875     pub fn serialize<W>(
14876         mut writer: &mut EventWriter<W>,
14877         name: &str,
14878         obj: &Vec<Transition>,
14879     ) -> Result<(), xml::writer::Error>
14880     where
14881         W: Write,
14882     {
14883         for element in obj {
14884             TransitionSerializer::serialize(writer, name, element)?;
14885         }
14886         Ok(())
14887     }
14888 }
14889 
14890 #[allow(dead_code)]
14891 struct TransitionStorageClassDeserializer;
14892 impl TransitionStorageClassDeserializer {
14893     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14894     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14895         xml_util::deserialize_primitive(tag_name, stack, Ok)
14896     }
14897 }
14898 
14899 pub struct TransitionStorageClassSerializer;
14900 impl TransitionStorageClassSerializer {
14901     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14902     pub fn serialize<W>(
14903         mut writer: &mut EventWriter<W>,
14904         name: &str,
14905         obj: &String,
14906     ) -> Result<(), xml::writer::Error>
14907     where
14908         W: Write,
14909     {
14910         write_characters_element(writer, name, obj)
14911     }
14912 }
14913 
14914 #[allow(dead_code)]
14915 struct TypeDeserializer;
14916 impl TypeDeserializer {
14917     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14918     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14919         xml_util::deserialize_primitive(tag_name, stack, Ok)
14920     }
14921 }
14922 
14923 pub struct TypeSerializer;
14924 impl TypeSerializer {
14925     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14926     pub fn serialize<W>(
14927         mut writer: &mut EventWriter<W>,
14928         name: &str,
14929         obj: &String,
14930     ) -> Result<(), xml::writer::Error>
14931     where
14932         W: Write,
14933     {
14934         write_characters_element(writer, name, obj)
14935     }
14936 }
14937 
14938 #[allow(dead_code)]
14939 struct URIDeserializer;
14940 impl URIDeserializer {
14941     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14942     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14943         xml_util::deserialize_primitive(tag_name, stack, Ok)
14944     }
14945 }
14946 
14947 pub struct URISerializer;
14948 impl URISerializer {
14949     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14950     pub fn serialize<W>(
14951         mut writer: &mut EventWriter<W>,
14952         name: &str,
14953         obj: &String,
14954     ) -> Result<(), xml::writer::Error>
14955     where
14956         W: Write,
14957     {
14958         write_characters_element(writer, name, obj)
14959     }
14960 }
14961 
14962 #[allow(dead_code)]
14963 struct UploadIdMarkerDeserializer;
14964 impl UploadIdMarkerDeserializer {
14965     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>14966     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
14967         xml_util::deserialize_primitive(tag_name, stack, Ok)
14968     }
14969 }
14970 
14971 pub struct UploadIdMarkerSerializer;
14972 impl UploadIdMarkerSerializer {
14973     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,14974     pub fn serialize<W>(
14975         mut writer: &mut EventWriter<W>,
14976         name: &str,
14977         obj: &String,
14978     ) -> Result<(), xml::writer::Error>
14979     where
14980         W: Write,
14981     {
14982         write_characters_element(writer, name, obj)
14983     }
14984 }
14985 
14986 #[derive(Clone, Debug, Default, PartialEq)]
14987 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
14988 pub struct UploadPartCopyOutput {
14989     /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with AWS KMS (SSE-KMS).</p>
14990     pub bucket_key_enabled: Option<bool>,
14991     /// <p>Container for all response elements.</p>
14992     pub copy_part_result: Option<CopyPartResult>,
14993     /// <p>The version of the source object that was copied, if you have enabled versioning on the source bucket.</p>
14994     pub copy_source_version_id: Option<String>,
14995     pub request_charged: Option<String>,
14996     /// <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>
14997     pub sse_customer_algorithm: Option<String>,
14998     /// <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>
14999     pub sse_customer_key_md5: Option<String>,
15000     /// <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>
15001     pub ssekms_key_id: Option<String>,
15002     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
15003     pub server_side_encryption: Option<String>,
15004 }
15005 
15006 #[allow(dead_code)]
15007 struct UploadPartCopyOutputDeserializer;
15008 impl UploadPartCopyOutputDeserializer {
15009     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<UploadPartCopyOutput, XmlParseError>15010     fn deserialize<T: Peek + Next>(
15011         tag_name: &str,
15012         stack: &mut T,
15013     ) -> Result<UploadPartCopyOutput, XmlParseError> {
15014         Ok(UploadPartCopyOutput {
15015             copy_part_result: Some(CopyPartResultDeserializer::deserialize(
15016                 "CopyPartResult",
15017                 stack,
15018             )?),
15019             ..UploadPartCopyOutput::default()
15020         })
15021     }
15022 }
15023 #[derive(Clone, Debug, Default, PartialEq)]
15024 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
15025 pub struct UploadPartCopyRequest {
15026     /// <p>The bucket name.</p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
15027     pub bucket: String,
15028     /// <p>Specifies the source object for the copy operation. You specify the value in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p> <ul> <li> <p>For objects not accessed through an access point, specify the name of the source bucket and key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL encoded.</p> </li> <li> <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:&lt;Region&gt;:&lt;account-id&gt;:accesspoint/&lt;access-point-name&gt;/object/&lt;key&gt;</code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p> <note> <p>Amazon S3 supports copy operations using access points only when the source and destination buckets are in the same AWS Region.</p> </note> <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:&lt;Region&gt;:&lt;account-id&gt;:outpost/&lt;outpost-id&gt;/object/&lt;key&gt;</code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL encoded. </p> </li> </ul> <p>To copy a specific version of an object, append <code>?versionId=&lt;version-id&gt;</code> to the value (for example, <code>awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>). If you don't specify a version ID, Amazon S3 copies the latest version of the source object.</p>
15029     pub copy_source: String,
15030     /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
15031     pub copy_source_if_match: Option<String>,
15032     /// <p>Copies the object if it has been modified since the specified time.</p>
15033     pub copy_source_if_modified_since: Option<String>,
15034     /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
15035     pub copy_source_if_none_match: Option<String>,
15036     /// <p>Copies the object if it hasn't been modified since the specified time.</p>
15037     pub copy_source_if_unmodified_since: Option<String>,
15038     /// <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>
15039     pub copy_source_range: Option<String>,
15040     /// <p>Specifies the algorithm to use when decrypting the source object (for example, AES256).</p>
15041     pub copy_source_sse_customer_algorithm: Option<String>,
15042     /// <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>
15043     pub copy_source_sse_customer_key: Option<String>,
15044     /// <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>
15045     pub copy_source_sse_customer_key_md5: Option<String>,
15046     /// <p>The account ID of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
15047     pub expected_bucket_owner: Option<String>,
15048     /// <p>The account ID of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
15049     pub expected_source_bucket_owner: Option<String>,
15050     /// <p>Object key for which the multipart upload was initiated.</p>
15051     pub key: String,
15052     /// <p>Part number of part being copied. This is a positive integer between 1 and 10,000.</p>
15053     pub part_number: i64,
15054     pub request_payer: Option<String>,
15055     /// <p>Specifies the algorithm to use to when encrypting the object (for example, AES256).</p>
15056     pub sse_customer_algorithm: Option<String>,
15057     /// <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>
15058     pub sse_customer_key: Option<String>,
15059     /// <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>
15060     pub sse_customer_key_md5: Option<String>,
15061     /// <p>Upload ID identifying the multipart upload whose part is being copied.</p>
15062     pub upload_id: String,
15063 }
15064 
15065 #[derive(Clone, Debug, Default, PartialEq)]
15066 #[cfg_attr(feature = "serialize_structs", derive(Serialize))]
15067 pub struct UploadPartOutput {
15068     /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with AWS KMS (SSE-KMS).</p>
15069     pub bucket_key_enabled: Option<bool>,
15070     /// <p>Entity tag for the uploaded object.</p>
15071     pub e_tag: Option<String>,
15072     pub request_charged: Option<String>,
15073     /// <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>
15074     pub sse_customer_algorithm: Option<String>,
15075     /// <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>
15076     pub sse_customer_key_md5: Option<String>,
15077     /// <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>
15078     pub ssekms_key_id: Option<String>,
15079     /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
15080     pub server_side_encryption: Option<String>,
15081 }
15082 
15083 #[allow(dead_code)]
15084 struct UploadPartOutputDeserializer;
15085 impl UploadPartOutputDeserializer {
15086     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>( tag_name: &str, stack: &mut T, ) -> Result<UploadPartOutput, XmlParseError>15087     fn deserialize<T: Peek + Next>(
15088         tag_name: &str,
15089         stack: &mut T,
15090     ) -> Result<UploadPartOutput, XmlParseError> {
15091         xml_util::start_element(tag_name, stack)?;
15092 
15093         let obj = UploadPartOutput::default();
15094 
15095         xml_util::end_element(tag_name, stack)?;
15096 
15097         Ok(obj)
15098     }
15099 }
15100 #[derive(Debug, Default)]
15101 pub struct UploadPartRequest {
15102     /// <p>Object data.</p>
15103     pub body: Option<StreamingBody>,
15104     /// <p>The name of the bucket to which the multipart upload was initiated.</p> <p>When using this action 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 action with 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/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com. When using this action using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p>
15105     pub bucket: String,
15106     /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.</p>
15107     pub content_length: Option<i64>,
15108     /// <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>
15109     pub content_md5: Option<String>,
15110     /// <p>The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP <code>403 (Access Denied)</code> error.</p>
15111     pub expected_bucket_owner: Option<String>,
15112     /// <p>Object key for which the multipart upload was initiated.</p>
15113     pub key: String,
15114     /// <p>Part number of part being uploaded. This is a positive integer between 1 and 10,000.</p>
15115     pub part_number: i64,
15116     pub request_payer: Option<String>,
15117     /// <p>Specifies the algorithm to use to when encrypting the object (for example, AES256).</p>
15118     pub sse_customer_algorithm: Option<String>,
15119     /// <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>
15120     pub sse_customer_key: Option<String>,
15121     /// <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>
15122     pub sse_customer_key_md5: Option<String>,
15123     /// <p>Upload ID identifying the multipart upload whose part is being uploaded.</p>
15124     pub upload_id: String,
15125 }
15126 
15127 pub struct UserMetadataSerializer;
15128 impl UserMetadataSerializer {
15129     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &Vec<MetadataEntry>, ) -> Result<(), xml::writer::Error> where W: Write,15130     pub fn serialize<W>(
15131         mut writer: &mut EventWriter<W>,
15132         name: &str,
15133         obj: &Vec<MetadataEntry>,
15134     ) -> Result<(), xml::writer::Error>
15135     where
15136         W: Write,
15137     {
15138         writer.write(xml::writer::XmlEvent::start_element(name))?;
15139         for element in obj {
15140             MetadataEntrySerializer::serialize(writer, "MetadataEntry", element)?;
15141         }
15142         writer.write(xml::writer::XmlEvent::end_element())?;
15143         Ok(())
15144     }
15145 }
15146 
15147 #[allow(dead_code)]
15148 struct ValueDeserializer;
15149 impl ValueDeserializer {
15150     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>15151     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
15152         xml_util::deserialize_primitive(tag_name, stack, Ok)
15153     }
15154 }
15155 
15156 pub struct ValueSerializer;
15157 impl ValueSerializer {
15158     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,15159     pub fn serialize<W>(
15160         mut writer: &mut EventWriter<W>,
15161         name: &str,
15162         obj: &String,
15163     ) -> Result<(), xml::writer::Error>
15164     where
15165         W: Write,
15166     {
15167         write_characters_element(writer, name, obj)
15168     }
15169 }
15170 
15171 #[allow(dead_code)]
15172 struct VersionIdMarkerDeserializer;
15173 impl VersionIdMarkerDeserializer {
15174     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError>15175     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
15176         xml_util::deserialize_primitive(tag_name, stack, Ok)
15177     }
15178 }
15179 
15180 pub struct VersionIdMarkerSerializer;
15181 impl VersionIdMarkerSerializer {
15182     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &String, ) -> Result<(), xml::writer::Error> where W: Write,15183     pub fn serialize<W>(
15184         mut writer: &mut EventWriter<W>,
15185         name: &str,
15186         obj: &String,
15187     ) -> Result<(), xml::writer::Error>
15188     where
15189         W: Write,
15190     {
15191         write_characters_element(writer, name, obj)
15192     }
15193 }
15194 
15195 /// <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 S3 API Reference</i>.</p>
15196 #[derive(Clone, Debug, Default, PartialEq)]
15197 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
15198 pub struct VersioningConfiguration {
15199     /// <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>
15200     pub mfa_delete: Option<String>,
15201     /// <p>The versioning state of the bucket.</p>
15202     pub status: Option<String>,
15203 }
15204 
15205 pub struct VersioningConfigurationSerializer;
15206 impl VersioningConfigurationSerializer {
15207     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &VersioningConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,15208     pub fn serialize<W>(
15209         mut writer: &mut EventWriter<W>,
15210         name: &str,
15211         obj: &VersioningConfiguration,
15212     ) -> Result<(), xml::writer::Error>
15213     where
15214         W: Write,
15215     {
15216         writer.write(xml::writer::XmlEvent::start_element(name))?;
15217         if let Some(ref value) = obj.mfa_delete {
15218             write_characters_element(writer, "MfaDelete", &value)?;
15219         }
15220         if let Some(ref value) = obj.status {
15221             write_characters_element(writer, "Status", &value)?;
15222         }
15223         writer.write(xml::writer::XmlEvent::end_element())
15224     }
15225 }
15226 
15227 /// <p>Specifies website configuration parameters for an Amazon S3 bucket.</p>
15228 #[derive(Clone, Debug, Default, PartialEq)]
15229 #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
15230 pub struct WebsiteConfiguration {
15231     /// <p>The name of the error document for the website.</p>
15232     pub error_document: Option<ErrorDocument>,
15233     /// <p>The name of the index document for the website.</p>
15234     pub index_document: Option<IndexDocument>,
15235     /// <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>
15236     pub redirect_all_requests_to: Option<RedirectAllRequestsTo>,
15237     /// <p>Rules that define when a redirect is applied and the redirect behavior.</p>
15238     pub routing_rules: Option<Vec<RoutingRule>>,
15239 }
15240 
15241 pub struct WebsiteConfigurationSerializer;
15242 impl WebsiteConfigurationSerializer {
15243     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &WebsiteConfiguration, ) -> Result<(), xml::writer::Error> where W: Write,15244     pub fn serialize<W>(
15245         mut writer: &mut EventWriter<W>,
15246         name: &str,
15247         obj: &WebsiteConfiguration,
15248     ) -> Result<(), xml::writer::Error>
15249     where
15250         W: Write,
15251     {
15252         writer.write(xml::writer::XmlEvent::start_element(name))?;
15253         if let Some(ref value) = obj.error_document {
15254             &ErrorDocumentSerializer::serialize(&mut writer, "ErrorDocument", value)?;
15255         }
15256         if let Some(ref value) = obj.index_document {
15257             &IndexDocumentSerializer::serialize(&mut writer, "IndexDocument", value)?;
15258         }
15259         if let Some(ref value) = obj.redirect_all_requests_to {
15260             &RedirectAllRequestsToSerializer::serialize(
15261                 &mut writer,
15262                 "RedirectAllRequestsTo",
15263                 value,
15264             )?;
15265         }
15266         if let Some(ref value) = obj.routing_rules {
15267             &RoutingRulesSerializer::serialize(&mut writer, "RoutingRules", value)?;
15268         }
15269         writer.write(xml::writer::XmlEvent::end_element())
15270     }
15271 }
15272 
15273 #[derive(Debug, Default)]
15274 pub struct WriteGetObjectResponseRequest {
15275     /// <p>Indicates that a range of bytes was specified.</p>
15276     pub accept_ranges: Option<String>,
15277     /// <p>The object data.</p>
15278     pub body: Option<StreamingBody>,
15279     /// <p> Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side encryption with AWS KMS (SSE-KMS).</p>
15280     pub bucket_key_enabled: Option<bool>,
15281     /// <p>Specifies caching behavior along the request/reply chain.</p>
15282     pub cache_control: Option<String>,
15283     /// <p>Specifies presentational information for the object.</p>
15284     pub content_disposition: Option<String>,
15285     /// <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>
15286     pub content_encoding: Option<String>,
15287     /// <p>The language the content is in.</p>
15288     pub content_language: Option<String>,
15289     /// <p>The size of the content body in bytes.</p>
15290     pub content_length: Option<i64>,
15291     /// <p>The portion of the object returned in the response.</p>
15292     pub content_range: Option<String>,
15293     /// <p>A standard MIME type describing the format of the object data.</p>
15294     pub content_type: Option<String>,
15295     /// <p>Specifies whether an object stored in Amazon S3 is (<code>true</code>) or is not (<code>false</code>) a delete marker. </p>
15296     pub delete_marker: Option<bool>,
15297     /// <p>An opaque identifier assigned by a web server to a specific version of a resource found at a URL. </p>
15298     pub e_tag: Option<String>,
15299     /// <p>A string that uniquely identifies an error condition. Returned in the &lt;Code&gt; tag of the error XML response for a corresponding <code>GetObject</code> call. Cannot be used with a successful <code>StatusCode</code> header or when the transformed object is provided in the body. All error codes from S3 are sentence-cased. Regex value is "^[A-Z][a-zA-Z]+$".</p>
15300     pub error_code: Option<String>,
15301     /// <p>Contains a generic description of the error condition. Returned in the &lt;Message&gt; tag of the error XML response for a corresponding <code>GetObject</code> call. Cannot be used with a successful <code>StatusCode</code> header or when the transformed object is provided in body.</p>
15302     pub error_message: Option<String>,
15303     /// <p>If object stored in Amazon S3 expiration is configured (see PUT Bucket lifecycle) it includes expiry-date and rule-id key-value pairs providing object expiration information. The value of the rule-id is URL encoded. </p>
15304     pub expiration: Option<String>,
15305     /// <p>The date and time at which the object is no longer cacheable.</p>
15306     pub expires: Option<String>,
15307     /// <p>The date and time that the object was last modified.</p>
15308     pub last_modified: Option<String>,
15309     /// <p>A map of metadata to store with the object in S3.</p>
15310     pub metadata: Option<::std::collections::HashMap<String, String>>,
15311     /// <p>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>
15312     pub missing_meta: Option<i64>,
15313     /// <p>Indicates whether an object stored in Amazon S3 has an active legal hold.</p>
15314     pub object_lock_legal_hold_status: Option<String>,
15315     /// <p>Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html">Object Lock</a>.</p>
15316     pub object_lock_mode: Option<String>,
15317     /// <p>The date and time when Object Lock is configured to expire.</p>
15318     pub object_lock_retain_until_date: Option<String>,
15319     /// <p>The count of parts this object has.</p>
15320     pub parts_count: Option<i64>,
15321     /// <p>Indicates if request involves bucket that is either a source or destination in a Replication rule. For more information about S3 Replication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html">Replication</a>.</p>
15322     pub replication_status: Option<String>,
15323     pub request_charged: Option<String>,
15324     /// <p>Route prefix to the HTTP URL generated.</p>
15325     pub request_route: String,
15326     /// <p>A single use encrypted token that maps <code>WriteGetObjectResponse</code> to the end user <code>GetObject</code> request.</p>
15327     pub request_token: String,
15328     /// <p>Provides information about object restoration operation and expiration time of the restored object copy.</p>
15329     pub restore: Option<String>,
15330     /// <p>Encryption algorithm used if server-side encryption with a customer-provided encryption key was specified for object stored in Amazon S3.</p>
15331     pub sse_customer_algorithm: Option<String>,
15332     /// <p> 128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data stored in S3. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html">Protecting data using server-side encryption with customer-provided encryption keys (SSE-C)</a>.</p>
15333     pub sse_customer_key_md5: Option<String>,
15334     /// <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 stored in Amazon S3 object. </p>
15335     pub ssekms_key_id: Option<String>,
15336     /// <p> The server-side encryption algorithm used when storing requested object in Amazon S3 (for example, AES256, aws:kms).</p>
15337     pub server_side_encryption: Option<String>,
15338     /// <p><p>The integer status code for an HTTP response of a corresponding <code>GetObject</code> request.</p> <p class="title"> <b>Status Codes</b> </p> <ul> <li> <p> <i>200 - OK</i> </p> </li> <li> <p> <i>206 - Partial Content</i> </p> </li> <li> <p> <i>304 - Not Modified</i> </p> </li> <li> <p> <i>400 - Bad Request</i> </p> </li> <li> <p> <i>401 - Unauthorized</i> </p> </li> <li> <p> <i>403 - Forbidden</i> </p> </li> <li> <p> <i>404 - Not Found</i> </p> </li> <li> <p> <i>405 - Method Not Allowed</i> </p> </li> <li> <p> <i>409 - Conflict</i> </p> </li> <li> <p> <i>411 - Length Required</i> </p> </li> <li> <p> <i>412 - Precondition Failed</i> </p> </li> <li> <p> <i>416 - Range Not Satisfiable</i> </p> </li> <li> <p> <i>500 - Internal Server Error</i> </p> </li> <li> <p> <i>503 - Service Unavailable</i> </p> </li> </ul></p>
15339     pub status_code: Option<i64>,
15340     /// <p> The class of storage used to store object in Amazon S3.</p>
15341     pub storage_class: Option<String>,
15342     /// <p>The number of tags, if any, on the object.</p>
15343     pub tag_count: Option<i64>,
15344     /// <p>An ID used to reference a specific version of the object.</p>
15345     pub version_id: Option<String>,
15346 }
15347 
15348 #[allow(dead_code)]
15349 struct YearsDeserializer;
15350 impl YearsDeserializer {
15351     #[allow(dead_code, unused_variables)]
deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError>15352     fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
15353         xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
15354     }
15355 }
15356 
15357 pub struct YearsSerializer;
15358 impl YearsSerializer {
15359     #[allow(unused_variables, warnings)]
serialize<W>( mut writer: &mut EventWriter<W>, name: &str, obj: &i64, ) -> Result<(), xml::writer::Error> where W: Write,15360     pub fn serialize<W>(
15361         mut writer: &mut EventWriter<W>,
15362         name: &str,
15363         obj: &i64,
15364     ) -> Result<(), xml::writer::Error>
15365     where
15366         W: Write,
15367     {
15368         write_characters_element(writer, name, &obj.to_string())
15369     }
15370 }
15371 
15372 /// Errors returned by AbortMultipartUpload
15373 #[derive(Debug, PartialEq)]
15374 pub enum AbortMultipartUploadError {
15375     /// <p>The specified multipart upload does not exist.</p>
15376     NoSuchUpload(String),
15377 }
15378 
15379 impl AbortMultipartUploadError {
from_response(res: BufferedHttpResponse) -> RusotoError<AbortMultipartUploadError>15380     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AbortMultipartUploadError> {
15381         {
15382             let reader = EventReader::new(res.body.as_ref());
15383             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15384             find_start_element(&mut stack);
15385             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15386                 match &parsed_error.code[..] {
15387                     "NoSuchUpload" => {
15388                         return RusotoError::Service(AbortMultipartUploadError::NoSuchUpload(
15389                             parsed_error.message,
15390                         ))
15391                     }
15392                     _ => {}
15393                 }
15394             }
15395         }
15396         RusotoError::Unknown(res)
15397     }
15398 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15399     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15400     where
15401         T: Peek + Next,
15402     {
15403         XmlErrorDeserializer::deserialize("Error", stack)
15404     }
15405 }
15406 impl fmt::Display for AbortMultipartUploadError {
15407     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15408     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15409         match *self {
15410             AbortMultipartUploadError::NoSuchUpload(ref cause) => write!(f, "{}", cause),
15411         }
15412     }
15413 }
15414 impl Error for AbortMultipartUploadError {}
15415 /// Errors returned by CompleteMultipartUpload
15416 #[derive(Debug, PartialEq)]
15417 pub enum CompleteMultipartUploadError {}
15418 
15419 impl CompleteMultipartUploadError {
from_response(res: BufferedHttpResponse) -> RusotoError<CompleteMultipartUploadError>15420     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CompleteMultipartUploadError> {
15421         {
15422             let reader = EventReader::new(res.body.as_ref());
15423             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15424             find_start_element(&mut stack);
15425             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15426                 match &parsed_error.code[..] {
15427                     _ => {}
15428                 }
15429             }
15430         }
15431         RusotoError::Unknown(res)
15432     }
15433 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15434     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15435     where
15436         T: Peek + Next,
15437     {
15438         XmlErrorDeserializer::deserialize("Error", stack)
15439     }
15440 }
15441 impl fmt::Display for CompleteMultipartUploadError {
15442     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15443     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15444         match *self {}
15445     }
15446 }
15447 impl Error for CompleteMultipartUploadError {}
15448 /// Errors returned by CopyObject
15449 #[derive(Debug, PartialEq)]
15450 pub enum CopyObjectError {
15451     /// <p>The source object of the COPY action is not in the active tier and is only stored in Amazon S3 Glacier.</p>
15452     ObjectNotInActiveTierError(String),
15453 }
15454 
15455 impl CopyObjectError {
from_response(res: BufferedHttpResponse) -> RusotoError<CopyObjectError>15456     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CopyObjectError> {
15457         {
15458             let reader = EventReader::new(res.body.as_ref());
15459             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15460             find_start_element(&mut stack);
15461             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15462                 match &parsed_error.code[..] {
15463                     "ObjectNotInActiveTierError" => {
15464                         return RusotoError::Service(CopyObjectError::ObjectNotInActiveTierError(
15465                             parsed_error.message,
15466                         ))
15467                     }
15468                     _ => {}
15469                 }
15470             }
15471         }
15472         RusotoError::Unknown(res)
15473     }
15474 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15475     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15476     where
15477         T: Peek + Next,
15478     {
15479         XmlErrorDeserializer::deserialize("Error", stack)
15480     }
15481 }
15482 impl fmt::Display for CopyObjectError {
15483     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15484     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15485         match *self {
15486             CopyObjectError::ObjectNotInActiveTierError(ref cause) => write!(f, "{}", cause),
15487         }
15488     }
15489 }
15490 impl Error for CopyObjectError {}
15491 /// Errors returned by CreateBucket
15492 #[derive(Debug, PartialEq)]
15493 pub enum CreateBucketError {
15494     /// <p>The requested bucket name is not available. The bucket namespace is shared by all users of the system. Select a different name and try again.</p>
15495     BucketAlreadyExists(String),
15496     /// <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>
15497     BucketAlreadyOwnedByYou(String),
15498 }
15499 
15500 impl CreateBucketError {
from_response(res: BufferedHttpResponse) -> RusotoError<CreateBucketError>15501     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBucketError> {
15502         {
15503             let reader = EventReader::new(res.body.as_ref());
15504             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15505             find_start_element(&mut stack);
15506             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15507                 match &parsed_error.code[..] {
15508                     "BucketAlreadyExists" => {
15509                         return RusotoError::Service(CreateBucketError::BucketAlreadyExists(
15510                             parsed_error.message,
15511                         ))
15512                     }
15513                     "BucketAlreadyOwnedByYou" => {
15514                         return RusotoError::Service(CreateBucketError::BucketAlreadyOwnedByYou(
15515                             parsed_error.message,
15516                         ))
15517                     }
15518                     _ => {}
15519                 }
15520             }
15521         }
15522         RusotoError::Unknown(res)
15523     }
15524 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15525     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15526     where
15527         T: Peek + Next,
15528     {
15529         XmlErrorDeserializer::deserialize("Error", stack)
15530     }
15531 }
15532 impl fmt::Display for CreateBucketError {
15533     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15534     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15535         match *self {
15536             CreateBucketError::BucketAlreadyExists(ref cause) => write!(f, "{}", cause),
15537             CreateBucketError::BucketAlreadyOwnedByYou(ref cause) => write!(f, "{}", cause),
15538         }
15539     }
15540 }
15541 impl Error for CreateBucketError {}
15542 /// Errors returned by CreateMultipartUpload
15543 #[derive(Debug, PartialEq)]
15544 pub enum CreateMultipartUploadError {}
15545 
15546 impl CreateMultipartUploadError {
from_response(res: BufferedHttpResponse) -> RusotoError<CreateMultipartUploadError>15547     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateMultipartUploadError> {
15548         {
15549             let reader = EventReader::new(res.body.as_ref());
15550             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15551             find_start_element(&mut stack);
15552             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15553                 match &parsed_error.code[..] {
15554                     _ => {}
15555                 }
15556             }
15557         }
15558         RusotoError::Unknown(res)
15559     }
15560 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15561     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15562     where
15563         T: Peek + Next,
15564     {
15565         XmlErrorDeserializer::deserialize("Error", stack)
15566     }
15567 }
15568 impl fmt::Display for CreateMultipartUploadError {
15569     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15570     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15571         match *self {}
15572     }
15573 }
15574 impl Error for CreateMultipartUploadError {}
15575 /// Errors returned by DeleteBucket
15576 #[derive(Debug, PartialEq)]
15577 pub enum DeleteBucketError {}
15578 
15579 impl DeleteBucketError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketError>15580     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketError> {
15581         {
15582             let reader = EventReader::new(res.body.as_ref());
15583             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15584             find_start_element(&mut stack);
15585             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15586                 match &parsed_error.code[..] {
15587                     _ => {}
15588                 }
15589             }
15590         }
15591         RusotoError::Unknown(res)
15592     }
15593 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15594     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15595     where
15596         T: Peek + Next,
15597     {
15598         XmlErrorDeserializer::deserialize("Error", stack)
15599     }
15600 }
15601 impl fmt::Display for DeleteBucketError {
15602     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15603     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15604         match *self {}
15605     }
15606 }
15607 impl Error for DeleteBucketError {}
15608 /// Errors returned by DeleteBucketAnalyticsConfiguration
15609 #[derive(Debug, PartialEq)]
15610 pub enum DeleteBucketAnalyticsConfigurationError {}
15611 
15612 impl DeleteBucketAnalyticsConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<DeleteBucketAnalyticsConfigurationError>15613     pub fn from_response(
15614         res: BufferedHttpResponse,
15615     ) -> RusotoError<DeleteBucketAnalyticsConfigurationError> {
15616         {
15617             let reader = EventReader::new(res.body.as_ref());
15618             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15619             find_start_element(&mut stack);
15620             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15621                 match &parsed_error.code[..] {
15622                     _ => {}
15623                 }
15624             }
15625         }
15626         RusotoError::Unknown(res)
15627     }
15628 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15629     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15630     where
15631         T: Peek + Next,
15632     {
15633         XmlErrorDeserializer::deserialize("Error", stack)
15634     }
15635 }
15636 impl fmt::Display for DeleteBucketAnalyticsConfigurationError {
15637     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15638     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15639         match *self {}
15640     }
15641 }
15642 impl Error for DeleteBucketAnalyticsConfigurationError {}
15643 /// Errors returned by DeleteBucketCors
15644 #[derive(Debug, PartialEq)]
15645 pub enum DeleteBucketCorsError {}
15646 
15647 impl DeleteBucketCorsError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketCorsError>15648     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketCorsError> {
15649         {
15650             let reader = EventReader::new(res.body.as_ref());
15651             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15652             find_start_element(&mut stack);
15653             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15654                 match &parsed_error.code[..] {
15655                     _ => {}
15656                 }
15657             }
15658         }
15659         RusotoError::Unknown(res)
15660     }
15661 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15662     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15663     where
15664         T: Peek + Next,
15665     {
15666         XmlErrorDeserializer::deserialize("Error", stack)
15667     }
15668 }
15669 impl fmt::Display for DeleteBucketCorsError {
15670     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15671     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15672         match *self {}
15673     }
15674 }
15675 impl Error for DeleteBucketCorsError {}
15676 /// Errors returned by DeleteBucketEncryption
15677 #[derive(Debug, PartialEq)]
15678 pub enum DeleteBucketEncryptionError {}
15679 
15680 impl DeleteBucketEncryptionError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketEncryptionError>15681     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketEncryptionError> {
15682         {
15683             let reader = EventReader::new(res.body.as_ref());
15684             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15685             find_start_element(&mut stack);
15686             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15687                 match &parsed_error.code[..] {
15688                     _ => {}
15689                 }
15690             }
15691         }
15692         RusotoError::Unknown(res)
15693     }
15694 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15695     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15696     where
15697         T: Peek + Next,
15698     {
15699         XmlErrorDeserializer::deserialize("Error", stack)
15700     }
15701 }
15702 impl fmt::Display for DeleteBucketEncryptionError {
15703     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15704     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15705         match *self {}
15706     }
15707 }
15708 impl Error for DeleteBucketEncryptionError {}
15709 /// Errors returned by DeleteBucketIntelligentTieringConfiguration
15710 #[derive(Debug, PartialEq)]
15711 pub enum DeleteBucketIntelligentTieringConfigurationError {}
15712 
15713 impl DeleteBucketIntelligentTieringConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<DeleteBucketIntelligentTieringConfigurationError>15714     pub fn from_response(
15715         res: BufferedHttpResponse,
15716     ) -> RusotoError<DeleteBucketIntelligentTieringConfigurationError> {
15717         {
15718             let reader = EventReader::new(res.body.as_ref());
15719             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15720             find_start_element(&mut stack);
15721             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15722                 match &parsed_error.code[..] {
15723                     _ => {}
15724                 }
15725             }
15726         }
15727         RusotoError::Unknown(res)
15728     }
15729 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15730     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15731     where
15732         T: Peek + Next,
15733     {
15734         XmlErrorDeserializer::deserialize("Error", stack)
15735     }
15736 }
15737 impl fmt::Display for DeleteBucketIntelligentTieringConfigurationError {
15738     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15739     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15740         match *self {}
15741     }
15742 }
15743 impl Error for DeleteBucketIntelligentTieringConfigurationError {}
15744 /// Errors returned by DeleteBucketInventoryConfiguration
15745 #[derive(Debug, PartialEq)]
15746 pub enum DeleteBucketInventoryConfigurationError {}
15747 
15748 impl DeleteBucketInventoryConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<DeleteBucketInventoryConfigurationError>15749     pub fn from_response(
15750         res: BufferedHttpResponse,
15751     ) -> RusotoError<DeleteBucketInventoryConfigurationError> {
15752         {
15753             let reader = EventReader::new(res.body.as_ref());
15754             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15755             find_start_element(&mut stack);
15756             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15757                 match &parsed_error.code[..] {
15758                     _ => {}
15759                 }
15760             }
15761         }
15762         RusotoError::Unknown(res)
15763     }
15764 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15765     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15766     where
15767         T: Peek + Next,
15768     {
15769         XmlErrorDeserializer::deserialize("Error", stack)
15770     }
15771 }
15772 impl fmt::Display for DeleteBucketInventoryConfigurationError {
15773     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15774     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15775         match *self {}
15776     }
15777 }
15778 impl Error for DeleteBucketInventoryConfigurationError {}
15779 /// Errors returned by DeleteBucketLifecycle
15780 #[derive(Debug, PartialEq)]
15781 pub enum DeleteBucketLifecycleError {}
15782 
15783 impl DeleteBucketLifecycleError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketLifecycleError>15784     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketLifecycleError> {
15785         {
15786             let reader = EventReader::new(res.body.as_ref());
15787             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15788             find_start_element(&mut stack);
15789             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15790                 match &parsed_error.code[..] {
15791                     _ => {}
15792                 }
15793             }
15794         }
15795         RusotoError::Unknown(res)
15796     }
15797 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15798     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15799     where
15800         T: Peek + Next,
15801     {
15802         XmlErrorDeserializer::deserialize("Error", stack)
15803     }
15804 }
15805 impl fmt::Display for DeleteBucketLifecycleError {
15806     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15807     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15808         match *self {}
15809     }
15810 }
15811 impl Error for DeleteBucketLifecycleError {}
15812 /// Errors returned by DeleteBucketMetricsConfiguration
15813 #[derive(Debug, PartialEq)]
15814 pub enum DeleteBucketMetricsConfigurationError {}
15815 
15816 impl DeleteBucketMetricsConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<DeleteBucketMetricsConfigurationError>15817     pub fn from_response(
15818         res: BufferedHttpResponse,
15819     ) -> RusotoError<DeleteBucketMetricsConfigurationError> {
15820         {
15821             let reader = EventReader::new(res.body.as_ref());
15822             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15823             find_start_element(&mut stack);
15824             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15825                 match &parsed_error.code[..] {
15826                     _ => {}
15827                 }
15828             }
15829         }
15830         RusotoError::Unknown(res)
15831     }
15832 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15833     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15834     where
15835         T: Peek + Next,
15836     {
15837         XmlErrorDeserializer::deserialize("Error", stack)
15838     }
15839 }
15840 impl fmt::Display for DeleteBucketMetricsConfigurationError {
15841     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15842     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15843         match *self {}
15844     }
15845 }
15846 impl Error for DeleteBucketMetricsConfigurationError {}
15847 /// Errors returned by DeleteBucketOwnershipControls
15848 #[derive(Debug, PartialEq)]
15849 pub enum DeleteBucketOwnershipControlsError {}
15850 
15851 impl DeleteBucketOwnershipControlsError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<DeleteBucketOwnershipControlsError>15852     pub fn from_response(
15853         res: BufferedHttpResponse,
15854     ) -> RusotoError<DeleteBucketOwnershipControlsError> {
15855         {
15856             let reader = EventReader::new(res.body.as_ref());
15857             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15858             find_start_element(&mut stack);
15859             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15860                 match &parsed_error.code[..] {
15861                     _ => {}
15862                 }
15863             }
15864         }
15865         RusotoError::Unknown(res)
15866     }
15867 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15868     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15869     where
15870         T: Peek + Next,
15871     {
15872         XmlErrorDeserializer::deserialize("Error", stack)
15873     }
15874 }
15875 impl fmt::Display for DeleteBucketOwnershipControlsError {
15876     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15877     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15878         match *self {}
15879     }
15880 }
15881 impl Error for DeleteBucketOwnershipControlsError {}
15882 /// Errors returned by DeleteBucketPolicy
15883 #[derive(Debug, PartialEq)]
15884 pub enum DeleteBucketPolicyError {}
15885 
15886 impl DeleteBucketPolicyError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketPolicyError>15887     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketPolicyError> {
15888         {
15889             let reader = EventReader::new(res.body.as_ref());
15890             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15891             find_start_element(&mut stack);
15892             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15893                 match &parsed_error.code[..] {
15894                     _ => {}
15895                 }
15896             }
15897         }
15898         RusotoError::Unknown(res)
15899     }
15900 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15901     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15902     where
15903         T: Peek + Next,
15904     {
15905         XmlErrorDeserializer::deserialize("Error", stack)
15906     }
15907 }
15908 impl fmt::Display for DeleteBucketPolicyError {
15909     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15910     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15911         match *self {}
15912     }
15913 }
15914 impl Error for DeleteBucketPolicyError {}
15915 /// Errors returned by DeleteBucketReplication
15916 #[derive(Debug, PartialEq)]
15917 pub enum DeleteBucketReplicationError {}
15918 
15919 impl DeleteBucketReplicationError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketReplicationError>15920     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketReplicationError> {
15921         {
15922             let reader = EventReader::new(res.body.as_ref());
15923             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15924             find_start_element(&mut stack);
15925             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15926                 match &parsed_error.code[..] {
15927                     _ => {}
15928                 }
15929             }
15930         }
15931         RusotoError::Unknown(res)
15932     }
15933 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15934     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15935     where
15936         T: Peek + Next,
15937     {
15938         XmlErrorDeserializer::deserialize("Error", stack)
15939     }
15940 }
15941 impl fmt::Display for DeleteBucketReplicationError {
15942     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15943     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15944         match *self {}
15945     }
15946 }
15947 impl Error for DeleteBucketReplicationError {}
15948 /// Errors returned by DeleteBucketTagging
15949 #[derive(Debug, PartialEq)]
15950 pub enum DeleteBucketTaggingError {}
15951 
15952 impl DeleteBucketTaggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketTaggingError>15953     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketTaggingError> {
15954         {
15955             let reader = EventReader::new(res.body.as_ref());
15956             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15957             find_start_element(&mut stack);
15958             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15959                 match &parsed_error.code[..] {
15960                     _ => {}
15961                 }
15962             }
15963         }
15964         RusotoError::Unknown(res)
15965     }
15966 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,15967     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
15968     where
15969         T: Peek + Next,
15970     {
15971         XmlErrorDeserializer::deserialize("Error", stack)
15972     }
15973 }
15974 impl fmt::Display for DeleteBucketTaggingError {
15975     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result15976     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15977         match *self {}
15978     }
15979 }
15980 impl Error for DeleteBucketTaggingError {}
15981 /// Errors returned by DeleteBucketWebsite
15982 #[derive(Debug, PartialEq)]
15983 pub enum DeleteBucketWebsiteError {}
15984 
15985 impl DeleteBucketWebsiteError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketWebsiteError>15986     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBucketWebsiteError> {
15987         {
15988             let reader = EventReader::new(res.body.as_ref());
15989             let mut stack = XmlResponse::new(reader.into_iter().peekable());
15990             find_start_element(&mut stack);
15991             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
15992                 match &parsed_error.code[..] {
15993                     _ => {}
15994                 }
15995             }
15996         }
15997         RusotoError::Unknown(res)
15998     }
15999 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16000     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16001     where
16002         T: Peek + Next,
16003     {
16004         XmlErrorDeserializer::deserialize("Error", stack)
16005     }
16006 }
16007 impl fmt::Display for DeleteBucketWebsiteError {
16008     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16009     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16010         match *self {}
16011     }
16012 }
16013 impl Error for DeleteBucketWebsiteError {}
16014 /// Errors returned by DeleteObject
16015 #[derive(Debug, PartialEq)]
16016 pub enum DeleteObjectError {}
16017 
16018 impl DeleteObjectError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteObjectError>16019     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteObjectError> {
16020         {
16021             let reader = EventReader::new(res.body.as_ref());
16022             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16023             find_start_element(&mut stack);
16024             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16025                 match &parsed_error.code[..] {
16026                     _ => {}
16027                 }
16028             }
16029         }
16030         RusotoError::Unknown(res)
16031     }
16032 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16033     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16034     where
16035         T: Peek + Next,
16036     {
16037         XmlErrorDeserializer::deserialize("Error", stack)
16038     }
16039 }
16040 impl fmt::Display for DeleteObjectError {
16041     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16042     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16043         match *self {}
16044     }
16045 }
16046 impl Error for DeleteObjectError {}
16047 /// Errors returned by DeleteObjectTagging
16048 #[derive(Debug, PartialEq)]
16049 pub enum DeleteObjectTaggingError {}
16050 
16051 impl DeleteObjectTaggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteObjectTaggingError>16052     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteObjectTaggingError> {
16053         {
16054             let reader = EventReader::new(res.body.as_ref());
16055             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16056             find_start_element(&mut stack);
16057             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16058                 match &parsed_error.code[..] {
16059                     _ => {}
16060                 }
16061             }
16062         }
16063         RusotoError::Unknown(res)
16064     }
16065 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16066     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16067     where
16068         T: Peek + Next,
16069     {
16070         XmlErrorDeserializer::deserialize("Error", stack)
16071     }
16072 }
16073 impl fmt::Display for DeleteObjectTaggingError {
16074     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16075     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16076         match *self {}
16077     }
16078 }
16079 impl Error for DeleteObjectTaggingError {}
16080 /// Errors returned by DeleteObjects
16081 #[derive(Debug, PartialEq)]
16082 pub enum DeleteObjectsError {}
16083 
16084 impl DeleteObjectsError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeleteObjectsError>16085     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteObjectsError> {
16086         {
16087             let reader = EventReader::new(res.body.as_ref());
16088             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16089             find_start_element(&mut stack);
16090             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16091                 match &parsed_error.code[..] {
16092                     _ => {}
16093                 }
16094             }
16095         }
16096         RusotoError::Unknown(res)
16097     }
16098 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16099     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16100     where
16101         T: Peek + Next,
16102     {
16103         XmlErrorDeserializer::deserialize("Error", stack)
16104     }
16105 }
16106 impl fmt::Display for DeleteObjectsError {
16107     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16108     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16109         match *self {}
16110     }
16111 }
16112 impl Error for DeleteObjectsError {}
16113 /// Errors returned by DeletePublicAccessBlock
16114 #[derive(Debug, PartialEq)]
16115 pub enum DeletePublicAccessBlockError {}
16116 
16117 impl DeletePublicAccessBlockError {
from_response(res: BufferedHttpResponse) -> RusotoError<DeletePublicAccessBlockError>16118     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePublicAccessBlockError> {
16119         {
16120             let reader = EventReader::new(res.body.as_ref());
16121             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16122             find_start_element(&mut stack);
16123             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16124                 match &parsed_error.code[..] {
16125                     _ => {}
16126                 }
16127             }
16128         }
16129         RusotoError::Unknown(res)
16130     }
16131 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16132     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16133     where
16134         T: Peek + Next,
16135     {
16136         XmlErrorDeserializer::deserialize("Error", stack)
16137     }
16138 }
16139 impl fmt::Display for DeletePublicAccessBlockError {
16140     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16141     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16142         match *self {}
16143     }
16144 }
16145 impl Error for DeletePublicAccessBlockError {}
16146 /// Errors returned by GetBucketAccelerateConfiguration
16147 #[derive(Debug, PartialEq)]
16148 pub enum GetBucketAccelerateConfigurationError {}
16149 
16150 impl GetBucketAccelerateConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBucketAccelerateConfigurationError>16151     pub fn from_response(
16152         res: BufferedHttpResponse,
16153     ) -> RusotoError<GetBucketAccelerateConfigurationError> {
16154         {
16155             let reader = EventReader::new(res.body.as_ref());
16156             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16157             find_start_element(&mut stack);
16158             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16159                 match &parsed_error.code[..] {
16160                     _ => {}
16161                 }
16162             }
16163         }
16164         RusotoError::Unknown(res)
16165     }
16166 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16167     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16168     where
16169         T: Peek + Next,
16170     {
16171         XmlErrorDeserializer::deserialize("Error", stack)
16172     }
16173 }
16174 impl fmt::Display for GetBucketAccelerateConfigurationError {
16175     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16176     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16177         match *self {}
16178     }
16179 }
16180 impl Error for GetBucketAccelerateConfigurationError {}
16181 /// Errors returned by GetBucketAcl
16182 #[derive(Debug, PartialEq)]
16183 pub enum GetBucketAclError {}
16184 
16185 impl GetBucketAclError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketAclError>16186     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketAclError> {
16187         {
16188             let reader = EventReader::new(res.body.as_ref());
16189             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16190             find_start_element(&mut stack);
16191             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16192                 match &parsed_error.code[..] {
16193                     _ => {}
16194                 }
16195             }
16196         }
16197         RusotoError::Unknown(res)
16198     }
16199 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16200     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16201     where
16202         T: Peek + Next,
16203     {
16204         XmlErrorDeserializer::deserialize("Error", stack)
16205     }
16206 }
16207 impl fmt::Display for GetBucketAclError {
16208     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16209     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16210         match *self {}
16211     }
16212 }
16213 impl Error for GetBucketAclError {}
16214 /// Errors returned by GetBucketAnalyticsConfiguration
16215 #[derive(Debug, PartialEq)]
16216 pub enum GetBucketAnalyticsConfigurationError {}
16217 
16218 impl GetBucketAnalyticsConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBucketAnalyticsConfigurationError>16219     pub fn from_response(
16220         res: BufferedHttpResponse,
16221     ) -> RusotoError<GetBucketAnalyticsConfigurationError> {
16222         {
16223             let reader = EventReader::new(res.body.as_ref());
16224             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16225             find_start_element(&mut stack);
16226             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16227                 match &parsed_error.code[..] {
16228                     _ => {}
16229                 }
16230             }
16231         }
16232         RusotoError::Unknown(res)
16233     }
16234 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16235     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16236     where
16237         T: Peek + Next,
16238     {
16239         XmlErrorDeserializer::deserialize("Error", stack)
16240     }
16241 }
16242 impl fmt::Display for GetBucketAnalyticsConfigurationError {
16243     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16244     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16245         match *self {}
16246     }
16247 }
16248 impl Error for GetBucketAnalyticsConfigurationError {}
16249 /// Errors returned by GetBucketCors
16250 #[derive(Debug, PartialEq)]
16251 pub enum GetBucketCorsError {}
16252 
16253 impl GetBucketCorsError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketCorsError>16254     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketCorsError> {
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 GetBucketCorsError {
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 GetBucketCorsError {}
16282 /// Errors returned by GetBucketEncryption
16283 #[derive(Debug, PartialEq)]
16284 pub enum GetBucketEncryptionError {}
16285 
16286 impl GetBucketEncryptionError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketEncryptionError>16287     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketEncryptionError> {
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 GetBucketEncryptionError {
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 GetBucketEncryptionError {}
16315 /// Errors returned by GetBucketIntelligentTieringConfiguration
16316 #[derive(Debug, PartialEq)]
16317 pub enum GetBucketIntelligentTieringConfigurationError {}
16318 
16319 impl GetBucketIntelligentTieringConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBucketIntelligentTieringConfigurationError>16320     pub fn from_response(
16321         res: BufferedHttpResponse,
16322     ) -> RusotoError<GetBucketIntelligentTieringConfigurationError> {
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 GetBucketIntelligentTieringConfigurationError {
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 GetBucketIntelligentTieringConfigurationError {}
16350 /// Errors returned by GetBucketInventoryConfiguration
16351 #[derive(Debug, PartialEq)]
16352 pub enum GetBucketInventoryConfigurationError {}
16353 
16354 impl GetBucketInventoryConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBucketInventoryConfigurationError>16355     pub fn from_response(
16356         res: BufferedHttpResponse,
16357     ) -> RusotoError<GetBucketInventoryConfigurationError> {
16358         {
16359             let reader = EventReader::new(res.body.as_ref());
16360             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16361             find_start_element(&mut stack);
16362             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16363                 match &parsed_error.code[..] {
16364                     _ => {}
16365                 }
16366             }
16367         }
16368         RusotoError::Unknown(res)
16369     }
16370 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16371     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16372     where
16373         T: Peek + Next,
16374     {
16375         XmlErrorDeserializer::deserialize("Error", stack)
16376     }
16377 }
16378 impl fmt::Display for GetBucketInventoryConfigurationError {
16379     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16380     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16381         match *self {}
16382     }
16383 }
16384 impl Error for GetBucketInventoryConfigurationError {}
16385 /// Errors returned by GetBucketLifecycle
16386 #[derive(Debug, PartialEq)]
16387 pub enum GetBucketLifecycleError {}
16388 
16389 impl GetBucketLifecycleError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketLifecycleError>16390     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketLifecycleError> {
16391         {
16392             let reader = EventReader::new(res.body.as_ref());
16393             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16394             find_start_element(&mut stack);
16395             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16396                 match &parsed_error.code[..] {
16397                     _ => {}
16398                 }
16399             }
16400         }
16401         RusotoError::Unknown(res)
16402     }
16403 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16404     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16405     where
16406         T: Peek + Next,
16407     {
16408         XmlErrorDeserializer::deserialize("Error", stack)
16409     }
16410 }
16411 impl fmt::Display for GetBucketLifecycleError {
16412     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16413     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16414         match *self {}
16415     }
16416 }
16417 impl Error for GetBucketLifecycleError {}
16418 /// Errors returned by GetBucketLifecycleConfiguration
16419 #[derive(Debug, PartialEq)]
16420 pub enum GetBucketLifecycleConfigurationError {}
16421 
16422 impl GetBucketLifecycleConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBucketLifecycleConfigurationError>16423     pub fn from_response(
16424         res: BufferedHttpResponse,
16425     ) -> RusotoError<GetBucketLifecycleConfigurationError> {
16426         {
16427             let reader = EventReader::new(res.body.as_ref());
16428             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16429             find_start_element(&mut stack);
16430             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16431                 match &parsed_error.code[..] {
16432                     _ => {}
16433                 }
16434             }
16435         }
16436         RusotoError::Unknown(res)
16437     }
16438 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16439     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16440     where
16441         T: Peek + Next,
16442     {
16443         XmlErrorDeserializer::deserialize("Error", stack)
16444     }
16445 }
16446 impl fmt::Display for GetBucketLifecycleConfigurationError {
16447     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16448     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16449         match *self {}
16450     }
16451 }
16452 impl Error for GetBucketLifecycleConfigurationError {}
16453 /// Errors returned by GetBucketLocation
16454 #[derive(Debug, PartialEq)]
16455 pub enum GetBucketLocationError {}
16456 
16457 impl GetBucketLocationError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketLocationError>16458     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketLocationError> {
16459         {
16460             let reader = EventReader::new(res.body.as_ref());
16461             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16462             find_start_element(&mut stack);
16463             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16464                 match &parsed_error.code[..] {
16465                     _ => {}
16466                 }
16467             }
16468         }
16469         RusotoError::Unknown(res)
16470     }
16471 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16472     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16473     where
16474         T: Peek + Next,
16475     {
16476         XmlErrorDeserializer::deserialize("Error", stack)
16477     }
16478 }
16479 impl fmt::Display for GetBucketLocationError {
16480     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16481     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16482         match *self {}
16483     }
16484 }
16485 impl Error for GetBucketLocationError {}
16486 /// Errors returned by GetBucketLogging
16487 #[derive(Debug, PartialEq)]
16488 pub enum GetBucketLoggingError {}
16489 
16490 impl GetBucketLoggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketLoggingError>16491     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketLoggingError> {
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 GetBucketLoggingError {
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 GetBucketLoggingError {}
16519 /// Errors returned by GetBucketMetricsConfiguration
16520 #[derive(Debug, PartialEq)]
16521 pub enum GetBucketMetricsConfigurationError {}
16522 
16523 impl GetBucketMetricsConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBucketMetricsConfigurationError>16524     pub fn from_response(
16525         res: BufferedHttpResponse,
16526     ) -> RusotoError<GetBucketMetricsConfigurationError> {
16527         {
16528             let reader = EventReader::new(res.body.as_ref());
16529             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16530             find_start_element(&mut stack);
16531             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16532                 match &parsed_error.code[..] {
16533                     _ => {}
16534                 }
16535             }
16536         }
16537         RusotoError::Unknown(res)
16538     }
16539 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16540     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16541     where
16542         T: Peek + Next,
16543     {
16544         XmlErrorDeserializer::deserialize("Error", stack)
16545     }
16546 }
16547 impl fmt::Display for GetBucketMetricsConfigurationError {
16548     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16549     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16550         match *self {}
16551     }
16552 }
16553 impl Error for GetBucketMetricsConfigurationError {}
16554 /// Errors returned by GetBucketNotification
16555 #[derive(Debug, PartialEq)]
16556 pub enum GetBucketNotificationError {}
16557 
16558 impl GetBucketNotificationError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketNotificationError>16559     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketNotificationError> {
16560         {
16561             let reader = EventReader::new(res.body.as_ref());
16562             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16563             find_start_element(&mut stack);
16564             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16565                 match &parsed_error.code[..] {
16566                     _ => {}
16567                 }
16568             }
16569         }
16570         RusotoError::Unknown(res)
16571     }
16572 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16573     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16574     where
16575         T: Peek + Next,
16576     {
16577         XmlErrorDeserializer::deserialize("Error", stack)
16578     }
16579 }
16580 impl fmt::Display for GetBucketNotificationError {
16581     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16582     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16583         match *self {}
16584     }
16585 }
16586 impl Error for GetBucketNotificationError {}
16587 /// Errors returned by GetBucketNotificationConfiguration
16588 #[derive(Debug, PartialEq)]
16589 pub enum GetBucketNotificationConfigurationError {}
16590 
16591 impl GetBucketNotificationConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBucketNotificationConfigurationError>16592     pub fn from_response(
16593         res: BufferedHttpResponse,
16594     ) -> RusotoError<GetBucketNotificationConfigurationError> {
16595         {
16596             let reader = EventReader::new(res.body.as_ref());
16597             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16598             find_start_element(&mut stack);
16599             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16600                 match &parsed_error.code[..] {
16601                     _ => {}
16602                 }
16603             }
16604         }
16605         RusotoError::Unknown(res)
16606     }
16607 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16608     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16609     where
16610         T: Peek + Next,
16611     {
16612         XmlErrorDeserializer::deserialize("Error", stack)
16613     }
16614 }
16615 impl fmt::Display for GetBucketNotificationConfigurationError {
16616     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16617     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16618         match *self {}
16619     }
16620 }
16621 impl Error for GetBucketNotificationConfigurationError {}
16622 /// Errors returned by GetBucketOwnershipControls
16623 #[derive(Debug, PartialEq)]
16624 pub enum GetBucketOwnershipControlsError {}
16625 
16626 impl GetBucketOwnershipControlsError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBucketOwnershipControlsError>16627     pub fn from_response(
16628         res: BufferedHttpResponse,
16629     ) -> RusotoError<GetBucketOwnershipControlsError> {
16630         {
16631             let reader = EventReader::new(res.body.as_ref());
16632             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16633             find_start_element(&mut stack);
16634             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16635                 match &parsed_error.code[..] {
16636                     _ => {}
16637                 }
16638             }
16639         }
16640         RusotoError::Unknown(res)
16641     }
16642 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16643     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16644     where
16645         T: Peek + Next,
16646     {
16647         XmlErrorDeserializer::deserialize("Error", stack)
16648     }
16649 }
16650 impl fmt::Display for GetBucketOwnershipControlsError {
16651     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16652     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16653         match *self {}
16654     }
16655 }
16656 impl Error for GetBucketOwnershipControlsError {}
16657 /// Errors returned by GetBucketPolicy
16658 #[derive(Debug, PartialEq)]
16659 pub enum GetBucketPolicyError {}
16660 
16661 impl GetBucketPolicyError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketPolicyError>16662     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketPolicyError> {
16663         {
16664             let reader = EventReader::new(res.body.as_ref());
16665             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16666             find_start_element(&mut stack);
16667             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16668                 match &parsed_error.code[..] {
16669                     _ => {}
16670                 }
16671             }
16672         }
16673         RusotoError::Unknown(res)
16674     }
16675 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16676     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16677     where
16678         T: Peek + Next,
16679     {
16680         XmlErrorDeserializer::deserialize("Error", stack)
16681     }
16682 }
16683 impl fmt::Display for GetBucketPolicyError {
16684     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16685     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16686         match *self {}
16687     }
16688 }
16689 impl Error for GetBucketPolicyError {}
16690 /// Errors returned by GetBucketPolicyStatus
16691 #[derive(Debug, PartialEq)]
16692 pub enum GetBucketPolicyStatusError {}
16693 
16694 impl GetBucketPolicyStatusError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketPolicyStatusError>16695     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketPolicyStatusError> {
16696         {
16697             let reader = EventReader::new(res.body.as_ref());
16698             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16699             find_start_element(&mut stack);
16700             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16701                 match &parsed_error.code[..] {
16702                     _ => {}
16703                 }
16704             }
16705         }
16706         RusotoError::Unknown(res)
16707     }
16708 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16709     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16710     where
16711         T: Peek + Next,
16712     {
16713         XmlErrorDeserializer::deserialize("Error", stack)
16714     }
16715 }
16716 impl fmt::Display for GetBucketPolicyStatusError {
16717     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16718     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16719         match *self {}
16720     }
16721 }
16722 impl Error for GetBucketPolicyStatusError {}
16723 /// Errors returned by GetBucketReplication
16724 #[derive(Debug, PartialEq)]
16725 pub enum GetBucketReplicationError {}
16726 
16727 impl GetBucketReplicationError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketReplicationError>16728     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketReplicationError> {
16729         {
16730             let reader = EventReader::new(res.body.as_ref());
16731             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16732             find_start_element(&mut stack);
16733             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16734                 match &parsed_error.code[..] {
16735                     _ => {}
16736                 }
16737             }
16738         }
16739         RusotoError::Unknown(res)
16740     }
16741 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16742     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16743     where
16744         T: Peek + Next,
16745     {
16746         XmlErrorDeserializer::deserialize("Error", stack)
16747     }
16748 }
16749 impl fmt::Display for GetBucketReplicationError {
16750     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16751     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16752         match *self {}
16753     }
16754 }
16755 impl Error for GetBucketReplicationError {}
16756 /// Errors returned by GetBucketRequestPayment
16757 #[derive(Debug, PartialEq)]
16758 pub enum GetBucketRequestPaymentError {}
16759 
16760 impl GetBucketRequestPaymentError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketRequestPaymentError>16761     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketRequestPaymentError> {
16762         {
16763             let reader = EventReader::new(res.body.as_ref());
16764             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16765             find_start_element(&mut stack);
16766             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16767                 match &parsed_error.code[..] {
16768                     _ => {}
16769                 }
16770             }
16771         }
16772         RusotoError::Unknown(res)
16773     }
16774 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16775     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16776     where
16777         T: Peek + Next,
16778     {
16779         XmlErrorDeserializer::deserialize("Error", stack)
16780     }
16781 }
16782 impl fmt::Display for GetBucketRequestPaymentError {
16783     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16784     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16785         match *self {}
16786     }
16787 }
16788 impl Error for GetBucketRequestPaymentError {}
16789 /// Errors returned by GetBucketTagging
16790 #[derive(Debug, PartialEq)]
16791 pub enum GetBucketTaggingError {}
16792 
16793 impl GetBucketTaggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketTaggingError>16794     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketTaggingError> {
16795         {
16796             let reader = EventReader::new(res.body.as_ref());
16797             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16798             find_start_element(&mut stack);
16799             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16800                 match &parsed_error.code[..] {
16801                     _ => {}
16802                 }
16803             }
16804         }
16805         RusotoError::Unknown(res)
16806     }
16807 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16808     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16809     where
16810         T: Peek + Next,
16811     {
16812         XmlErrorDeserializer::deserialize("Error", stack)
16813     }
16814 }
16815 impl fmt::Display for GetBucketTaggingError {
16816     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16817     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16818         match *self {}
16819     }
16820 }
16821 impl Error for GetBucketTaggingError {}
16822 /// Errors returned by GetBucketVersioning
16823 #[derive(Debug, PartialEq)]
16824 pub enum GetBucketVersioningError {}
16825 
16826 impl GetBucketVersioningError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketVersioningError>16827     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketVersioningError> {
16828         {
16829             let reader = EventReader::new(res.body.as_ref());
16830             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16831             find_start_element(&mut stack);
16832             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16833                 match &parsed_error.code[..] {
16834                     _ => {}
16835                 }
16836             }
16837         }
16838         RusotoError::Unknown(res)
16839     }
16840 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16841     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16842     where
16843         T: Peek + Next,
16844     {
16845         XmlErrorDeserializer::deserialize("Error", stack)
16846     }
16847 }
16848 impl fmt::Display for GetBucketVersioningError {
16849     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16850     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16851         match *self {}
16852     }
16853 }
16854 impl Error for GetBucketVersioningError {}
16855 /// Errors returned by GetBucketWebsite
16856 #[derive(Debug, PartialEq)]
16857 pub enum GetBucketWebsiteError {}
16858 
16859 impl GetBucketWebsiteError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketWebsiteError>16860     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBucketWebsiteError> {
16861         {
16862             let reader = EventReader::new(res.body.as_ref());
16863             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16864             find_start_element(&mut stack);
16865             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16866                 match &parsed_error.code[..] {
16867                     _ => {}
16868                 }
16869             }
16870         }
16871         RusotoError::Unknown(res)
16872     }
16873 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16874     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16875     where
16876         T: Peek + Next,
16877     {
16878         XmlErrorDeserializer::deserialize("Error", stack)
16879     }
16880 }
16881 impl fmt::Display for GetBucketWebsiteError {
16882     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16883     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16884         match *self {}
16885     }
16886 }
16887 impl Error for GetBucketWebsiteError {}
16888 /// Errors returned by GetObject
16889 #[derive(Debug, PartialEq)]
16890 pub enum GetObjectError {
16891     /// <p>Object is archived and inaccessible until restored.</p>
16892     InvalidObjectState(String),
16893     /// <p>The specified key does not exist.</p>
16894     NoSuchKey(String),
16895 }
16896 
16897 impl GetObjectError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectError>16898     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectError> {
16899         {
16900             let reader = EventReader::new(res.body.as_ref());
16901             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16902             find_start_element(&mut stack);
16903             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16904                 match &parsed_error.code[..] {
16905                     "InvalidObjectState" => {
16906                         return RusotoError::Service(GetObjectError::InvalidObjectState(
16907                             parsed_error.message,
16908                         ))
16909                     }
16910                     "NoSuchKey" => {
16911                         return RusotoError::Service(GetObjectError::NoSuchKey(
16912                             parsed_error.message,
16913                         ))
16914                     }
16915                     _ => {}
16916                 }
16917             }
16918         }
16919         RusotoError::Unknown(res)
16920     }
16921 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16922     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16923     where
16924         T: Peek + Next,
16925     {
16926         XmlErrorDeserializer::deserialize("Error", stack)
16927     }
16928 }
16929 impl fmt::Display for GetObjectError {
16930     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16931     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16932         match *self {
16933             GetObjectError::InvalidObjectState(ref cause) => write!(f, "{}", cause),
16934             GetObjectError::NoSuchKey(ref cause) => write!(f, "{}", cause),
16935         }
16936     }
16937 }
16938 impl Error for GetObjectError {}
16939 /// Errors returned by GetObjectAcl
16940 #[derive(Debug, PartialEq)]
16941 pub enum GetObjectAclError {
16942     /// <p>The specified key does not exist.</p>
16943     NoSuchKey(String),
16944 }
16945 
16946 impl GetObjectAclError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectAclError>16947     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectAclError> {
16948         {
16949             let reader = EventReader::new(res.body.as_ref());
16950             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16951             find_start_element(&mut stack);
16952             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16953                 match &parsed_error.code[..] {
16954                     "NoSuchKey" => {
16955                         return RusotoError::Service(GetObjectAclError::NoSuchKey(
16956                             parsed_error.message,
16957                         ))
16958                     }
16959                     _ => {}
16960                 }
16961             }
16962         }
16963         RusotoError::Unknown(res)
16964     }
16965 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,16966     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
16967     where
16968         T: Peek + Next,
16969     {
16970         XmlErrorDeserializer::deserialize("Error", stack)
16971     }
16972 }
16973 impl fmt::Display for GetObjectAclError {
16974     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result16975     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
16976         match *self {
16977             GetObjectAclError::NoSuchKey(ref cause) => write!(f, "{}", cause),
16978         }
16979     }
16980 }
16981 impl Error for GetObjectAclError {}
16982 /// Errors returned by GetObjectLegalHold
16983 #[derive(Debug, PartialEq)]
16984 pub enum GetObjectLegalHoldError {}
16985 
16986 impl GetObjectLegalHoldError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectLegalHoldError>16987     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectLegalHoldError> {
16988         {
16989             let reader = EventReader::new(res.body.as_ref());
16990             let mut stack = XmlResponse::new(reader.into_iter().peekable());
16991             find_start_element(&mut stack);
16992             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
16993                 match &parsed_error.code[..] {
16994                     _ => {}
16995                 }
16996             }
16997         }
16998         RusotoError::Unknown(res)
16999     }
17000 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17001     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17002     where
17003         T: Peek + Next,
17004     {
17005         XmlErrorDeserializer::deserialize("Error", stack)
17006     }
17007 }
17008 impl fmt::Display for GetObjectLegalHoldError {
17009     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17010     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17011         match *self {}
17012     }
17013 }
17014 impl Error for GetObjectLegalHoldError {}
17015 /// Errors returned by GetObjectLockConfiguration
17016 #[derive(Debug, PartialEq)]
17017 pub enum GetObjectLockConfigurationError {}
17018 
17019 impl GetObjectLockConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<GetObjectLockConfigurationError>17020     pub fn from_response(
17021         res: BufferedHttpResponse,
17022     ) -> RusotoError<GetObjectLockConfigurationError> {
17023         {
17024             let reader = EventReader::new(res.body.as_ref());
17025             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17026             find_start_element(&mut stack);
17027             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17028                 match &parsed_error.code[..] {
17029                     _ => {}
17030                 }
17031             }
17032         }
17033         RusotoError::Unknown(res)
17034     }
17035 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17036     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17037     where
17038         T: Peek + Next,
17039     {
17040         XmlErrorDeserializer::deserialize("Error", stack)
17041     }
17042 }
17043 impl fmt::Display for GetObjectLockConfigurationError {
17044     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17045     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17046         match *self {}
17047     }
17048 }
17049 impl Error for GetObjectLockConfigurationError {}
17050 /// Errors returned by GetObjectRetention
17051 #[derive(Debug, PartialEq)]
17052 pub enum GetObjectRetentionError {}
17053 
17054 impl GetObjectRetentionError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectRetentionError>17055     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectRetentionError> {
17056         {
17057             let reader = EventReader::new(res.body.as_ref());
17058             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17059             find_start_element(&mut stack);
17060             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17061                 match &parsed_error.code[..] {
17062                     _ => {}
17063                 }
17064             }
17065         }
17066         RusotoError::Unknown(res)
17067     }
17068 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17069     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17070     where
17071         T: Peek + Next,
17072     {
17073         XmlErrorDeserializer::deserialize("Error", stack)
17074     }
17075 }
17076 impl fmt::Display for GetObjectRetentionError {
17077     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17078     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17079         match *self {}
17080     }
17081 }
17082 impl Error for GetObjectRetentionError {}
17083 /// Errors returned by GetObjectTagging
17084 #[derive(Debug, PartialEq)]
17085 pub enum GetObjectTaggingError {}
17086 
17087 impl GetObjectTaggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectTaggingError>17088     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectTaggingError> {
17089         {
17090             let reader = EventReader::new(res.body.as_ref());
17091             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17092             find_start_element(&mut stack);
17093             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17094                 match &parsed_error.code[..] {
17095                     _ => {}
17096                 }
17097             }
17098         }
17099         RusotoError::Unknown(res)
17100     }
17101 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17102     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17103     where
17104         T: Peek + Next,
17105     {
17106         XmlErrorDeserializer::deserialize("Error", stack)
17107     }
17108 }
17109 impl fmt::Display for GetObjectTaggingError {
17110     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17111     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17112         match *self {}
17113     }
17114 }
17115 impl Error for GetObjectTaggingError {}
17116 /// Errors returned by GetObjectTorrent
17117 #[derive(Debug, PartialEq)]
17118 pub enum GetObjectTorrentError {}
17119 
17120 impl GetObjectTorrentError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectTorrentError>17121     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetObjectTorrentError> {
17122         {
17123             let reader = EventReader::new(res.body.as_ref());
17124             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17125             find_start_element(&mut stack);
17126             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17127                 match &parsed_error.code[..] {
17128                     _ => {}
17129                 }
17130             }
17131         }
17132         RusotoError::Unknown(res)
17133     }
17134 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17135     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17136     where
17137         T: Peek + Next,
17138     {
17139         XmlErrorDeserializer::deserialize("Error", stack)
17140     }
17141 }
17142 impl fmt::Display for GetObjectTorrentError {
17143     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17144     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17145         match *self {}
17146     }
17147 }
17148 impl Error for GetObjectTorrentError {}
17149 /// Errors returned by GetPublicAccessBlock
17150 #[derive(Debug, PartialEq)]
17151 pub enum GetPublicAccessBlockError {}
17152 
17153 impl GetPublicAccessBlockError {
from_response(res: BufferedHttpResponse) -> RusotoError<GetPublicAccessBlockError>17154     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPublicAccessBlockError> {
17155         {
17156             let reader = EventReader::new(res.body.as_ref());
17157             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17158             find_start_element(&mut stack);
17159             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17160                 match &parsed_error.code[..] {
17161                     _ => {}
17162                 }
17163             }
17164         }
17165         RusotoError::Unknown(res)
17166     }
17167 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17168     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17169     where
17170         T: Peek + Next,
17171     {
17172         XmlErrorDeserializer::deserialize("Error", stack)
17173     }
17174 }
17175 impl fmt::Display for GetPublicAccessBlockError {
17176     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17177     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17178         match *self {}
17179     }
17180 }
17181 impl Error for GetPublicAccessBlockError {}
17182 /// Errors returned by HeadBucket
17183 #[derive(Debug, PartialEq)]
17184 pub enum HeadBucketError {
17185     /// <p>The specified bucket does not exist.</p>
17186     NoSuchBucket(String),
17187 }
17188 
17189 impl HeadBucketError {
from_response(res: BufferedHttpResponse) -> RusotoError<HeadBucketError>17190     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<HeadBucketError> {
17191         {
17192             let reader = EventReader::new(res.body.as_ref());
17193             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17194             find_start_element(&mut stack);
17195             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17196                 match &parsed_error.code[..] {
17197                     "NoSuchBucket" => {
17198                         return RusotoError::Service(HeadBucketError::NoSuchBucket(
17199                             parsed_error.message,
17200                         ))
17201                     }
17202                     _ => {}
17203                 }
17204             }
17205         }
17206         RusotoError::Unknown(res)
17207     }
17208 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17209     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17210     where
17211         T: Peek + Next,
17212     {
17213         XmlErrorDeserializer::deserialize("Error", stack)
17214     }
17215 }
17216 impl fmt::Display for HeadBucketError {
17217     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17218     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17219         match *self {
17220             HeadBucketError::NoSuchBucket(ref cause) => write!(f, "{}", cause),
17221         }
17222     }
17223 }
17224 impl Error for HeadBucketError {}
17225 /// Errors returned by HeadObject
17226 #[derive(Debug, PartialEq)]
17227 pub enum HeadObjectError {
17228     /// <p>The specified key does not exist.</p>
17229     NoSuchKey(String),
17230 }
17231 
17232 impl HeadObjectError {
from_response(res: BufferedHttpResponse) -> RusotoError<HeadObjectError>17233     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<HeadObjectError> {
17234         {
17235             let reader = EventReader::new(res.body.as_ref());
17236             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17237             find_start_element(&mut stack);
17238             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17239                 match &parsed_error.code[..] {
17240                     "NoSuchKey" => {
17241                         return RusotoError::Service(HeadObjectError::NoSuchKey(
17242                             parsed_error.message,
17243                         ))
17244                     }
17245                     _ => {}
17246                 }
17247             }
17248         }
17249         RusotoError::Unknown(res)
17250     }
17251 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17252     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17253     where
17254         T: Peek + Next,
17255     {
17256         XmlErrorDeserializer::deserialize("Error", stack)
17257     }
17258 }
17259 impl fmt::Display for HeadObjectError {
17260     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17261     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17262         match *self {
17263             HeadObjectError::NoSuchKey(ref cause) => write!(f, "{}", cause),
17264         }
17265     }
17266 }
17267 impl Error for HeadObjectError {}
17268 /// Errors returned by ListBucketAnalyticsConfigurations
17269 #[derive(Debug, PartialEq)]
17270 pub enum ListBucketAnalyticsConfigurationsError {}
17271 
17272 impl ListBucketAnalyticsConfigurationsError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<ListBucketAnalyticsConfigurationsError>17273     pub fn from_response(
17274         res: BufferedHttpResponse,
17275     ) -> RusotoError<ListBucketAnalyticsConfigurationsError> {
17276         {
17277             let reader = EventReader::new(res.body.as_ref());
17278             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17279             find_start_element(&mut stack);
17280             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17281                 match &parsed_error.code[..] {
17282                     _ => {}
17283                 }
17284             }
17285         }
17286         RusotoError::Unknown(res)
17287     }
17288 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17289     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17290     where
17291         T: Peek + Next,
17292     {
17293         XmlErrorDeserializer::deserialize("Error", stack)
17294     }
17295 }
17296 impl fmt::Display for ListBucketAnalyticsConfigurationsError {
17297     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17298     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17299         match *self {}
17300     }
17301 }
17302 impl Error for ListBucketAnalyticsConfigurationsError {}
17303 /// Errors returned by ListBucketIntelligentTieringConfigurations
17304 #[derive(Debug, PartialEq)]
17305 pub enum ListBucketIntelligentTieringConfigurationsError {}
17306 
17307 impl ListBucketIntelligentTieringConfigurationsError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<ListBucketIntelligentTieringConfigurationsError>17308     pub fn from_response(
17309         res: BufferedHttpResponse,
17310     ) -> RusotoError<ListBucketIntelligentTieringConfigurationsError> {
17311         {
17312             let reader = EventReader::new(res.body.as_ref());
17313             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17314             find_start_element(&mut stack);
17315             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17316                 match &parsed_error.code[..] {
17317                     _ => {}
17318                 }
17319             }
17320         }
17321         RusotoError::Unknown(res)
17322     }
17323 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17324     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17325     where
17326         T: Peek + Next,
17327     {
17328         XmlErrorDeserializer::deserialize("Error", stack)
17329     }
17330 }
17331 impl fmt::Display for ListBucketIntelligentTieringConfigurationsError {
17332     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17333     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17334         match *self {}
17335     }
17336 }
17337 impl Error for ListBucketIntelligentTieringConfigurationsError {}
17338 /// Errors returned by ListBucketInventoryConfigurations
17339 #[derive(Debug, PartialEq)]
17340 pub enum ListBucketInventoryConfigurationsError {}
17341 
17342 impl ListBucketInventoryConfigurationsError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<ListBucketInventoryConfigurationsError>17343     pub fn from_response(
17344         res: BufferedHttpResponse,
17345     ) -> RusotoError<ListBucketInventoryConfigurationsError> {
17346         {
17347             let reader = EventReader::new(res.body.as_ref());
17348             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17349             find_start_element(&mut stack);
17350             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17351                 match &parsed_error.code[..] {
17352                     _ => {}
17353                 }
17354             }
17355         }
17356         RusotoError::Unknown(res)
17357     }
17358 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17359     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17360     where
17361         T: Peek + Next,
17362     {
17363         XmlErrorDeserializer::deserialize("Error", stack)
17364     }
17365 }
17366 impl fmt::Display for ListBucketInventoryConfigurationsError {
17367     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17368     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17369         match *self {}
17370     }
17371 }
17372 impl Error for ListBucketInventoryConfigurationsError {}
17373 /// Errors returned by ListBucketMetricsConfigurations
17374 #[derive(Debug, PartialEq)]
17375 pub enum ListBucketMetricsConfigurationsError {}
17376 
17377 impl ListBucketMetricsConfigurationsError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<ListBucketMetricsConfigurationsError>17378     pub fn from_response(
17379         res: BufferedHttpResponse,
17380     ) -> RusotoError<ListBucketMetricsConfigurationsError> {
17381         {
17382             let reader = EventReader::new(res.body.as_ref());
17383             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17384             find_start_element(&mut stack);
17385             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17386                 match &parsed_error.code[..] {
17387                     _ => {}
17388                 }
17389             }
17390         }
17391         RusotoError::Unknown(res)
17392     }
17393 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17394     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17395     where
17396         T: Peek + Next,
17397     {
17398         XmlErrorDeserializer::deserialize("Error", stack)
17399     }
17400 }
17401 impl fmt::Display for ListBucketMetricsConfigurationsError {
17402     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17403     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17404         match *self {}
17405     }
17406 }
17407 impl Error for ListBucketMetricsConfigurationsError {}
17408 /// Errors returned by ListBuckets
17409 #[derive(Debug, PartialEq)]
17410 pub enum ListBucketsError {}
17411 
17412 impl ListBucketsError {
from_response(res: BufferedHttpResponse) -> RusotoError<ListBucketsError>17413     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBucketsError> {
17414         {
17415             let reader = EventReader::new(res.body.as_ref());
17416             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17417             find_start_element(&mut stack);
17418             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17419                 match &parsed_error.code[..] {
17420                     _ => {}
17421                 }
17422             }
17423         }
17424         RusotoError::Unknown(res)
17425     }
17426 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17427     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17428     where
17429         T: Peek + Next,
17430     {
17431         XmlErrorDeserializer::deserialize("Error", stack)
17432     }
17433 }
17434 impl fmt::Display for ListBucketsError {
17435     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17436     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17437         match *self {}
17438     }
17439 }
17440 impl Error for ListBucketsError {}
17441 /// Errors returned by ListMultipartUploads
17442 #[derive(Debug, PartialEq)]
17443 pub enum ListMultipartUploadsError {}
17444 
17445 impl ListMultipartUploadsError {
from_response(res: BufferedHttpResponse) -> RusotoError<ListMultipartUploadsError>17446     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListMultipartUploadsError> {
17447         {
17448             let reader = EventReader::new(res.body.as_ref());
17449             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17450             find_start_element(&mut stack);
17451             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17452                 match &parsed_error.code[..] {
17453                     _ => {}
17454                 }
17455             }
17456         }
17457         RusotoError::Unknown(res)
17458     }
17459 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17460     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17461     where
17462         T: Peek + Next,
17463     {
17464         XmlErrorDeserializer::deserialize("Error", stack)
17465     }
17466 }
17467 impl fmt::Display for ListMultipartUploadsError {
17468     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17469     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17470         match *self {}
17471     }
17472 }
17473 impl Error for ListMultipartUploadsError {}
17474 /// Errors returned by ListObjectVersions
17475 #[derive(Debug, PartialEq)]
17476 pub enum ListObjectVersionsError {}
17477 
17478 impl ListObjectVersionsError {
from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectVersionsError>17479     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectVersionsError> {
17480         {
17481             let reader = EventReader::new(res.body.as_ref());
17482             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17483             find_start_element(&mut stack);
17484             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17485                 match &parsed_error.code[..] {
17486                     _ => {}
17487                 }
17488             }
17489         }
17490         RusotoError::Unknown(res)
17491     }
17492 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17493     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17494     where
17495         T: Peek + Next,
17496     {
17497         XmlErrorDeserializer::deserialize("Error", stack)
17498     }
17499 }
17500 impl fmt::Display for ListObjectVersionsError {
17501     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17502     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17503         match *self {}
17504     }
17505 }
17506 impl Error for ListObjectVersionsError {}
17507 /// Errors returned by ListObjects
17508 #[derive(Debug, PartialEq)]
17509 pub enum ListObjectsError {
17510     /// <p>The specified bucket does not exist.</p>
17511     NoSuchBucket(String),
17512 }
17513 
17514 impl ListObjectsError {
from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectsError>17515     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectsError> {
17516         {
17517             let reader = EventReader::new(res.body.as_ref());
17518             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17519             find_start_element(&mut stack);
17520             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17521                 match &parsed_error.code[..] {
17522                     "NoSuchBucket" => {
17523                         return RusotoError::Service(ListObjectsError::NoSuchBucket(
17524                             parsed_error.message,
17525                         ))
17526                     }
17527                     _ => {}
17528                 }
17529             }
17530         }
17531         RusotoError::Unknown(res)
17532     }
17533 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17534     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17535     where
17536         T: Peek + Next,
17537     {
17538         XmlErrorDeserializer::deserialize("Error", stack)
17539     }
17540 }
17541 impl fmt::Display for ListObjectsError {
17542     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17543     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17544         match *self {
17545             ListObjectsError::NoSuchBucket(ref cause) => write!(f, "{}", cause),
17546         }
17547     }
17548 }
17549 impl Error for ListObjectsError {}
17550 /// Errors returned by ListObjectsV2
17551 #[derive(Debug, PartialEq)]
17552 pub enum ListObjectsV2Error {
17553     /// <p>The specified bucket does not exist.</p>
17554     NoSuchBucket(String),
17555 }
17556 
17557 impl ListObjectsV2Error {
from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectsV2Error>17558     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListObjectsV2Error> {
17559         {
17560             let reader = EventReader::new(res.body.as_ref());
17561             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17562             find_start_element(&mut stack);
17563             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17564                 match &parsed_error.code[..] {
17565                     "NoSuchBucket" => {
17566                         return RusotoError::Service(ListObjectsV2Error::NoSuchBucket(
17567                             parsed_error.message,
17568                         ))
17569                     }
17570                     _ => {}
17571                 }
17572             }
17573         }
17574         RusotoError::Unknown(res)
17575     }
17576 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17577     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17578     where
17579         T: Peek + Next,
17580     {
17581         XmlErrorDeserializer::deserialize("Error", stack)
17582     }
17583 }
17584 impl fmt::Display for ListObjectsV2Error {
17585     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17586     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17587         match *self {
17588             ListObjectsV2Error::NoSuchBucket(ref cause) => write!(f, "{}", cause),
17589         }
17590     }
17591 }
17592 impl Error for ListObjectsV2Error {}
17593 /// Errors returned by ListParts
17594 #[derive(Debug, PartialEq)]
17595 pub enum ListPartsError {}
17596 
17597 impl ListPartsError {
from_response(res: BufferedHttpResponse) -> RusotoError<ListPartsError>17598     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPartsError> {
17599         {
17600             let reader = EventReader::new(res.body.as_ref());
17601             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17602             find_start_element(&mut stack);
17603             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17604                 match &parsed_error.code[..] {
17605                     _ => {}
17606                 }
17607             }
17608         }
17609         RusotoError::Unknown(res)
17610     }
17611 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17612     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17613     where
17614         T: Peek + Next,
17615     {
17616         XmlErrorDeserializer::deserialize("Error", stack)
17617     }
17618 }
17619 impl fmt::Display for ListPartsError {
17620     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17621     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17622         match *self {}
17623     }
17624 }
17625 impl Error for ListPartsError {}
17626 /// Errors returned by PutBucketAccelerateConfiguration
17627 #[derive(Debug, PartialEq)]
17628 pub enum PutBucketAccelerateConfigurationError {}
17629 
17630 impl PutBucketAccelerateConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBucketAccelerateConfigurationError>17631     pub fn from_response(
17632         res: BufferedHttpResponse,
17633     ) -> RusotoError<PutBucketAccelerateConfigurationError> {
17634         {
17635             let reader = EventReader::new(res.body.as_ref());
17636             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17637             find_start_element(&mut stack);
17638             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17639                 match &parsed_error.code[..] {
17640                     _ => {}
17641                 }
17642             }
17643         }
17644         RusotoError::Unknown(res)
17645     }
17646 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17647     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17648     where
17649         T: Peek + Next,
17650     {
17651         XmlErrorDeserializer::deserialize("Error", stack)
17652     }
17653 }
17654 impl fmt::Display for PutBucketAccelerateConfigurationError {
17655     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17656     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17657         match *self {}
17658     }
17659 }
17660 impl Error for PutBucketAccelerateConfigurationError {}
17661 /// Errors returned by PutBucketAcl
17662 #[derive(Debug, PartialEq)]
17663 pub enum PutBucketAclError {}
17664 
17665 impl PutBucketAclError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketAclError>17666     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketAclError> {
17667         {
17668             let reader = EventReader::new(res.body.as_ref());
17669             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17670             find_start_element(&mut stack);
17671             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17672                 match &parsed_error.code[..] {
17673                     _ => {}
17674                 }
17675             }
17676         }
17677         RusotoError::Unknown(res)
17678     }
17679 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17680     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17681     where
17682         T: Peek + Next,
17683     {
17684         XmlErrorDeserializer::deserialize("Error", stack)
17685     }
17686 }
17687 impl fmt::Display for PutBucketAclError {
17688     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17689     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17690         match *self {}
17691     }
17692 }
17693 impl Error for PutBucketAclError {}
17694 /// Errors returned by PutBucketAnalyticsConfiguration
17695 #[derive(Debug, PartialEq)]
17696 pub enum PutBucketAnalyticsConfigurationError {}
17697 
17698 impl PutBucketAnalyticsConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBucketAnalyticsConfigurationError>17699     pub fn from_response(
17700         res: BufferedHttpResponse,
17701     ) -> RusotoError<PutBucketAnalyticsConfigurationError> {
17702         {
17703             let reader = EventReader::new(res.body.as_ref());
17704             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17705             find_start_element(&mut stack);
17706             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17707                 match &parsed_error.code[..] {
17708                     _ => {}
17709                 }
17710             }
17711         }
17712         RusotoError::Unknown(res)
17713     }
17714 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17715     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17716     where
17717         T: Peek + Next,
17718     {
17719         XmlErrorDeserializer::deserialize("Error", stack)
17720     }
17721 }
17722 impl fmt::Display for PutBucketAnalyticsConfigurationError {
17723     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17724     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17725         match *self {}
17726     }
17727 }
17728 impl Error for PutBucketAnalyticsConfigurationError {}
17729 /// Errors returned by PutBucketCors
17730 #[derive(Debug, PartialEq)]
17731 pub enum PutBucketCorsError {}
17732 
17733 impl PutBucketCorsError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketCorsError>17734     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketCorsError> {
17735         {
17736             let reader = EventReader::new(res.body.as_ref());
17737             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17738             find_start_element(&mut stack);
17739             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17740                 match &parsed_error.code[..] {
17741                     _ => {}
17742                 }
17743             }
17744         }
17745         RusotoError::Unknown(res)
17746     }
17747 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17748     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17749     where
17750         T: Peek + Next,
17751     {
17752         XmlErrorDeserializer::deserialize("Error", stack)
17753     }
17754 }
17755 impl fmt::Display for PutBucketCorsError {
17756     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17757     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17758         match *self {}
17759     }
17760 }
17761 impl Error for PutBucketCorsError {}
17762 /// Errors returned by PutBucketEncryption
17763 #[derive(Debug, PartialEq)]
17764 pub enum PutBucketEncryptionError {}
17765 
17766 impl PutBucketEncryptionError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketEncryptionError>17767     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketEncryptionError> {
17768         {
17769             let reader = EventReader::new(res.body.as_ref());
17770             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17771             find_start_element(&mut stack);
17772             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17773                 match &parsed_error.code[..] {
17774                     _ => {}
17775                 }
17776             }
17777         }
17778         RusotoError::Unknown(res)
17779     }
17780 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17781     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17782     where
17783         T: Peek + Next,
17784     {
17785         XmlErrorDeserializer::deserialize("Error", stack)
17786     }
17787 }
17788 impl fmt::Display for PutBucketEncryptionError {
17789     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17790     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17791         match *self {}
17792     }
17793 }
17794 impl Error for PutBucketEncryptionError {}
17795 /// Errors returned by PutBucketIntelligentTieringConfiguration
17796 #[derive(Debug, PartialEq)]
17797 pub enum PutBucketIntelligentTieringConfigurationError {}
17798 
17799 impl PutBucketIntelligentTieringConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBucketIntelligentTieringConfigurationError>17800     pub fn from_response(
17801         res: BufferedHttpResponse,
17802     ) -> RusotoError<PutBucketIntelligentTieringConfigurationError> {
17803         {
17804             let reader = EventReader::new(res.body.as_ref());
17805             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17806             find_start_element(&mut stack);
17807             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17808                 match &parsed_error.code[..] {
17809                     _ => {}
17810                 }
17811             }
17812         }
17813         RusotoError::Unknown(res)
17814     }
17815 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17816     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17817     where
17818         T: Peek + Next,
17819     {
17820         XmlErrorDeserializer::deserialize("Error", stack)
17821     }
17822 }
17823 impl fmt::Display for PutBucketIntelligentTieringConfigurationError {
17824     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17825     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17826         match *self {}
17827     }
17828 }
17829 impl Error for PutBucketIntelligentTieringConfigurationError {}
17830 /// Errors returned by PutBucketInventoryConfiguration
17831 #[derive(Debug, PartialEq)]
17832 pub enum PutBucketInventoryConfigurationError {}
17833 
17834 impl PutBucketInventoryConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBucketInventoryConfigurationError>17835     pub fn from_response(
17836         res: BufferedHttpResponse,
17837     ) -> RusotoError<PutBucketInventoryConfigurationError> {
17838         {
17839             let reader = EventReader::new(res.body.as_ref());
17840             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17841             find_start_element(&mut stack);
17842             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17843                 match &parsed_error.code[..] {
17844                     _ => {}
17845                 }
17846             }
17847         }
17848         RusotoError::Unknown(res)
17849     }
17850 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17851     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17852     where
17853         T: Peek + Next,
17854     {
17855         XmlErrorDeserializer::deserialize("Error", stack)
17856     }
17857 }
17858 impl fmt::Display for PutBucketInventoryConfigurationError {
17859     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17860     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17861         match *self {}
17862     }
17863 }
17864 impl Error for PutBucketInventoryConfigurationError {}
17865 /// Errors returned by PutBucketLifecycle
17866 #[derive(Debug, PartialEq)]
17867 pub enum PutBucketLifecycleError {}
17868 
17869 impl PutBucketLifecycleError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketLifecycleError>17870     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketLifecycleError> {
17871         {
17872             let reader = EventReader::new(res.body.as_ref());
17873             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17874             find_start_element(&mut stack);
17875             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17876                 match &parsed_error.code[..] {
17877                     _ => {}
17878                 }
17879             }
17880         }
17881         RusotoError::Unknown(res)
17882     }
17883 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17884     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17885     where
17886         T: Peek + Next,
17887     {
17888         XmlErrorDeserializer::deserialize("Error", stack)
17889     }
17890 }
17891 impl fmt::Display for PutBucketLifecycleError {
17892     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17893     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17894         match *self {}
17895     }
17896 }
17897 impl Error for PutBucketLifecycleError {}
17898 /// Errors returned by PutBucketLifecycleConfiguration
17899 #[derive(Debug, PartialEq)]
17900 pub enum PutBucketLifecycleConfigurationError {}
17901 
17902 impl PutBucketLifecycleConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBucketLifecycleConfigurationError>17903     pub fn from_response(
17904         res: BufferedHttpResponse,
17905     ) -> RusotoError<PutBucketLifecycleConfigurationError> {
17906         {
17907             let reader = EventReader::new(res.body.as_ref());
17908             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17909             find_start_element(&mut stack);
17910             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17911                 match &parsed_error.code[..] {
17912                     _ => {}
17913                 }
17914             }
17915         }
17916         RusotoError::Unknown(res)
17917     }
17918 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17919     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17920     where
17921         T: Peek + Next,
17922     {
17923         XmlErrorDeserializer::deserialize("Error", stack)
17924     }
17925 }
17926 impl fmt::Display for PutBucketLifecycleConfigurationError {
17927     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17928     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17929         match *self {}
17930     }
17931 }
17932 impl Error for PutBucketLifecycleConfigurationError {}
17933 /// Errors returned by PutBucketLogging
17934 #[derive(Debug, PartialEq)]
17935 pub enum PutBucketLoggingError {}
17936 
17937 impl PutBucketLoggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketLoggingError>17938     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketLoggingError> {
17939         {
17940             let reader = EventReader::new(res.body.as_ref());
17941             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17942             find_start_element(&mut stack);
17943             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17944                 match &parsed_error.code[..] {
17945                     _ => {}
17946                 }
17947             }
17948         }
17949         RusotoError::Unknown(res)
17950     }
17951 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17952     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17953     where
17954         T: Peek + Next,
17955     {
17956         XmlErrorDeserializer::deserialize("Error", stack)
17957     }
17958 }
17959 impl fmt::Display for PutBucketLoggingError {
17960     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17961     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17962         match *self {}
17963     }
17964 }
17965 impl Error for PutBucketLoggingError {}
17966 /// Errors returned by PutBucketMetricsConfiguration
17967 #[derive(Debug, PartialEq)]
17968 pub enum PutBucketMetricsConfigurationError {}
17969 
17970 impl PutBucketMetricsConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBucketMetricsConfigurationError>17971     pub fn from_response(
17972         res: BufferedHttpResponse,
17973     ) -> RusotoError<PutBucketMetricsConfigurationError> {
17974         {
17975             let reader = EventReader::new(res.body.as_ref());
17976             let mut stack = XmlResponse::new(reader.into_iter().peekable());
17977             find_start_element(&mut stack);
17978             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
17979                 match &parsed_error.code[..] {
17980                     _ => {}
17981                 }
17982             }
17983         }
17984         RusotoError::Unknown(res)
17985     }
17986 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,17987     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
17988     where
17989         T: Peek + Next,
17990     {
17991         XmlErrorDeserializer::deserialize("Error", stack)
17992     }
17993 }
17994 impl fmt::Display for PutBucketMetricsConfigurationError {
17995     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result17996     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17997         match *self {}
17998     }
17999 }
18000 impl Error for PutBucketMetricsConfigurationError {}
18001 /// Errors returned by PutBucketNotification
18002 #[derive(Debug, PartialEq)]
18003 pub enum PutBucketNotificationError {}
18004 
18005 impl PutBucketNotificationError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketNotificationError>18006     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketNotificationError> {
18007         {
18008             let reader = EventReader::new(res.body.as_ref());
18009             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18010             find_start_element(&mut stack);
18011             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18012                 match &parsed_error.code[..] {
18013                     _ => {}
18014                 }
18015             }
18016         }
18017         RusotoError::Unknown(res)
18018     }
18019 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18020     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18021     where
18022         T: Peek + Next,
18023     {
18024         XmlErrorDeserializer::deserialize("Error", stack)
18025     }
18026 }
18027 impl fmt::Display for PutBucketNotificationError {
18028     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18029     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18030         match *self {}
18031     }
18032 }
18033 impl Error for PutBucketNotificationError {}
18034 /// Errors returned by PutBucketNotificationConfiguration
18035 #[derive(Debug, PartialEq)]
18036 pub enum PutBucketNotificationConfigurationError {}
18037 
18038 impl PutBucketNotificationConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBucketNotificationConfigurationError>18039     pub fn from_response(
18040         res: BufferedHttpResponse,
18041     ) -> RusotoError<PutBucketNotificationConfigurationError> {
18042         {
18043             let reader = EventReader::new(res.body.as_ref());
18044             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18045             find_start_element(&mut stack);
18046             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18047                 match &parsed_error.code[..] {
18048                     _ => {}
18049                 }
18050             }
18051         }
18052         RusotoError::Unknown(res)
18053     }
18054 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18055     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18056     where
18057         T: Peek + Next,
18058     {
18059         XmlErrorDeserializer::deserialize("Error", stack)
18060     }
18061 }
18062 impl fmt::Display for PutBucketNotificationConfigurationError {
18063     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18064     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18065         match *self {}
18066     }
18067 }
18068 impl Error for PutBucketNotificationConfigurationError {}
18069 /// Errors returned by PutBucketOwnershipControls
18070 #[derive(Debug, PartialEq)]
18071 pub enum PutBucketOwnershipControlsError {}
18072 
18073 impl PutBucketOwnershipControlsError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBucketOwnershipControlsError>18074     pub fn from_response(
18075         res: BufferedHttpResponse,
18076     ) -> RusotoError<PutBucketOwnershipControlsError> {
18077         {
18078             let reader = EventReader::new(res.body.as_ref());
18079             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18080             find_start_element(&mut stack);
18081             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18082                 match &parsed_error.code[..] {
18083                     _ => {}
18084                 }
18085             }
18086         }
18087         RusotoError::Unknown(res)
18088     }
18089 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18090     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18091     where
18092         T: Peek + Next,
18093     {
18094         XmlErrorDeserializer::deserialize("Error", stack)
18095     }
18096 }
18097 impl fmt::Display for PutBucketOwnershipControlsError {
18098     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18099     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18100         match *self {}
18101     }
18102 }
18103 impl Error for PutBucketOwnershipControlsError {}
18104 /// Errors returned by PutBucketPolicy
18105 #[derive(Debug, PartialEq)]
18106 pub enum PutBucketPolicyError {}
18107 
18108 impl PutBucketPolicyError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketPolicyError>18109     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketPolicyError> {
18110         {
18111             let reader = EventReader::new(res.body.as_ref());
18112             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18113             find_start_element(&mut stack);
18114             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18115                 match &parsed_error.code[..] {
18116                     _ => {}
18117                 }
18118             }
18119         }
18120         RusotoError::Unknown(res)
18121     }
18122 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18123     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18124     where
18125         T: Peek + Next,
18126     {
18127         XmlErrorDeserializer::deserialize("Error", stack)
18128     }
18129 }
18130 impl fmt::Display for PutBucketPolicyError {
18131     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18132     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18133         match *self {}
18134     }
18135 }
18136 impl Error for PutBucketPolicyError {}
18137 /// Errors returned by PutBucketReplication
18138 #[derive(Debug, PartialEq)]
18139 pub enum PutBucketReplicationError {}
18140 
18141 impl PutBucketReplicationError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketReplicationError>18142     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketReplicationError> {
18143         {
18144             let reader = EventReader::new(res.body.as_ref());
18145             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18146             find_start_element(&mut stack);
18147             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18148                 match &parsed_error.code[..] {
18149                     _ => {}
18150                 }
18151             }
18152         }
18153         RusotoError::Unknown(res)
18154     }
18155 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18156     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18157     where
18158         T: Peek + Next,
18159     {
18160         XmlErrorDeserializer::deserialize("Error", stack)
18161     }
18162 }
18163 impl fmt::Display for PutBucketReplicationError {
18164     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18165     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18166         match *self {}
18167     }
18168 }
18169 impl Error for PutBucketReplicationError {}
18170 /// Errors returned by PutBucketRequestPayment
18171 #[derive(Debug, PartialEq)]
18172 pub enum PutBucketRequestPaymentError {}
18173 
18174 impl PutBucketRequestPaymentError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketRequestPaymentError>18175     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketRequestPaymentError> {
18176         {
18177             let reader = EventReader::new(res.body.as_ref());
18178             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18179             find_start_element(&mut stack);
18180             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18181                 match &parsed_error.code[..] {
18182                     _ => {}
18183                 }
18184             }
18185         }
18186         RusotoError::Unknown(res)
18187     }
18188 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18189     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18190     where
18191         T: Peek + Next,
18192     {
18193         XmlErrorDeserializer::deserialize("Error", stack)
18194     }
18195 }
18196 impl fmt::Display for PutBucketRequestPaymentError {
18197     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18198     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18199         match *self {}
18200     }
18201 }
18202 impl Error for PutBucketRequestPaymentError {}
18203 /// Errors returned by PutBucketTagging
18204 #[derive(Debug, PartialEq)]
18205 pub enum PutBucketTaggingError {}
18206 
18207 impl PutBucketTaggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketTaggingError>18208     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketTaggingError> {
18209         {
18210             let reader = EventReader::new(res.body.as_ref());
18211             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18212             find_start_element(&mut stack);
18213             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18214                 match &parsed_error.code[..] {
18215                     _ => {}
18216                 }
18217             }
18218         }
18219         RusotoError::Unknown(res)
18220     }
18221 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18222     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18223     where
18224         T: Peek + Next,
18225     {
18226         XmlErrorDeserializer::deserialize("Error", stack)
18227     }
18228 }
18229 impl fmt::Display for PutBucketTaggingError {
18230     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18231     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18232         match *self {}
18233     }
18234 }
18235 impl Error for PutBucketTaggingError {}
18236 /// Errors returned by PutBucketVersioning
18237 #[derive(Debug, PartialEq)]
18238 pub enum PutBucketVersioningError {}
18239 
18240 impl PutBucketVersioningError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketVersioningError>18241     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketVersioningError> {
18242         {
18243             let reader = EventReader::new(res.body.as_ref());
18244             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18245             find_start_element(&mut stack);
18246             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18247                 match &parsed_error.code[..] {
18248                     _ => {}
18249                 }
18250             }
18251         }
18252         RusotoError::Unknown(res)
18253     }
18254 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18255     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18256     where
18257         T: Peek + Next,
18258     {
18259         XmlErrorDeserializer::deserialize("Error", stack)
18260     }
18261 }
18262 impl fmt::Display for PutBucketVersioningError {
18263     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18264     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18265         match *self {}
18266     }
18267 }
18268 impl Error for PutBucketVersioningError {}
18269 /// Errors returned by PutBucketWebsite
18270 #[derive(Debug, PartialEq)]
18271 pub enum PutBucketWebsiteError {}
18272 
18273 impl PutBucketWebsiteError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketWebsiteError>18274     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBucketWebsiteError> {
18275         {
18276             let reader = EventReader::new(res.body.as_ref());
18277             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18278             find_start_element(&mut stack);
18279             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18280                 match &parsed_error.code[..] {
18281                     _ => {}
18282                 }
18283             }
18284         }
18285         RusotoError::Unknown(res)
18286     }
18287 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18288     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18289     where
18290         T: Peek + Next,
18291     {
18292         XmlErrorDeserializer::deserialize("Error", stack)
18293     }
18294 }
18295 impl fmt::Display for PutBucketWebsiteError {
18296     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18297     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18298         match *self {}
18299     }
18300 }
18301 impl Error for PutBucketWebsiteError {}
18302 /// Errors returned by PutObject
18303 #[derive(Debug, PartialEq)]
18304 pub enum PutObjectError {}
18305 
18306 impl PutObjectError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectError>18307     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectError> {
18308         {
18309             let reader = EventReader::new(res.body.as_ref());
18310             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18311             find_start_element(&mut stack);
18312             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18313                 match &parsed_error.code[..] {
18314                     _ => {}
18315                 }
18316             }
18317         }
18318         RusotoError::Unknown(res)
18319     }
18320 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18321     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18322     where
18323         T: Peek + Next,
18324     {
18325         XmlErrorDeserializer::deserialize("Error", stack)
18326     }
18327 }
18328 impl fmt::Display for PutObjectError {
18329     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18330     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18331         match *self {}
18332     }
18333 }
18334 impl Error for PutObjectError {}
18335 /// Errors returned by PutObjectAcl
18336 #[derive(Debug, PartialEq)]
18337 pub enum PutObjectAclError {
18338     /// <p>The specified key does not exist.</p>
18339     NoSuchKey(String),
18340 }
18341 
18342 impl PutObjectAclError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectAclError>18343     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectAclError> {
18344         {
18345             let reader = EventReader::new(res.body.as_ref());
18346             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18347             find_start_element(&mut stack);
18348             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18349                 match &parsed_error.code[..] {
18350                     "NoSuchKey" => {
18351                         return RusotoError::Service(PutObjectAclError::NoSuchKey(
18352                             parsed_error.message,
18353                         ))
18354                     }
18355                     _ => {}
18356                 }
18357             }
18358         }
18359         RusotoError::Unknown(res)
18360     }
18361 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18362     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18363     where
18364         T: Peek + Next,
18365     {
18366         XmlErrorDeserializer::deserialize("Error", stack)
18367     }
18368 }
18369 impl fmt::Display for PutObjectAclError {
18370     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18371     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18372         match *self {
18373             PutObjectAclError::NoSuchKey(ref cause) => write!(f, "{}", cause),
18374         }
18375     }
18376 }
18377 impl Error for PutObjectAclError {}
18378 /// Errors returned by PutObjectLegalHold
18379 #[derive(Debug, PartialEq)]
18380 pub enum PutObjectLegalHoldError {}
18381 
18382 impl PutObjectLegalHoldError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectLegalHoldError>18383     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectLegalHoldError> {
18384         {
18385             let reader = EventReader::new(res.body.as_ref());
18386             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18387             find_start_element(&mut stack);
18388             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18389                 match &parsed_error.code[..] {
18390                     _ => {}
18391                 }
18392             }
18393         }
18394         RusotoError::Unknown(res)
18395     }
18396 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18397     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18398     where
18399         T: Peek + Next,
18400     {
18401         XmlErrorDeserializer::deserialize("Error", stack)
18402     }
18403 }
18404 impl fmt::Display for PutObjectLegalHoldError {
18405     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18406     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18407         match *self {}
18408     }
18409 }
18410 impl Error for PutObjectLegalHoldError {}
18411 /// Errors returned by PutObjectLockConfiguration
18412 #[derive(Debug, PartialEq)]
18413 pub enum PutObjectLockConfigurationError {}
18414 
18415 impl PutObjectLockConfigurationError {
from_response( res: BufferedHttpResponse, ) -> RusotoError<PutObjectLockConfigurationError>18416     pub fn from_response(
18417         res: BufferedHttpResponse,
18418     ) -> RusotoError<PutObjectLockConfigurationError> {
18419         {
18420             let reader = EventReader::new(res.body.as_ref());
18421             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18422             find_start_element(&mut stack);
18423             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18424                 match &parsed_error.code[..] {
18425                     _ => {}
18426                 }
18427             }
18428         }
18429         RusotoError::Unknown(res)
18430     }
18431 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18432     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18433     where
18434         T: Peek + Next,
18435     {
18436         XmlErrorDeserializer::deserialize("Error", stack)
18437     }
18438 }
18439 impl fmt::Display for PutObjectLockConfigurationError {
18440     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18441     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18442         match *self {}
18443     }
18444 }
18445 impl Error for PutObjectLockConfigurationError {}
18446 /// Errors returned by PutObjectRetention
18447 #[derive(Debug, PartialEq)]
18448 pub enum PutObjectRetentionError {}
18449 
18450 impl PutObjectRetentionError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectRetentionError>18451     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectRetentionError> {
18452         {
18453             let reader = EventReader::new(res.body.as_ref());
18454             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18455             find_start_element(&mut stack);
18456             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18457                 match &parsed_error.code[..] {
18458                     _ => {}
18459                 }
18460             }
18461         }
18462         RusotoError::Unknown(res)
18463     }
18464 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18465     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18466     where
18467         T: Peek + Next,
18468     {
18469         XmlErrorDeserializer::deserialize("Error", stack)
18470     }
18471 }
18472 impl fmt::Display for PutObjectRetentionError {
18473     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18474     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18475         match *self {}
18476     }
18477 }
18478 impl Error for PutObjectRetentionError {}
18479 /// Errors returned by PutObjectTagging
18480 #[derive(Debug, PartialEq)]
18481 pub enum PutObjectTaggingError {}
18482 
18483 impl PutObjectTaggingError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectTaggingError>18484     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutObjectTaggingError> {
18485         {
18486             let reader = EventReader::new(res.body.as_ref());
18487             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18488             find_start_element(&mut stack);
18489             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18490                 match &parsed_error.code[..] {
18491                     _ => {}
18492                 }
18493             }
18494         }
18495         RusotoError::Unknown(res)
18496     }
18497 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18498     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18499     where
18500         T: Peek + Next,
18501     {
18502         XmlErrorDeserializer::deserialize("Error", stack)
18503     }
18504 }
18505 impl fmt::Display for PutObjectTaggingError {
18506     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18507     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18508         match *self {}
18509     }
18510 }
18511 impl Error for PutObjectTaggingError {}
18512 /// Errors returned by PutPublicAccessBlock
18513 #[derive(Debug, PartialEq)]
18514 pub enum PutPublicAccessBlockError {}
18515 
18516 impl PutPublicAccessBlockError {
from_response(res: BufferedHttpResponse) -> RusotoError<PutPublicAccessBlockError>18517     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutPublicAccessBlockError> {
18518         {
18519             let reader = EventReader::new(res.body.as_ref());
18520             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18521             find_start_element(&mut stack);
18522             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18523                 match &parsed_error.code[..] {
18524                     _ => {}
18525                 }
18526             }
18527         }
18528         RusotoError::Unknown(res)
18529     }
18530 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18531     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18532     where
18533         T: Peek + Next,
18534     {
18535         XmlErrorDeserializer::deserialize("Error", stack)
18536     }
18537 }
18538 impl fmt::Display for PutPublicAccessBlockError {
18539     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18540     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18541         match *self {}
18542     }
18543 }
18544 impl Error for PutPublicAccessBlockError {}
18545 /// Errors returned by RestoreObject
18546 #[derive(Debug, PartialEq)]
18547 pub enum RestoreObjectError {
18548     /// <p>This action is not allowed against this storage tier.</p>
18549     ObjectAlreadyInActiveTierError(String),
18550 }
18551 
18552 impl RestoreObjectError {
from_response(res: BufferedHttpResponse) -> RusotoError<RestoreObjectError>18553     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RestoreObjectError> {
18554         {
18555             let reader = EventReader::new(res.body.as_ref());
18556             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18557             find_start_element(&mut stack);
18558             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18559                 match &parsed_error.code[..] {
18560                     "ObjectAlreadyInActiveTierError" => {
18561                         return RusotoError::Service(
18562                             RestoreObjectError::ObjectAlreadyInActiveTierError(
18563                                 parsed_error.message,
18564                             ),
18565                         )
18566                     }
18567                     _ => {}
18568                 }
18569             }
18570         }
18571         RusotoError::Unknown(res)
18572     }
18573 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18574     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18575     where
18576         T: Peek + Next,
18577     {
18578         XmlErrorDeserializer::deserialize("Error", stack)
18579     }
18580 }
18581 impl fmt::Display for RestoreObjectError {
18582     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18583     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18584         match *self {
18585             RestoreObjectError::ObjectAlreadyInActiveTierError(ref cause) => write!(f, "{}", cause),
18586         }
18587     }
18588 }
18589 impl Error for RestoreObjectError {}
18590 /// Errors returned by SelectObjectContent
18591 #[derive(Debug, PartialEq)]
18592 pub enum SelectObjectContentError {}
18593 
18594 impl SelectObjectContentError {
from_response(res: BufferedHttpResponse) -> RusotoError<SelectObjectContentError>18595     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SelectObjectContentError> {
18596         {
18597             let reader = EventReader::new(res.body.as_ref());
18598             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18599             find_start_element(&mut stack);
18600             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18601                 match &parsed_error.code[..] {
18602                     _ => {}
18603                 }
18604             }
18605         }
18606         RusotoError::Unknown(res)
18607     }
18608 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18609     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18610     where
18611         T: Peek + Next,
18612     {
18613         XmlErrorDeserializer::deserialize("Error", stack)
18614     }
18615 }
18616 impl fmt::Display for SelectObjectContentError {
18617     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18618     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18619         match *self {}
18620     }
18621 }
18622 impl Error for SelectObjectContentError {}
18623 /// Errors returned by UploadPart
18624 #[derive(Debug, PartialEq)]
18625 pub enum UploadPartError {}
18626 
18627 impl UploadPartError {
from_response(res: BufferedHttpResponse) -> RusotoError<UploadPartError>18628     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UploadPartError> {
18629         {
18630             let reader = EventReader::new(res.body.as_ref());
18631             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18632             find_start_element(&mut stack);
18633             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18634                 match &parsed_error.code[..] {
18635                     _ => {}
18636                 }
18637             }
18638         }
18639         RusotoError::Unknown(res)
18640     }
18641 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18642     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18643     where
18644         T: Peek + Next,
18645     {
18646         XmlErrorDeserializer::deserialize("Error", stack)
18647     }
18648 }
18649 impl fmt::Display for UploadPartError {
18650     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18651     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18652         match *self {}
18653     }
18654 }
18655 impl Error for UploadPartError {}
18656 /// Errors returned by UploadPartCopy
18657 #[derive(Debug, PartialEq)]
18658 pub enum UploadPartCopyError {}
18659 
18660 impl UploadPartCopyError {
from_response(res: BufferedHttpResponse) -> RusotoError<UploadPartCopyError>18661     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UploadPartCopyError> {
18662         {
18663             let reader = EventReader::new(res.body.as_ref());
18664             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18665             find_start_element(&mut stack);
18666             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18667                 match &parsed_error.code[..] {
18668                     _ => {}
18669                 }
18670             }
18671         }
18672         RusotoError::Unknown(res)
18673     }
18674 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18675     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18676     where
18677         T: Peek + Next,
18678     {
18679         XmlErrorDeserializer::deserialize("Error", stack)
18680     }
18681 }
18682 impl fmt::Display for UploadPartCopyError {
18683     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18684     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18685         match *self {}
18686     }
18687 }
18688 impl Error for UploadPartCopyError {}
18689 /// Errors returned by WriteGetObjectResponse
18690 #[derive(Debug, PartialEq)]
18691 pub enum WriteGetObjectResponseError {}
18692 
18693 impl WriteGetObjectResponseError {
from_response(res: BufferedHttpResponse) -> RusotoError<WriteGetObjectResponseError>18694     pub fn from_response(res: BufferedHttpResponse) -> RusotoError<WriteGetObjectResponseError> {
18695         {
18696             let reader = EventReader::new(res.body.as_ref());
18697             let mut stack = XmlResponse::new(reader.into_iter().peekable());
18698             find_start_element(&mut stack);
18699             if let Ok(parsed_error) = Self::deserialize(&mut stack) {
18700                 match &parsed_error.code[..] {
18701                     _ => {}
18702                 }
18703             }
18704         }
18705         RusotoError::Unknown(res)
18706     }
18707 
deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError> where T: Peek + Next,18708     fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
18709     where
18710         T: Peek + Next,
18711     {
18712         XmlErrorDeserializer::deserialize("Error", stack)
18713     }
18714 }
18715 impl fmt::Display for WriteGetObjectResponseError {
18716     #[allow(unused_variables)]
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result18717     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18718         match *self {}
18719     }
18720 }
18721 impl Error for WriteGetObjectResponseError {}
18722 /// Trait representing the capabilities of the Amazon S3 API. Amazon S3 clients implement this trait.
18723 #[async_trait]
18724 pub trait S3 {
18725     /// <p><p>This action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> action and ensure that the parts list is empty.</p> <p>For information about permissions required to use the multipart upload, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload and Permissions</a>.</p> <p>The following operations are related to <code>AbortMultipartUpload</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a> </p> </li> </ul></p>
abort_multipart_upload( &self, input: AbortMultipartUploadRequest, ) -> Result<AbortMultipartUploadOutput, RusotoError<AbortMultipartUploadError>>18726     async fn abort_multipart_upload(
18727         &self,
18728         input: AbortMultipartUploadRequest,
18729     ) -> Result<AbortMultipartUploadOutput, RusotoError<AbortMultipartUploadError>>;
18730 
18731     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> operation. After successfully uploading all relevant parts of an upload, you call this action 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 action 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 and Permissions</a>.</p> <p> <code>CompleteMultipartUpload</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>CompleteMultipartUpload</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a> </p> </li> </ul></p>
complete_multipart_upload( &self, input: CompleteMultipartUploadRequest, ) -> Result<CompleteMultipartUploadOutput, RusotoError<CompleteMultipartUploadError>>18732     async fn complete_multipart_upload(
18733         &self,
18734         input: CompleteMultipartUploadRequest,
18735     ) -> Result<CompleteMultipartUploadOutput, RusotoError<CompleteMultipartUploadError>>;
18736 
18737     /// <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 action using this API. However, to copy 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>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>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 action 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>The copy request charge is based on the storage class and Region that you specify for the destination object. For pricing information, see <a href="http://aws.amazon.com/s3/pricing/">Amazon S3 pricing</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, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html">Transfer Acceleration</a>.</p> </important> <p> <b>Metadata</b> </p> <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> <p>To specify whether you want the object metadata copied from the source object or replaced with metadata provided in the request, you can optionally add the <code>x-amz-metadata-directive</code> header. When you grant permissions, you can use the <code>s3:x-amz-metadata-directive</code> condition key to enforce certain metadata behavior when objects are uploaded. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html">Specifying Conditions in a Policy</a> in the <i>Amazon S3 User Guide</i>. For a complete list of Amazon S3-specific condition keys, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html">Actions, Resources, and Condition Keys for Amazon S3</a>.</p> <p> <b> <code>x-amz-copy-source-if</code> Headers</b> </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 following request parameters:</p> <ul> <li> <p> <code>x-amz-copy-source-if-match</code> </p> </li> <li> <p> <code>x-amz-copy-source-if-none-match</code> </p> </li> <li> <p> <code>x-amz-copy-source-if-unmodified-since</code> </p> </li> <li> <p> <code>x-amz-copy-source-if-modified-since</code> </p> </li> </ul> <p> 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 <code>200 OK</code> 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> <p>If both 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> <note> <p>All headers with the <code>x-amz-</code> prefix, including <code>x-amz-copy-source</code>, must be signed.</p> </note> <p> <b>Server-side encryption</b> </p> <p>When you perform a CopyObject operation, you can optionally use the appropriate encryption-related headers to encrypt the object using server-side encryption with AWS managed encryption keys (SSE-S3 or SSE-KMS) or a customer-provided encryption key. 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. 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>If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p> <p> <b>Access Control List (ACL)-Specific Request Headers</b> </p> <p>When copying an object, you can optionally use headers to grant ACL-based permissions. 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 ACL on the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a>. </p> <p> <b>Storage Class Options</b> </p> <p>You can use the <code>CopyObject</code> action 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> in the <i>Amazon S3 User Guide</i>.</p> <p> <b>Versioning</b> </p> <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 <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a>.</p> <p>The following operations are related to <code>CopyObject</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">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>>18738     async fn copy_object(
18739         &self,
18740         input: CopyObjectRequest,
18741     ) -> Result<CopyObjectOutput, RusotoError<CopyObjectError>>;
18742 
18743     /// <p><p>Creates a new S3 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 about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html">Bucket naming rules</a>.</p> <p>If you want to create an Amazon S3 on Outposts bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html">Create Bucket</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 Europe (Ireland) Region. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro">Accessing a bucket</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>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> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> <note> <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>Europe (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> </note> </li> </ul> <p>For example, the following <code>x-amz-grant-read</code> header grants the AWS accounts identified by account IDs permissions to read object data and its metadata:</p> <p> <code>x-amz-grant-read: id=&quot;11112222333&quot;, id=&quot;444455556666&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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html">DeleteBucket</a> </p> </li> </ul></p>
create_bucket( &self, input: CreateBucketRequest, ) -> Result<CreateBucketOutput, RusotoError<CreateBucketError>>18744     async fn create_bucket(
18745         &self,
18746         input: CreateBucketRequest,
18747     ) -> Result<CreateBucketOutput, RusotoError<CreateBucketError>>;
18748 
18749     /// <p><p>This action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">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 action 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 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">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:Decrypt</code> and <code>kms:GenerateDataKey*</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. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions">Multipart upload API and permissions</a> in the <i>Amazon S3 User Guide</i>.</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>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> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> <note> <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>Europe (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> </note> </li> </ul> <p>For example, the following <code>x-amz-grant-read</code> header grants the AWS accounts identified by account IDs permissions to read object data and its metadata:</p> <p> <code>x-amz-grant-read: id=&quot;11112222333&quot;, id=&quot;444455556666&quot; </code> </p> </li> </ul> </dd> </dl> <p>The following operations are related to <code>CreateMultipartUpload</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a> </p> </li> </ul></p>
create_multipart_upload( &self, input: CreateMultipartUploadRequest, ) -> Result<CreateMultipartUploadOutput, RusotoError<CreateMultipartUploadError>>18750     async fn create_multipart_upload(
18751         &self,
18752         input: CreateMultipartUploadRequest,
18753     ) -> Result<CreateMultipartUploadOutput, RusotoError<CreateMultipartUploadError>>;
18754 
18755     /// <p><p>Deletes the S3 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> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a> </p> </li> </ul></p>
delete_bucket( &self, input: DeleteBucketRequest, ) -> Result<(), RusotoError<DeleteBucketError>>18756     async fn delete_bucket(
18757         &self,
18758         input: DeleteBucketRequest,
18759     ) -> Result<(), RusotoError<DeleteBucketError>>;
18760 
18761     /// <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/userguide/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/userguide/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> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html">GetBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html">ListBucketAnalyticsConfigurations</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html">PutBucketAnalyticsConfiguration</a> </p> </li> </ul></p>
delete_bucket_analytics_configuration( &self, input: DeleteBucketAnalyticsConfigurationRequest, ) -> Result<(), RusotoError<DeleteBucketAnalyticsConfigurationError>>18762     async fn delete_bucket_analytics_configuration(
18763         &self,
18764         input: DeleteBucketAnalyticsConfigurationRequest,
18765     ) -> Result<(), RusotoError<DeleteBucketAnalyticsConfigurationError>>;
18766 
18767     /// <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 S3 User Guide</i>.</p> <p class="title"> <b>Related Resources:</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html">PutBucketCors</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html">RESTOPTIONSobject</a> </p> </li> </ul></p>
delete_bucket_cors( &self, input: DeleteBucketCorsRequest, ) -> Result<(), RusotoError<DeleteBucketCorsError>>18768     async fn delete_bucket_cors(
18769         &self,
18770         input: DeleteBucketCorsRequest,
18771     ) -> Result<(), RusotoError<DeleteBucketCorsError>>;
18772 
18773     /// <p><p>This implementation of the DELETE action 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 S3 User 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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> in the <i>Amazon S3 User Guide</i>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html">PutBucketEncryption</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html">GetBucketEncryption</a> </p> </li> </ul></p>
delete_bucket_encryption( &self, input: DeleteBucketEncryptionRequest, ) -> Result<(), RusotoError<DeleteBucketEncryptionError>>18774     async fn delete_bucket_encryption(
18775         &self,
18776         input: DeleteBucketEncryptionRequest,
18777     ) -> Result<(), RusotoError<DeleteBucketEncryptionError>>;
18778 
18779     /// <p><p>Deletes the S3 Intelligent-Tiering configuration from the specified bucket.</p> <p>The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without additional operational overhead. S3 Intelligent-Tiering delivers automatic cost savings by moving data between access tiers, when access patterns change.</p> <p>The S3 Intelligent-Tiering storage class is suitable for objects larger than 128 KB that you plan to store for at least 30 days. If the size of an object is less than 128 KB, it is not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the frequent access tier rates in the S3 Intelligent-Tiering storage class. </p> <p>If you delete an object before the end of the 30-day minimum storage duration period, you are charged for 30 days. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access">Storage class for automatically optimizing frequently and infrequently accessed objects</a>.</p> <p>Operations related to <code>DeleteBucketIntelligentTieringConfiguration</code> include: </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html">GetBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html">PutBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html">ListBucketIntelligentTieringConfigurations</a> </p> </li> </ul></p>
delete_bucket_intelligent_tiering_configuration( &self, input: DeleteBucketIntelligentTieringConfigurationRequest, ) -> Result<(), RusotoError<DeleteBucketIntelligentTieringConfigurationError>>18780     async fn delete_bucket_intelligent_tiering_configuration(
18781         &self,
18782         input: DeleteBucketIntelligentTieringConfigurationRequest,
18783     ) -> Result<(), RusotoError<DeleteBucketIntelligentTieringConfigurationError>>;
18784 
18785     /// <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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html">GetBucketInventoryConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html">PutBucketInventoryConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html">ListBucketInventoryConfigurations</a> </p> </li> </ul></p>
delete_bucket_inventory_configuration( &self, input: DeleteBucketInventoryConfigurationRequest, ) -> Result<(), RusotoError<DeleteBucketInventoryConfigurationError>>18786     async fn delete_bucket_inventory_configuration(
18787         &self,
18788         input: DeleteBucketInventoryConfigurationRequest,
18789     ) -> Result<(), RusotoError<DeleteBucketInventoryConfigurationError>>;
18790 
18791     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html">GetBucketLifecycleConfiguration</a> </p> </li> </ul></p>
delete_bucket_lifecycle( &self, input: DeleteBucketLifecycleRequest, ) -> Result<(), RusotoError<DeleteBucketLifecycleError>>18792     async fn delete_bucket_lifecycle(
18793         &self,
18794         input: DeleteBucketLifecycleRequest,
18795     ) -> Result<(), RusotoError<DeleteBucketLifecycleError>>;
18796 
18797     /// <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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html">GetBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html">PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html">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>>18798     async fn delete_bucket_metrics_configuration(
18799         &self,
18800         input: DeleteBucketMetricsConfigurationRequest,
18801     ) -> Result<(), RusotoError<DeleteBucketMetricsConfigurationError>>;
18802 
18803     /// <p><p>Removes <code>OwnershipControls</code> for an Amazon S3 bucket. To use this operation, you must have the <code>s3:PutBucketOwnershipControls</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 information about Amazon S3 Object Ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html">Using Object Ownership</a>. </p> <p>The following operations are related to <code>DeleteBucketOwnershipControls</code>:</p> <ul> <li> <p> <a>GetBucketOwnershipControls</a> </p> </li> <li> <p> <a>PutBucketOwnershipControls</a> </p> </li> </ul></p>
delete_bucket_ownership_controls( &self, input: DeleteBucketOwnershipControlsRequest, ) -> Result<(), RusotoError<DeleteBucketOwnershipControlsError>>18804     async fn delete_bucket_ownership_controls(
18805         &self,
18806         input: DeleteBucketOwnershipControlsRequest,
18807     ) -> Result<(), RusotoError<DeleteBucketOwnershipControlsError>>;
18808 
18809     /// <p><p>This implementation of the DELETE action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a> </p> </li> </ul></p>
delete_bucket_policy( &self, input: DeleteBucketPolicyRequest, ) -> Result<(), RusotoError<DeleteBucketPolicyError>>18810     async fn delete_bucket_policy(
18811         &self,
18812         input: DeleteBucketPolicyRequest,
18813     ) -> Result<(), RusotoError<DeleteBucketPolicyError>>;
18814 
18815     /// <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/userguide/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/userguide/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 User Guide</i>.</p> <p>The following operations are related to <code>DeleteBucketReplication</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html">PutBucketReplication</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html">GetBucketReplication</a> </p> </li> </ul></p>
delete_bucket_replication( &self, input: DeleteBucketReplicationRequest, ) -> Result<(), RusotoError<DeleteBucketReplicationError>>18816     async fn delete_bucket_replication(
18817         &self,
18818         input: DeleteBucketReplicationRequest,
18819     ) -> Result<(), RusotoError<DeleteBucketReplicationError>>;
18820 
18821     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html">GetBucketTagging</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html">PutBucketTagging</a> </p> </li> </ul></p>
delete_bucket_tagging( &self, input: DeleteBucketTaggingRequest, ) -> Result<(), RusotoError<DeleteBucketTaggingError>>18822     async fn delete_bucket_tagging(
18823         &self,
18824         input: DeleteBucketTaggingRequest,
18825     ) -> Result<(), RusotoError<DeleteBucketTaggingError>>;
18826 
18827     /// <p><p>This action 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 action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketWebsite.html">GetBucketWebsite</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html">PutBucketWebsite</a> </p> </li> </ul></p>
delete_bucket_website( &self, input: DeleteBucketWebsiteRequest, ) -> Result<(), RusotoError<DeleteBucketWebsiteError>>18828     async fn delete_bucket_website(
18829         &self,
18830         input: DeleteBucketWebsiteRequest,
18831     ) -> Result<(), RusotoError<DeleteBucketWebsiteError>>;
18832 
18833     /// <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 but will still respond that the command was successful.</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 DELETE Object or configure its lifecycle (<a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">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 action is related to <code>DeleteObject</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> </ul></p>
delete_object( &self, input: DeleteObjectRequest, ) -> Result<DeleteObjectOutput, RusotoError<DeleteObjectError>>18834     async fn delete_object(
18835         &self,
18836         input: DeleteObjectRequest,
18837     ) -> Result<DeleteObjectOutput, RusotoError<DeleteObjectError>>;
18838 
18839     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html">PutObjectTagging</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html">GetObjectTagging</a> </p> </li> </ul></p>
delete_object_tagging( &self, input: DeleteObjectTaggingRequest, ) -> Result<DeleteObjectTaggingOutput, RusotoError<DeleteObjectTaggingError>>18840     async fn delete_object_tagging(
18841         &self,
18842         input: DeleteObjectTaggingRequest,
18843     ) -> Result<DeleteObjectTaggingOutput, RusotoError<DeleteObjectTaggingError>>;
18844 
18845     /// <p><p>This action 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 action 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 action 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 action supports two modes for the response: verbose and quiet. By default, the action 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 action encountered an error. For a successful deletion, the action does not return any information about the delete in the response body.</p> <p>When performing this action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> </p> </li> </ul></p>
delete_objects( &self, input: DeleteObjectsRequest, ) -> Result<DeleteObjectsOutput, RusotoError<DeleteObjectsError>>18846     async fn delete_objects(
18847         &self,
18848         input: DeleteObjectsRequest,
18849     ) -> Result<DeleteObjectsOutput, RusotoError<DeleteObjectsError>>;
18850 
18851     /// <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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>The following operations are related to <code>DeletePublicAccessBlock</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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html">GetPublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html">PutPublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html">GetBucketPolicyStatus</a> </p> </li> </ul></p>
delete_public_access_block( &self, input: DeletePublicAccessBlockRequest, ) -> Result<(), RusotoError<DeletePublicAccessBlockError>>18852     async fn delete_public_access_block(
18853         &self,
18854         input: DeletePublicAccessBlockRequest,
18855     ) -> Result<(), RusotoError<DeletePublicAccessBlockError>>;
18856 
18857     /// <p><p>This implementation of the GET action 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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> in the <i>Amazon S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html">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 S3 User Guide.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html">PutBucketAccelerateConfiguration</a> </p> </li> </ul></p>
get_bucket_accelerate_configuration( &self, input: GetBucketAccelerateConfigurationRequest, ) -> Result< GetBucketAccelerateConfigurationOutput, RusotoError<GetBucketAccelerateConfigurationError>, >18858     async fn get_bucket_accelerate_configuration(
18859         &self,
18860         input: GetBucketAccelerateConfigurationRequest,
18861     ) -> Result<
18862         GetBucketAccelerateConfigurationOutput,
18863         RusotoError<GetBucketAccelerateConfigurationError>,
18864     >;
18865 
18866     /// <p><p>This implementation of the <code>GET</code> action 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> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html">ListObjects</a> </p> </li> </ul></p>
get_bucket_acl( &self, input: GetBucketAclRequest, ) -> Result<GetBucketAclOutput, RusotoError<GetBucketAclError>>18867     async fn get_bucket_acl(
18868         &self,
18869         input: GetBucketAclRequest,
18870     ) -> Result<GetBucketAclOutput, RusotoError<GetBucketAclError>>;
18871 
18872     /// <p><p>This implementation of the GET action 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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the <i>Amazon S3 User 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 S3 User Guide</i>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html">DeleteBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html">ListBucketAnalyticsConfigurations</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html">PutBucketAnalyticsConfiguration</a> </p> </li> </ul></p>
get_bucket_analytics_configuration( &self, input: GetBucketAnalyticsConfigurationRequest, ) -> Result< GetBucketAnalyticsConfigurationOutput, RusotoError<GetBucketAnalyticsConfigurationError>, >18873     async fn get_bucket_analytics_configuration(
18874         &self,
18875         input: GetBucketAnalyticsConfigurationRequest,
18876     ) -> Result<
18877         GetBucketAnalyticsConfigurationOutput,
18878         RusotoError<GetBucketAnalyticsConfigurationError>,
18879     >;
18880 
18881     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html">PutBucketCors</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html">DeleteBucketCors</a> </p> </li> </ul></p>
get_bucket_cors( &self, input: GetBucketCorsRequest, ) -> Result<GetBucketCorsOutput, RusotoError<GetBucketCorsError>>18882     async fn get_bucket_cors(
18883         &self,
18884         input: GetBucketCorsRequest,
18885     ) -> Result<GetBucketCorsOutput, RusotoError<GetBucketCorsError>>;
18886 
18887     /// <p><p>Returns the default encryption configuration for an Amazon S3 bucket. If the bucket does not have a default encryption configuration, GetBucketEncryption returns <code>ServerSideEncryptionConfigurationNotFoundError</code>. </p> <p>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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html">PutBucketEncryption</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html">DeleteBucketEncryption</a> </p> </li> </ul></p>
get_bucket_encryption( &self, input: GetBucketEncryptionRequest, ) -> Result<GetBucketEncryptionOutput, RusotoError<GetBucketEncryptionError>>18888     async fn get_bucket_encryption(
18889         &self,
18890         input: GetBucketEncryptionRequest,
18891     ) -> Result<GetBucketEncryptionOutput, RusotoError<GetBucketEncryptionError>>;
18892 
18893     /// <p><p>Gets the S3 Intelligent-Tiering configuration from the specified bucket.</p> <p>The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without additional operational overhead. S3 Intelligent-Tiering delivers automatic cost savings by moving data between access tiers, when access patterns change.</p> <p>The S3 Intelligent-Tiering storage class is suitable for objects larger than 128 KB that you plan to store for at least 30 days. If the size of an object is less than 128 KB, it is not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the frequent access tier rates in the S3 Intelligent-Tiering storage class. </p> <p>If you delete an object before the end of the 30-day minimum storage duration period, you are charged for 30 days. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access">Storage class for automatically optimizing frequently and infrequently accessed objects</a>.</p> <p>Operations related to <code>GetBucketIntelligentTieringConfiguration</code> include: </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html">DeleteBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html">PutBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html">ListBucketIntelligentTieringConfigurations</a> </p> </li> </ul></p>
get_bucket_intelligent_tiering_configuration( &self, input: GetBucketIntelligentTieringConfigurationRequest, ) -> Result< GetBucketIntelligentTieringConfigurationOutput, RusotoError<GetBucketIntelligentTieringConfigurationError>, >18894     async fn get_bucket_intelligent_tiering_configuration(
18895         &self,
18896         input: GetBucketIntelligentTieringConfigurationRequest,
18897     ) -> Result<
18898         GetBucketIntelligentTieringConfigurationOutput,
18899         RusotoError<GetBucketIntelligentTieringConfigurationError>,
18900     >;
18901 
18902     /// <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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html">DeleteBucketInventoryConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html">ListBucketInventoryConfigurations</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html">PutBucketInventoryConfiguration</a> </p> </li> </ul></p>
get_bucket_inventory_configuration( &self, input: GetBucketInventoryConfigurationRequest, ) -> Result< GetBucketInventoryConfigurationOutput, RusotoError<GetBucketInventoryConfigurationError>, >18903     async fn get_bucket_inventory_configuration(
18904         &self,
18905         input: GetBucketInventoryConfigurationRequest,
18906     ) -> Result<
18907         GetBucketInventoryConfigurationOutput,
18908         RusotoError<GetBucketInventoryConfigurationError>,
18909     >;
18910 
18911     /// <p><important> <p>For an updated version of this API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html">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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html">GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">PutBucketLifecycle</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html">DeleteBucketLifecycle</a> </p> </li> </ul></p>
get_bucket_lifecycle( &self, input: GetBucketLifecycleRequest, ) -> Result<GetBucketLifecycleOutput, RusotoError<GetBucketLifecycleError>>18912     async fn get_bucket_lifecycle(
18913         &self,
18914         input: GetBucketLifecycleRequest,
18915     ) -> Result<GetBucketLifecycleOutput, RusotoError<GetBucketLifecycleError>>;
18916 
18917     /// <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 using a previous version of the lifecycle configuration, it still works. For the earlier action, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html">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/userguide/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/userguide/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>GetBucketLifecycleConfiguration</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html">GetBucketLifecycle</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">PutBucketLifecycle</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html">DeleteBucketLifecycle</a> </p> </li> </ul></p>
get_bucket_lifecycle_configuration( &self, input: GetBucketLifecycleConfigurationRequest, ) -> Result< GetBucketLifecycleConfigurationOutput, RusotoError<GetBucketLifecycleConfigurationError>, >18918     async fn get_bucket_lifecycle_configuration(
18919         &self,
18920         input: GetBucketLifecycleConfigurationRequest,
18921     ) -> Result<
18922         GetBucketLifecycleConfigurationOutput,
18923         RusotoError<GetBucketLifecycleConfigurationError>,
18924     >;
18925 
18926     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> </ul></p>
get_bucket_location( &self, input: GetBucketLocationRequest, ) -> Result<GetBucketLocationOutput, RusotoError<GetBucketLocationError>>18927     async fn get_bucket_location(
18928         &self,
18929         input: GetBucketLocationRequest,
18930     ) -> Result<GetBucketLocationOutput, RusotoError<GetBucketLocationError>>;
18931 
18932     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.html">PutBucketLogging</a> </p> </li> </ul></p>
get_bucket_logging( &self, input: GetBucketLoggingRequest, ) -> Result<GetBucketLoggingOutput, RusotoError<GetBucketLoggingError>>18933     async fn get_bucket_logging(
18934         &self,
18935         input: GetBucketLoggingRequest,
18936     ) -> Result<GetBucketLoggingOutput, RusotoError<GetBucketLoggingError>>;
18937 
18938     /// <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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html">PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html">DeleteBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html">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>>18939     async fn get_bucket_metrics_configuration(
18940         &self,
18941         input: GetBucketMetricsConfigurationRequest,
18942     ) -> Result<GetBucketMetricsConfigurationOutput, RusotoError<GetBucketMetricsConfigurationError>>;
18943 
18944     /// <p> No longer used, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html">GetBucketNotificationConfiguration</a>.</p>
get_bucket_notification( &self, input: GetBucketNotificationConfigurationRequest, ) -> Result<NotificationConfigurationDeprecated, RusotoError<GetBucketNotificationError>>18945     async fn get_bucket_notification(
18946         &self,
18947         input: GetBucketNotificationConfigurationRequest,
18948     ) -> Result<NotificationConfigurationDeprecated, RusotoError<GetBucketNotificationError>>;
18949 
18950     /// <p><p>Returns the notification configuration of a bucket.</p> <p>If notifications are not enabled on the bucket, the action 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 action is related to <code>GetBucketNotification</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotification.html">PutBucketNotification</a> </p> </li> </ul></p>
get_bucket_notification_configuration( &self, input: GetBucketNotificationConfigurationRequest, ) -> Result<NotificationConfiguration, RusotoError<GetBucketNotificationConfigurationError>>18951     async fn get_bucket_notification_configuration(
18952         &self,
18953         input: GetBucketNotificationConfigurationRequest,
18954     ) -> Result<NotificationConfiguration, RusotoError<GetBucketNotificationConfigurationError>>;
18955 
18956     /// <p><p>Retrieves <code>OwnershipControls</code> for an Amazon S3 bucket. To use this operation, you must have the <code>s3:GetBucketOwnershipControls</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 information about Amazon S3 Object Ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html">Using Object Ownership</a>. </p> <p>The following operations are related to <code>GetBucketOwnershipControls</code>:</p> <ul> <li> <p> <a>PutBucketOwnershipControls</a> </p> </li> <li> <p> <a>DeleteBucketOwnershipControls</a> </p> </li> </ul></p>
get_bucket_ownership_controls( &self, input: GetBucketOwnershipControlsRequest, ) -> Result<GetBucketOwnershipControlsOutput, RusotoError<GetBucketOwnershipControlsError>>18957     async fn get_bucket_ownership_controls(
18958         &self,
18959         input: GetBucketOwnershipControlsRequest,
18960     ) -> Result<GetBucketOwnershipControlsOutput, RusotoError<GetBucketOwnershipControlsError>>;
18961 
18962     /// <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 action is related to <code>GetBucketPolicy</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> </ul></p>
get_bucket_policy( &self, input: GetBucketPolicyRequest, ) -> Result<GetBucketPolicyOutput, RusotoError<GetBucketPolicyError>>18963     async fn get_bucket_policy(
18964         &self,
18965         input: GetBucketPolicyRequest,
18966     ) -> Result<GetBucketPolicyOutput, RusotoError<GetBucketPolicyError>>;
18967 
18968     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html">GetPublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html">PutPublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html">DeletePublicAccessBlock</a> </p> </li> </ul></p>
get_bucket_policy_status( &self, input: GetBucketPolicyStatusRequest, ) -> Result<GetBucketPolicyStatusOutput, RusotoError<GetBucketPolicyStatusError>>18969     async fn get_bucket_policy_status(
18970         &self,
18971         input: GetBucketPolicyStatusRequest,
18972     ) -> Result<GetBucketPolicyStatusOutput, RusotoError<GetBucketPolicyStatusError>>;
18973 
18974     /// <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 S3 User Guide</i>.</p> <p>This action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList">List of replication-related error codes</a> </p> <p>The following operations are related to <code>GetBucketReplication</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html">PutBucketReplication</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html">DeleteBucketReplication</a> </p> </li> </ul></p>
get_bucket_replication( &self, input: GetBucketReplicationRequest, ) -> Result<GetBucketReplicationOutput, RusotoError<GetBucketReplicationError>>18975     async fn get_bucket_replication(
18976         &self,
18977         input: GetBucketReplicationRequest,
18978     ) -> Result<GetBucketReplicationOutput, RusotoError<GetBucketReplicationError>>;
18979 
18980     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html">ListObjects</a> </p> </li> </ul></p>
get_bucket_request_payment( &self, input: GetBucketRequestPaymentRequest, ) -> Result<GetBucketRequestPaymentOutput, RusotoError<GetBucketRequestPaymentError>>18981     async fn get_bucket_request_payment(
18982         &self,
18983         input: GetBucketRequestPaymentRequest,
18984     ) -> Result<GetBucketRequestPaymentOutput, RusotoError<GetBucketRequestPaymentError>>;
18985 
18986     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html">PutBucketTagging</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html">DeleteBucketTagging</a> </p> </li> </ul></p>
get_bucket_tagging( &self, input: GetBucketTaggingRequest, ) -> Result<GetBucketTaggingOutput, RusotoError<GetBucketTaggingError>>18987     async fn get_bucket_tagging(
18988         &self,
18989         input: GetBucketTaggingRequest,
18990     ) -> Result<GetBucketTaggingOutput, RusotoError<GetBucketTaggingError>>;
18991 
18992     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a> </p> </li> </ul></p>
get_bucket_versioning( &self, input: GetBucketVersioningRequest, ) -> Result<GetBucketVersioningOutput, RusotoError<GetBucketVersioningError>>18993     async fn get_bucket_versioning(
18994         &self,
18995         input: GetBucketVersioningRequest,
18996     ) -> Result<GetBucketVersioningOutput, RusotoError<GetBucketVersioningError>>;
18997 
18998     /// <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 action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketWebsite.html">DeleteBucketWebsite</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html">PutBucketWebsite</a> </p> </li> </ul></p>
get_bucket_website( &self, input: GetBucketWebsiteRequest, ) -> Result<GetBucketWebsiteOutput, RusotoError<GetBucketWebsiteError>>18999     async fn get_bucket_website(
19000         &self,
19001         input: GetBucketWebsiteRequest,
19002     ) -> Result<GetBucketWebsiteOutput, RusotoError<GetBucketWebsiteError>>;
19003 
19004     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html">GetObjectAcl</a>.</p> <p>If the object you are retrieving is stored in the S3 Glacier or S3 Glacier Deep Archive storage class, or S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep Archive tiers, before you can retrieve the object you must first restore a copy using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a>. Otherwise, this action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html">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 action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html">ListBuckets</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html">GetObjectAcl</a> </p> </li> </ul></p>
get_object( &self, input: GetObjectRequest, ) -> Result<GetObjectOutput, RusotoError<GetObjectError>>19005     async fn get_object(
19006         &self,
19007         input: GetObjectRequest,
19008     ) -> Result<GetObjectOutput, RusotoError<GetObjectError>>;
19009 
19010     /// <p><p>Returns the access control list (ACL) of an object. To use this operation, you must have <code>READ<em>ACP</code> access to the object.</p> <p>This action is not supported by Amazon S3 on Outposts.</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> &lt;a href=&quot;https://docs.aws.amazon.com/AmazonS3/latest/API/API</em>GetObject.html&quot;&gt;GetObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> </ul></p>
get_object_acl( &self, input: GetObjectAclRequest, ) -> Result<GetObjectAclOutput, RusotoError<GetObjectAclError>>19011     async fn get_object_acl(
19012         &self,
19013         input: GetObjectAclRequest,
19014     ) -> Result<GetObjectAclOutput, RusotoError<GetObjectAclError>>;
19015 
19016     /// <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> <p>This action is not supported by Amazon S3 on Outposts.</p>
get_object_legal_hold( &self, input: GetObjectLegalHoldRequest, ) -> Result<GetObjectLegalHoldOutput, RusotoError<GetObjectLegalHoldError>>19017     async fn get_object_legal_hold(
19018         &self,
19019         input: GetObjectLegalHoldRequest,
19020     ) -> Result<GetObjectLegalHoldOutput, RusotoError<GetObjectLegalHoldError>>;
19021 
19022     /// <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>>19023     async fn get_object_lock_configuration(
19024         &self,
19025         input: GetObjectLockConfigurationRequest,
19026     ) -> Result<GetObjectLockConfigurationOutput, RusotoError<GetObjectLockConfigurationError>>;
19027 
19028     /// <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> <p>This action is not supported by Amazon S3 on Outposts.</p>
get_object_retention( &self, input: GetObjectRetentionRequest, ) -> Result<GetObjectRetentionOutput, RusotoError<GetObjectRetentionError>>19029     async fn get_object_retention(
19030         &self,
19031         input: GetObjectRetentionRequest,
19032     ) -> Result<GetObjectRetentionOutput, RusotoError<GetObjectRetentionError>>;
19033 
19034     /// <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 action 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 action is related to <code>GetObjectTagging</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html">PutObjectTagging</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html">DeleteObjectTagging</a> </p> </li> </ul></p>
get_object_tagging( &self, input: GetObjectTaggingRequest, ) -> Result<GetObjectTaggingOutput, RusotoError<GetObjectTaggingError>>19035     async fn get_object_tagging(
19036         &self,
19037         input: GetObjectTaggingRequest,
19038     ) -> Result<GetObjectTaggingOutput, RusotoError<GetObjectTaggingError>>;
19039 
19040     /// <p><p>Returns 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">Using BitTorrent with Amazon S3</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 a customer-provided encryption key.</p> </note> <p>To use GET, you must have READ access to the object.</p> <p>This action is not supported by Amazon S3 on Outposts.</p> <p>The following action is related to <code>GetObjectTorrent</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> </ul></p>
get_object_torrent( &self, input: GetObjectTorrentRequest, ) -> Result<GetObjectTorrentOutput, RusotoError<GetObjectTorrentError>>19041     async fn get_object_torrent(
19042         &self,
19043         input: GetObjectTorrentRequest,
19044     ) -> Result<GetObjectTorrentOutput, RusotoError<GetObjectTorrentError>>;
19045 
19046     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html">PutPublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html">GetPublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html">DeletePublicAccessBlock</a> </p> </li> </ul></p>
get_public_access_block( &self, input: GetPublicAccessBlockRequest, ) -> Result<GetPublicAccessBlockOutput, RusotoError<GetPublicAccessBlockError>>19047     async fn get_public_access_block(
19048         &self,
19049         input: GetPublicAccessBlockRequest,
19050     ) -> Result<GetPublicAccessBlockOutput, RusotoError<GetPublicAccessBlockError>>;
19051 
19052     /// <p>This action is useful to determine if a bucket exists and you have permission to access it. The action returns a <code>200 OK</code> if the bucket exists and you have permission to access it.</p> <p>If the bucket does not exist or you do not have permission to access it, the <code>HEAD</code> request returns a generic <code>404 Not Found</code> or <code>403 Forbidden</code> code. A message body is not included, so you cannot determine the exception beyond these error codes.</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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p>
head_bucket( &self, input: HeadBucketRequest, ) -> Result<(), RusotoError<HeadBucketError>>19053     async fn head_bucket(
19054         &self,
19055         input: HeadBucketRequest,
19056     ) -> Result<(), RusotoError<HeadBucketError>>;
19057 
19058     /// <p><p>The HEAD action retrieves metadata from an object without returning the object itself. This action 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> action on an object. The response is identical to the <code>GET</code> response except that there is no response body. Because of this, if the <code>HEAD</code> request generates an error, it returns a generic <code>404 Not Found</code> or <code>403 Forbidden</code> code. It is not possible to retrieve the exact exception beyond these error codes.</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> <ul> <li> <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> </li> <li> <p> The last modified property in this case is the creation date of the object.</p> </li> </ul> </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 action is related to <code>HeadObject</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> </ul></p>
head_object( &self, input: HeadObjectRequest, ) -> Result<HeadObjectOutput, RusotoError<HeadObjectError>>19059     async fn head_object(
19060         &self,
19061         input: HeadObjectRequest,
19062     ) -> Result<HeadObjectOutput, RusotoError<HeadObjectError>>;
19063 
19064     /// <p><p>Lists the analytics configurations for the bucket. You can have up to 1,000 analytics configurations per bucket.</p> <p>This action 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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html">GetBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html">DeleteBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html">PutBucketAnalyticsConfiguration</a> </p> </li> </ul></p>
list_bucket_analytics_configurations( &self, input: ListBucketAnalyticsConfigurationsRequest, ) -> Result< ListBucketAnalyticsConfigurationsOutput, RusotoError<ListBucketAnalyticsConfigurationsError>, >19065     async fn list_bucket_analytics_configurations(
19066         &self,
19067         input: ListBucketAnalyticsConfigurationsRequest,
19068     ) -> Result<
19069         ListBucketAnalyticsConfigurationsOutput,
19070         RusotoError<ListBucketAnalyticsConfigurationsError>,
19071     >;
19072 
19073     /// <p><p>Lists the S3 Intelligent-Tiering configuration from the specified bucket.</p> <p>The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without additional operational overhead. S3 Intelligent-Tiering delivers automatic cost savings by moving data between access tiers, when access patterns change.</p> <p>The S3 Intelligent-Tiering storage class is suitable for objects larger than 128 KB that you plan to store for at least 30 days. If the size of an object is less than 128 KB, it is not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the frequent access tier rates in the S3 Intelligent-Tiering storage class. </p> <p>If you delete an object before the end of the 30-day minimum storage duration period, you are charged for 30 days. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access">Storage class for automatically optimizing frequently and infrequently accessed objects</a>.</p> <p>Operations related to <code>ListBucketIntelligentTieringConfigurations</code> include: </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html">DeleteBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html">PutBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html">GetBucketIntelligentTieringConfiguration</a> </p> </li> </ul></p>
list_bucket_intelligent_tiering_configurations( &self, input: ListBucketIntelligentTieringConfigurationsRequest, ) -> Result< ListBucketIntelligentTieringConfigurationsOutput, RusotoError<ListBucketIntelligentTieringConfigurationsError>, >19074     async fn list_bucket_intelligent_tiering_configurations(
19075         &self,
19076         input: ListBucketIntelligentTieringConfigurationsRequest,
19077     ) -> Result<
19078         ListBucketIntelligentTieringConfigurationsOutput,
19079         RusotoError<ListBucketIntelligentTieringConfigurationsError>,
19080     >;
19081 
19082     /// <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 action 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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html">GetBucketInventoryConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html">DeleteBucketInventoryConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html">PutBucketInventoryConfiguration</a> </p> </li> </ul></p>
list_bucket_inventory_configurations( &self, input: ListBucketInventoryConfigurationsRequest, ) -> Result< ListBucketInventoryConfigurationsOutput, RusotoError<ListBucketInventoryConfigurationsError>, >19083     async fn list_bucket_inventory_configurations(
19084         &self,
19085         input: ListBucketInventoryConfigurationsRequest,
19086     ) -> Result<
19087         ListBucketInventoryConfigurationsOutput,
19088         RusotoError<ListBucketInventoryConfigurationsError>,
19089     >;
19090 
19091     /// <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 action 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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html">PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html">GetBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html">DeleteBucketMetricsConfiguration</a> </p> </li> </ul></p>
list_bucket_metrics_configurations( &self, input: ListBucketMetricsConfigurationsRequest, ) -> Result< ListBucketMetricsConfigurationsOutput, RusotoError<ListBucketMetricsConfigurationsError>, >19092     async fn list_bucket_metrics_configurations(
19093         &self,
19094         input: ListBucketMetricsConfigurationsRequest,
19095     ) -> Result<
19096         ListBucketMetricsConfigurationsOutput,
19097         RusotoError<ListBucketMetricsConfigurationsError>,
19098     >;
19099 
19100     /// <p>Returns a list of all buckets owned by the authenticated sender of the request.</p>
list_buckets(&self) -> Result<ListBucketsOutput, RusotoError<ListBucketsError>>19101     async fn list_buckets(&self) -> Result<ListBucketsOutput, RusotoError<ListBucketsError>>;
19102 
19103     /// <p><p>This action 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 action 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 and Permissions</a>.</p> <p>The following operations are related to <code>ListMultipartUploads</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> </p> </li> </ul></p>
list_multipart_uploads( &self, input: ListMultipartUploadsRequest, ) -> Result<ListMultipartUploadsOutput, RusotoError<ListMultipartUploadsError>>19104     async fn list_multipart_uploads(
19105         &self,
19106         input: ListMultipartUploadsRequest,
19107     ) -> Result<ListMultipartUploadsOutput, RusotoError<ListMultipartUploadsError>>;
19108 
19109     /// <p><p>Returns metadata about all versions of the 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> <important> <p> To use this operation, you must have permissions to perform the <code>s3:ListBucketVersions</code> action. Be aware of the name difference. </p> </important> <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>This action is not supported by Amazon S3 on Outposts.</p> <p>The following operations are related to <code>ListObjectVersions</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html">ListObjectsV2</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a> </p> </li> </ul></p>
list_object_versions( &self, input: ListObjectVersionsRequest, ) -> Result<ListObjectVersionsOutput, RusotoError<ListObjectVersionsError>>19110     async fn list_object_versions(
19111         &self,
19112         input: ListObjectVersionsRequest,
19113     ) -> Result<ListObjectVersionsOutput, RusotoError<ListObjectVersionsError>>;
19114 
19115     /// <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 action has been revised. We recommend that you use the newer version, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html">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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html">ListObjectsV2</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html">ListBuckets</a> </p> </li> </ul></p>
list_objects( &self, input: ListObjectsRequest, ) -> Result<ListObjectsOutput, RusotoError<ListObjectsError>>19116     async fn list_objects(
19117         &self,
19118         input: ListObjectsRequest,
19119     ) -> Result<ListObjectsOutput, RusotoError<ListObjectsError>>;
19120 
19121     /// <p><p>Returns some or all (up to 1,000) of the objects in a bucket with each request. 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. Objects are returned sorted in an ascending order of the respective key names in the list. For more information about listing objects, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html">Listing object keys programmatically</a> </p> <p>To use this operation, you must have READ access to the bucket.</p> <p>To use this action 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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <important> <p>This section describes the latest revision of this action. 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html">ListObjects</a>.</p> </important> <p>To get a list of your buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html">ListBuckets</a>.</p> <p>The following operations are related to <code>ListObjectsV2</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> </ul></p>
list_objects_v2( &self, input: ListObjectsV2Request, ) -> Result<ListObjectsV2Output, RusotoError<ListObjectsV2Error>>19122     async fn list_objects_v2(
19123         &self,
19124         input: ListObjectsV2Request,
19125     ) -> Result<ListObjectsV2Output, RusotoError<ListObjectsV2Error>>;
19126 
19127     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">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 and Permissions</a>.</p> <p>The following operations are related to <code>ListParts</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a> </p> </li> </ul></p>
list_parts( &self, input: ListPartsRequest, ) -> Result<ListPartsOutput, RusotoError<ListPartsError>>19128     async fn list_parts(
19129         &self,
19130         input: ListPartsRequest,
19131     ) -> Result<ListPartsOutput, RusotoError<ListPartsError>>;
19132 
19133     /// <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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html">GetBucketAccelerateConfiguration</a> action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html">GetBucketAccelerateConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> </ul></p>
put_bucket_accelerate_configuration( &self, input: PutBucketAccelerateConfigurationRequest, ) -> Result<(), RusotoError<PutBucketAccelerateConfigurationError>>19134     async fn put_bucket_accelerate_configuration(
19135         &self,
19136         input: PutBucketAccelerateConfigurationRequest,
19137     ) -> Result<(), RusotoError<PutBucketAccelerateConfigurationError>>;
19138 
19139     /// <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<em>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>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> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> <note> <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>Europe (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 &lt;a href=&quot;https://docs.aws.amazon.com/general/latest/gr/rande.html#s3</em>region&quot;&gt;Regions and Endpoints</a> in the AWS General Reference.</p> </note> </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;, id=&quot;111122223333&quot;, id=&quot;555566667777&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 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> <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> <note> <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>Europe (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> </note> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html">DeleteBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html">GetObjectAcl</a> </p> </li> </ul></p>
put_bucket_acl( &self, input: PutBucketAclRequest, ) -> Result<(), RusotoError<PutBucketAclError>>19140     async fn put_bucket_acl(
19141         &self,
19142         input: PutBucketAclRequest,
19143     ) -> Result<(), RusotoError<PutBucketAclError>>;
19144 
19145     /// <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/userguide/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/userguide/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> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html">GetBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html">DeleteBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html">ListBucketAnalyticsConfigurations</a> </p> </li> </ul></p>
put_bucket_analytics_configuration( &self, input: PutBucketAnalyticsConfigurationRequest, ) -> Result<(), RusotoError<PutBucketAnalyticsConfigurationError>>19146     async fn put_bucket_analytics_configuration(
19147         &self,
19148         input: PutBucketAnalyticsConfigurationRequest,
19149     ) -> Result<(), RusotoError<PutBucketAnalyticsConfigurationError>>;
19150 
19151     /// <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 S3 User Guide</i>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketCors.html">GetBucketCors</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html">DeleteBucketCors</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html">RESTOPTIONSobject</a> </p> </li> </ul></p>
put_bucket_cors( &self, input: PutBucketCorsRequest, ) -> Result<(), RusotoError<PutBucketCorsError>>19152     async fn put_bucket_cors(
19153         &self,
19154         input: PutBucketCorsRequest,
19155     ) -> Result<(), RusotoError<PutBucketCorsError>>;
19156 
19157     /// <p><p>This action uses the <code>encryption</code> subresource to configure default encryption and Amazon S3 Bucket Key for an existing bucket.</p> <p>Default encryption for a bucket can use server-side encryption with Amazon S3-managed keys (SSE-S3) or AWS KMS customer master keys (SSE-KMS). If you specify default encryption using SSE-KMS, you can also configure Amazon S3 Bucket Key. For information about default encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html">Amazon S3 default bucket encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about S3 Bucket Keys, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p> <important> <p>This action requires AWS Signature Version 4. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the Amazon S3 User Guide. </p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html">GetBucketEncryption</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html">DeleteBucketEncryption</a> </p> </li> </ul></p>
put_bucket_encryption( &self, input: PutBucketEncryptionRequest, ) -> Result<(), RusotoError<PutBucketEncryptionError>>19158     async fn put_bucket_encryption(
19159         &self,
19160         input: PutBucketEncryptionRequest,
19161     ) -> Result<(), RusotoError<PutBucketEncryptionError>>;
19162 
19163     /// <p><p>Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can have up to 1,000 S3 Intelligent-Tiering configurations per bucket.</p> <p>The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without additional operational overhead. S3 Intelligent-Tiering delivers automatic cost savings by moving data between access tiers, when access patterns change.</p> <p>The S3 Intelligent-Tiering storage class is suitable for objects larger than 128 KB that you plan to store for at least 30 days. If the size of an object is less than 128 KB, it is not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the frequent access tier rates in the S3 Intelligent-Tiering storage class. </p> <p>If you delete an object before the end of the 30-day minimum storage duration period, you are charged for 30 days. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access">Storage class for automatically optimizing frequently and infrequently accessed objects</a>.</p> <p>Operations related to <code>PutBucketIntelligentTieringConfiguration</code> include: </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html">DeleteBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html">GetBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html">ListBucketIntelligentTieringConfigurations</a> </p> </li> </ul> <note> <p>You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access or Deep Archive Access tier.</p> </note> <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:PutIntelligentTieringConfiguration</code> bucket permission to set the configuration on the bucket. </p> </li> </ul> </li> </ul></p>
put_bucket_intelligent_tiering_configuration( &self, input: PutBucketIntelligentTieringConfigurationRequest, ) -> Result<(), RusotoError<PutBucketIntelligentTieringConfigurationError>>19164     async fn put_bucket_intelligent_tiering_configuration(
19165         &self,
19166         input: PutBucketIntelligentTieringConfigurationRequest,
19167     ) -> Result<(), RusotoError<PutBucketIntelligentTieringConfigurationError>>;
19168 
19169     /// <p><p>This implementation of the <code>PUT</code> action 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 S3 User 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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the Amazon S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html">GetBucketInventoryConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html">DeleteBucketInventoryConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html">ListBucketInventoryConfigurations</a> </p> </li> </ul></p>
put_bucket_inventory_configuration( &self, input: PutBucketInventoryConfigurationRequest, ) -> Result<(), RusotoError<PutBucketInventoryConfigurationError>>19170     async fn put_bucket_inventory_configuration(
19171         &self,
19172         input: PutBucketInventoryConfigurationRequest,
19173     ) -> Result<(), RusotoError<PutBucketInventoryConfigurationError>>;
19174 
19175     /// <p><important> <p>For an updated version of this API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">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 S3 User 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/userguide/s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> in the <i>Amazon S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html">GetBucketLifecycle</a>(Deprecated)</p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html">GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a> </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 S3 User 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/userguide/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>>19176     async fn put_bucket_lifecycle(
19177         &self,
19178         input: PutBucketLifecycleRequest,
19179     ) -> Result<(), RusotoError<PutBucketLifecycleError>>;
19180 
19181     /// <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/userguide/object-lifecycle-mgmt.html">Managing your storage lifecycle</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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html">GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html">DeleteBucketLifecycle</a> </p> </li> </ul></p>
put_bucket_lifecycle_configuration( &self, input: PutBucketLifecycleConfigurationRequest, ) -> Result<(), RusotoError<PutBucketLifecycleConfigurationError>>19182     async fn put_bucket_lifecycle_configuration(
19183         &self,
19184         input: PutBucketLifecycleConfigurationRequest,
19185     ) -> Result<(), RusotoError<PutBucketLifecycleConfigurationError>>;
19186 
19187     /// <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<em>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 &lt;a href=&quot;https://docs.aws.amazon.com/AmazonS3/latest/API/API</em>CreateBucket.html&quot;&gt;CreateBucket</a>. For more information about returning the logging status of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html">GetBucketLogging</a>.</p> <p>The following operations are related to <code>PutBucketLogging</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html">DeleteBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html">GetBucketLogging</a> </p> </li> </ul></p>
put_bucket_logging( &self, input: PutBucketLoggingRequest, ) -> Result<(), RusotoError<PutBucketLoggingError>>19188     async fn put_bucket_logging(
19189         &self,
19190         input: PutBucketLoggingRequest,
19191     ) -> Result<(), RusotoError<PutBucketLoggingError>>;
19192 
19193     /// <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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html">DeleteBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html">PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html">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>>19194     async fn put_bucket_metrics_configuration(
19195         &self,
19196         input: PutBucketMetricsConfigurationRequest,
19197     ) -> Result<(), RusotoError<PutBucketMetricsConfigurationError>>;
19198 
19199     /// <p> No longer used, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotificationConfiguration.html">PutBucketNotificationConfiguration</a> operation.</p>
put_bucket_notification( &self, input: PutBucketNotificationRequest, ) -> Result<(), RusotoError<PutBucketNotificationError>>19200     async fn put_bucket_notification(
19201         &self,
19202         input: PutBucketNotificationRequest,
19203     ) -> Result<(), RusotoError<PutBucketNotificationError>>;
19204 
19205     /// <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 action 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 action 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 action is related to <code>PutBucketNotificationConfiguration</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html">GetBucketNotificationConfiguration</a> </p> </li> </ul></p>
put_bucket_notification_configuration( &self, input: PutBucketNotificationConfigurationRequest, ) -> Result<(), RusotoError<PutBucketNotificationConfigurationError>>19206     async fn put_bucket_notification_configuration(
19207         &self,
19208         input: PutBucketNotificationConfigurationRequest,
19209     ) -> Result<(), RusotoError<PutBucketNotificationConfigurationError>>;
19210 
19211     /// <p><p>Creates or modifies <code>OwnershipControls</code> for an Amazon S3 bucket. To use this operation, you must have the <code>s3:PutBucketOwnershipControls</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 information about Amazon S3 Object Ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html">Using Object Ownership</a>. </p> <p>The following operations are related to <code>PutBucketOwnershipControls</code>:</p> <ul> <li> <p> <a>GetBucketOwnershipControls</a> </p> </li> <li> <p> <a>DeleteBucketOwnershipControls</a> </p> </li> </ul></p>
put_bucket_ownership_controls( &self, input: PutBucketOwnershipControlsRequest, ) -> Result<(), RusotoError<PutBucketOwnershipControlsError>>19212     async fn put_bucket_ownership_controls(
19213         &self,
19214         input: PutBucketOwnershipControlsRequest,
19215     ) -> Result<(), RusotoError<PutBucketOwnershipControlsError>>;
19216 
19217     /// <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>PutBucketPolicy</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 operations are related to <code>PutBucketPolicy</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html">DeleteBucket</a> </p> </li> </ul></p>
put_bucket_policy( &self, input: PutBucketPolicyRequest, ) -> Result<(), RusotoError<PutBucketPolicyError>>19218     async fn put_bucket_policy(
19219         &self,
19220         input: PutBucketPolicyRequest,
19221     ) -> Result<(), RusotoError<PutBucketPolicyError>>;
19222 
19223     /// <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 User Guide</i>. </p> <note> <p>To perform this operation, the user or role performing the action 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 or buckets 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.</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> <note> <p>If you are using an earlier version of the replication configuration, Amazon S3 handles 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>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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList">List of replication-related error codes</a> </p> <p>The following operations are related to <code>PutBucketReplication</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html">GetBucketReplication</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html">DeleteBucketReplication</a> </p> </li> </ul></p>
put_bucket_replication( &self, input: PutBucketReplicationRequest, ) -> Result<(), RusotoError<PutBucketReplicationError>>19224     async fn put_bucket_replication(
19225         &self,
19226         input: PutBucketReplicationRequest,
19227     ) -> Result<(), RusotoError<PutBucketReplicationError>>;
19228 
19229     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketRequestPayment.html">GetBucketRequestPayment</a> </p> </li> </ul></p>
put_bucket_request_payment( &self, input: PutBucketRequestPaymentRequest, ) -> Result<(), RusotoError<PutBucketRequestPaymentError>>19230     async fn put_bucket_request_payment(
19231         &self,
19232         input: PutBucketRequestPaymentRequest,
19233     ) -> Result<(), RusotoError<PutBucketRequestPaymentError>>;
19234 
19235     /// <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> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CostAllocTagging.html">Using Cost Allocation in Amazon S3 Bucket Tags</a>.</p> <note> <p> When this operation sets the tags for a bucket, it will overwrite any current tags the bucket already has. You cannot use this operation to add tags to an existing list of tags.</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/userguide/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/userguide/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 action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html">GetBucketTagging</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html">DeleteBucketTagging</a> </p> </li> </ul></p>
put_bucket_tagging( &self, input: PutBucketTaggingRequest, ) -> Result<(), RusotoError<PutBucketTaggingError>>19236     async fn put_bucket_tagging(
19237         &self,
19238         input: PutBucketTaggingRequest,
19239     ) -> Result<(), RusotoError<PutBucketTaggingError>>;
19240 
19241     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html">DeleteBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a> </p> </li> </ul></p>
put_bucket_versioning( &self, input: PutBucketVersioningRequest, ) -> Result<(), RusotoError<PutBucketVersioningError>>19242     async fn put_bucket_versioning(
19243         &self,
19244         input: PutBucketVersioningRequest,
19245     ) -> Result<(), RusotoError<PutBucketVersioningError>>;
19246 
19247     /// <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 action 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's website endpoint, you add a website configuration with the following elements. Because all requests are sent to another website, you don'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>Amazon S3 has a limitation of 50 routing rules per website configuration. If you require more than 50 routing rules, you can use object redirect. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">Configuring an Object Redirect</a> in the <i>Amazon S3 User Guide</i>.</p>
put_bucket_website( &self, input: PutBucketWebsiteRequest, ) -> Result<(), RusotoError<PutBucketWebsiteError>>19248     async fn put_bucket_website(
19249         &self,
19250         input: PutBucketWebsiteRequest,
19251     ) -> Result<(), RusotoError<PutBucketWebsiteError>>;
19252 
19253     /// <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> The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>. </p> </note> <p> <b>Server-side Encryption</b> </p> <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 (SSE-S3 or SSE-KMS). For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a>.</p> <p>If you request server-side encryption using AWS Key Management Service (SSE-KMS), you can enable an S3 Bucket Key at the object-level. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p> <p> <b>Access Control List (ACL)-Specific Request Headers</b> </p> <p>You can use headers to grant ACL- based permissions. 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 ACL on the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a>. </p> <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. Depending on performance needs, you can specify a different Storage Class. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</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. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects.</p> <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to Versioning Enabled Buckets</a>. For information about returning the versioning state of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>. </p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a> </p> </li> </ul></p>
put_object( &self, input: PutObjectRequest, ) -> Result<PutObjectOutput, RusotoError<PutObjectError>>19254     async fn put_object(
19255         &self,
19256         input: PutObjectRequest,
19257     ) -> Result<PutObjectOutput, RusotoError<PutObjectError>>;
19258 
19259     /// <p><p>Uses the <code>acl</code> subresource to set the access control list (ACL) permissions for a new or existing object in an S3 bucket. You must have <code>WRITE<em>ACP</code> permission to set the ACL of an object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#permissions">What permissions can I grant?</a> in the <i>Amazon S3 User Guide</i>.</p> <p>This action is not supported by Amazon S3 on Outposts.</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. 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 <i>Amazon S3 User Guide</i>.</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>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> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> <note> <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>Europe (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 &lt;a href=&quot;https://docs.aws.amazon.com/general/latest/gr/rande.html#s3</em>region&quot;&gt;Regions and Endpoints</a> in the AWS General Reference.</p> </note> </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 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> <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> <note> <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>Europe (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> </note> </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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> </ul></p>
put_object_acl( &self, input: PutObjectAclRequest, ) -> Result<PutObjectAclOutput, RusotoError<PutObjectAclError>>19260     async fn put_object_acl(
19261         &self,
19262         input: PutObjectAclRequest,
19263     ) -> Result<PutObjectAclOutput, RusotoError<PutObjectAclError>>;
19264 
19265     /// <p>Applies a Legal Hold configuration to the specified object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a>.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
put_object_legal_hold( &self, input: PutObjectLegalHoldRequest, ) -> Result<PutObjectLegalHoldOutput, RusotoError<PutObjectLegalHoldError>>19266     async fn put_object_legal_hold(
19267         &self,
19268         input: PutObjectLegalHoldRequest,
19269     ) -> Result<PutObjectLegalHoldOutput, RusotoError<PutObjectLegalHoldError>>;
19270 
19271     /// <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. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a>. </p> <note> <ul> <li> <p>The <code>DefaultRetention</code> settings require both a mode and a period.</p> </li> <li> <p>The <code>DefaultRetention</code> period can be either <code>Days</code> or <code>Years</code> but you must select one. You cannot specify <code>Days</code> and <code>Years</code> at the same time.</p> </li> <li> <p>You can only enable Object Lock for new buckets. If you want to turn on Object Lock for an existing bucket, contact AWS Support.</p> </li> </ul> </note></p>
put_object_lock_configuration( &self, input: PutObjectLockConfigurationRequest, ) -> Result<PutObjectLockConfigurationOutput, RusotoError<PutObjectLockConfigurationError>>19272     async fn put_object_lock_configuration(
19273         &self,
19274         input: PutObjectLockConfigurationRequest,
19275     ) -> Result<PutObjectLockConfigurationOutput, RusotoError<PutObjectLockConfigurationError>>;
19276 
19277     /// <p>Places an Object Retention configuration on an object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a>. </p> <p>This action is not supported by Amazon S3 on Outposts.</p>
put_object_retention( &self, input: PutObjectRetentionRequest, ) -> Result<PutObjectRetentionOutput, RusotoError<PutObjectRetentionError>>19278     async fn put_object_retention(
19279         &self,
19280         input: PutObjectRetentionRequest,
19281     ) -> Result<PutObjectRetentionOutput, RusotoError<PutObjectRetentionError>>;
19282 
19283     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html">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> <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> <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 action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html">GetObjectTagging</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html">DeleteObjectTagging</a> </p> </li> </ul></p>
put_object_tagging( &self, input: PutObjectTaggingRequest, ) -> Result<PutObjectTaggingOutput, RusotoError<PutObjectTaggingError>>19284     async fn put_object_tagging(
19285         &self,
19286         input: PutObjectTaggingRequest,
19287     ) -> Result<PutObjectTaggingOutput, RusotoError<PutObjectTaggingError>>;
19288 
19289     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html">GetPublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html">DeletePublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html">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>>19290     async fn put_public_access_block(
19291         &self,
19292         input: PutPublicAccessBlockRequest,
19293     ) -> Result<(), RusotoError<PutPublicAccessBlockError>>;
19294 
19295     /// <p><p>Restores an archived copy of an object back into Amazon S3</p> <p>This action is not supported by Amazon S3 on Outposts.</p> <p>This action 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> 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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the <i>Amazon S3 User 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 S3 User 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 S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">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 S3 User 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 S3 User 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 S3 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 S3 Glacier Select</a> in the <i>Amazon S3 User 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 objects</b> </p> <p>Objects that you archive to the S3 Glacier or S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep Archive tiers are not accessible in real time. For objects in Archive Access or Deep Archive Access tiers you must first initiate a restore request, and then wait until the object is moved into the Frequent Access tier. For objects in S3 Glacier or S3 Glacier Deep Archive storage classes you must first initiate a restore request, and then wait until a temporary copy of the object is available. To access an archived object, you must restore the object for the duration (number of days) that you specify.</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>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 S3 Glacier storage class or S3 Intelligent-Tiering Archive tier 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 is 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 objects stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier.</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 retrieval requests that do not specify the retrieval option. Standard retrievals typically finish within 3–5 hours for objects stored in the S3 Glacier storage class or S3 Intelligent-Tiering Archive tier. They typically finish within 12 hours for objects stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier. Standard retrievals are free for objects stored in S3 Intelligent-Tiering.</p> </li> <li> <p> <b> <code>Bulk</code> </b> - Bulk retrievals are the lowest-cost retrieval option in S3 Glacier, enabling you to retrieve large amounts, even petabytes, of data inexpensively. Bulk retrievals typically finish within 5–12 hours for objects stored in the S3 Glacier storage class or S3 Intelligent-Tiering Archive tier. They typically finish within 48 hours for objects stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier. Bulk retrievals are free for objects stored in S3 Intelligent-Tiering.</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 S3 User 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. 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 S3 User 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 S3 User 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 &lt;a href=&quot;https://docs.aws.amazon.com/AmazonS3/latest/API/API</em>PutBucketLifecycleConfiguration.html&quot;&gt;PutBucketLifecycleConfiguration</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html">Object Lifecycle Management</a> in <i>Amazon S3 User Guide</i>.</p> <p> <b>Responses</b> </p> <p>A successful action returns either the <code>200 OK</code> or <code>202 Accepted</code> status code. </p> <ul> <li> <p>If the object is not previously restored, then Amazon S3 returns <code>202 Accepted</code> in the response. </p> </li> <li> <p>If the object 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> <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> <ul> <li> <p> <i>Code: GlacierExpeditedRetrievalNotAvailable</i> </p> </li> <li> <p> <i>Cause: 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 S3 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html">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 S3 Glacier Select </a> in the <i>Amazon S3 User Guide</i> </p> </li> </ul></p>
restore_object( &self, input: RestoreObjectRequest, ) -> Result<RestoreObjectOutput, RusotoError<RestoreObjectError>>19296     async fn restore_object(
19297         &self,
19298         input: RestoreObjectRequest,
19299     ) -> Result<RestoreObjectOutput, RusotoError<RestoreObjectError>>;
19300 
19301     /// <p><p>This action 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>This action is not supported by Amazon S3 on Outposts.</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 S3 User 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 S3 Glacier Select</a> in the <i>Amazon S3 User 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 S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">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 S3 User 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 S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html">Appendix: SelectObjectContent Response</a> .</p> <p/> <p> <b>GetObject Support</b> </p> <p>The <code>SelectObjectContent</code> action does not support the following <code>GetObject</code> functionality. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a>.</p> <ul> <li> <p> <code>Range</code>: Although you can specify a scan range for an Amazon S3 Select request (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html#AmazonS3-SelectObjectContent-request-ScanRange">SelectObjectContentRequest - ScanRange</a> in the request parameters), 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 S3 User Guide</i>.</p> </li> </ul> <p/> <p> <b>Special Errors</b> </p> <p>For a list of special errors for this operation, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#SelectObjectContentErrorCodeList">List of SELECT Object Content Error Codes</a> </p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html">GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a> </p> </li> </ul></p>
select_object_content( &self, input: SelectObjectContentRequest, ) -> Result<SelectObjectContentOutput, RusotoError<SelectObjectContentError>>19302     async fn select_object_content(
19303         &self,
19304         input: SelectObjectContentRequest,
19305     ) -> Result<SelectObjectContentOutput, RusotoError<SelectObjectContentError>>;
19306 
19307     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a> operation. </p> </note> <p>You must initiate a multipart upload (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">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>If the upload request is signed with Signature Version 4, then AWS S3 uses the <code>x-amz-content-sha256</code> header as a checksum instead of <code>Content-MD5</code>. For more information see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html">Authenticating Requests: Using the Authorization Header (AWS Signature Version 4)</a>. </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 S3 User 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 and Permissions</a> in the <i>Amazon S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">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 S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">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> <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a> </p> </li> </ul></p>
upload_part( &self, input: UploadPartRequest, ) -> Result<UploadPartOutput, RusotoError<UploadPartError>>19308     async fn upload_part(
19309         &self,
19310         input: UploadPartRequest,
19311     ) -> Result<UploadPartOutput, RusotoError<UploadPartError>>;
19312 
19313     /// <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 S3 User Guide</i>. </p> <note> <p>Instead of using an existing object as part data, you might use the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> action 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 S3 User 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 and Permissions</a> in the <i>Amazon S3 User Guide</i>.</p> </li> <li> <p>For information about copying objects using a single atomic action 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 S3 User Guide</i>.</p> </li> <li> <p>For information about using server-side encryption with customer-provided encryption keys with the UploadPartCopy operation, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">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> <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> <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a> </p> </li> </ul></p>
upload_part_copy( &self, input: UploadPartCopyRequest, ) -> Result<UploadPartCopyOutput, RusotoError<UploadPartCopyError>>19314     async fn upload_part_copy(
19315         &self,
19316         input: UploadPartCopyRequest,
19317     ) -> Result<UploadPartCopyOutput, RusotoError<UploadPartCopyError>>;
19318 
19319     /// <p>Passes transformed objects to a <code>GetObject</code> operation when using Object Lambda Access Points. For information about Object Lambda Access Points, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html">Transforming objects with Object Lambda Access Points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>This operation supports metadata that can be returned by <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a>, in addition to <code>RequestRoute</code>, <code>RequestToken</code>, <code>StatusCode</code>, <code>ErrorCode</code>, and <code>ErrorMessage</code>. The <code>GetObject</code> response metadata is supported so that the <code>WriteGetObjectResponse</code> caller, typically an AWS Lambda function, can provide the same metadata when it internally invokes <code>GetObject</code>. When <code>WriteGetObjectResponse</code> is called by a customer-owned Lambda function, the metadata returned to the end user <code>GetObject</code> call might differ from what Amazon S3 would normally return.</p> <p>AWS provides some prebuilt Lambda functions that you can use with S3 Object Lambda to detect and redact personally identifiable information (PII) and decompress S3 objects. These Lambda functions are available in the AWS Serverless Application Repository, and can be selected through the AWS Management Console when you create your Object Lambda Access Point.</p> <p>Example 1: PII Access Control - This Lambda function uses Amazon Comprehend, a natural language processing (NLP) service using machine learning to find insights and relationships in text. It automatically detects personally identifiable information (PII) such as names, addresses, dates, credit card numbers, and social security numbers from documents in your Amazon S3 bucket. </p> <p>Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a natural language processing (NLP) service using machine learning to find insights and relationships in text. It automatically redacts personally identifiable information (PII) such as names, addresses, dates, credit card numbers, and social security numbers from documents in your Amazon S3 bucket. </p> <p>Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is equipped to decompress objects stored in S3 in one of six compressed file formats including bzip2, gzip, snappy, zlib, zstandard and ZIP. </p> <p>For information on how to view and use these functions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/olap-examples.html">Using AWS built Lambda functions</a> in the <i>Amazon S3 User Guide</i>.</p>
write_get_object_response( &self, input: WriteGetObjectResponseRequest, ) -> Result<(), RusotoError<WriteGetObjectResponseError>>19320     async fn write_get_object_response(
19321         &self,
19322         input: WriteGetObjectResponseRequest,
19323     ) -> Result<(), RusotoError<WriteGetObjectResponseError>>;
19324 }
19325 /// A client for the Amazon S3 API.
19326 #[derive(Clone)]
19327 pub struct S3Client {
19328     client: Client,
19329     region: region::Region,
19330 }
19331 
19332 impl S3Client {
19333     /// Creates a client backed by the default tokio event loop.
19334     ///
19335     /// The client will use the default credentials provider and tls client.
new(region: region::Region) -> S3Client19336     pub fn new(region: region::Region) -> S3Client {
19337         S3Client {
19338             client: Client::shared(),
19339             region,
19340         }
19341     }
19342 
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,19343     pub fn new_with<P, D>(
19344         request_dispatcher: D,
19345         credentials_provider: P,
19346         region: region::Region,
19347     ) -> S3Client
19348     where
19349         P: ProvideAwsCredentials + Send + Sync + 'static,
19350         D: DispatchSignedRequest + Send + Sync + 'static,
19351     {
19352         S3Client {
19353             client: Client::new_with(credentials_provider, request_dispatcher),
19354             region,
19355         }
19356     }
19357 
new_with_client(client: Client, region: region::Region) -> S3Client19358     pub fn new_with_client(client: Client, region: region::Region) -> S3Client {
19359         S3Client { client, region }
19360     }
19361 }
19362 
19363 #[async_trait]
19364 impl S3 for S3Client {
19365     /// <p><p>This action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> action and ensure that the parts list is empty.</p> <p>For information about permissions required to use the multipart upload, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload and Permissions</a>.</p> <p>The following operations are related to <code>AbortMultipartUpload</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a> </p> </li> </ul></p>
19366     #[allow(unused_variables, warnings)]
abort_multipart_upload( &self, input: AbortMultipartUploadRequest, ) -> Result<AbortMultipartUploadOutput, RusotoError<AbortMultipartUploadError>>19367     async fn abort_multipart_upload(
19368         &self,
19369         input: AbortMultipartUploadRequest,
19370     ) -> Result<AbortMultipartUploadOutput, RusotoError<AbortMultipartUploadError>> {
19371         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
19372 
19373         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
19374 
19375         request.add_optional_header(
19376             "x-amz-expected-bucket-owner",
19377             input.expected_bucket_owner.as_ref(),
19378         );
19379         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
19380         let mut params = Params::new();
19381         params.put("uploadId", &input.upload_id);
19382         request.set_params(params);
19383 
19384         let mut response = self
19385             .sign_and_dispatch(request, AbortMultipartUploadError::from_response)
19386             .await?;
19387 
19388         let result = AbortMultipartUploadOutput::default();
19389         let mut result = result;
19390         result.request_charged = response.headers.remove("x-amz-request-charged"); // parse non-payload
19391         Ok(result)
19392     }
19393 
19394     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> operation. After successfully uploading all relevant parts of an upload, you call this action 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 action 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 and Permissions</a>.</p> <p> <code>CompleteMultipartUpload</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>CompleteMultipartUpload</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a> </p> </li> </ul></p>
19395     #[allow(unused_variables, warnings)]
complete_multipart_upload( &self, input: CompleteMultipartUploadRequest, ) -> Result<CompleteMultipartUploadOutput, RusotoError<CompleteMultipartUploadError>>19396     async fn complete_multipart_upload(
19397         &self,
19398         input: CompleteMultipartUploadRequest,
19399     ) -> Result<CompleteMultipartUploadOutput, RusotoError<CompleteMultipartUploadError>> {
19400         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
19401 
19402         let mut request = SignedRequest::new("POST", "s3", &self.region, &request_uri);
19403 
19404         request.add_optional_header(
19405             "x-amz-expected-bucket-owner",
19406             input.expected_bucket_owner.as_ref(),
19407         );
19408         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
19409         let mut params = Params::new();
19410         params.put("uploadId", &input.upload_id);
19411         request.set_params(params);
19412         if input.multipart_upload.is_some() {
19413             let mut writer = EventWriter::new(Vec::new());
19414             CompletedMultipartUploadSerializer::serialize(
19415                 &mut writer,
19416                 "CompleteMultipartUpload",
19417                 input.multipart_upload.as_ref().unwrap(),
19418             );
19419             request.set_payload(Some(writer.into_inner()));
19420         } else {
19421             request.set_payload(Some(Vec::new()));
19422         }
19423 
19424         let mut response = self
19425             .sign_and_dispatch(request, CompleteMultipartUploadError::from_response)
19426             .await?;
19427 
19428         let mut response = response;
19429         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
19430             CompleteMultipartUploadOutputDeserializer::deserialize(actual_tag_name, stack)
19431         })
19432         .await?;
19433         let mut result = result;
19434         result.bucket_key_enabled = response
19435             .headers
19436             .remove("x-amz-server-side-encryption-bucket-key-enabled")
19437             .map(|value| value.parse::<bool>().unwrap());
19438         result.expiration = response.headers.remove("x-amz-expiration");
19439         result.request_charged = response.headers.remove("x-amz-request-charged");
19440         result.ssekms_key_id = response
19441             .headers
19442             .remove("x-amz-server-side-encryption-aws-kms-key-id");
19443         result.server_side_encryption = response.headers.remove("x-amz-server-side-encryption");
19444         result.version_id = response.headers.remove("x-amz-version-id"); // parse non-payload
19445         Ok(result)
19446     }
19447 
19448     /// <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 action using this API. However, to copy 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>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>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 action 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>The copy request charge is based on the storage class and Region that you specify for the destination object. For pricing information, see <a href="http://aws.amazon.com/s3/pricing/">Amazon S3 pricing</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, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html">Transfer Acceleration</a>.</p> </important> <p> <b>Metadata</b> </p> <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> <p>To specify whether you want the object metadata copied from the source object or replaced with metadata provided in the request, you can optionally add the <code>x-amz-metadata-directive</code> header. When you grant permissions, you can use the <code>s3:x-amz-metadata-directive</code> condition key to enforce certain metadata behavior when objects are uploaded. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html">Specifying Conditions in a Policy</a> in the <i>Amazon S3 User Guide</i>. For a complete list of Amazon S3-specific condition keys, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html">Actions, Resources, and Condition Keys for Amazon S3</a>.</p> <p> <b> <code>x-amz-copy-source-if</code> Headers</b> </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 following request parameters:</p> <ul> <li> <p> <code>x-amz-copy-source-if-match</code> </p> </li> <li> <p> <code>x-amz-copy-source-if-none-match</code> </p> </li> <li> <p> <code>x-amz-copy-source-if-unmodified-since</code> </p> </li> <li> <p> <code>x-amz-copy-source-if-modified-since</code> </p> </li> </ul> <p> 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 <code>200 OK</code> 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> <p>If both 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> <note> <p>All headers with the <code>x-amz-</code> prefix, including <code>x-amz-copy-source</code>, must be signed.</p> </note> <p> <b>Server-side encryption</b> </p> <p>When you perform a CopyObject operation, you can optionally use the appropriate encryption-related headers to encrypt the object using server-side encryption with AWS managed encryption keys (SSE-S3 or SSE-KMS) or a customer-provided encryption key. 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. 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>If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p> <p> <b>Access Control List (ACL)-Specific Request Headers</b> </p> <p>When copying an object, you can optionally use headers to grant ACL-based permissions. 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 ACL on the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a>. </p> <p> <b>Storage Class Options</b> </p> <p>You can use the <code>CopyObject</code> action 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> in the <i>Amazon S3 User Guide</i>.</p> <p> <b>Versioning</b> </p> <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 <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a>.</p> <p>The following operations are related to <code>CopyObject</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">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>
19449     #[allow(unused_variables, warnings)]
copy_object( &self, input: CopyObjectRequest, ) -> Result<CopyObjectOutput, RusotoError<CopyObjectError>>19450     async fn copy_object(
19451         &self,
19452         input: CopyObjectRequest,
19453     ) -> Result<CopyObjectOutput, RusotoError<CopyObjectError>> {
19454         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
19455 
19456         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
19457 
19458         request.add_optional_header("x-amz-acl", input.acl.as_ref());
19459         request.add_optional_header(
19460             "x-amz-server-side-encryption-bucket-key-enabled",
19461             input.bucket_key_enabled.as_ref(),
19462         );
19463         request.add_optional_header("Cache-Control", input.cache_control.as_ref());
19464         request.add_optional_header("Content-Disposition", input.content_disposition.as_ref());
19465         request.add_optional_header("Content-Encoding", input.content_encoding.as_ref());
19466         request.add_optional_header("Content-Language", input.content_language.as_ref());
19467         request.add_optional_header("Content-Type", input.content_type.as_ref());
19468         request.add_header("x-amz-copy-source", &input.copy_source.to_string());
19469         request.add_optional_header(
19470             "x-amz-copy-source-if-match",
19471             input.copy_source_if_match.as_ref(),
19472         );
19473         request.add_optional_header(
19474             "x-amz-copy-source-if-modified-since",
19475             input.copy_source_if_modified_since.as_ref(),
19476         );
19477         request.add_optional_header(
19478             "x-amz-copy-source-if-none-match",
19479             input.copy_source_if_none_match.as_ref(),
19480         );
19481         request.add_optional_header(
19482             "x-amz-copy-source-if-unmodified-since",
19483             input.copy_source_if_unmodified_since.as_ref(),
19484         );
19485         request.add_optional_header(
19486             "x-amz-copy-source-server-side-encryption-customer-algorithm",
19487             input.copy_source_sse_customer_algorithm.as_ref(),
19488         );
19489         request.add_optional_header(
19490             "x-amz-copy-source-server-side-encryption-customer-key",
19491             input.copy_source_sse_customer_key.as_ref(),
19492         );
19493         request.add_optional_header(
19494             "x-amz-copy-source-server-side-encryption-customer-key-MD5",
19495             input.copy_source_sse_customer_key_md5.as_ref(),
19496         );
19497         request.add_optional_header(
19498             "x-amz-expected-bucket-owner",
19499             input.expected_bucket_owner.as_ref(),
19500         );
19501         request.add_optional_header(
19502             "x-amz-source-expected-bucket-owner",
19503             input.expected_source_bucket_owner.as_ref(),
19504         );
19505         request.add_optional_header("Expires", input.expires.as_ref());
19506         request.add_optional_header(
19507             "x-amz-grant-full-control",
19508             input.grant_full_control.as_ref(),
19509         );
19510         request.add_optional_header("x-amz-grant-read", input.grant_read.as_ref());
19511         request.add_optional_header("x-amz-grant-read-acp", input.grant_read_acp.as_ref());
19512         request.add_optional_header("x-amz-grant-write-acp", input.grant_write_acp.as_ref());
19513 
19514         if let Some(ref metadata) = input.metadata {
19515             for (header_name, header_value) in metadata.iter() {
19516                 let header = format!("x-amz-meta-{}", header_name);
19517                 request.add_header(header, header_value);
19518             }
19519         }
19520         request.add_optional_header(
19521             "x-amz-metadata-directive",
19522             input.metadata_directive.as_ref(),
19523         );
19524         request.add_optional_header(
19525             "x-amz-object-lock-legal-hold",
19526             input.object_lock_legal_hold_status.as_ref(),
19527         );
19528         request.add_optional_header("x-amz-object-lock-mode", input.object_lock_mode.as_ref());
19529         request.add_optional_header(
19530             "x-amz-object-lock-retain-until-date",
19531             input.object_lock_retain_until_date.as_ref(),
19532         );
19533         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
19534         request.add_optional_header(
19535             "x-amz-server-side-encryption-customer-algorithm",
19536             input.sse_customer_algorithm.as_ref(),
19537         );
19538         request.add_optional_header(
19539             "x-amz-server-side-encryption-customer-key",
19540             input.sse_customer_key.as_ref(),
19541         );
19542         request.add_optional_header(
19543             "x-amz-server-side-encryption-customer-key-MD5",
19544             input.sse_customer_key_md5.as_ref(),
19545         );
19546         request.add_optional_header(
19547             "x-amz-server-side-encryption-context",
19548             input.ssekms_encryption_context.as_ref(),
19549         );
19550         request.add_optional_header(
19551             "x-amz-server-side-encryption-aws-kms-key-id",
19552             input.ssekms_key_id.as_ref(),
19553         );
19554         request.add_optional_header(
19555             "x-amz-server-side-encryption",
19556             input.server_side_encryption.as_ref(),
19557         );
19558         request.add_optional_header("x-amz-storage-class", input.storage_class.as_ref());
19559         request.add_optional_header("x-amz-tagging", input.tagging.as_ref());
19560         request.add_optional_header("x-amz-tagging-directive", input.tagging_directive.as_ref());
19561         request.add_optional_header(
19562             "x-amz-website-redirect-location",
19563             input.website_redirect_location.as_ref(),
19564         );
19565 
19566         let mut response = self
19567             .sign_and_dispatch(request, CopyObjectError::from_response)
19568             .await?;
19569 
19570         let mut response = response;
19571         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
19572             CopyObjectOutputDeserializer::deserialize(actual_tag_name, stack)
19573         })
19574         .await?;
19575         let mut result = result;
19576         result.bucket_key_enabled = response
19577             .headers
19578             .remove("x-amz-server-side-encryption-bucket-key-enabled")
19579             .map(|value| value.parse::<bool>().unwrap());
19580         result.copy_source_version_id = response.headers.remove("x-amz-copy-source-version-id");
19581         result.expiration = response.headers.remove("x-amz-expiration");
19582         result.request_charged = response.headers.remove("x-amz-request-charged");
19583         result.sse_customer_algorithm = response
19584             .headers
19585             .remove("x-amz-server-side-encryption-customer-algorithm");
19586         result.sse_customer_key_md5 = response
19587             .headers
19588             .remove("x-amz-server-side-encryption-customer-key-MD5");
19589         result.ssekms_encryption_context = response
19590             .headers
19591             .remove("x-amz-server-side-encryption-context");
19592         result.ssekms_key_id = response
19593             .headers
19594             .remove("x-amz-server-side-encryption-aws-kms-key-id");
19595         result.server_side_encryption = response.headers.remove("x-amz-server-side-encryption");
19596         result.version_id = response.headers.remove("x-amz-version-id"); // parse non-payload
19597         Ok(result)
19598     }
19599 
19600     /// <p><p>Creates a new S3 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 about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html">Bucket naming rules</a>.</p> <p>If you want to create an Amazon S3 on Outposts bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html">Create Bucket</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 Europe (Ireland) Region. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro">Accessing a bucket</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>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> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> <note> <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>Europe (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> </note> </li> </ul> <p>For example, the following <code>x-amz-grant-read</code> header grants the AWS accounts identified by account IDs permissions to read object data and its metadata:</p> <p> <code>x-amz-grant-read: id=&quot;11112222333&quot;, id=&quot;444455556666&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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html">DeleteBucket</a> </p> </li> </ul></p>
19601     #[allow(unused_variables, warnings)]
create_bucket( &self, input: CreateBucketRequest, ) -> Result<CreateBucketOutput, RusotoError<CreateBucketError>>19602     async fn create_bucket(
19603         &self,
19604         input: CreateBucketRequest,
19605     ) -> Result<CreateBucketOutput, RusotoError<CreateBucketError>> {
19606         let request_uri = format!("/{bucket}", bucket = input.bucket);
19607 
19608         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
19609 
19610         request.add_optional_header("x-amz-acl", input.acl.as_ref());
19611         request.add_optional_header(
19612             "x-amz-grant-full-control",
19613             input.grant_full_control.as_ref(),
19614         );
19615         request.add_optional_header("x-amz-grant-read", input.grant_read.as_ref());
19616         request.add_optional_header("x-amz-grant-read-acp", input.grant_read_acp.as_ref());
19617         request.add_optional_header("x-amz-grant-write", input.grant_write.as_ref());
19618         request.add_optional_header("x-amz-grant-write-acp", input.grant_write_acp.as_ref());
19619         request.add_optional_header(
19620             "x-amz-bucket-object-lock-enabled",
19621             input.object_lock_enabled_for_bucket.as_ref(),
19622         );
19623 
19624         if input.create_bucket_configuration.is_some() {
19625             let mut writer = EventWriter::new(Vec::new());
19626             CreateBucketConfigurationSerializer::serialize(
19627                 &mut writer,
19628                 "CreateBucketConfiguration",
19629                 input.create_bucket_configuration.as_ref().unwrap(),
19630             );
19631             request.set_payload(Some(writer.into_inner()));
19632         } else {
19633             request.set_payload(Some(Vec::new()));
19634         }
19635 
19636         let mut response = self
19637             .sign_and_dispatch(request, CreateBucketError::from_response)
19638             .await?;
19639 
19640         let result = CreateBucketOutput::default();
19641         let mut result = result;
19642         result.location = response.headers.remove("Location"); // parse non-payload
19643         Ok(result)
19644     }
19645 
19646     /// <p><p>This action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">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 action 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 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">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:Decrypt</code> and <code>kms:GenerateDataKey*</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. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions">Multipart upload API and permissions</a> in the <i>Amazon S3 User Guide</i>.</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>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> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> <note> <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>Europe (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> </note> </li> </ul> <p>For example, the following <code>x-amz-grant-read</code> header grants the AWS accounts identified by account IDs permissions to read object data and its metadata:</p> <p> <code>x-amz-grant-read: id=&quot;11112222333&quot;, id=&quot;444455556666&quot; </code> </p> </li> </ul> </dd> </dl> <p>The following operations are related to <code>CreateMultipartUpload</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a> </p> </li> </ul></p>
19647     #[allow(unused_variables, warnings)]
create_multipart_upload( &self, input: CreateMultipartUploadRequest, ) -> Result<CreateMultipartUploadOutput, RusotoError<CreateMultipartUploadError>>19648     async fn create_multipart_upload(
19649         &self,
19650         input: CreateMultipartUploadRequest,
19651     ) -> Result<CreateMultipartUploadOutput, RusotoError<CreateMultipartUploadError>> {
19652         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
19653 
19654         let mut request = SignedRequest::new("POST", "s3", &self.region, &request_uri);
19655 
19656         request.add_optional_header("x-amz-acl", input.acl.as_ref());
19657         request.add_optional_header(
19658             "x-amz-server-side-encryption-bucket-key-enabled",
19659             input.bucket_key_enabled.as_ref(),
19660         );
19661         request.add_optional_header("Cache-Control", input.cache_control.as_ref());
19662         request.add_optional_header("Content-Disposition", input.content_disposition.as_ref());
19663         request.add_optional_header("Content-Encoding", input.content_encoding.as_ref());
19664         request.add_optional_header("Content-Language", input.content_language.as_ref());
19665         request.add_optional_header("Content-Type", input.content_type.as_ref());
19666         request.add_optional_header(
19667             "x-amz-expected-bucket-owner",
19668             input.expected_bucket_owner.as_ref(),
19669         );
19670         request.add_optional_header("Expires", input.expires.as_ref());
19671         request.add_optional_header(
19672             "x-amz-grant-full-control",
19673             input.grant_full_control.as_ref(),
19674         );
19675         request.add_optional_header("x-amz-grant-read", input.grant_read.as_ref());
19676         request.add_optional_header("x-amz-grant-read-acp", input.grant_read_acp.as_ref());
19677         request.add_optional_header("x-amz-grant-write-acp", input.grant_write_acp.as_ref());
19678 
19679         if let Some(ref metadata) = input.metadata {
19680             for (header_name, header_value) in metadata.iter() {
19681                 let header = format!("x-amz-meta-{}", header_name);
19682                 request.add_header(header, header_value);
19683             }
19684         }
19685         request.add_optional_header(
19686             "x-amz-object-lock-legal-hold",
19687             input.object_lock_legal_hold_status.as_ref(),
19688         );
19689         request.add_optional_header("x-amz-object-lock-mode", input.object_lock_mode.as_ref());
19690         request.add_optional_header(
19691             "x-amz-object-lock-retain-until-date",
19692             input.object_lock_retain_until_date.as_ref(),
19693         );
19694         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
19695         request.add_optional_header(
19696             "x-amz-server-side-encryption-customer-algorithm",
19697             input.sse_customer_algorithm.as_ref(),
19698         );
19699         request.add_optional_header(
19700             "x-amz-server-side-encryption-customer-key",
19701             input.sse_customer_key.as_ref(),
19702         );
19703         request.add_optional_header(
19704             "x-amz-server-side-encryption-customer-key-MD5",
19705             input.sse_customer_key_md5.as_ref(),
19706         );
19707         request.add_optional_header(
19708             "x-amz-server-side-encryption-context",
19709             input.ssekms_encryption_context.as_ref(),
19710         );
19711         request.add_optional_header(
19712             "x-amz-server-side-encryption-aws-kms-key-id",
19713             input.ssekms_key_id.as_ref(),
19714         );
19715         request.add_optional_header(
19716             "x-amz-server-side-encryption",
19717             input.server_side_encryption.as_ref(),
19718         );
19719         request.add_optional_header("x-amz-storage-class", input.storage_class.as_ref());
19720         request.add_optional_header("x-amz-tagging", input.tagging.as_ref());
19721         request.add_optional_header(
19722             "x-amz-website-redirect-location",
19723             input.website_redirect_location.as_ref(),
19724         );
19725         let mut params = Params::new();
19726         params.put_key("uploads");
19727         request.set_params(params);
19728 
19729         let mut response = self
19730             .sign_and_dispatch(request, CreateMultipartUploadError::from_response)
19731             .await?;
19732 
19733         let mut response = response;
19734         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
19735             CreateMultipartUploadOutputDeserializer::deserialize(actual_tag_name, stack)
19736         })
19737         .await?;
19738         let mut result = result;
19739         result.abort_date = response.headers.remove("x-amz-abort-date");
19740         result.abort_rule_id = response.headers.remove("x-amz-abort-rule-id");
19741         result.bucket_key_enabled = response
19742             .headers
19743             .remove("x-amz-server-side-encryption-bucket-key-enabled")
19744             .map(|value| value.parse::<bool>().unwrap());
19745         result.request_charged = response.headers.remove("x-amz-request-charged");
19746         result.sse_customer_algorithm = response
19747             .headers
19748             .remove("x-amz-server-side-encryption-customer-algorithm");
19749         result.sse_customer_key_md5 = response
19750             .headers
19751             .remove("x-amz-server-side-encryption-customer-key-MD5");
19752         result.ssekms_encryption_context = response
19753             .headers
19754             .remove("x-amz-server-side-encryption-context");
19755         result.ssekms_key_id = response
19756             .headers
19757             .remove("x-amz-server-side-encryption-aws-kms-key-id");
19758         result.server_side_encryption = response.headers.remove("x-amz-server-side-encryption"); // parse non-payload
19759         Ok(result)
19760     }
19761 
19762     /// <p><p>Deletes the S3 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> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a> </p> </li> </ul></p>
19763     #[allow(unused_variables, warnings)]
delete_bucket( &self, input: DeleteBucketRequest, ) -> Result<(), RusotoError<DeleteBucketError>>19764     async fn delete_bucket(
19765         &self,
19766         input: DeleteBucketRequest,
19767     ) -> Result<(), RusotoError<DeleteBucketError>> {
19768         let request_uri = format!("/{bucket}", bucket = input.bucket);
19769 
19770         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
19771 
19772         request.add_optional_header(
19773             "x-amz-expected-bucket-owner",
19774             input.expected_bucket_owner.as_ref(),
19775         );
19776 
19777         let mut response = self
19778             .sign_and_dispatch(request, DeleteBucketError::from_response)
19779             .await?;
19780 
19781         std::mem::drop(response);
19782         Ok(())
19783     }
19784 
19785     /// <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/userguide/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/userguide/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> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html">GetBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html">ListBucketAnalyticsConfigurations</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html">PutBucketAnalyticsConfiguration</a> </p> </li> </ul></p>
19786     #[allow(unused_variables, warnings)]
delete_bucket_analytics_configuration( &self, input: DeleteBucketAnalyticsConfigurationRequest, ) -> Result<(), RusotoError<DeleteBucketAnalyticsConfigurationError>>19787     async fn delete_bucket_analytics_configuration(
19788         &self,
19789         input: DeleteBucketAnalyticsConfigurationRequest,
19790     ) -> Result<(), RusotoError<DeleteBucketAnalyticsConfigurationError>> {
19791         let request_uri = format!("/{bucket}", bucket = input.bucket);
19792 
19793         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
19794 
19795         request.add_optional_header(
19796             "x-amz-expected-bucket-owner",
19797             input.expected_bucket_owner.as_ref(),
19798         );
19799         let mut params = Params::new();
19800         params.put("id", &input.id);
19801         params.put_key("analytics");
19802         request.set_params(params);
19803 
19804         let mut response = self
19805             .sign_and_dispatch(
19806                 request,
19807                 DeleteBucketAnalyticsConfigurationError::from_response,
19808             )
19809             .await?;
19810 
19811         std::mem::drop(response);
19812         Ok(())
19813     }
19814 
19815     /// <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 S3 User Guide</i>.</p> <p class="title"> <b>Related Resources:</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html">PutBucketCors</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html">RESTOPTIONSobject</a> </p> </li> </ul></p>
19816     #[allow(unused_variables, warnings)]
delete_bucket_cors( &self, input: DeleteBucketCorsRequest, ) -> Result<(), RusotoError<DeleteBucketCorsError>>19817     async fn delete_bucket_cors(
19818         &self,
19819         input: DeleteBucketCorsRequest,
19820     ) -> Result<(), RusotoError<DeleteBucketCorsError>> {
19821         let request_uri = format!("/{bucket}", bucket = input.bucket);
19822 
19823         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
19824 
19825         request.add_optional_header(
19826             "x-amz-expected-bucket-owner",
19827             input.expected_bucket_owner.as_ref(),
19828         );
19829         let mut params = Params::new();
19830         params.put_key("cors");
19831         request.set_params(params);
19832 
19833         let mut response = self
19834             .sign_and_dispatch(request, DeleteBucketCorsError::from_response)
19835             .await?;
19836 
19837         std::mem::drop(response);
19838         Ok(())
19839     }
19840 
19841     /// <p><p>This implementation of the DELETE action 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 S3 User 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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> in the <i>Amazon S3 User Guide</i>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html">PutBucketEncryption</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html">GetBucketEncryption</a> </p> </li> </ul></p>
19842     #[allow(unused_variables, warnings)]
delete_bucket_encryption( &self, input: DeleteBucketEncryptionRequest, ) -> Result<(), RusotoError<DeleteBucketEncryptionError>>19843     async fn delete_bucket_encryption(
19844         &self,
19845         input: DeleteBucketEncryptionRequest,
19846     ) -> Result<(), RusotoError<DeleteBucketEncryptionError>> {
19847         let request_uri = format!("/{bucket}", bucket = input.bucket);
19848 
19849         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
19850 
19851         request.add_optional_header(
19852             "x-amz-expected-bucket-owner",
19853             input.expected_bucket_owner.as_ref(),
19854         );
19855         let mut params = Params::new();
19856         params.put_key("encryption");
19857         request.set_params(params);
19858 
19859         let mut response = self
19860             .sign_and_dispatch(request, DeleteBucketEncryptionError::from_response)
19861             .await?;
19862 
19863         std::mem::drop(response);
19864         Ok(())
19865     }
19866 
19867     /// <p><p>Deletes the S3 Intelligent-Tiering configuration from the specified bucket.</p> <p>The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without additional operational overhead. S3 Intelligent-Tiering delivers automatic cost savings by moving data between access tiers, when access patterns change.</p> <p>The S3 Intelligent-Tiering storage class is suitable for objects larger than 128 KB that you plan to store for at least 30 days. If the size of an object is less than 128 KB, it is not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the frequent access tier rates in the S3 Intelligent-Tiering storage class. </p> <p>If you delete an object before the end of the 30-day minimum storage duration period, you are charged for 30 days. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access">Storage class for automatically optimizing frequently and infrequently accessed objects</a>.</p> <p>Operations related to <code>DeleteBucketIntelligentTieringConfiguration</code> include: </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html">GetBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html">PutBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html">ListBucketIntelligentTieringConfigurations</a> </p> </li> </ul></p>
19868     #[allow(unused_variables, warnings)]
delete_bucket_intelligent_tiering_configuration( &self, input: DeleteBucketIntelligentTieringConfigurationRequest, ) -> Result<(), RusotoError<DeleteBucketIntelligentTieringConfigurationError>>19869     async fn delete_bucket_intelligent_tiering_configuration(
19870         &self,
19871         input: DeleteBucketIntelligentTieringConfigurationRequest,
19872     ) -> Result<(), RusotoError<DeleteBucketIntelligentTieringConfigurationError>> {
19873         let request_uri = format!("/{bucket}", bucket = input.bucket);
19874 
19875         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
19876 
19877         let mut params = Params::new();
19878         params.put("id", &input.id);
19879         params.put_key("intelligent-tiering");
19880         request.set_params(params);
19881 
19882         let mut response = self
19883             .sign_and_dispatch(
19884                 request,
19885                 DeleteBucketIntelligentTieringConfigurationError::from_response,
19886             )
19887             .await?;
19888 
19889         std::mem::drop(response);
19890         Ok(())
19891     }
19892 
19893     /// <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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html">GetBucketInventoryConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html">PutBucketInventoryConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html">ListBucketInventoryConfigurations</a> </p> </li> </ul></p>
19894     #[allow(unused_variables, warnings)]
delete_bucket_inventory_configuration( &self, input: DeleteBucketInventoryConfigurationRequest, ) -> Result<(), RusotoError<DeleteBucketInventoryConfigurationError>>19895     async fn delete_bucket_inventory_configuration(
19896         &self,
19897         input: DeleteBucketInventoryConfigurationRequest,
19898     ) -> Result<(), RusotoError<DeleteBucketInventoryConfigurationError>> {
19899         let request_uri = format!("/{bucket}", bucket = input.bucket);
19900 
19901         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
19902 
19903         request.add_optional_header(
19904             "x-amz-expected-bucket-owner",
19905             input.expected_bucket_owner.as_ref(),
19906         );
19907         let mut params = Params::new();
19908         params.put("id", &input.id);
19909         params.put_key("inventory");
19910         request.set_params(params);
19911 
19912         let mut response = self
19913             .sign_and_dispatch(
19914                 request,
19915                 DeleteBucketInventoryConfigurationError::from_response,
19916             )
19917             .await?;
19918 
19919         std::mem::drop(response);
19920         Ok(())
19921     }
19922 
19923     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html">GetBucketLifecycleConfiguration</a> </p> </li> </ul></p>
19924     #[allow(unused_variables, warnings)]
delete_bucket_lifecycle( &self, input: DeleteBucketLifecycleRequest, ) -> Result<(), RusotoError<DeleteBucketLifecycleError>>19925     async fn delete_bucket_lifecycle(
19926         &self,
19927         input: DeleteBucketLifecycleRequest,
19928     ) -> Result<(), RusotoError<DeleteBucketLifecycleError>> {
19929         let request_uri = format!("/{bucket}", bucket = input.bucket);
19930 
19931         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
19932 
19933         request.add_optional_header(
19934             "x-amz-expected-bucket-owner",
19935             input.expected_bucket_owner.as_ref(),
19936         );
19937         let mut params = Params::new();
19938         params.put_key("lifecycle");
19939         request.set_params(params);
19940 
19941         let mut response = self
19942             .sign_and_dispatch(request, DeleteBucketLifecycleError::from_response)
19943             .await?;
19944 
19945         std::mem::drop(response);
19946         Ok(())
19947     }
19948 
19949     /// <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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html">GetBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html">PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html">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>
19950     #[allow(unused_variables, warnings)]
delete_bucket_metrics_configuration( &self, input: DeleteBucketMetricsConfigurationRequest, ) -> Result<(), RusotoError<DeleteBucketMetricsConfigurationError>>19951     async fn delete_bucket_metrics_configuration(
19952         &self,
19953         input: DeleteBucketMetricsConfigurationRequest,
19954     ) -> Result<(), RusotoError<DeleteBucketMetricsConfigurationError>> {
19955         let request_uri = format!("/{bucket}", bucket = input.bucket);
19956 
19957         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
19958 
19959         request.add_optional_header(
19960             "x-amz-expected-bucket-owner",
19961             input.expected_bucket_owner.as_ref(),
19962         );
19963         let mut params = Params::new();
19964         params.put("id", &input.id);
19965         params.put_key("metrics");
19966         request.set_params(params);
19967 
19968         let mut response = self
19969             .sign_and_dispatch(
19970                 request,
19971                 DeleteBucketMetricsConfigurationError::from_response,
19972             )
19973             .await?;
19974 
19975         std::mem::drop(response);
19976         Ok(())
19977     }
19978 
19979     /// <p><p>Removes <code>OwnershipControls</code> for an Amazon S3 bucket. To use this operation, you must have the <code>s3:PutBucketOwnershipControls</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 information about Amazon S3 Object Ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html">Using Object Ownership</a>. </p> <p>The following operations are related to <code>DeleteBucketOwnershipControls</code>:</p> <ul> <li> <p> <a>GetBucketOwnershipControls</a> </p> </li> <li> <p> <a>PutBucketOwnershipControls</a> </p> </li> </ul></p>
19980     #[allow(unused_variables, warnings)]
delete_bucket_ownership_controls( &self, input: DeleteBucketOwnershipControlsRequest, ) -> Result<(), RusotoError<DeleteBucketOwnershipControlsError>>19981     async fn delete_bucket_ownership_controls(
19982         &self,
19983         input: DeleteBucketOwnershipControlsRequest,
19984     ) -> Result<(), RusotoError<DeleteBucketOwnershipControlsError>> {
19985         let request_uri = format!("/{bucket}", bucket = input.bucket);
19986 
19987         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
19988 
19989         request.add_optional_header(
19990             "x-amz-expected-bucket-owner",
19991             input.expected_bucket_owner.as_ref(),
19992         );
19993         let mut params = Params::new();
19994         params.put_key("ownershipControls");
19995         request.set_params(params);
19996 
19997         let mut response = self
19998             .sign_and_dispatch(request, DeleteBucketOwnershipControlsError::from_response)
19999             .await?;
20000 
20001         std::mem::drop(response);
20002         Ok(())
20003     }
20004 
20005     /// <p><p>This implementation of the DELETE action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a> </p> </li> </ul></p>
20006     #[allow(unused_variables, warnings)]
delete_bucket_policy( &self, input: DeleteBucketPolicyRequest, ) -> Result<(), RusotoError<DeleteBucketPolicyError>>20007     async fn delete_bucket_policy(
20008         &self,
20009         input: DeleteBucketPolicyRequest,
20010     ) -> Result<(), RusotoError<DeleteBucketPolicyError>> {
20011         let request_uri = format!("/{bucket}", bucket = input.bucket);
20012 
20013         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20014 
20015         request.add_optional_header(
20016             "x-amz-expected-bucket-owner",
20017             input.expected_bucket_owner.as_ref(),
20018         );
20019         let mut params = Params::new();
20020         params.put_key("policy");
20021         request.set_params(params);
20022 
20023         let mut response = self
20024             .sign_and_dispatch(request, DeleteBucketPolicyError::from_response)
20025             .await?;
20026 
20027         std::mem::drop(response);
20028         Ok(())
20029     }
20030 
20031     /// <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/userguide/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/userguide/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 User Guide</i>.</p> <p>The following operations are related to <code>DeleteBucketReplication</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html">PutBucketReplication</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html">GetBucketReplication</a> </p> </li> </ul></p>
20032     #[allow(unused_variables, warnings)]
delete_bucket_replication( &self, input: DeleteBucketReplicationRequest, ) -> Result<(), RusotoError<DeleteBucketReplicationError>>20033     async fn delete_bucket_replication(
20034         &self,
20035         input: DeleteBucketReplicationRequest,
20036     ) -> Result<(), RusotoError<DeleteBucketReplicationError>> {
20037         let request_uri = format!("/{bucket}", bucket = input.bucket);
20038 
20039         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20040 
20041         request.add_optional_header(
20042             "x-amz-expected-bucket-owner",
20043             input.expected_bucket_owner.as_ref(),
20044         );
20045         let mut params = Params::new();
20046         params.put_key("replication");
20047         request.set_params(params);
20048 
20049         let mut response = self
20050             .sign_and_dispatch(request, DeleteBucketReplicationError::from_response)
20051             .await?;
20052 
20053         std::mem::drop(response);
20054         Ok(())
20055     }
20056 
20057     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html">GetBucketTagging</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html">PutBucketTagging</a> </p> </li> </ul></p>
20058     #[allow(unused_variables, warnings)]
delete_bucket_tagging( &self, input: DeleteBucketTaggingRequest, ) -> Result<(), RusotoError<DeleteBucketTaggingError>>20059     async fn delete_bucket_tagging(
20060         &self,
20061         input: DeleteBucketTaggingRequest,
20062     ) -> Result<(), RusotoError<DeleteBucketTaggingError>> {
20063         let request_uri = format!("/{bucket}", bucket = input.bucket);
20064 
20065         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20066 
20067         request.add_optional_header(
20068             "x-amz-expected-bucket-owner",
20069             input.expected_bucket_owner.as_ref(),
20070         );
20071         let mut params = Params::new();
20072         params.put_key("tagging");
20073         request.set_params(params);
20074 
20075         let mut response = self
20076             .sign_and_dispatch(request, DeleteBucketTaggingError::from_response)
20077             .await?;
20078 
20079         std::mem::drop(response);
20080         Ok(())
20081     }
20082 
20083     /// <p><p>This action 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 action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketWebsite.html">GetBucketWebsite</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html">PutBucketWebsite</a> </p> </li> </ul></p>
20084     #[allow(unused_variables, warnings)]
delete_bucket_website( &self, input: DeleteBucketWebsiteRequest, ) -> Result<(), RusotoError<DeleteBucketWebsiteError>>20085     async fn delete_bucket_website(
20086         &self,
20087         input: DeleteBucketWebsiteRequest,
20088     ) -> Result<(), RusotoError<DeleteBucketWebsiteError>> {
20089         let request_uri = format!("/{bucket}", bucket = input.bucket);
20090 
20091         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20092 
20093         request.add_optional_header(
20094             "x-amz-expected-bucket-owner",
20095             input.expected_bucket_owner.as_ref(),
20096         );
20097         let mut params = Params::new();
20098         params.put_key("website");
20099         request.set_params(params);
20100 
20101         let mut response = self
20102             .sign_and_dispatch(request, DeleteBucketWebsiteError::from_response)
20103             .await?;
20104 
20105         std::mem::drop(response);
20106         Ok(())
20107     }
20108 
20109     /// <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 but will still respond that the command was successful.</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 DELETE Object or configure its lifecycle (<a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">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 action is related to <code>DeleteObject</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> </ul></p>
20110     #[allow(unused_variables, warnings)]
delete_object( &self, input: DeleteObjectRequest, ) -> Result<DeleteObjectOutput, RusotoError<DeleteObjectError>>20111     async fn delete_object(
20112         &self,
20113         input: DeleteObjectRequest,
20114     ) -> Result<DeleteObjectOutput, RusotoError<DeleteObjectError>> {
20115         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
20116 
20117         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20118 
20119         request.add_optional_header(
20120             "x-amz-bypass-governance-retention",
20121             input.bypass_governance_retention.as_ref(),
20122         );
20123         request.add_optional_header(
20124             "x-amz-expected-bucket-owner",
20125             input.expected_bucket_owner.as_ref(),
20126         );
20127         request.add_optional_header("x-amz-mfa", input.mfa.as_ref());
20128         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
20129         let mut params = Params::new();
20130         if let Some(ref x) = input.version_id {
20131             params.put("versionId", x);
20132         }
20133         request.set_params(params);
20134 
20135         let mut response = self
20136             .sign_and_dispatch(request, DeleteObjectError::from_response)
20137             .await?;
20138 
20139         let result = DeleteObjectOutput::default();
20140         let mut result = result;
20141         result.delete_marker = response
20142             .headers
20143             .remove("x-amz-delete-marker")
20144             .map(|value| value.parse::<bool>().unwrap());
20145         result.request_charged = response.headers.remove("x-amz-request-charged");
20146         result.version_id = response.headers.remove("x-amz-version-id"); // parse non-payload
20147         Ok(result)
20148     }
20149 
20150     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html">PutObjectTagging</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html">GetObjectTagging</a> </p> </li> </ul></p>
20151     #[allow(unused_variables, warnings)]
delete_object_tagging( &self, input: DeleteObjectTaggingRequest, ) -> Result<DeleteObjectTaggingOutput, RusotoError<DeleteObjectTaggingError>>20152     async fn delete_object_tagging(
20153         &self,
20154         input: DeleteObjectTaggingRequest,
20155     ) -> Result<DeleteObjectTaggingOutput, RusotoError<DeleteObjectTaggingError>> {
20156         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
20157 
20158         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20159 
20160         request.add_optional_header(
20161             "x-amz-expected-bucket-owner",
20162             input.expected_bucket_owner.as_ref(),
20163         );
20164         let mut params = Params::new();
20165         if let Some(ref x) = input.version_id {
20166             params.put("versionId", x);
20167         }
20168         params.put_key("tagging");
20169         request.set_params(params);
20170 
20171         let mut response = self
20172             .sign_and_dispatch(request, DeleteObjectTaggingError::from_response)
20173             .await?;
20174 
20175         let result = DeleteObjectTaggingOutput::default();
20176         let mut result = result;
20177         result.version_id = response.headers.remove("x-amz-version-id"); // parse non-payload
20178         Ok(result)
20179     }
20180 
20181     /// <p><p>This action 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 action 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 action 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 action supports two modes for the response: verbose and quiet. By default, the action 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 action encountered an error. For a successful deletion, the action does not return any information about the delete in the response body.</p> <p>When performing this action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> </p> </li> </ul></p>
20182     #[allow(unused_variables, warnings)]
delete_objects( &self, input: DeleteObjectsRequest, ) -> Result<DeleteObjectsOutput, RusotoError<DeleteObjectsError>>20183     async fn delete_objects(
20184         &self,
20185         input: DeleteObjectsRequest,
20186     ) -> Result<DeleteObjectsOutput, RusotoError<DeleteObjectsError>> {
20187         let request_uri = format!("/{bucket}", bucket = input.bucket);
20188 
20189         let mut request = SignedRequest::new("POST", "s3", &self.region, &request_uri);
20190 
20191         request.add_optional_header(
20192             "x-amz-bypass-governance-retention",
20193             input.bypass_governance_retention.as_ref(),
20194         );
20195         request.add_optional_header(
20196             "x-amz-expected-bucket-owner",
20197             input.expected_bucket_owner.as_ref(),
20198         );
20199         request.add_optional_header("x-amz-mfa", input.mfa.as_ref());
20200         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
20201         let mut params = Params::new();
20202         params.put_key("delete");
20203         request.set_params(params);
20204         let mut writer = EventWriter::new(Vec::new());
20205         DeleteSerializer::serialize(&mut writer, "Delete", &input.delete);
20206         request.set_payload(Some(writer.into_inner()));
20207         request.maybe_set_content_md5_header();
20208 
20209         let mut response = self
20210             .sign_and_dispatch(request, DeleteObjectsError::from_response)
20211             .await?;
20212 
20213         let mut response = response;
20214         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20215             DeleteObjectsOutputDeserializer::deserialize(actual_tag_name, stack)
20216         })
20217         .await?;
20218         let mut result = result;
20219         result.request_charged = response.headers.remove("x-amz-request-charged"); // parse non-payload
20220         Ok(result)
20221     }
20222 
20223     /// <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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <p>The following operations are related to <code>DeletePublicAccessBlock</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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html">GetPublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html">PutPublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html">GetBucketPolicyStatus</a> </p> </li> </ul></p>
20224     #[allow(unused_variables, warnings)]
delete_public_access_block( &self, input: DeletePublicAccessBlockRequest, ) -> Result<(), RusotoError<DeletePublicAccessBlockError>>20225     async fn delete_public_access_block(
20226         &self,
20227         input: DeletePublicAccessBlockRequest,
20228     ) -> Result<(), RusotoError<DeletePublicAccessBlockError>> {
20229         let request_uri = format!("/{bucket}", bucket = input.bucket);
20230 
20231         let mut request = SignedRequest::new("DELETE", "s3", &self.region, &request_uri);
20232 
20233         request.add_optional_header(
20234             "x-amz-expected-bucket-owner",
20235             input.expected_bucket_owner.as_ref(),
20236         );
20237         let mut params = Params::new();
20238         params.put_key("publicAccessBlock");
20239         request.set_params(params);
20240 
20241         let mut response = self
20242             .sign_and_dispatch(request, DeletePublicAccessBlockError::from_response)
20243             .await?;
20244 
20245         std::mem::drop(response);
20246         Ok(())
20247     }
20248 
20249     /// <p><p>This implementation of the GET action 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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> in the <i>Amazon S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html">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 S3 User Guide.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html">PutBucketAccelerateConfiguration</a> </p> </li> </ul></p>
20250     #[allow(unused_variables, warnings)]
get_bucket_accelerate_configuration( &self, input: GetBucketAccelerateConfigurationRequest, ) -> Result< GetBucketAccelerateConfigurationOutput, RusotoError<GetBucketAccelerateConfigurationError>, >20251     async fn get_bucket_accelerate_configuration(
20252         &self,
20253         input: GetBucketAccelerateConfigurationRequest,
20254     ) -> Result<
20255         GetBucketAccelerateConfigurationOutput,
20256         RusotoError<GetBucketAccelerateConfigurationError>,
20257     > {
20258         let request_uri = format!("/{bucket}", bucket = input.bucket);
20259 
20260         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20261 
20262         request.add_optional_header(
20263             "x-amz-expected-bucket-owner",
20264             input.expected_bucket_owner.as_ref(),
20265         );
20266         let mut params = Params::new();
20267         params.put_key("accelerate");
20268         request.set_params(params);
20269 
20270         let mut response = self
20271             .sign_and_dispatch(
20272                 request,
20273                 GetBucketAccelerateConfigurationError::from_response,
20274             )
20275             .await?;
20276 
20277         let mut response = response;
20278         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20279             GetBucketAccelerateConfigurationOutputDeserializer::deserialize(actual_tag_name, stack)
20280         })
20281         .await?;
20282         let mut result = result;
20283         // parse non-payload
20284         Ok(result)
20285     }
20286 
20287     /// <p><p>This implementation of the <code>GET</code> action 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> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html">ListObjects</a> </p> </li> </ul></p>
20288     #[allow(unused_variables, warnings)]
get_bucket_acl( &self, input: GetBucketAclRequest, ) -> Result<GetBucketAclOutput, RusotoError<GetBucketAclError>>20289     async fn get_bucket_acl(
20290         &self,
20291         input: GetBucketAclRequest,
20292     ) -> Result<GetBucketAclOutput, RusotoError<GetBucketAclError>> {
20293         let request_uri = format!("/{bucket}", bucket = input.bucket);
20294 
20295         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20296 
20297         request.add_optional_header(
20298             "x-amz-expected-bucket-owner",
20299             input.expected_bucket_owner.as_ref(),
20300         );
20301         let mut params = Params::new();
20302         params.put_key("acl");
20303         request.set_params(params);
20304 
20305         let mut response = self
20306             .sign_and_dispatch(request, GetBucketAclError::from_response)
20307             .await?;
20308 
20309         let mut response = response;
20310         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20311             GetBucketAclOutputDeserializer::deserialize(actual_tag_name, stack)
20312         })
20313         .await?;
20314         let mut result = result;
20315         // parse non-payload
20316         Ok(result)
20317     }
20318 
20319     /// <p><p>This implementation of the GET action 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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the <i>Amazon S3 User 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 S3 User Guide</i>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html">DeleteBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html">ListBucketAnalyticsConfigurations</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html">PutBucketAnalyticsConfiguration</a> </p> </li> </ul></p>
20320     #[allow(unused_variables, warnings)]
get_bucket_analytics_configuration( &self, input: GetBucketAnalyticsConfigurationRequest, ) -> Result< GetBucketAnalyticsConfigurationOutput, RusotoError<GetBucketAnalyticsConfigurationError>, >20321     async fn get_bucket_analytics_configuration(
20322         &self,
20323         input: GetBucketAnalyticsConfigurationRequest,
20324     ) -> Result<
20325         GetBucketAnalyticsConfigurationOutput,
20326         RusotoError<GetBucketAnalyticsConfigurationError>,
20327     > {
20328         let request_uri = format!("/{bucket}", bucket = input.bucket);
20329 
20330         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20331 
20332         request.add_optional_header(
20333             "x-amz-expected-bucket-owner",
20334             input.expected_bucket_owner.as_ref(),
20335         );
20336         let mut params = Params::new();
20337         params.put("id", &input.id);
20338         params.put_key("analytics");
20339         request.set_params(params);
20340 
20341         let mut response = self
20342             .sign_and_dispatch(request, GetBucketAnalyticsConfigurationError::from_response)
20343             .await?;
20344 
20345         let mut response = response;
20346         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20347             GetBucketAnalyticsConfigurationOutputDeserializer::deserialize(actual_tag_name, stack)
20348         })
20349         .await?;
20350         let mut result = result;
20351         // parse non-payload
20352         Ok(result)
20353     }
20354 
20355     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html">PutBucketCors</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html">DeleteBucketCors</a> </p> </li> </ul></p>
20356     #[allow(unused_variables, warnings)]
get_bucket_cors( &self, input: GetBucketCorsRequest, ) -> Result<GetBucketCorsOutput, RusotoError<GetBucketCorsError>>20357     async fn get_bucket_cors(
20358         &self,
20359         input: GetBucketCorsRequest,
20360     ) -> Result<GetBucketCorsOutput, RusotoError<GetBucketCorsError>> {
20361         let request_uri = format!("/{bucket}", bucket = input.bucket);
20362 
20363         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20364 
20365         request.add_optional_header(
20366             "x-amz-expected-bucket-owner",
20367             input.expected_bucket_owner.as_ref(),
20368         );
20369         let mut params = Params::new();
20370         params.put_key("cors");
20371         request.set_params(params);
20372 
20373         let mut response = self
20374             .sign_and_dispatch(request, GetBucketCorsError::from_response)
20375             .await?;
20376 
20377         let mut response = response;
20378         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20379             GetBucketCorsOutputDeserializer::deserialize(actual_tag_name, stack)
20380         })
20381         .await?;
20382         let mut result = result;
20383         // parse non-payload
20384         Ok(result)
20385     }
20386 
20387     /// <p><p>Returns the default encryption configuration for an Amazon S3 bucket. If the bucket does not have a default encryption configuration, GetBucketEncryption returns <code>ServerSideEncryptionConfigurationNotFoundError</code>. </p> <p>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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html">PutBucketEncryption</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html">DeleteBucketEncryption</a> </p> </li> </ul></p>
20388     #[allow(unused_variables, warnings)]
get_bucket_encryption( &self, input: GetBucketEncryptionRequest, ) -> Result<GetBucketEncryptionOutput, RusotoError<GetBucketEncryptionError>>20389     async fn get_bucket_encryption(
20390         &self,
20391         input: GetBucketEncryptionRequest,
20392     ) -> Result<GetBucketEncryptionOutput, RusotoError<GetBucketEncryptionError>> {
20393         let request_uri = format!("/{bucket}", bucket = input.bucket);
20394 
20395         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20396 
20397         request.add_optional_header(
20398             "x-amz-expected-bucket-owner",
20399             input.expected_bucket_owner.as_ref(),
20400         );
20401         let mut params = Params::new();
20402         params.put_key("encryption");
20403         request.set_params(params);
20404 
20405         let mut response = self
20406             .sign_and_dispatch(request, GetBucketEncryptionError::from_response)
20407             .await?;
20408 
20409         let mut response = response;
20410         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20411             GetBucketEncryptionOutputDeserializer::deserialize(actual_tag_name, stack)
20412         })
20413         .await?;
20414         let mut result = result;
20415         // parse non-payload
20416         Ok(result)
20417     }
20418 
20419     /// <p><p>Gets the S3 Intelligent-Tiering configuration from the specified bucket.</p> <p>The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without additional operational overhead. S3 Intelligent-Tiering delivers automatic cost savings by moving data between access tiers, when access patterns change.</p> <p>The S3 Intelligent-Tiering storage class is suitable for objects larger than 128 KB that you plan to store for at least 30 days. If the size of an object is less than 128 KB, it is not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the frequent access tier rates in the S3 Intelligent-Tiering storage class. </p> <p>If you delete an object before the end of the 30-day minimum storage duration period, you are charged for 30 days. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access">Storage class for automatically optimizing frequently and infrequently accessed objects</a>.</p> <p>Operations related to <code>GetBucketIntelligentTieringConfiguration</code> include: </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html">DeleteBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html">PutBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html">ListBucketIntelligentTieringConfigurations</a> </p> </li> </ul></p>
20420     #[allow(unused_variables, warnings)]
get_bucket_intelligent_tiering_configuration( &self, input: GetBucketIntelligentTieringConfigurationRequest, ) -> Result< GetBucketIntelligentTieringConfigurationOutput, RusotoError<GetBucketIntelligentTieringConfigurationError>, >20421     async fn get_bucket_intelligent_tiering_configuration(
20422         &self,
20423         input: GetBucketIntelligentTieringConfigurationRequest,
20424     ) -> Result<
20425         GetBucketIntelligentTieringConfigurationOutput,
20426         RusotoError<GetBucketIntelligentTieringConfigurationError>,
20427     > {
20428         let request_uri = format!("/{bucket}", bucket = input.bucket);
20429 
20430         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20431 
20432         let mut params = Params::new();
20433         params.put("id", &input.id);
20434         params.put_key("intelligent-tiering");
20435         request.set_params(params);
20436 
20437         let mut response = self
20438             .sign_and_dispatch(
20439                 request,
20440                 GetBucketIntelligentTieringConfigurationError::from_response,
20441             )
20442             .await?;
20443 
20444         let mut response = response;
20445         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20446             GetBucketIntelligentTieringConfigurationOutputDeserializer::deserialize(
20447                 actual_tag_name,
20448                 stack,
20449             )
20450         })
20451         .await?;
20452         let mut result = result;
20453         // parse non-payload
20454         Ok(result)
20455     }
20456 
20457     /// <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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html">DeleteBucketInventoryConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html">ListBucketInventoryConfigurations</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html">PutBucketInventoryConfiguration</a> </p> </li> </ul></p>
20458     #[allow(unused_variables, warnings)]
get_bucket_inventory_configuration( &self, input: GetBucketInventoryConfigurationRequest, ) -> Result< GetBucketInventoryConfigurationOutput, RusotoError<GetBucketInventoryConfigurationError>, >20459     async fn get_bucket_inventory_configuration(
20460         &self,
20461         input: GetBucketInventoryConfigurationRequest,
20462     ) -> Result<
20463         GetBucketInventoryConfigurationOutput,
20464         RusotoError<GetBucketInventoryConfigurationError>,
20465     > {
20466         let request_uri = format!("/{bucket}", bucket = input.bucket);
20467 
20468         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20469 
20470         request.add_optional_header(
20471             "x-amz-expected-bucket-owner",
20472             input.expected_bucket_owner.as_ref(),
20473         );
20474         let mut params = Params::new();
20475         params.put("id", &input.id);
20476         params.put_key("inventory");
20477         request.set_params(params);
20478 
20479         let mut response = self
20480             .sign_and_dispatch(request, GetBucketInventoryConfigurationError::from_response)
20481             .await?;
20482 
20483         let mut response = response;
20484         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20485             GetBucketInventoryConfigurationOutputDeserializer::deserialize(actual_tag_name, stack)
20486         })
20487         .await?;
20488         let mut result = result;
20489         // parse non-payload
20490         Ok(result)
20491     }
20492 
20493     /// <p><important> <p>For an updated version of this API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html">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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html">GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">PutBucketLifecycle</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html">DeleteBucketLifecycle</a> </p> </li> </ul></p>
20494     #[allow(unused_variables, warnings)]
get_bucket_lifecycle( &self, input: GetBucketLifecycleRequest, ) -> Result<GetBucketLifecycleOutput, RusotoError<GetBucketLifecycleError>>20495     async fn get_bucket_lifecycle(
20496         &self,
20497         input: GetBucketLifecycleRequest,
20498     ) -> Result<GetBucketLifecycleOutput, RusotoError<GetBucketLifecycleError>> {
20499         let request_uri = format!("/{bucket}", bucket = input.bucket);
20500 
20501         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20502 
20503         request.add_optional_header(
20504             "x-amz-expected-bucket-owner",
20505             input.expected_bucket_owner.as_ref(),
20506         );
20507         let mut params = Params::new();
20508         params.put_key("lifecycle");
20509         request.set_params(params);
20510 
20511         let mut response = self
20512             .sign_and_dispatch(request, GetBucketLifecycleError::from_response)
20513             .await?;
20514 
20515         let mut response = response;
20516         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20517             GetBucketLifecycleOutputDeserializer::deserialize(actual_tag_name, stack)
20518         })
20519         .await?;
20520         let mut result = result;
20521         // parse non-payload
20522         Ok(result)
20523     }
20524 
20525     /// <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 using a previous version of the lifecycle configuration, it still works. For the earlier action, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html">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/userguide/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/userguide/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>GetBucketLifecycleConfiguration</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html">GetBucketLifecycle</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">PutBucketLifecycle</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html">DeleteBucketLifecycle</a> </p> </li> </ul></p>
20526     #[allow(unused_variables, warnings)]
get_bucket_lifecycle_configuration( &self, input: GetBucketLifecycleConfigurationRequest, ) -> Result< GetBucketLifecycleConfigurationOutput, RusotoError<GetBucketLifecycleConfigurationError>, >20527     async fn get_bucket_lifecycle_configuration(
20528         &self,
20529         input: GetBucketLifecycleConfigurationRequest,
20530     ) -> Result<
20531         GetBucketLifecycleConfigurationOutput,
20532         RusotoError<GetBucketLifecycleConfigurationError>,
20533     > {
20534         let request_uri = format!("/{bucket}", bucket = input.bucket);
20535 
20536         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20537 
20538         request.add_optional_header(
20539             "x-amz-expected-bucket-owner",
20540             input.expected_bucket_owner.as_ref(),
20541         );
20542         let mut params = Params::new();
20543         params.put_key("lifecycle");
20544         request.set_params(params);
20545 
20546         let mut response = self
20547             .sign_and_dispatch(request, GetBucketLifecycleConfigurationError::from_response)
20548             .await?;
20549 
20550         let mut response = response;
20551         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20552             GetBucketLifecycleConfigurationOutputDeserializer::deserialize(actual_tag_name, stack)
20553         })
20554         .await?;
20555         let mut result = result;
20556         // parse non-payload
20557         Ok(result)
20558     }
20559 
20560     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> </ul></p>
20561     #[allow(unused_variables, warnings)]
get_bucket_location( &self, input: GetBucketLocationRequest, ) -> Result<GetBucketLocationOutput, RusotoError<GetBucketLocationError>>20562     async fn get_bucket_location(
20563         &self,
20564         input: GetBucketLocationRequest,
20565     ) -> Result<GetBucketLocationOutput, RusotoError<GetBucketLocationError>> {
20566         let request_uri = format!("/{bucket}", bucket = input.bucket);
20567 
20568         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20569 
20570         request.add_optional_header(
20571             "x-amz-expected-bucket-owner",
20572             input.expected_bucket_owner.as_ref(),
20573         );
20574         let mut params = Params::new();
20575         params.put_key("location");
20576         request.set_params(params);
20577 
20578         let mut response = self
20579             .sign_and_dispatch(request, GetBucketLocationError::from_response)
20580             .await?;
20581 
20582         let mut response = response;
20583         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20584             GetBucketLocationOutputDeserializer::deserialize(actual_tag_name, stack)
20585         })
20586         .await?;
20587         let mut result = result;
20588         // parse non-payload
20589         Ok(result)
20590     }
20591 
20592     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.html">PutBucketLogging</a> </p> </li> </ul></p>
20593     #[allow(unused_variables, warnings)]
get_bucket_logging( &self, input: GetBucketLoggingRequest, ) -> Result<GetBucketLoggingOutput, RusotoError<GetBucketLoggingError>>20594     async fn get_bucket_logging(
20595         &self,
20596         input: GetBucketLoggingRequest,
20597     ) -> Result<GetBucketLoggingOutput, RusotoError<GetBucketLoggingError>> {
20598         let request_uri = format!("/{bucket}", bucket = input.bucket);
20599 
20600         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20601 
20602         request.add_optional_header(
20603             "x-amz-expected-bucket-owner",
20604             input.expected_bucket_owner.as_ref(),
20605         );
20606         let mut params = Params::new();
20607         params.put_key("logging");
20608         request.set_params(params);
20609 
20610         let mut response = self
20611             .sign_and_dispatch(request, GetBucketLoggingError::from_response)
20612             .await?;
20613 
20614         let mut response = response;
20615         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20616             GetBucketLoggingOutputDeserializer::deserialize(actual_tag_name, stack)
20617         })
20618         .await?;
20619         let mut result = result;
20620         // parse non-payload
20621         Ok(result)
20622     }
20623 
20624     /// <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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html">PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html">DeleteBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html">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>
20625     #[allow(unused_variables, warnings)]
get_bucket_metrics_configuration( &self, input: GetBucketMetricsConfigurationRequest, ) -> Result<GetBucketMetricsConfigurationOutput, RusotoError<GetBucketMetricsConfigurationError>>20626     async fn get_bucket_metrics_configuration(
20627         &self,
20628         input: GetBucketMetricsConfigurationRequest,
20629     ) -> Result<GetBucketMetricsConfigurationOutput, RusotoError<GetBucketMetricsConfigurationError>>
20630     {
20631         let request_uri = format!("/{bucket}", bucket = input.bucket);
20632 
20633         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20634 
20635         request.add_optional_header(
20636             "x-amz-expected-bucket-owner",
20637             input.expected_bucket_owner.as_ref(),
20638         );
20639         let mut params = Params::new();
20640         params.put("id", &input.id);
20641         params.put_key("metrics");
20642         request.set_params(params);
20643 
20644         let mut response = self
20645             .sign_and_dispatch(request, GetBucketMetricsConfigurationError::from_response)
20646             .await?;
20647 
20648         let mut response = response;
20649         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20650             GetBucketMetricsConfigurationOutputDeserializer::deserialize(actual_tag_name, stack)
20651         })
20652         .await?;
20653         let mut result = result;
20654         // parse non-payload
20655         Ok(result)
20656     }
20657 
20658     /// <p> No longer used, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html">GetBucketNotificationConfiguration</a>.</p>
20659     #[allow(unused_variables, warnings)]
get_bucket_notification( &self, input: GetBucketNotificationConfigurationRequest, ) -> Result<NotificationConfigurationDeprecated, RusotoError<GetBucketNotificationError>>20660     async fn get_bucket_notification(
20661         &self,
20662         input: GetBucketNotificationConfigurationRequest,
20663     ) -> Result<NotificationConfigurationDeprecated, RusotoError<GetBucketNotificationError>> {
20664         let request_uri = format!("/{bucket}", bucket = input.bucket);
20665 
20666         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20667 
20668         request.add_optional_header(
20669             "x-amz-expected-bucket-owner",
20670             input.expected_bucket_owner.as_ref(),
20671         );
20672         let mut params = Params::new();
20673         params.put_key("notification");
20674         request.set_params(params);
20675 
20676         let mut response = self
20677             .sign_and_dispatch(request, GetBucketNotificationError::from_response)
20678             .await?;
20679 
20680         let mut response = response;
20681         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20682             NotificationConfigurationDeprecatedDeserializer::deserialize(actual_tag_name, stack)
20683         })
20684         .await?;
20685         let mut result = result;
20686         // parse non-payload
20687         Ok(result)
20688     }
20689 
20690     /// <p><p>Returns the notification configuration of a bucket.</p> <p>If notifications are not enabled on the bucket, the action 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 action is related to <code>GetBucketNotification</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotification.html">PutBucketNotification</a> </p> </li> </ul></p>
20691     #[allow(unused_variables, warnings)]
get_bucket_notification_configuration( &self, input: GetBucketNotificationConfigurationRequest, ) -> Result<NotificationConfiguration, RusotoError<GetBucketNotificationConfigurationError>>20692     async fn get_bucket_notification_configuration(
20693         &self,
20694         input: GetBucketNotificationConfigurationRequest,
20695     ) -> Result<NotificationConfiguration, RusotoError<GetBucketNotificationConfigurationError>>
20696     {
20697         let request_uri = format!("/{bucket}", bucket = input.bucket);
20698 
20699         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20700 
20701         request.add_optional_header(
20702             "x-amz-expected-bucket-owner",
20703             input.expected_bucket_owner.as_ref(),
20704         );
20705         let mut params = Params::new();
20706         params.put_key("notification");
20707         request.set_params(params);
20708 
20709         let mut response = self
20710             .sign_and_dispatch(
20711                 request,
20712                 GetBucketNotificationConfigurationError::from_response,
20713             )
20714             .await?;
20715 
20716         let mut response = response;
20717         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20718             NotificationConfigurationDeserializer::deserialize(actual_tag_name, stack)
20719         })
20720         .await?;
20721         let mut result = result;
20722         // parse non-payload
20723         Ok(result)
20724     }
20725 
20726     /// <p><p>Retrieves <code>OwnershipControls</code> for an Amazon S3 bucket. To use this operation, you must have the <code>s3:GetBucketOwnershipControls</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 information about Amazon S3 Object Ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html">Using Object Ownership</a>. </p> <p>The following operations are related to <code>GetBucketOwnershipControls</code>:</p> <ul> <li> <p> <a>PutBucketOwnershipControls</a> </p> </li> <li> <p> <a>DeleteBucketOwnershipControls</a> </p> </li> </ul></p>
20727     #[allow(unused_variables, warnings)]
get_bucket_ownership_controls( &self, input: GetBucketOwnershipControlsRequest, ) -> Result<GetBucketOwnershipControlsOutput, RusotoError<GetBucketOwnershipControlsError>>20728     async fn get_bucket_ownership_controls(
20729         &self,
20730         input: GetBucketOwnershipControlsRequest,
20731     ) -> Result<GetBucketOwnershipControlsOutput, RusotoError<GetBucketOwnershipControlsError>>
20732     {
20733         let request_uri = format!("/{bucket}", bucket = input.bucket);
20734 
20735         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20736 
20737         request.add_optional_header(
20738             "x-amz-expected-bucket-owner",
20739             input.expected_bucket_owner.as_ref(),
20740         );
20741         let mut params = Params::new();
20742         params.put_key("ownershipControls");
20743         request.set_params(params);
20744 
20745         let mut response = self
20746             .sign_and_dispatch(request, GetBucketOwnershipControlsError::from_response)
20747             .await?;
20748 
20749         let mut response = response;
20750         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20751             GetBucketOwnershipControlsOutputDeserializer::deserialize(actual_tag_name, stack)
20752         })
20753         .await?;
20754         let mut result = result;
20755         // parse non-payload
20756         Ok(result)
20757     }
20758 
20759     /// <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 action is related to <code>GetBucketPolicy</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> </ul></p>
20760     #[allow(unused_variables, warnings)]
get_bucket_policy( &self, input: GetBucketPolicyRequest, ) -> Result<GetBucketPolicyOutput, RusotoError<GetBucketPolicyError>>20761     async fn get_bucket_policy(
20762         &self,
20763         input: GetBucketPolicyRequest,
20764     ) -> Result<GetBucketPolicyOutput, RusotoError<GetBucketPolicyError>> {
20765         let request_uri = format!("/{bucket}", bucket = input.bucket);
20766 
20767         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20768 
20769         request.add_optional_header(
20770             "x-amz-expected-bucket-owner",
20771             input.expected_bucket_owner.as_ref(),
20772         );
20773         let mut params = Params::new();
20774         params.put_key("policy");
20775         request.set_params(params);
20776 
20777         let mut response = self
20778             .sign_and_dispatch(request, GetBucketPolicyError::from_response)
20779             .await?;
20780 
20781         let mut response = response;
20782         let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
20783         let mut result = GetBucketPolicyOutput::default();
20784         result.policy = Some(String::from_utf8_lossy(response.body.as_ref()).into());
20785 
20786         Ok(result)
20787     }
20788 
20789     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html">GetPublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html">PutPublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html">DeletePublicAccessBlock</a> </p> </li> </ul></p>
20790     #[allow(unused_variables, warnings)]
get_bucket_policy_status( &self, input: GetBucketPolicyStatusRequest, ) -> Result<GetBucketPolicyStatusOutput, RusotoError<GetBucketPolicyStatusError>>20791     async fn get_bucket_policy_status(
20792         &self,
20793         input: GetBucketPolicyStatusRequest,
20794     ) -> Result<GetBucketPolicyStatusOutput, RusotoError<GetBucketPolicyStatusError>> {
20795         let request_uri = format!("/{bucket}", bucket = input.bucket);
20796 
20797         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20798 
20799         request.add_optional_header(
20800             "x-amz-expected-bucket-owner",
20801             input.expected_bucket_owner.as_ref(),
20802         );
20803         let mut params = Params::new();
20804         params.put_key("policyStatus");
20805         request.set_params(params);
20806 
20807         let mut response = self
20808             .sign_and_dispatch(request, GetBucketPolicyStatusError::from_response)
20809             .await?;
20810 
20811         let mut response = response;
20812         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20813             GetBucketPolicyStatusOutputDeserializer::deserialize(actual_tag_name, stack)
20814         })
20815         .await?;
20816         let mut result = result;
20817         // parse non-payload
20818         Ok(result)
20819     }
20820 
20821     /// <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 S3 User Guide</i>.</p> <p>This action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList">List of replication-related error codes</a> </p> <p>The following operations are related to <code>GetBucketReplication</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html">PutBucketReplication</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html">DeleteBucketReplication</a> </p> </li> </ul></p>
20822     #[allow(unused_variables, warnings)]
get_bucket_replication( &self, input: GetBucketReplicationRequest, ) -> Result<GetBucketReplicationOutput, RusotoError<GetBucketReplicationError>>20823     async fn get_bucket_replication(
20824         &self,
20825         input: GetBucketReplicationRequest,
20826     ) -> Result<GetBucketReplicationOutput, RusotoError<GetBucketReplicationError>> {
20827         let request_uri = format!("/{bucket}", bucket = input.bucket);
20828 
20829         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20830 
20831         request.add_optional_header(
20832             "x-amz-expected-bucket-owner",
20833             input.expected_bucket_owner.as_ref(),
20834         );
20835         let mut params = Params::new();
20836         params.put_key("replication");
20837         request.set_params(params);
20838 
20839         let mut response = self
20840             .sign_and_dispatch(request, GetBucketReplicationError::from_response)
20841             .await?;
20842 
20843         let mut response = response;
20844         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20845             GetBucketReplicationOutputDeserializer::deserialize(actual_tag_name, stack)
20846         })
20847         .await?;
20848         let mut result = result;
20849         // parse non-payload
20850         Ok(result)
20851     }
20852 
20853     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html">ListObjects</a> </p> </li> </ul></p>
20854     #[allow(unused_variables, warnings)]
get_bucket_request_payment( &self, input: GetBucketRequestPaymentRequest, ) -> Result<GetBucketRequestPaymentOutput, RusotoError<GetBucketRequestPaymentError>>20855     async fn get_bucket_request_payment(
20856         &self,
20857         input: GetBucketRequestPaymentRequest,
20858     ) -> Result<GetBucketRequestPaymentOutput, RusotoError<GetBucketRequestPaymentError>> {
20859         let request_uri = format!("/{bucket}", bucket = input.bucket);
20860 
20861         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20862 
20863         request.add_optional_header(
20864             "x-amz-expected-bucket-owner",
20865             input.expected_bucket_owner.as_ref(),
20866         );
20867         let mut params = Params::new();
20868         params.put_key("requestPayment");
20869         request.set_params(params);
20870 
20871         let mut response = self
20872             .sign_and_dispatch(request, GetBucketRequestPaymentError::from_response)
20873             .await?;
20874 
20875         let mut response = response;
20876         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20877             GetBucketRequestPaymentOutputDeserializer::deserialize(actual_tag_name, stack)
20878         })
20879         .await?;
20880         let mut result = result;
20881         // parse non-payload
20882         Ok(result)
20883     }
20884 
20885     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html">PutBucketTagging</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html">DeleteBucketTagging</a> </p> </li> </ul></p>
20886     #[allow(unused_variables, warnings)]
get_bucket_tagging( &self, input: GetBucketTaggingRequest, ) -> Result<GetBucketTaggingOutput, RusotoError<GetBucketTaggingError>>20887     async fn get_bucket_tagging(
20888         &self,
20889         input: GetBucketTaggingRequest,
20890     ) -> Result<GetBucketTaggingOutput, RusotoError<GetBucketTaggingError>> {
20891         let request_uri = format!("/{bucket}", bucket = input.bucket);
20892 
20893         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20894 
20895         request.add_optional_header(
20896             "x-amz-expected-bucket-owner",
20897             input.expected_bucket_owner.as_ref(),
20898         );
20899         let mut params = Params::new();
20900         params.put_key("tagging");
20901         request.set_params(params);
20902 
20903         let mut response = self
20904             .sign_and_dispatch(request, GetBucketTaggingError::from_response)
20905             .await?;
20906 
20907         let mut response = response;
20908         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20909             GetBucketTaggingOutputDeserializer::deserialize(actual_tag_name, stack)
20910         })
20911         .await?;
20912         let mut result = result;
20913         // parse non-payload
20914         Ok(result)
20915     }
20916 
20917     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a> </p> </li> </ul></p>
20918     #[allow(unused_variables, warnings)]
get_bucket_versioning( &self, input: GetBucketVersioningRequest, ) -> Result<GetBucketVersioningOutput, RusotoError<GetBucketVersioningError>>20919     async fn get_bucket_versioning(
20920         &self,
20921         input: GetBucketVersioningRequest,
20922     ) -> Result<GetBucketVersioningOutput, RusotoError<GetBucketVersioningError>> {
20923         let request_uri = format!("/{bucket}", bucket = input.bucket);
20924 
20925         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20926 
20927         request.add_optional_header(
20928             "x-amz-expected-bucket-owner",
20929             input.expected_bucket_owner.as_ref(),
20930         );
20931         let mut params = Params::new();
20932         params.put_key("versioning");
20933         request.set_params(params);
20934 
20935         let mut response = self
20936             .sign_and_dispatch(request, GetBucketVersioningError::from_response)
20937             .await?;
20938 
20939         let mut response = response;
20940         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20941             GetBucketVersioningOutputDeserializer::deserialize(actual_tag_name, stack)
20942         })
20943         .await?;
20944         let mut result = result;
20945         // parse non-payload
20946         Ok(result)
20947     }
20948 
20949     /// <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 action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketWebsite.html">DeleteBucketWebsite</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html">PutBucketWebsite</a> </p> </li> </ul></p>
20950     #[allow(unused_variables, warnings)]
get_bucket_website( &self, input: GetBucketWebsiteRequest, ) -> Result<GetBucketWebsiteOutput, RusotoError<GetBucketWebsiteError>>20951     async fn get_bucket_website(
20952         &self,
20953         input: GetBucketWebsiteRequest,
20954     ) -> Result<GetBucketWebsiteOutput, RusotoError<GetBucketWebsiteError>> {
20955         let request_uri = format!("/{bucket}", bucket = input.bucket);
20956 
20957         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20958 
20959         request.add_optional_header(
20960             "x-amz-expected-bucket-owner",
20961             input.expected_bucket_owner.as_ref(),
20962         );
20963         let mut params = Params::new();
20964         params.put_key("website");
20965         request.set_params(params);
20966 
20967         let mut response = self
20968             .sign_and_dispatch(request, GetBucketWebsiteError::from_response)
20969             .await?;
20970 
20971         let mut response = response;
20972         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
20973             GetBucketWebsiteOutputDeserializer::deserialize(actual_tag_name, stack)
20974         })
20975         .await?;
20976         let mut result = result;
20977         // parse non-payload
20978         Ok(result)
20979     }
20980 
20981     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html">GetObjectAcl</a>.</p> <p>If the object you are retrieving is stored in the S3 Glacier or S3 Glacier Deep Archive storage class, or S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep Archive tiers, before you can retrieve the object you must first restore a copy using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a>. Otherwise, this action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html">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 action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html">ListBuckets</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html">GetObjectAcl</a> </p> </li> </ul></p>
20982     #[allow(unused_variables, warnings)]
get_object( &self, input: GetObjectRequest, ) -> Result<GetObjectOutput, RusotoError<GetObjectError>>20983     async fn get_object(
20984         &self,
20985         input: GetObjectRequest,
20986     ) -> Result<GetObjectOutput, RusotoError<GetObjectError>> {
20987         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
20988 
20989         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
20990 
20991         request.add_optional_header(
20992             "x-amz-expected-bucket-owner",
20993             input.expected_bucket_owner.as_ref(),
20994         );
20995         request.add_optional_header("If-Match", input.if_match.as_ref());
20996         request.add_optional_header("If-Modified-Since", input.if_modified_since.as_ref());
20997         request.add_optional_header("If-None-Match", input.if_none_match.as_ref());
20998         request.add_optional_header("If-Unmodified-Since", input.if_unmodified_since.as_ref());
20999         request.add_optional_header("Range", input.range.as_ref());
21000         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
21001         request.add_optional_header(
21002             "x-amz-server-side-encryption-customer-algorithm",
21003             input.sse_customer_algorithm.as_ref(),
21004         );
21005         request.add_optional_header(
21006             "x-amz-server-side-encryption-customer-key",
21007             input.sse_customer_key.as_ref(),
21008         );
21009         request.add_optional_header(
21010             "x-amz-server-side-encryption-customer-key-MD5",
21011             input.sse_customer_key_md5.as_ref(),
21012         );
21013         let mut params = Params::new();
21014         if let Some(ref x) = input.part_number {
21015             params.put("partNumber", x);
21016         }
21017         if let Some(ref x) = input.response_cache_control {
21018             params.put("response-cache-control", x);
21019         }
21020         if let Some(ref x) = input.response_content_disposition {
21021             params.put("response-content-disposition", x);
21022         }
21023         if let Some(ref x) = input.response_content_encoding {
21024             params.put("response-content-encoding", x);
21025         }
21026         if let Some(ref x) = input.response_content_language {
21027             params.put("response-content-language", x);
21028         }
21029         if let Some(ref x) = input.response_content_type {
21030             params.put("response-content-type", x);
21031         }
21032         if let Some(ref x) = input.response_expires {
21033             params.put("response-expires", x);
21034         }
21035         if let Some(ref x) = input.version_id {
21036             params.put("versionId", x);
21037         }
21038         request.set_params(params);
21039 
21040         let mut response = self
21041             .sign_and_dispatch(request, GetObjectError::from_response)
21042             .await?;
21043 
21044         let mut result = GetObjectOutput::default();
21045         result.body = Some(response.body);
21046         result.accept_ranges = response.headers.remove("accept-ranges");
21047         result.bucket_key_enabled = response
21048             .headers
21049             .remove("x-amz-server-side-encryption-bucket-key-enabled")
21050             .map(|value| value.parse::<bool>().unwrap());
21051         result.cache_control = response.headers.remove("Cache-Control");
21052         result.content_disposition = response.headers.remove("Content-Disposition");
21053         result.content_encoding = response.headers.remove("Content-Encoding");
21054         result.content_language = response.headers.remove("Content-Language");
21055         result.content_length = response
21056             .headers
21057             .remove("Content-Length")
21058             .map(|value| value.parse::<i64>().unwrap());
21059         result.content_range = response.headers.remove("Content-Range");
21060         result.content_type = response.headers.remove("Content-Type");
21061         result.delete_marker = response
21062             .headers
21063             .remove("x-amz-delete-marker")
21064             .map(|value| value.parse::<bool>().unwrap());
21065         result.e_tag = response.headers.remove("ETag");
21066         result.expiration = response.headers.remove("x-amz-expiration");
21067         result.expires = response.headers.remove("Expires");
21068         result.last_modified = response.headers.remove("Last-Modified");
21069         let mut values = ::std::collections::HashMap::new();
21070         for (key, value) in response.headers.iter() {
21071             if key.as_str().starts_with("x-amz-meta-") {
21072                 values.insert(
21073                     key.as_str()["x-amz-meta-".len()..].to_owned(),
21074                     value.to_owned(),
21075                 );
21076             }
21077         }
21078         result.metadata = Some(values);
21079         result.missing_meta = response
21080             .headers
21081             .remove("x-amz-missing-meta")
21082             .map(|value| value.parse::<i64>().unwrap());
21083         result.object_lock_legal_hold_status =
21084             response.headers.remove("x-amz-object-lock-legal-hold");
21085         result.object_lock_mode = response.headers.remove("x-amz-object-lock-mode");
21086         result.object_lock_retain_until_date = response
21087             .headers
21088             .remove("x-amz-object-lock-retain-until-date");
21089         result.parts_count = response
21090             .headers
21091             .remove("x-amz-mp-parts-count")
21092             .map(|value| value.parse::<i64>().unwrap());
21093         result.replication_status = response.headers.remove("x-amz-replication-status");
21094         result.request_charged = response.headers.remove("x-amz-request-charged");
21095         result.restore = response.headers.remove("x-amz-restore");
21096         result.sse_customer_algorithm = response
21097             .headers
21098             .remove("x-amz-server-side-encryption-customer-algorithm");
21099         result.sse_customer_key_md5 = response
21100             .headers
21101             .remove("x-amz-server-side-encryption-customer-key-MD5");
21102         result.ssekms_key_id = response
21103             .headers
21104             .remove("x-amz-server-side-encryption-aws-kms-key-id");
21105         result.server_side_encryption = response.headers.remove("x-amz-server-side-encryption");
21106         result.storage_class = response.headers.remove("x-amz-storage-class");
21107         result.tag_count = response
21108             .headers
21109             .remove("x-amz-tagging-count")
21110             .map(|value| value.parse::<i64>().unwrap());
21111         result.version_id = response.headers.remove("x-amz-version-id");
21112         result.website_redirect_location =
21113             response.headers.remove("x-amz-website-redirect-location");
21114         Ok(result)
21115     }
21116 
21117     /// <p><p>Returns the access control list (ACL) of an object. To use this operation, you must have <code>READ<em>ACP</code> access to the object.</p> <p>This action is not supported by Amazon S3 on Outposts.</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> &lt;a href=&quot;https://docs.aws.amazon.com/AmazonS3/latest/API/API</em>GetObject.html&quot;&gt;GetObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> </ul></p>
21118     #[allow(unused_variables, warnings)]
get_object_acl( &self, input: GetObjectAclRequest, ) -> Result<GetObjectAclOutput, RusotoError<GetObjectAclError>>21119     async fn get_object_acl(
21120         &self,
21121         input: GetObjectAclRequest,
21122     ) -> Result<GetObjectAclOutput, RusotoError<GetObjectAclError>> {
21123         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
21124 
21125         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21126 
21127         request.add_optional_header(
21128             "x-amz-expected-bucket-owner",
21129             input.expected_bucket_owner.as_ref(),
21130         );
21131         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
21132         let mut params = Params::new();
21133         if let Some(ref x) = input.version_id {
21134             params.put("versionId", x);
21135         }
21136         params.put_key("acl");
21137         request.set_params(params);
21138 
21139         let mut response = self
21140             .sign_and_dispatch(request, GetObjectAclError::from_response)
21141             .await?;
21142 
21143         let mut response = response;
21144         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21145             GetObjectAclOutputDeserializer::deserialize(actual_tag_name, stack)
21146         })
21147         .await?;
21148         let mut result = result;
21149         result.request_charged = response.headers.remove("x-amz-request-charged"); // parse non-payload
21150         Ok(result)
21151     }
21152 
21153     /// <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> <p>This action is not supported by Amazon S3 on Outposts.</p>
21154     #[allow(unused_variables, warnings)]
get_object_legal_hold( &self, input: GetObjectLegalHoldRequest, ) -> Result<GetObjectLegalHoldOutput, RusotoError<GetObjectLegalHoldError>>21155     async fn get_object_legal_hold(
21156         &self,
21157         input: GetObjectLegalHoldRequest,
21158     ) -> Result<GetObjectLegalHoldOutput, RusotoError<GetObjectLegalHoldError>> {
21159         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
21160 
21161         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21162 
21163         request.add_optional_header(
21164             "x-amz-expected-bucket-owner",
21165             input.expected_bucket_owner.as_ref(),
21166         );
21167         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
21168         let mut params = Params::new();
21169         if let Some(ref x) = input.version_id {
21170             params.put("versionId", x);
21171         }
21172         params.put_key("legal-hold");
21173         request.set_params(params);
21174 
21175         let mut response = self
21176             .sign_and_dispatch(request, GetObjectLegalHoldError::from_response)
21177             .await?;
21178 
21179         let mut response = response;
21180         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21181             GetObjectLegalHoldOutputDeserializer::deserialize(actual_tag_name, stack)
21182         })
21183         .await?;
21184         let mut result = result;
21185         // parse non-payload
21186         Ok(result)
21187     }
21188 
21189     /// <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>
21190     #[allow(unused_variables, warnings)]
get_object_lock_configuration( &self, input: GetObjectLockConfigurationRequest, ) -> Result<GetObjectLockConfigurationOutput, RusotoError<GetObjectLockConfigurationError>>21191     async fn get_object_lock_configuration(
21192         &self,
21193         input: GetObjectLockConfigurationRequest,
21194     ) -> Result<GetObjectLockConfigurationOutput, RusotoError<GetObjectLockConfigurationError>>
21195     {
21196         let request_uri = format!("/{bucket}", bucket = input.bucket);
21197 
21198         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21199 
21200         request.add_optional_header(
21201             "x-amz-expected-bucket-owner",
21202             input.expected_bucket_owner.as_ref(),
21203         );
21204         let mut params = Params::new();
21205         params.put_key("object-lock");
21206         request.set_params(params);
21207 
21208         let mut response = self
21209             .sign_and_dispatch(request, GetObjectLockConfigurationError::from_response)
21210             .await?;
21211 
21212         let mut response = response;
21213         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21214             GetObjectLockConfigurationOutputDeserializer::deserialize(actual_tag_name, stack)
21215         })
21216         .await?;
21217         let mut result = result;
21218         // parse non-payload
21219         Ok(result)
21220     }
21221 
21222     /// <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> <p>This action is not supported by Amazon S3 on Outposts.</p>
21223     #[allow(unused_variables, warnings)]
get_object_retention( &self, input: GetObjectRetentionRequest, ) -> Result<GetObjectRetentionOutput, RusotoError<GetObjectRetentionError>>21224     async fn get_object_retention(
21225         &self,
21226         input: GetObjectRetentionRequest,
21227     ) -> Result<GetObjectRetentionOutput, RusotoError<GetObjectRetentionError>> {
21228         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
21229 
21230         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21231 
21232         request.add_optional_header(
21233             "x-amz-expected-bucket-owner",
21234             input.expected_bucket_owner.as_ref(),
21235         );
21236         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
21237         let mut params = Params::new();
21238         if let Some(ref x) = input.version_id {
21239             params.put("versionId", x);
21240         }
21241         params.put_key("retention");
21242         request.set_params(params);
21243 
21244         let mut response = self
21245             .sign_and_dispatch(request, GetObjectRetentionError::from_response)
21246             .await?;
21247 
21248         let mut response = response;
21249         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21250             GetObjectRetentionOutputDeserializer::deserialize(actual_tag_name, stack)
21251         })
21252         .await?;
21253         let mut result = result;
21254         // parse non-payload
21255         Ok(result)
21256     }
21257 
21258     /// <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 action 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 action is related to <code>GetObjectTagging</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html">PutObjectTagging</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html">DeleteObjectTagging</a> </p> </li> </ul></p>
21259     #[allow(unused_variables, warnings)]
get_object_tagging( &self, input: GetObjectTaggingRequest, ) -> Result<GetObjectTaggingOutput, RusotoError<GetObjectTaggingError>>21260     async fn get_object_tagging(
21261         &self,
21262         input: GetObjectTaggingRequest,
21263     ) -> Result<GetObjectTaggingOutput, RusotoError<GetObjectTaggingError>> {
21264         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
21265 
21266         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21267 
21268         request.add_optional_header(
21269             "x-amz-expected-bucket-owner",
21270             input.expected_bucket_owner.as_ref(),
21271         );
21272         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
21273         let mut params = Params::new();
21274         if let Some(ref x) = input.version_id {
21275             params.put("versionId", x);
21276         }
21277         params.put_key("tagging");
21278         request.set_params(params);
21279 
21280         let mut response = self
21281             .sign_and_dispatch(request, GetObjectTaggingError::from_response)
21282             .await?;
21283 
21284         let mut response = response;
21285         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21286             GetObjectTaggingOutputDeserializer::deserialize(actual_tag_name, stack)
21287         })
21288         .await?;
21289         let mut result = result;
21290         result.version_id = response.headers.remove("x-amz-version-id"); // parse non-payload
21291         Ok(result)
21292     }
21293 
21294     /// <p><p>Returns 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">Using BitTorrent with Amazon S3</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 a customer-provided encryption key.</p> </note> <p>To use GET, you must have READ access to the object.</p> <p>This action is not supported by Amazon S3 on Outposts.</p> <p>The following action is related to <code>GetObjectTorrent</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> </ul></p>
21295     #[allow(unused_variables, warnings)]
get_object_torrent( &self, input: GetObjectTorrentRequest, ) -> Result<GetObjectTorrentOutput, RusotoError<GetObjectTorrentError>>21296     async fn get_object_torrent(
21297         &self,
21298         input: GetObjectTorrentRequest,
21299     ) -> Result<GetObjectTorrentOutput, RusotoError<GetObjectTorrentError>> {
21300         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
21301 
21302         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21303 
21304         request.add_optional_header(
21305             "x-amz-expected-bucket-owner",
21306             input.expected_bucket_owner.as_ref(),
21307         );
21308         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
21309         let mut params = Params::new();
21310         params.put_key("torrent");
21311         request.set_params(params);
21312 
21313         let mut response = self
21314             .sign_and_dispatch(request, GetObjectTorrentError::from_response)
21315             .await?;
21316 
21317         let mut result = GetObjectTorrentOutput::default();
21318         result.body = Some(response.body);
21319         result.request_charged = response.headers.remove("x-amz-request-charged");
21320         Ok(result)
21321     }
21322 
21323     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html">PutPublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html">GetPublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html">DeletePublicAccessBlock</a> </p> </li> </ul></p>
21324     #[allow(unused_variables, warnings)]
get_public_access_block( &self, input: GetPublicAccessBlockRequest, ) -> Result<GetPublicAccessBlockOutput, RusotoError<GetPublicAccessBlockError>>21325     async fn get_public_access_block(
21326         &self,
21327         input: GetPublicAccessBlockRequest,
21328     ) -> Result<GetPublicAccessBlockOutput, RusotoError<GetPublicAccessBlockError>> {
21329         let request_uri = format!("/{bucket}", bucket = input.bucket);
21330 
21331         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21332 
21333         request.add_optional_header(
21334             "x-amz-expected-bucket-owner",
21335             input.expected_bucket_owner.as_ref(),
21336         );
21337         let mut params = Params::new();
21338         params.put_key("publicAccessBlock");
21339         request.set_params(params);
21340 
21341         let mut response = self
21342             .sign_and_dispatch(request, GetPublicAccessBlockError::from_response)
21343             .await?;
21344 
21345         let mut response = response;
21346         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21347             GetPublicAccessBlockOutputDeserializer::deserialize(actual_tag_name, stack)
21348         })
21349         .await?;
21350         let mut result = result;
21351         // parse non-payload
21352         Ok(result)
21353     }
21354 
21355     /// <p>This action is useful to determine if a bucket exists and you have permission to access it. The action returns a <code>200 OK</code> if the bucket exists and you have permission to access it.</p> <p>If the bucket does not exist or you do not have permission to access it, the <code>HEAD</code> request returns a generic <code>404 Not Found</code> or <code>403 Forbidden</code> code. A message body is not included, so you cannot determine the exception beyond these error codes.</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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p>
21356     #[allow(unused_variables, warnings)]
head_bucket( &self, input: HeadBucketRequest, ) -> Result<(), RusotoError<HeadBucketError>>21357     async fn head_bucket(
21358         &self,
21359         input: HeadBucketRequest,
21360     ) -> Result<(), RusotoError<HeadBucketError>> {
21361         let request_uri = format!("/{bucket}", bucket = input.bucket);
21362 
21363         let mut request = SignedRequest::new("HEAD", "s3", &self.region, &request_uri);
21364 
21365         request.add_optional_header(
21366             "x-amz-expected-bucket-owner",
21367             input.expected_bucket_owner.as_ref(),
21368         );
21369 
21370         let mut response = self
21371             .sign_and_dispatch(request, HeadBucketError::from_response)
21372             .await?;
21373 
21374         std::mem::drop(response);
21375         Ok(())
21376     }
21377 
21378     /// <p><p>The HEAD action retrieves metadata from an object without returning the object itself. This action 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> action on an object. The response is identical to the <code>GET</code> response except that there is no response body. Because of this, if the <code>HEAD</code> request generates an error, it returns a generic <code>404 Not Found</code> or <code>403 Forbidden</code> code. It is not possible to retrieve the exact exception beyond these error codes.</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> <ul> <li> <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> </li> <li> <p> The last modified property in this case is the creation date of the object.</p> </li> </ul> </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 action is related to <code>HeadObject</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> </ul></p>
21379     #[allow(unused_variables, warnings)]
head_object( &self, input: HeadObjectRequest, ) -> Result<HeadObjectOutput, RusotoError<HeadObjectError>>21380     async fn head_object(
21381         &self,
21382         input: HeadObjectRequest,
21383     ) -> Result<HeadObjectOutput, RusotoError<HeadObjectError>> {
21384         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
21385 
21386         let mut request = SignedRequest::new("HEAD", "s3", &self.region, &request_uri);
21387 
21388         request.add_optional_header(
21389             "x-amz-expected-bucket-owner",
21390             input.expected_bucket_owner.as_ref(),
21391         );
21392         request.add_optional_header("If-Match", input.if_match.as_ref());
21393         request.add_optional_header("If-Modified-Since", input.if_modified_since.as_ref());
21394         request.add_optional_header("If-None-Match", input.if_none_match.as_ref());
21395         request.add_optional_header("If-Unmodified-Since", input.if_unmodified_since.as_ref());
21396         request.add_optional_header("Range", input.range.as_ref());
21397         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
21398         request.add_optional_header(
21399             "x-amz-server-side-encryption-customer-algorithm",
21400             input.sse_customer_algorithm.as_ref(),
21401         );
21402         request.add_optional_header(
21403             "x-amz-server-side-encryption-customer-key",
21404             input.sse_customer_key.as_ref(),
21405         );
21406         request.add_optional_header(
21407             "x-amz-server-side-encryption-customer-key-MD5",
21408             input.sse_customer_key_md5.as_ref(),
21409         );
21410         let mut params = Params::new();
21411         if let Some(ref x) = input.part_number {
21412             params.put("partNumber", x);
21413         }
21414         if let Some(ref x) = input.version_id {
21415             params.put("versionId", x);
21416         }
21417         request.set_params(params);
21418 
21419         let mut response = self
21420             .sign_and_dispatch(request, HeadObjectError::from_response)
21421             .await?;
21422 
21423         let result = HeadObjectOutput::default();
21424         let mut result = result;
21425         result.accept_ranges = response.headers.remove("accept-ranges");
21426         result.archive_status = response.headers.remove("x-amz-archive-status");
21427         result.bucket_key_enabled = response
21428             .headers
21429             .remove("x-amz-server-side-encryption-bucket-key-enabled")
21430             .map(|value| value.parse::<bool>().unwrap());
21431         result.cache_control = response.headers.remove("Cache-Control");
21432         result.content_disposition = response.headers.remove("Content-Disposition");
21433         result.content_encoding = response.headers.remove("Content-Encoding");
21434         result.content_language = response.headers.remove("Content-Language");
21435         result.content_length = response
21436             .headers
21437             .remove("Content-Length")
21438             .map(|value| value.parse::<i64>().unwrap());
21439         result.content_type = response.headers.remove("Content-Type");
21440         result.delete_marker = response
21441             .headers
21442             .remove("x-amz-delete-marker")
21443             .map(|value| value.parse::<bool>().unwrap());
21444         result.e_tag = response.headers.remove("ETag");
21445         result.expiration = response.headers.remove("x-amz-expiration");
21446         result.expires = response.headers.remove("Expires");
21447         result.last_modified = response.headers.remove("Last-Modified");
21448         let mut values = ::std::collections::HashMap::new();
21449         for (key, value) in response.headers.iter() {
21450             if key.as_str().starts_with("x-amz-meta-") {
21451                 values.insert(
21452                     key.as_str()["x-amz-meta-".len()..].to_owned(),
21453                     value.to_owned(),
21454                 );
21455             }
21456         }
21457         result.metadata = Some(values);
21458         result.missing_meta = response
21459             .headers
21460             .remove("x-amz-missing-meta")
21461             .map(|value| value.parse::<i64>().unwrap());
21462         result.object_lock_legal_hold_status =
21463             response.headers.remove("x-amz-object-lock-legal-hold");
21464         result.object_lock_mode = response.headers.remove("x-amz-object-lock-mode");
21465         result.object_lock_retain_until_date = response
21466             .headers
21467             .remove("x-amz-object-lock-retain-until-date");
21468         result.parts_count = response
21469             .headers
21470             .remove("x-amz-mp-parts-count")
21471             .map(|value| value.parse::<i64>().unwrap());
21472         result.replication_status = response.headers.remove("x-amz-replication-status");
21473         result.request_charged = response.headers.remove("x-amz-request-charged");
21474         result.restore = response.headers.remove("x-amz-restore");
21475         result.sse_customer_algorithm = response
21476             .headers
21477             .remove("x-amz-server-side-encryption-customer-algorithm");
21478         result.sse_customer_key_md5 = response
21479             .headers
21480             .remove("x-amz-server-side-encryption-customer-key-MD5");
21481         result.ssekms_key_id = response
21482             .headers
21483             .remove("x-amz-server-side-encryption-aws-kms-key-id");
21484         result.server_side_encryption = response.headers.remove("x-amz-server-side-encryption");
21485         result.storage_class = response.headers.remove("x-amz-storage-class");
21486         result.version_id = response.headers.remove("x-amz-version-id");
21487         result.website_redirect_location =
21488             response.headers.remove("x-amz-website-redirect-location"); // parse non-payload
21489         Ok(result)
21490     }
21491 
21492     /// <p><p>Lists the analytics configurations for the bucket. You can have up to 1,000 analytics configurations per bucket.</p> <p>This action 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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html">GetBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html">DeleteBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html">PutBucketAnalyticsConfiguration</a> </p> </li> </ul></p>
21493     #[allow(unused_variables, warnings)]
list_bucket_analytics_configurations( &self, input: ListBucketAnalyticsConfigurationsRequest, ) -> Result< ListBucketAnalyticsConfigurationsOutput, RusotoError<ListBucketAnalyticsConfigurationsError>, >21494     async fn list_bucket_analytics_configurations(
21495         &self,
21496         input: ListBucketAnalyticsConfigurationsRequest,
21497     ) -> Result<
21498         ListBucketAnalyticsConfigurationsOutput,
21499         RusotoError<ListBucketAnalyticsConfigurationsError>,
21500     > {
21501         let request_uri = format!("/{bucket}", bucket = input.bucket);
21502 
21503         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21504 
21505         request.add_optional_header(
21506             "x-amz-expected-bucket-owner",
21507             input.expected_bucket_owner.as_ref(),
21508         );
21509         let mut params = Params::new();
21510         if let Some(ref x) = input.continuation_token {
21511             params.put("continuation-token", x);
21512         }
21513         params.put_key("analytics");
21514         request.set_params(params);
21515 
21516         let mut response = self
21517             .sign_and_dispatch(
21518                 request,
21519                 ListBucketAnalyticsConfigurationsError::from_response,
21520             )
21521             .await?;
21522 
21523         let mut response = response;
21524         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21525             ListBucketAnalyticsConfigurationsOutputDeserializer::deserialize(actual_tag_name, stack)
21526         })
21527         .await?;
21528         let mut result = result;
21529         // parse non-payload
21530         Ok(result)
21531     }
21532 
21533     /// <p><p>Lists the S3 Intelligent-Tiering configuration from the specified bucket.</p> <p>The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without additional operational overhead. S3 Intelligent-Tiering delivers automatic cost savings by moving data between access tiers, when access patterns change.</p> <p>The S3 Intelligent-Tiering storage class is suitable for objects larger than 128 KB that you plan to store for at least 30 days. If the size of an object is less than 128 KB, it is not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the frequent access tier rates in the S3 Intelligent-Tiering storage class. </p> <p>If you delete an object before the end of the 30-day minimum storage duration period, you are charged for 30 days. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access">Storage class for automatically optimizing frequently and infrequently accessed objects</a>.</p> <p>Operations related to <code>ListBucketIntelligentTieringConfigurations</code> include: </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html">DeleteBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html">PutBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html">GetBucketIntelligentTieringConfiguration</a> </p> </li> </ul></p>
21534     #[allow(unused_variables, warnings)]
list_bucket_intelligent_tiering_configurations( &self, input: ListBucketIntelligentTieringConfigurationsRequest, ) -> Result< ListBucketIntelligentTieringConfigurationsOutput, RusotoError<ListBucketIntelligentTieringConfigurationsError>, >21535     async fn list_bucket_intelligent_tiering_configurations(
21536         &self,
21537         input: ListBucketIntelligentTieringConfigurationsRequest,
21538     ) -> Result<
21539         ListBucketIntelligentTieringConfigurationsOutput,
21540         RusotoError<ListBucketIntelligentTieringConfigurationsError>,
21541     > {
21542         let request_uri = format!("/{bucket}", bucket = input.bucket);
21543 
21544         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21545 
21546         let mut params = Params::new();
21547         if let Some(ref x) = input.continuation_token {
21548             params.put("continuation-token", x);
21549         }
21550         params.put_key("intelligent-tiering");
21551         request.set_params(params);
21552 
21553         let mut response = self
21554             .sign_and_dispatch(
21555                 request,
21556                 ListBucketIntelligentTieringConfigurationsError::from_response,
21557             )
21558             .await?;
21559 
21560         let mut response = response;
21561         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21562             ListBucketIntelligentTieringConfigurationsOutputDeserializer::deserialize(
21563                 actual_tag_name,
21564                 stack,
21565             )
21566         })
21567         .await?;
21568         let mut result = result;
21569         // parse non-payload
21570         Ok(result)
21571     }
21572 
21573     /// <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 action 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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html">GetBucketInventoryConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html">DeleteBucketInventoryConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html">PutBucketInventoryConfiguration</a> </p> </li> </ul></p>
21574     #[allow(unused_variables, warnings)]
list_bucket_inventory_configurations( &self, input: ListBucketInventoryConfigurationsRequest, ) -> Result< ListBucketInventoryConfigurationsOutput, RusotoError<ListBucketInventoryConfigurationsError>, >21575     async fn list_bucket_inventory_configurations(
21576         &self,
21577         input: ListBucketInventoryConfigurationsRequest,
21578     ) -> Result<
21579         ListBucketInventoryConfigurationsOutput,
21580         RusotoError<ListBucketInventoryConfigurationsError>,
21581     > {
21582         let request_uri = format!("/{bucket}", bucket = input.bucket);
21583 
21584         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21585 
21586         request.add_optional_header(
21587             "x-amz-expected-bucket-owner",
21588             input.expected_bucket_owner.as_ref(),
21589         );
21590         let mut params = Params::new();
21591         if let Some(ref x) = input.continuation_token {
21592             params.put("continuation-token", x);
21593         }
21594         params.put_key("inventory");
21595         request.set_params(params);
21596 
21597         let mut response = self
21598             .sign_and_dispatch(
21599                 request,
21600                 ListBucketInventoryConfigurationsError::from_response,
21601             )
21602             .await?;
21603 
21604         let mut response = response;
21605         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21606             ListBucketInventoryConfigurationsOutputDeserializer::deserialize(actual_tag_name, stack)
21607         })
21608         .await?;
21609         let mut result = result;
21610         // parse non-payload
21611         Ok(result)
21612     }
21613 
21614     /// <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 action 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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html">PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html">GetBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html">DeleteBucketMetricsConfiguration</a> </p> </li> </ul></p>
21615     #[allow(unused_variables, warnings)]
list_bucket_metrics_configurations( &self, input: ListBucketMetricsConfigurationsRequest, ) -> Result< ListBucketMetricsConfigurationsOutput, RusotoError<ListBucketMetricsConfigurationsError>, >21616     async fn list_bucket_metrics_configurations(
21617         &self,
21618         input: ListBucketMetricsConfigurationsRequest,
21619     ) -> Result<
21620         ListBucketMetricsConfigurationsOutput,
21621         RusotoError<ListBucketMetricsConfigurationsError>,
21622     > {
21623         let request_uri = format!("/{bucket}", bucket = input.bucket);
21624 
21625         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21626 
21627         request.add_optional_header(
21628             "x-amz-expected-bucket-owner",
21629             input.expected_bucket_owner.as_ref(),
21630         );
21631         let mut params = Params::new();
21632         if let Some(ref x) = input.continuation_token {
21633             params.put("continuation-token", x);
21634         }
21635         params.put_key("metrics");
21636         request.set_params(params);
21637 
21638         let mut response = self
21639             .sign_and_dispatch(request, ListBucketMetricsConfigurationsError::from_response)
21640             .await?;
21641 
21642         let mut response = response;
21643         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21644             ListBucketMetricsConfigurationsOutputDeserializer::deserialize(actual_tag_name, stack)
21645         })
21646         .await?;
21647         let mut result = result;
21648         // parse non-payload
21649         Ok(result)
21650     }
21651 
21652     /// <p>Returns a list of all buckets owned by the authenticated sender of the request.</p>
21653     #[allow(unused_variables, warnings)]
list_buckets(&self) -> Result<ListBucketsOutput, RusotoError<ListBucketsError>>21654     async fn list_buckets(&self) -> Result<ListBucketsOutput, RusotoError<ListBucketsError>> {
21655         let request_uri = "/";
21656 
21657         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21658 
21659         let mut response = self
21660             .sign_and_dispatch(request, ListBucketsError::from_response)
21661             .await?;
21662 
21663         let mut response = response;
21664         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21665             ListBucketsOutputDeserializer::deserialize(actual_tag_name, stack)
21666         })
21667         .await?;
21668         let mut result = result;
21669         // parse non-payload
21670         Ok(result)
21671     }
21672 
21673     /// <p><p>This action 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 action 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 and Permissions</a>.</p> <p>The following operations are related to <code>ListMultipartUploads</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> </p> </li> </ul></p>
21674     #[allow(unused_variables, warnings)]
list_multipart_uploads( &self, input: ListMultipartUploadsRequest, ) -> Result<ListMultipartUploadsOutput, RusotoError<ListMultipartUploadsError>>21675     async fn list_multipart_uploads(
21676         &self,
21677         input: ListMultipartUploadsRequest,
21678     ) -> Result<ListMultipartUploadsOutput, RusotoError<ListMultipartUploadsError>> {
21679         let request_uri = format!("/{bucket}", bucket = input.bucket);
21680 
21681         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21682 
21683         request.add_optional_header(
21684             "x-amz-expected-bucket-owner",
21685             input.expected_bucket_owner.as_ref(),
21686         );
21687         let mut params = Params::new();
21688         if let Some(ref x) = input.delimiter {
21689             params.put("delimiter", x);
21690         }
21691         if let Some(ref x) = input.encoding_type {
21692             params.put("encoding-type", x);
21693         }
21694         if let Some(ref x) = input.key_marker {
21695             params.put("key-marker", x);
21696         }
21697         if let Some(ref x) = input.max_uploads {
21698             params.put("max-uploads", x);
21699         }
21700         if let Some(ref x) = input.prefix {
21701             params.put("prefix", x);
21702         }
21703         if let Some(ref x) = input.upload_id_marker {
21704             params.put("upload-id-marker", x);
21705         }
21706         params.put_key("uploads");
21707         request.set_params(params);
21708 
21709         let mut response = self
21710             .sign_and_dispatch(request, ListMultipartUploadsError::from_response)
21711             .await?;
21712 
21713         let mut response = response;
21714         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21715             ListMultipartUploadsOutputDeserializer::deserialize(actual_tag_name, stack)
21716         })
21717         .await?;
21718         let mut result = result;
21719         // parse non-payload
21720         Ok(result)
21721     }
21722 
21723     /// <p><p>Returns metadata about all versions of the 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> <important> <p> To use this operation, you must have permissions to perform the <code>s3:ListBucketVersions</code> action. Be aware of the name difference. </p> </important> <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>This action is not supported by Amazon S3 on Outposts.</p> <p>The following operations are related to <code>ListObjectVersions</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html">ListObjectsV2</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a> </p> </li> </ul></p>
21724     #[allow(unused_variables, warnings)]
list_object_versions( &self, input: ListObjectVersionsRequest, ) -> Result<ListObjectVersionsOutput, RusotoError<ListObjectVersionsError>>21725     async fn list_object_versions(
21726         &self,
21727         input: ListObjectVersionsRequest,
21728     ) -> Result<ListObjectVersionsOutput, RusotoError<ListObjectVersionsError>> {
21729         let request_uri = format!("/{bucket}", bucket = input.bucket);
21730 
21731         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21732 
21733         request.add_optional_header(
21734             "x-amz-expected-bucket-owner",
21735             input.expected_bucket_owner.as_ref(),
21736         );
21737         let mut params = Params::new();
21738         if let Some(ref x) = input.delimiter {
21739             params.put("delimiter", x);
21740         }
21741         if let Some(ref x) = input.encoding_type {
21742             params.put("encoding-type", x);
21743         }
21744         if let Some(ref x) = input.key_marker {
21745             params.put("key-marker", x);
21746         }
21747         if let Some(ref x) = input.max_keys {
21748             params.put("max-keys", x);
21749         }
21750         if let Some(ref x) = input.prefix {
21751             params.put("prefix", x);
21752         }
21753         if let Some(ref x) = input.version_id_marker {
21754             params.put("version-id-marker", x);
21755         }
21756         params.put_key("versions");
21757         request.set_params(params);
21758 
21759         let mut response = self
21760             .sign_and_dispatch(request, ListObjectVersionsError::from_response)
21761             .await?;
21762 
21763         let mut response = response;
21764         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21765             ListObjectVersionsOutputDeserializer::deserialize(actual_tag_name, stack)
21766         })
21767         .await?;
21768         let mut result = result;
21769         // parse non-payload
21770         Ok(result)
21771     }
21772 
21773     /// <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 action has been revised. We recommend that you use the newer version, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html">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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html">ListObjectsV2</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html">ListBuckets</a> </p> </li> </ul></p>
21774     #[allow(unused_variables, warnings)]
list_objects( &self, input: ListObjectsRequest, ) -> Result<ListObjectsOutput, RusotoError<ListObjectsError>>21775     async fn list_objects(
21776         &self,
21777         input: ListObjectsRequest,
21778     ) -> Result<ListObjectsOutput, RusotoError<ListObjectsError>> {
21779         let request_uri = format!("/{bucket}", bucket = input.bucket);
21780 
21781         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21782 
21783         request.add_optional_header(
21784             "x-amz-expected-bucket-owner",
21785             input.expected_bucket_owner.as_ref(),
21786         );
21787         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
21788         let mut params = Params::new();
21789         if let Some(ref x) = input.delimiter {
21790             params.put("delimiter", x);
21791         }
21792         if let Some(ref x) = input.encoding_type {
21793             params.put("encoding-type", x);
21794         }
21795         if let Some(ref x) = input.marker {
21796             params.put("marker", x);
21797         }
21798         if let Some(ref x) = input.max_keys {
21799             params.put("max-keys", x);
21800         }
21801         if let Some(ref x) = input.prefix {
21802             params.put("prefix", x);
21803         }
21804         request.set_params(params);
21805 
21806         let mut response = self
21807             .sign_and_dispatch(request, ListObjectsError::from_response)
21808             .await?;
21809 
21810         let mut response = response;
21811         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21812             ListObjectsOutputDeserializer::deserialize(actual_tag_name, stack)
21813         })
21814         .await?;
21815         let mut result = result;
21816         // parse non-payload
21817         Ok(result)
21818     }
21819 
21820     /// <p><p>Returns some or all (up to 1,000) of the objects in a bucket with each request. 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. Objects are returned sorted in an ascending order of the respective key names in the list. For more information about listing objects, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html">Listing object keys programmatically</a> </p> <p>To use this operation, you must have READ access to the bucket.</p> <p>To use this action 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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a>.</p> <important> <p>This section describes the latest revision of this action. 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html">ListObjects</a>.</p> </important> <p>To get a list of your buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html">ListBuckets</a>.</p> <p>The following operations are related to <code>ListObjectsV2</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> </ul></p>
21821     #[allow(unused_variables, warnings)]
list_objects_v2( &self, input: ListObjectsV2Request, ) -> Result<ListObjectsV2Output, RusotoError<ListObjectsV2Error>>21822     async fn list_objects_v2(
21823         &self,
21824         input: ListObjectsV2Request,
21825     ) -> Result<ListObjectsV2Output, RusotoError<ListObjectsV2Error>> {
21826         let request_uri = format!("/{bucket}", bucket = input.bucket);
21827 
21828         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21829 
21830         request.add_optional_header(
21831             "x-amz-expected-bucket-owner",
21832             input.expected_bucket_owner.as_ref(),
21833         );
21834         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
21835         let mut params = Params::new();
21836         if let Some(ref x) = input.continuation_token {
21837             params.put("continuation-token", x);
21838         }
21839         if let Some(ref x) = input.delimiter {
21840             params.put("delimiter", x);
21841         }
21842         if let Some(ref x) = input.encoding_type {
21843             params.put("encoding-type", x);
21844         }
21845         if let Some(ref x) = input.fetch_owner {
21846             params.put("fetch-owner", x);
21847         }
21848         if let Some(ref x) = input.max_keys {
21849             params.put("max-keys", x);
21850         }
21851         if let Some(ref x) = input.prefix {
21852             params.put("prefix", x);
21853         }
21854         if let Some(ref x) = input.start_after {
21855             params.put("start-after", x);
21856         }
21857         params.put("list-type", "2");
21858         request.set_params(params);
21859 
21860         let mut response = self
21861             .sign_and_dispatch(request, ListObjectsV2Error::from_response)
21862             .await?;
21863 
21864         let mut response = response;
21865         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21866             ListObjectsV2OutputDeserializer::deserialize(actual_tag_name, stack)
21867         })
21868         .await?;
21869         let mut result = result;
21870         // parse non-payload
21871         Ok(result)
21872     }
21873 
21874     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">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 and Permissions</a>.</p> <p>The following operations are related to <code>ListParts</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a> </p> </li> </ul></p>
21875     #[allow(unused_variables, warnings)]
list_parts( &self, input: ListPartsRequest, ) -> Result<ListPartsOutput, RusotoError<ListPartsError>>21876     async fn list_parts(
21877         &self,
21878         input: ListPartsRequest,
21879     ) -> Result<ListPartsOutput, RusotoError<ListPartsError>> {
21880         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
21881 
21882         let mut request = SignedRequest::new("GET", "s3", &self.region, &request_uri);
21883 
21884         request.add_optional_header(
21885             "x-amz-expected-bucket-owner",
21886             input.expected_bucket_owner.as_ref(),
21887         );
21888         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
21889         let mut params = Params::new();
21890         if let Some(ref x) = input.max_parts {
21891             params.put("max-parts", x);
21892         }
21893         if let Some(ref x) = input.part_number_marker {
21894             params.put("part-number-marker", x);
21895         }
21896         params.put("uploadId", &input.upload_id);
21897         request.set_params(params);
21898 
21899         let mut response = self
21900             .sign_and_dispatch(request, ListPartsError::from_response)
21901             .await?;
21902 
21903         let mut response = response;
21904         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
21905             ListPartsOutputDeserializer::deserialize(actual_tag_name, stack)
21906         })
21907         .await?;
21908         let mut result = result;
21909         result.abort_date = response.headers.remove("x-amz-abort-date");
21910         result.abort_rule_id = response.headers.remove("x-amz-abort-rule-id");
21911         result.request_charged = response.headers.remove("x-amz-request-charged"); // parse non-payload
21912         Ok(result)
21913     }
21914 
21915     /// <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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html">GetBucketAccelerateConfiguration</a> action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html">GetBucketAccelerateConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> </ul></p>
21916     #[allow(unused_variables, warnings)]
put_bucket_accelerate_configuration( &self, input: PutBucketAccelerateConfigurationRequest, ) -> Result<(), RusotoError<PutBucketAccelerateConfigurationError>>21917     async fn put_bucket_accelerate_configuration(
21918         &self,
21919         input: PutBucketAccelerateConfigurationRequest,
21920     ) -> Result<(), RusotoError<PutBucketAccelerateConfigurationError>> {
21921         let request_uri = format!("/{bucket}", bucket = input.bucket);
21922 
21923         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
21924 
21925         request.add_optional_header(
21926             "x-amz-expected-bucket-owner",
21927             input.expected_bucket_owner.as_ref(),
21928         );
21929         let mut params = Params::new();
21930         params.put_key("accelerate");
21931         request.set_params(params);
21932         let mut writer = EventWriter::new(Vec::new());
21933         AccelerateConfigurationSerializer::serialize(
21934             &mut writer,
21935             "AccelerateConfiguration",
21936             &input.accelerate_configuration,
21937         );
21938         request.set_payload(Some(writer.into_inner()));
21939 
21940         let mut response = self
21941             .sign_and_dispatch(
21942                 request,
21943                 PutBucketAccelerateConfigurationError::from_response,
21944             )
21945             .await?;
21946 
21947         std::mem::drop(response);
21948         Ok(())
21949     }
21950 
21951     /// <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<em>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>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> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> <note> <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>Europe (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 &lt;a href=&quot;https://docs.aws.amazon.com/general/latest/gr/rande.html#s3</em>region&quot;&gt;Regions and Endpoints</a> in the AWS General Reference.</p> </note> </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;, id=&quot;111122223333&quot;, id=&quot;555566667777&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 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> <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> <note> <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>Europe (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> </note> </li> </ul> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html">DeleteBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html">GetObjectAcl</a> </p> </li> </ul></p>
21952     #[allow(unused_variables, warnings)]
put_bucket_acl( &self, input: PutBucketAclRequest, ) -> Result<(), RusotoError<PutBucketAclError>>21953     async fn put_bucket_acl(
21954         &self,
21955         input: PutBucketAclRequest,
21956     ) -> Result<(), RusotoError<PutBucketAclError>> {
21957         let request_uri = format!("/{bucket}", bucket = input.bucket);
21958 
21959         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
21960 
21961         request.add_optional_header("x-amz-acl", input.acl.as_ref());
21962         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
21963         request.add_optional_header(
21964             "x-amz-expected-bucket-owner",
21965             input.expected_bucket_owner.as_ref(),
21966         );
21967         request.add_optional_header(
21968             "x-amz-grant-full-control",
21969             input.grant_full_control.as_ref(),
21970         );
21971         request.add_optional_header("x-amz-grant-read", input.grant_read.as_ref());
21972         request.add_optional_header("x-amz-grant-read-acp", input.grant_read_acp.as_ref());
21973         request.add_optional_header("x-amz-grant-write", input.grant_write.as_ref());
21974         request.add_optional_header("x-amz-grant-write-acp", input.grant_write_acp.as_ref());
21975         let mut params = Params::new();
21976         params.put_key("acl");
21977         request.set_params(params);
21978         if input.access_control_policy.is_some() {
21979             let mut writer = EventWriter::new(Vec::new());
21980             AccessControlPolicySerializer::serialize(
21981                 &mut writer,
21982                 "AccessControlPolicy",
21983                 input.access_control_policy.as_ref().unwrap(),
21984             );
21985             request.set_payload(Some(writer.into_inner()));
21986         } else {
21987             request.set_payload(Some(Vec::new()));
21988         }
21989         request.maybe_set_content_md5_header();
21990 
21991         let mut response = self
21992             .sign_and_dispatch(request, PutBucketAclError::from_response)
21993             .await?;
21994 
21995         std::mem::drop(response);
21996         Ok(())
21997     }
21998 
21999     /// <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/userguide/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/userguide/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> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html">GetBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html">DeleteBucketAnalyticsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html">ListBucketAnalyticsConfigurations</a> </p> </li> </ul></p>
22000     #[allow(unused_variables, warnings)]
put_bucket_analytics_configuration( &self, input: PutBucketAnalyticsConfigurationRequest, ) -> Result<(), RusotoError<PutBucketAnalyticsConfigurationError>>22001     async fn put_bucket_analytics_configuration(
22002         &self,
22003         input: PutBucketAnalyticsConfigurationRequest,
22004     ) -> Result<(), RusotoError<PutBucketAnalyticsConfigurationError>> {
22005         let request_uri = format!("/{bucket}", bucket = input.bucket);
22006 
22007         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22008 
22009         request.add_optional_header(
22010             "x-amz-expected-bucket-owner",
22011             input.expected_bucket_owner.as_ref(),
22012         );
22013         let mut params = Params::new();
22014         params.put("id", &input.id);
22015         params.put_key("analytics");
22016         request.set_params(params);
22017         let mut writer = EventWriter::new(Vec::new());
22018         AnalyticsConfigurationSerializer::serialize(
22019             &mut writer,
22020             "AnalyticsConfiguration",
22021             &input.analytics_configuration,
22022         );
22023         request.set_payload(Some(writer.into_inner()));
22024 
22025         let mut response = self
22026             .sign_and_dispatch(request, PutBucketAnalyticsConfigurationError::from_response)
22027             .await?;
22028 
22029         std::mem::drop(response);
22030         Ok(())
22031     }
22032 
22033     /// <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 S3 User Guide</i>.</p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketCors.html">GetBucketCors</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html">DeleteBucketCors</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html">RESTOPTIONSobject</a> </p> </li> </ul></p>
22034     #[allow(unused_variables, warnings)]
put_bucket_cors( &self, input: PutBucketCorsRequest, ) -> Result<(), RusotoError<PutBucketCorsError>>22035     async fn put_bucket_cors(
22036         &self,
22037         input: PutBucketCorsRequest,
22038     ) -> Result<(), RusotoError<PutBucketCorsError>> {
22039         let request_uri = format!("/{bucket}", bucket = input.bucket);
22040 
22041         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22042 
22043         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22044         request.add_optional_header(
22045             "x-amz-expected-bucket-owner",
22046             input.expected_bucket_owner.as_ref(),
22047         );
22048         let mut params = Params::new();
22049         params.put_key("cors");
22050         request.set_params(params);
22051         let mut writer = EventWriter::new(Vec::new());
22052         CORSConfigurationSerializer::serialize(
22053             &mut writer,
22054             "CORSConfiguration",
22055             &input.cors_configuration,
22056         );
22057         request.set_payload(Some(writer.into_inner()));
22058         request.maybe_set_content_md5_header();
22059 
22060         let mut response = self
22061             .sign_and_dispatch(request, PutBucketCorsError::from_response)
22062             .await?;
22063 
22064         std::mem::drop(response);
22065         Ok(())
22066     }
22067 
22068     /// <p><p>This action uses the <code>encryption</code> subresource to configure default encryption and Amazon S3 Bucket Key for an existing bucket.</p> <p>Default encryption for a bucket can use server-side encryption with Amazon S3-managed keys (SSE-S3) or AWS KMS customer master keys (SSE-KMS). If you specify default encryption using SSE-KMS, you can also configure Amazon S3 Bucket Key. For information about default encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html">Amazon S3 default bucket encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about S3 Bucket Keys, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p> <important> <p>This action requires AWS Signature Version 4. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the Amazon S3 User Guide. </p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html">GetBucketEncryption</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html">DeleteBucketEncryption</a> </p> </li> </ul></p>
22069     #[allow(unused_variables, warnings)]
put_bucket_encryption( &self, input: PutBucketEncryptionRequest, ) -> Result<(), RusotoError<PutBucketEncryptionError>>22070     async fn put_bucket_encryption(
22071         &self,
22072         input: PutBucketEncryptionRequest,
22073     ) -> Result<(), RusotoError<PutBucketEncryptionError>> {
22074         let request_uri = format!("/{bucket}", bucket = input.bucket);
22075 
22076         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22077 
22078         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22079         request.add_optional_header(
22080             "x-amz-expected-bucket-owner",
22081             input.expected_bucket_owner.as_ref(),
22082         );
22083         let mut params = Params::new();
22084         params.put_key("encryption");
22085         request.set_params(params);
22086         let mut writer = EventWriter::new(Vec::new());
22087         ServerSideEncryptionConfigurationSerializer::serialize(
22088             &mut writer,
22089             "ServerSideEncryptionConfiguration",
22090             &input.server_side_encryption_configuration,
22091         );
22092         request.set_payload(Some(writer.into_inner()));
22093         request.maybe_set_content_md5_header();
22094 
22095         let mut response = self
22096             .sign_and_dispatch(request, PutBucketEncryptionError::from_response)
22097             .await?;
22098 
22099         std::mem::drop(response);
22100         Ok(())
22101     }
22102 
22103     /// <p><p>Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can have up to 1,000 S3 Intelligent-Tiering configurations per bucket.</p> <p>The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without additional operational overhead. S3 Intelligent-Tiering delivers automatic cost savings by moving data between access tiers, when access patterns change.</p> <p>The S3 Intelligent-Tiering storage class is suitable for objects larger than 128 KB that you plan to store for at least 30 days. If the size of an object is less than 128 KB, it is not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the frequent access tier rates in the S3 Intelligent-Tiering storage class. </p> <p>If you delete an object before the end of the 30-day minimum storage duration period, you are charged for 30 days. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access">Storage class for automatically optimizing frequently and infrequently accessed objects</a>.</p> <p>Operations related to <code>PutBucketIntelligentTieringConfiguration</code> include: </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html">DeleteBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html">GetBucketIntelligentTieringConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html">ListBucketIntelligentTieringConfigurations</a> </p> </li> </ul> <note> <p>You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access or Deep Archive Access tier.</p> </note> <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:PutIntelligentTieringConfiguration</code> bucket permission to set the configuration on the bucket. </p> </li> </ul> </li> </ul></p>
22104     #[allow(unused_variables, warnings)]
put_bucket_intelligent_tiering_configuration( &self, input: PutBucketIntelligentTieringConfigurationRequest, ) -> Result<(), RusotoError<PutBucketIntelligentTieringConfigurationError>>22105     async fn put_bucket_intelligent_tiering_configuration(
22106         &self,
22107         input: PutBucketIntelligentTieringConfigurationRequest,
22108     ) -> Result<(), RusotoError<PutBucketIntelligentTieringConfigurationError>> {
22109         let request_uri = format!("/{bucket}", bucket = input.bucket);
22110 
22111         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22112 
22113         let mut params = Params::new();
22114         params.put("id", &input.id);
22115         params.put_key("intelligent-tiering");
22116         request.set_params(params);
22117         let mut writer = EventWriter::new(Vec::new());
22118         IntelligentTieringConfigurationSerializer::serialize(
22119             &mut writer,
22120             "IntelligentTieringConfiguration",
22121             &input.intelligent_tiering_configuration,
22122         );
22123         request.set_payload(Some(writer.into_inner()));
22124 
22125         let mut response = self
22126             .sign_and_dispatch(
22127                 request,
22128                 PutBucketIntelligentTieringConfigurationError::from_response,
22129             )
22130             .await?;
22131 
22132         std::mem::drop(response);
22133         Ok(())
22134     }
22135 
22136     /// <p><p>This implementation of the <code>PUT</code> action 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 S3 User 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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the Amazon S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html">GetBucketInventoryConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html">DeleteBucketInventoryConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html">ListBucketInventoryConfigurations</a> </p> </li> </ul></p>
22137     #[allow(unused_variables, warnings)]
put_bucket_inventory_configuration( &self, input: PutBucketInventoryConfigurationRequest, ) -> Result<(), RusotoError<PutBucketInventoryConfigurationError>>22138     async fn put_bucket_inventory_configuration(
22139         &self,
22140         input: PutBucketInventoryConfigurationRequest,
22141     ) -> Result<(), RusotoError<PutBucketInventoryConfigurationError>> {
22142         let request_uri = format!("/{bucket}", bucket = input.bucket);
22143 
22144         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22145 
22146         request.add_optional_header(
22147             "x-amz-expected-bucket-owner",
22148             input.expected_bucket_owner.as_ref(),
22149         );
22150         let mut params = Params::new();
22151         params.put("id", &input.id);
22152         params.put_key("inventory");
22153         request.set_params(params);
22154         let mut writer = EventWriter::new(Vec::new());
22155         InventoryConfigurationSerializer::serialize(
22156             &mut writer,
22157             "InventoryConfiguration",
22158             &input.inventory_configuration,
22159         );
22160         request.set_payload(Some(writer.into_inner()));
22161 
22162         let mut response = self
22163             .sign_and_dispatch(request, PutBucketInventoryConfigurationError::from_response)
22164             .await?;
22165 
22166         std::mem::drop(response);
22167         Ok(())
22168     }
22169 
22170     /// <p><important> <p>For an updated version of this API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">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 S3 User 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/userguide/s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> in the <i>Amazon S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html">GetBucketLifecycle</a>(Deprecated)</p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html">GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a> </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 S3 User 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/userguide/s3-access-control.html">Managing Access Permissions to your Amazon S3 Resources</a> </p> </li> </ul> </li> </ul></p>
22171     #[allow(unused_variables, warnings)]
put_bucket_lifecycle( &self, input: PutBucketLifecycleRequest, ) -> Result<(), RusotoError<PutBucketLifecycleError>>22172     async fn put_bucket_lifecycle(
22173         &self,
22174         input: PutBucketLifecycleRequest,
22175     ) -> Result<(), RusotoError<PutBucketLifecycleError>> {
22176         let request_uri = format!("/{bucket}", bucket = input.bucket);
22177 
22178         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22179 
22180         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22181         request.add_optional_header(
22182             "x-amz-expected-bucket-owner",
22183             input.expected_bucket_owner.as_ref(),
22184         );
22185         let mut params = Params::new();
22186         params.put_key("lifecycle");
22187         request.set_params(params);
22188         if input.lifecycle_configuration.is_some() {
22189             let mut writer = EventWriter::new(Vec::new());
22190             LifecycleConfigurationSerializer::serialize(
22191                 &mut writer,
22192                 "LifecycleConfiguration",
22193                 input.lifecycle_configuration.as_ref().unwrap(),
22194             );
22195             request.set_payload(Some(writer.into_inner()));
22196         } else {
22197             request.set_payload(Some(Vec::new()));
22198         }
22199         request.maybe_set_content_md5_header();
22200 
22201         let mut response = self
22202             .sign_and_dispatch(request, PutBucketLifecycleError::from_response)
22203             .await?;
22204 
22205         std::mem::drop(response);
22206         Ok(())
22207     }
22208 
22209     /// <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/userguide/object-lifecycle-mgmt.html">Managing your storage lifecycle</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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html">GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html">DeleteBucketLifecycle</a> </p> </li> </ul></p>
22210     #[allow(unused_variables, warnings)]
put_bucket_lifecycle_configuration( &self, input: PutBucketLifecycleConfigurationRequest, ) -> Result<(), RusotoError<PutBucketLifecycleConfigurationError>>22211     async fn put_bucket_lifecycle_configuration(
22212         &self,
22213         input: PutBucketLifecycleConfigurationRequest,
22214     ) -> Result<(), RusotoError<PutBucketLifecycleConfigurationError>> {
22215         let request_uri = format!("/{bucket}", bucket = input.bucket);
22216 
22217         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22218 
22219         request.add_optional_header(
22220             "x-amz-expected-bucket-owner",
22221             input.expected_bucket_owner.as_ref(),
22222         );
22223         let mut params = Params::new();
22224         params.put_key("lifecycle");
22225         request.set_params(params);
22226         if input.lifecycle_configuration.is_some() {
22227             let mut writer = EventWriter::new(Vec::new());
22228             BucketLifecycleConfigurationSerializer::serialize(
22229                 &mut writer,
22230                 "LifecycleConfiguration",
22231                 input.lifecycle_configuration.as_ref().unwrap(),
22232             );
22233             request.set_payload(Some(writer.into_inner()));
22234         } else {
22235             request.set_payload(Some(Vec::new()));
22236         }
22237         request.maybe_set_content_md5_header();
22238 
22239         let mut response = self
22240             .sign_and_dispatch(request, PutBucketLifecycleConfigurationError::from_response)
22241             .await?;
22242 
22243         std::mem::drop(response);
22244         Ok(())
22245     }
22246 
22247     /// <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<em>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 &lt;a href=&quot;https://docs.aws.amazon.com/AmazonS3/latest/API/API</em>CreateBucket.html&quot;&gt;CreateBucket</a>. For more information about returning the logging status of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html">GetBucketLogging</a>.</p> <p>The following operations are related to <code>PutBucketLogging</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html">DeleteBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html">GetBucketLogging</a> </p> </li> </ul></p>
22248     #[allow(unused_variables, warnings)]
put_bucket_logging( &self, input: PutBucketLoggingRequest, ) -> Result<(), RusotoError<PutBucketLoggingError>>22249     async fn put_bucket_logging(
22250         &self,
22251         input: PutBucketLoggingRequest,
22252     ) -> Result<(), RusotoError<PutBucketLoggingError>> {
22253         let request_uri = format!("/{bucket}", bucket = input.bucket);
22254 
22255         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22256 
22257         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22258         request.add_optional_header(
22259             "x-amz-expected-bucket-owner",
22260             input.expected_bucket_owner.as_ref(),
22261         );
22262         let mut params = Params::new();
22263         params.put_key("logging");
22264         request.set_params(params);
22265         let mut writer = EventWriter::new(Vec::new());
22266         BucketLoggingStatusSerializer::serialize(
22267             &mut writer,
22268             "BucketLoggingStatus",
22269             &input.bucket_logging_status,
22270         );
22271         request.set_payload(Some(writer.into_inner()));
22272         request.maybe_set_content_md5_header();
22273 
22274         let mut response = self
22275             .sign_and_dispatch(request, PutBucketLoggingError::from_response)
22276             .await?;
22277 
22278         std::mem::drop(response);
22279         Ok(())
22280     }
22281 
22282     /// <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/userguide/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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html">DeleteBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html">PutBucketMetricsConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html">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>
22283     #[allow(unused_variables, warnings)]
put_bucket_metrics_configuration( &self, input: PutBucketMetricsConfigurationRequest, ) -> Result<(), RusotoError<PutBucketMetricsConfigurationError>>22284     async fn put_bucket_metrics_configuration(
22285         &self,
22286         input: PutBucketMetricsConfigurationRequest,
22287     ) -> Result<(), RusotoError<PutBucketMetricsConfigurationError>> {
22288         let request_uri = format!("/{bucket}", bucket = input.bucket);
22289 
22290         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22291 
22292         request.add_optional_header(
22293             "x-amz-expected-bucket-owner",
22294             input.expected_bucket_owner.as_ref(),
22295         );
22296         let mut params = Params::new();
22297         params.put("id", &input.id);
22298         params.put_key("metrics");
22299         request.set_params(params);
22300         let mut writer = EventWriter::new(Vec::new());
22301         MetricsConfigurationSerializer::serialize(
22302             &mut writer,
22303             "MetricsConfiguration",
22304             &input.metrics_configuration,
22305         );
22306         request.set_payload(Some(writer.into_inner()));
22307 
22308         let mut response = self
22309             .sign_and_dispatch(request, PutBucketMetricsConfigurationError::from_response)
22310             .await?;
22311 
22312         std::mem::drop(response);
22313         Ok(())
22314     }
22315 
22316     /// <p> No longer used, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotificationConfiguration.html">PutBucketNotificationConfiguration</a> operation.</p>
22317     #[allow(unused_variables, warnings)]
put_bucket_notification( &self, input: PutBucketNotificationRequest, ) -> Result<(), RusotoError<PutBucketNotificationError>>22318     async fn put_bucket_notification(
22319         &self,
22320         input: PutBucketNotificationRequest,
22321     ) -> Result<(), RusotoError<PutBucketNotificationError>> {
22322         let request_uri = format!("/{bucket}", bucket = input.bucket);
22323 
22324         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22325 
22326         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22327         request.add_optional_header(
22328             "x-amz-expected-bucket-owner",
22329             input.expected_bucket_owner.as_ref(),
22330         );
22331         let mut params = Params::new();
22332         params.put_key("notification");
22333         request.set_params(params);
22334         let mut writer = EventWriter::new(Vec::new());
22335         NotificationConfigurationDeprecatedSerializer::serialize(
22336             &mut writer,
22337             "NotificationConfigurationDeprecated",
22338             &input.notification_configuration,
22339         );
22340         request.set_payload(Some(writer.into_inner()));
22341         request.maybe_set_content_md5_header();
22342 
22343         let mut response = self
22344             .sign_and_dispatch(request, PutBucketNotificationError::from_response)
22345             .await?;
22346 
22347         std::mem::drop(response);
22348         Ok(())
22349     }
22350 
22351     /// <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 action 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 action 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 action is related to <code>PutBucketNotificationConfiguration</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html">GetBucketNotificationConfiguration</a> </p> </li> </ul></p>
22352     #[allow(unused_variables, warnings)]
put_bucket_notification_configuration( &self, input: PutBucketNotificationConfigurationRequest, ) -> Result<(), RusotoError<PutBucketNotificationConfigurationError>>22353     async fn put_bucket_notification_configuration(
22354         &self,
22355         input: PutBucketNotificationConfigurationRequest,
22356     ) -> Result<(), RusotoError<PutBucketNotificationConfigurationError>> {
22357         let request_uri = format!("/{bucket}", bucket = input.bucket);
22358 
22359         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22360 
22361         request.add_optional_header(
22362             "x-amz-expected-bucket-owner",
22363             input.expected_bucket_owner.as_ref(),
22364         );
22365         let mut params = Params::new();
22366         params.put_key("notification");
22367         request.set_params(params);
22368         let mut writer = EventWriter::new(Vec::new());
22369         NotificationConfigurationSerializer::serialize(
22370             &mut writer,
22371             "NotificationConfiguration",
22372             &input.notification_configuration,
22373         );
22374         request.set_payload(Some(writer.into_inner()));
22375 
22376         let mut response = self
22377             .sign_and_dispatch(
22378                 request,
22379                 PutBucketNotificationConfigurationError::from_response,
22380             )
22381             .await?;
22382 
22383         std::mem::drop(response);
22384         Ok(())
22385     }
22386 
22387     /// <p><p>Creates or modifies <code>OwnershipControls</code> for an Amazon S3 bucket. To use this operation, you must have the <code>s3:PutBucketOwnershipControls</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 information about Amazon S3 Object Ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html">Using Object Ownership</a>. </p> <p>The following operations are related to <code>PutBucketOwnershipControls</code>:</p> <ul> <li> <p> <a>GetBucketOwnershipControls</a> </p> </li> <li> <p> <a>DeleteBucketOwnershipControls</a> </p> </li> </ul></p>
22388     #[allow(unused_variables, warnings)]
put_bucket_ownership_controls( &self, input: PutBucketOwnershipControlsRequest, ) -> Result<(), RusotoError<PutBucketOwnershipControlsError>>22389     async fn put_bucket_ownership_controls(
22390         &self,
22391         input: PutBucketOwnershipControlsRequest,
22392     ) -> Result<(), RusotoError<PutBucketOwnershipControlsError>> {
22393         let request_uri = format!("/{bucket}", bucket = input.bucket);
22394 
22395         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22396 
22397         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22398         request.add_optional_header(
22399             "x-amz-expected-bucket-owner",
22400             input.expected_bucket_owner.as_ref(),
22401         );
22402         let mut params = Params::new();
22403         params.put_key("ownershipControls");
22404         request.set_params(params);
22405         let mut writer = EventWriter::new(Vec::new());
22406         OwnershipControlsSerializer::serialize(
22407             &mut writer,
22408             "OwnershipControls",
22409             &input.ownership_controls,
22410         );
22411         request.set_payload(Some(writer.into_inner()));
22412         request.maybe_set_content_md5_header();
22413 
22414         let mut response = self
22415             .sign_and_dispatch(request, PutBucketOwnershipControlsError::from_response)
22416             .await?;
22417 
22418         std::mem::drop(response);
22419         Ok(())
22420     }
22421 
22422     /// <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>PutBucketPolicy</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 operations are related to <code>PutBucketPolicy</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html">DeleteBucket</a> </p> </li> </ul></p>
22423     #[allow(unused_variables, warnings)]
put_bucket_policy( &self, input: PutBucketPolicyRequest, ) -> Result<(), RusotoError<PutBucketPolicyError>>22424     async fn put_bucket_policy(
22425         &self,
22426         input: PutBucketPolicyRequest,
22427     ) -> Result<(), RusotoError<PutBucketPolicyError>> {
22428         let request_uri = format!("/{bucket}", bucket = input.bucket);
22429 
22430         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22431 
22432         request.add_optional_header(
22433             "x-amz-confirm-remove-self-bucket-access",
22434             input.confirm_remove_self_bucket_access.as_ref(),
22435         );
22436         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22437         request.add_optional_header(
22438             "x-amz-expected-bucket-owner",
22439             input.expected_bucket_owner.as_ref(),
22440         );
22441         let mut params = Params::new();
22442         params.put_key("policy");
22443         request.set_params(params);
22444         request.set_payload(Some(input.policy.into_bytes()));
22445         request.maybe_set_content_md5_header();
22446 
22447         let mut response = self
22448             .sign_and_dispatch(request, PutBucketPolicyError::from_response)
22449             .await?;
22450 
22451         std::mem::drop(response);
22452         Ok(())
22453     }
22454 
22455     /// <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 User Guide</i>. </p> <note> <p>To perform this operation, the user or role performing the action 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 or buckets 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.</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> <note> <p>If you are using an earlier version of the replication configuration, Amazon S3 handles 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>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/userguide/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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList">List of replication-related error codes</a> </p> <p>The following operations are related to <code>PutBucketReplication</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html">GetBucketReplication</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html">DeleteBucketReplication</a> </p> </li> </ul></p>
22456     #[allow(unused_variables, warnings)]
put_bucket_replication( &self, input: PutBucketReplicationRequest, ) -> Result<(), RusotoError<PutBucketReplicationError>>22457     async fn put_bucket_replication(
22458         &self,
22459         input: PutBucketReplicationRequest,
22460     ) -> Result<(), RusotoError<PutBucketReplicationError>> {
22461         let request_uri = format!("/{bucket}", bucket = input.bucket);
22462 
22463         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22464 
22465         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22466         request.add_optional_header(
22467             "x-amz-expected-bucket-owner",
22468             input.expected_bucket_owner.as_ref(),
22469         );
22470         request.add_optional_header("x-amz-bucket-object-lock-token", input.token.as_ref());
22471         let mut params = Params::new();
22472         params.put_key("replication");
22473         request.set_params(params);
22474         let mut writer = EventWriter::new(Vec::new());
22475         ReplicationConfigurationSerializer::serialize(
22476             &mut writer,
22477             "ReplicationConfiguration",
22478             &input.replication_configuration,
22479         );
22480         request.set_payload(Some(writer.into_inner()));
22481         request.maybe_set_content_md5_header();
22482 
22483         let mut response = self
22484             .sign_and_dispatch(request, PutBucketReplicationError::from_response)
22485             .await?;
22486 
22487         std::mem::drop(response);
22488         Ok(())
22489     }
22490 
22491     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketRequestPayment.html">GetBucketRequestPayment</a> </p> </li> </ul></p>
22492     #[allow(unused_variables, warnings)]
put_bucket_request_payment( &self, input: PutBucketRequestPaymentRequest, ) -> Result<(), RusotoError<PutBucketRequestPaymentError>>22493     async fn put_bucket_request_payment(
22494         &self,
22495         input: PutBucketRequestPaymentRequest,
22496     ) -> Result<(), RusotoError<PutBucketRequestPaymentError>> {
22497         let request_uri = format!("/{bucket}", bucket = input.bucket);
22498 
22499         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22500 
22501         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22502         request.add_optional_header(
22503             "x-amz-expected-bucket-owner",
22504             input.expected_bucket_owner.as_ref(),
22505         );
22506         let mut params = Params::new();
22507         params.put_key("requestPayment");
22508         request.set_params(params);
22509         let mut writer = EventWriter::new(Vec::new());
22510         RequestPaymentConfigurationSerializer::serialize(
22511             &mut writer,
22512             "RequestPaymentConfiguration",
22513             &input.request_payment_configuration,
22514         );
22515         request.set_payload(Some(writer.into_inner()));
22516         request.maybe_set_content_md5_header();
22517 
22518         let mut response = self
22519             .sign_and_dispatch(request, PutBucketRequestPaymentError::from_response)
22520             .await?;
22521 
22522         std::mem::drop(response);
22523         Ok(())
22524     }
22525 
22526     /// <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> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CostAllocTagging.html">Using Cost Allocation in Amazon S3 Bucket Tags</a>.</p> <note> <p> When this operation sets the tags for a bucket, it will overwrite any current tags the bucket already has. You cannot use this operation to add tags to an existing list of tags.</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/userguide/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/userguide/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 action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html">GetBucketTagging</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html">DeleteBucketTagging</a> </p> </li> </ul></p>
22527     #[allow(unused_variables, warnings)]
put_bucket_tagging( &self, input: PutBucketTaggingRequest, ) -> Result<(), RusotoError<PutBucketTaggingError>>22528     async fn put_bucket_tagging(
22529         &self,
22530         input: PutBucketTaggingRequest,
22531     ) -> Result<(), RusotoError<PutBucketTaggingError>> {
22532         let request_uri = format!("/{bucket}", bucket = input.bucket);
22533 
22534         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22535 
22536         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22537         request.add_optional_header(
22538             "x-amz-expected-bucket-owner",
22539             input.expected_bucket_owner.as_ref(),
22540         );
22541         let mut params = Params::new();
22542         params.put_key("tagging");
22543         request.set_params(params);
22544         let mut writer = EventWriter::new(Vec::new());
22545         TaggingSerializer::serialize(&mut writer, "Tagging", &input.tagging);
22546         request.set_payload(Some(writer.into_inner()));
22547         request.maybe_set_content_md5_header();
22548 
22549         let mut response = self
22550             .sign_and_dispatch(request, PutBucketTaggingError::from_response)
22551             .await?;
22552 
22553         std::mem::drop(response);
22554         Ok(())
22555     }
22556 
22557     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html">DeleteBucket</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a> </p> </li> </ul></p>
22558     #[allow(unused_variables, warnings)]
put_bucket_versioning( &self, input: PutBucketVersioningRequest, ) -> Result<(), RusotoError<PutBucketVersioningError>>22559     async fn put_bucket_versioning(
22560         &self,
22561         input: PutBucketVersioningRequest,
22562     ) -> Result<(), RusotoError<PutBucketVersioningError>> {
22563         let request_uri = format!("/{bucket}", bucket = input.bucket);
22564 
22565         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22566 
22567         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22568         request.add_optional_header(
22569             "x-amz-expected-bucket-owner",
22570             input.expected_bucket_owner.as_ref(),
22571         );
22572         request.add_optional_header("x-amz-mfa", input.mfa.as_ref());
22573         let mut params = Params::new();
22574         params.put_key("versioning");
22575         request.set_params(params);
22576         let mut writer = EventWriter::new(Vec::new());
22577         VersioningConfigurationSerializer::serialize(
22578             &mut writer,
22579             "VersioningConfiguration",
22580             &input.versioning_configuration,
22581         );
22582         request.set_payload(Some(writer.into_inner()));
22583         request.maybe_set_content_md5_header();
22584 
22585         let mut response = self
22586             .sign_and_dispatch(request, PutBucketVersioningError::from_response)
22587             .await?;
22588 
22589         std::mem::drop(response);
22590         Ok(())
22591     }
22592 
22593     /// <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 action 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's website endpoint, you add a website configuration with the following elements. Because all requests are sent to another website, you don'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>Amazon S3 has a limitation of 50 routing rules per website configuration. If you require more than 50 routing rules, you can use object redirect. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">Configuring an Object Redirect</a> in the <i>Amazon S3 User Guide</i>.</p>
22594     #[allow(unused_variables, warnings)]
put_bucket_website( &self, input: PutBucketWebsiteRequest, ) -> Result<(), RusotoError<PutBucketWebsiteError>>22595     async fn put_bucket_website(
22596         &self,
22597         input: PutBucketWebsiteRequest,
22598     ) -> Result<(), RusotoError<PutBucketWebsiteError>> {
22599         let request_uri = format!("/{bucket}", bucket = input.bucket);
22600 
22601         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22602 
22603         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22604         request.add_optional_header(
22605             "x-amz-expected-bucket-owner",
22606             input.expected_bucket_owner.as_ref(),
22607         );
22608         let mut params = Params::new();
22609         params.put_key("website");
22610         request.set_params(params);
22611         let mut writer = EventWriter::new(Vec::new());
22612         WebsiteConfigurationSerializer::serialize(
22613             &mut writer,
22614             "WebsiteConfiguration",
22615             &input.website_configuration,
22616         );
22617         request.set_payload(Some(writer.into_inner()));
22618         request.maybe_set_content_md5_header();
22619 
22620         let mut response = self
22621             .sign_and_dispatch(request, PutBucketWebsiteError::from_response)
22622             .await?;
22623 
22624         std::mem::drop(response);
22625         Ok(())
22626     }
22627 
22628     /// <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> The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>. </p> </note> <p> <b>Server-side Encryption</b> </p> <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 (SSE-S3 or SSE-KMS). For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a>.</p> <p>If you request server-side encryption using AWS Key Management Service (SSE-KMS), you can enable an S3 Bucket Key at the object-level. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p> <p> <b>Access Control List (ACL)-Specific Request Headers</b> </p> <p>You can use headers to grant ACL- based permissions. 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 ACL on the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a>. </p> <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. Depending on performance needs, you can specify a different Storage Class. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</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. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects.</p> <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to Versioning Enabled Buckets</a>. For information about returning the versioning state of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>. </p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a> </p> </li> </ul></p>
22629     #[allow(unused_variables, warnings)]
put_object( &self, input: PutObjectRequest, ) -> Result<PutObjectOutput, RusotoError<PutObjectError>>22630     async fn put_object(
22631         &self,
22632         input: PutObjectRequest,
22633     ) -> Result<PutObjectOutput, RusotoError<PutObjectError>> {
22634         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
22635 
22636         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22637 
22638         request.add_optional_header("x-amz-acl", input.acl.as_ref());
22639         request.add_optional_header(
22640             "x-amz-server-side-encryption-bucket-key-enabled",
22641             input.bucket_key_enabled.as_ref(),
22642         );
22643         request.add_optional_header("Cache-Control", input.cache_control.as_ref());
22644         request.add_optional_header("Content-Disposition", input.content_disposition.as_ref());
22645         request.add_optional_header("Content-Encoding", input.content_encoding.as_ref());
22646         request.add_optional_header("Content-Language", input.content_language.as_ref());
22647         request.add_optional_header("Content-Length", input.content_length.as_ref());
22648         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22649         request.add_optional_header("Content-Type", input.content_type.as_ref());
22650         request.add_optional_header(
22651             "x-amz-expected-bucket-owner",
22652             input.expected_bucket_owner.as_ref(),
22653         );
22654         request.add_optional_header("Expires", input.expires.as_ref());
22655         request.add_optional_header(
22656             "x-amz-grant-full-control",
22657             input.grant_full_control.as_ref(),
22658         );
22659         request.add_optional_header("x-amz-grant-read", input.grant_read.as_ref());
22660         request.add_optional_header("x-amz-grant-read-acp", input.grant_read_acp.as_ref());
22661         request.add_optional_header("x-amz-grant-write-acp", input.grant_write_acp.as_ref());
22662 
22663         if let Some(ref metadata) = input.metadata {
22664             for (header_name, header_value) in metadata.iter() {
22665                 let header = format!("x-amz-meta-{}", header_name);
22666                 request.add_header(header, header_value);
22667             }
22668         }
22669         request.add_optional_header(
22670             "x-amz-object-lock-legal-hold",
22671             input.object_lock_legal_hold_status.as_ref(),
22672         );
22673         request.add_optional_header("x-amz-object-lock-mode", input.object_lock_mode.as_ref());
22674         request.add_optional_header(
22675             "x-amz-object-lock-retain-until-date",
22676             input.object_lock_retain_until_date.as_ref(),
22677         );
22678         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
22679         request.add_optional_header(
22680             "x-amz-server-side-encryption-customer-algorithm",
22681             input.sse_customer_algorithm.as_ref(),
22682         );
22683         request.add_optional_header(
22684             "x-amz-server-side-encryption-customer-key",
22685             input.sse_customer_key.as_ref(),
22686         );
22687         request.add_optional_header(
22688             "x-amz-server-side-encryption-customer-key-MD5",
22689             input.sse_customer_key_md5.as_ref(),
22690         );
22691         request.add_optional_header(
22692             "x-amz-server-side-encryption-context",
22693             input.ssekms_encryption_context.as_ref(),
22694         );
22695         request.add_optional_header(
22696             "x-amz-server-side-encryption-aws-kms-key-id",
22697             input.ssekms_key_id.as_ref(),
22698         );
22699         request.add_optional_header(
22700             "x-amz-server-side-encryption",
22701             input.server_side_encryption.as_ref(),
22702         );
22703         request.add_optional_header("x-amz-storage-class", input.storage_class.as_ref());
22704         request.add_optional_header("x-amz-tagging", input.tagging.as_ref());
22705         request.add_optional_header(
22706             "x-amz-website-redirect-location",
22707             input.website_redirect_location.as_ref(),
22708         );
22709 
22710         if let Some(__body) = input.body {
22711             request.set_payload_stream(__body);
22712         }
22713 
22714         let mut response = self
22715             .sign_and_dispatch(request, PutObjectError::from_response)
22716             .await?;
22717 
22718         let result = PutObjectOutput::default();
22719         let mut result = result;
22720         result.bucket_key_enabled = response
22721             .headers
22722             .remove("x-amz-server-side-encryption-bucket-key-enabled")
22723             .map(|value| value.parse::<bool>().unwrap());
22724         result.e_tag = response.headers.remove("ETag");
22725         result.expiration = response.headers.remove("x-amz-expiration");
22726         result.request_charged = response.headers.remove("x-amz-request-charged");
22727         result.sse_customer_algorithm = response
22728             .headers
22729             .remove("x-amz-server-side-encryption-customer-algorithm");
22730         result.sse_customer_key_md5 = response
22731             .headers
22732             .remove("x-amz-server-side-encryption-customer-key-MD5");
22733         result.ssekms_encryption_context = response
22734             .headers
22735             .remove("x-amz-server-side-encryption-context");
22736         result.ssekms_key_id = response
22737             .headers
22738             .remove("x-amz-server-side-encryption-aws-kms-key-id");
22739         result.server_side_encryption = response.headers.remove("x-amz-server-side-encryption");
22740         result.version_id = response.headers.remove("x-amz-version-id"); // parse non-payload
22741         Ok(result)
22742     }
22743 
22744     /// <p><p>Uses the <code>acl</code> subresource to set the access control list (ACL) permissions for a new or existing object in an S3 bucket. You must have <code>WRITE<em>ACP</code> permission to set the ACL of an object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#permissions">What permissions can I grant?</a> in the <i>Amazon S3 User Guide</i>.</p> <p>This action is not supported by Amazon S3 on Outposts.</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. 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 <i>Amazon S3 User Guide</i>.</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>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> <li> <p> <code>emailAddress</code> – if the value specified is the email address of an AWS account</p> <note> <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>Europe (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 &lt;a href=&quot;https://docs.aws.amazon.com/general/latest/gr/rande.html#s3</em>region&quot;&gt;Regions and Endpoints</a> in the AWS General Reference.</p> </note> </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 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> <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> <note> <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>Europe (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> </note> </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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> </ul></p>
22745     #[allow(unused_variables, warnings)]
put_object_acl( &self, input: PutObjectAclRequest, ) -> Result<PutObjectAclOutput, RusotoError<PutObjectAclError>>22746     async fn put_object_acl(
22747         &self,
22748         input: PutObjectAclRequest,
22749     ) -> Result<PutObjectAclOutput, RusotoError<PutObjectAclError>> {
22750         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
22751 
22752         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22753 
22754         request.add_optional_header("x-amz-acl", input.acl.as_ref());
22755         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22756         request.add_optional_header(
22757             "x-amz-expected-bucket-owner",
22758             input.expected_bucket_owner.as_ref(),
22759         );
22760         request.add_optional_header(
22761             "x-amz-grant-full-control",
22762             input.grant_full_control.as_ref(),
22763         );
22764         request.add_optional_header("x-amz-grant-read", input.grant_read.as_ref());
22765         request.add_optional_header("x-amz-grant-read-acp", input.grant_read_acp.as_ref());
22766         request.add_optional_header("x-amz-grant-write", input.grant_write.as_ref());
22767         request.add_optional_header("x-amz-grant-write-acp", input.grant_write_acp.as_ref());
22768         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
22769         let mut params = Params::new();
22770         if let Some(ref x) = input.version_id {
22771             params.put("versionId", x);
22772         }
22773         params.put_key("acl");
22774         request.set_params(params);
22775         if input.access_control_policy.is_some() {
22776             let mut writer = EventWriter::new(Vec::new());
22777             AccessControlPolicySerializer::serialize(
22778                 &mut writer,
22779                 "AccessControlPolicy",
22780                 input.access_control_policy.as_ref().unwrap(),
22781             );
22782             request.set_payload(Some(writer.into_inner()));
22783         } else {
22784             request.set_payload(Some(Vec::new()));
22785         }
22786         request.maybe_set_content_md5_header();
22787 
22788         let mut response = self
22789             .sign_and_dispatch(request, PutObjectAclError::from_response)
22790             .await?;
22791 
22792         let result = PutObjectAclOutput::default();
22793         let mut result = result;
22794         result.request_charged = response.headers.remove("x-amz-request-charged"); // parse non-payload
22795         Ok(result)
22796     }
22797 
22798     /// <p>Applies a Legal Hold configuration to the specified object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a>.</p> <p>This action is not supported by Amazon S3 on Outposts.</p>
22799     #[allow(unused_variables, warnings)]
put_object_legal_hold( &self, input: PutObjectLegalHoldRequest, ) -> Result<PutObjectLegalHoldOutput, RusotoError<PutObjectLegalHoldError>>22800     async fn put_object_legal_hold(
22801         &self,
22802         input: PutObjectLegalHoldRequest,
22803     ) -> Result<PutObjectLegalHoldOutput, RusotoError<PutObjectLegalHoldError>> {
22804         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
22805 
22806         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22807 
22808         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22809         request.add_optional_header(
22810             "x-amz-expected-bucket-owner",
22811             input.expected_bucket_owner.as_ref(),
22812         );
22813         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
22814         let mut params = Params::new();
22815         if let Some(ref x) = input.version_id {
22816             params.put("versionId", x);
22817         }
22818         params.put_key("legal-hold");
22819         request.set_params(params);
22820         if input.legal_hold.is_some() {
22821             let mut writer = EventWriter::new(Vec::new());
22822             ObjectLockLegalHoldSerializer::serialize(
22823                 &mut writer,
22824                 "LegalHold",
22825                 input.legal_hold.as_ref().unwrap(),
22826             );
22827             request.set_payload(Some(writer.into_inner()));
22828         } else {
22829             request.set_payload(Some(Vec::new()));
22830         }
22831         request.maybe_set_content_md5_header();
22832 
22833         let mut response = self
22834             .sign_and_dispatch(request, PutObjectLegalHoldError::from_response)
22835             .await?;
22836 
22837         let result = PutObjectLegalHoldOutput::default();
22838         let mut result = result;
22839         result.request_charged = response.headers.remove("x-amz-request-charged"); // parse non-payload
22840         Ok(result)
22841     }
22842 
22843     /// <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. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a>. </p> <note> <ul> <li> <p>The <code>DefaultRetention</code> settings require both a mode and a period.</p> </li> <li> <p>The <code>DefaultRetention</code> period can be either <code>Days</code> or <code>Years</code> but you must select one. You cannot specify <code>Days</code> and <code>Years</code> at the same time.</p> </li> <li> <p>You can only enable Object Lock for new buckets. If you want to turn on Object Lock for an existing bucket, contact AWS Support.</p> </li> </ul> </note></p>
22844     #[allow(unused_variables, warnings)]
put_object_lock_configuration( &self, input: PutObjectLockConfigurationRequest, ) -> Result<PutObjectLockConfigurationOutput, RusotoError<PutObjectLockConfigurationError>>22845     async fn put_object_lock_configuration(
22846         &self,
22847         input: PutObjectLockConfigurationRequest,
22848     ) -> Result<PutObjectLockConfigurationOutput, RusotoError<PutObjectLockConfigurationError>>
22849     {
22850         let request_uri = format!("/{bucket}", bucket = input.bucket);
22851 
22852         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22853 
22854         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22855         request.add_optional_header(
22856             "x-amz-expected-bucket-owner",
22857             input.expected_bucket_owner.as_ref(),
22858         );
22859         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
22860         request.add_optional_header("x-amz-bucket-object-lock-token", input.token.as_ref());
22861         let mut params = Params::new();
22862         params.put_key("object-lock");
22863         request.set_params(params);
22864         if input.object_lock_configuration.is_some() {
22865             let mut writer = EventWriter::new(Vec::new());
22866             ObjectLockConfigurationSerializer::serialize(
22867                 &mut writer,
22868                 "ObjectLockConfiguration",
22869                 input.object_lock_configuration.as_ref().unwrap(),
22870             );
22871             request.set_payload(Some(writer.into_inner()));
22872         } else {
22873             request.set_payload(Some(Vec::new()));
22874         }
22875         request.maybe_set_content_md5_header();
22876 
22877         let mut response = self
22878             .sign_and_dispatch(request, PutObjectLockConfigurationError::from_response)
22879             .await?;
22880 
22881         let result = PutObjectLockConfigurationOutput::default();
22882         let mut result = result;
22883         result.request_charged = response.headers.remove("x-amz-request-charged"); // parse non-payload
22884         Ok(result)
22885     }
22886 
22887     /// <p>Places an Object Retention configuration on an object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Locking Objects</a>. </p> <p>This action is not supported by Amazon S3 on Outposts.</p>
22888     #[allow(unused_variables, warnings)]
put_object_retention( &self, input: PutObjectRetentionRequest, ) -> Result<PutObjectRetentionOutput, RusotoError<PutObjectRetentionError>>22889     async fn put_object_retention(
22890         &self,
22891         input: PutObjectRetentionRequest,
22892     ) -> Result<PutObjectRetentionOutput, RusotoError<PutObjectRetentionError>> {
22893         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
22894 
22895         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22896 
22897         request.add_optional_header(
22898             "x-amz-bypass-governance-retention",
22899             input.bypass_governance_retention.as_ref(),
22900         );
22901         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22902         request.add_optional_header(
22903             "x-amz-expected-bucket-owner",
22904             input.expected_bucket_owner.as_ref(),
22905         );
22906         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
22907         let mut params = Params::new();
22908         if let Some(ref x) = input.version_id {
22909             params.put("versionId", x);
22910         }
22911         params.put_key("retention");
22912         request.set_params(params);
22913         if input.retention.is_some() {
22914             let mut writer = EventWriter::new(Vec::new());
22915             ObjectLockRetentionSerializer::serialize(
22916                 &mut writer,
22917                 "Retention",
22918                 input.retention.as_ref().unwrap(),
22919             );
22920             request.set_payload(Some(writer.into_inner()));
22921         } else {
22922             request.set_payload(Some(Vec::new()));
22923         }
22924         request.maybe_set_content_md5_header();
22925 
22926         let mut response = self
22927             .sign_and_dispatch(request, PutObjectRetentionError::from_response)
22928             .await?;
22929 
22930         let result = PutObjectRetentionOutput::default();
22931         let mut result = result;
22932         result.request_charged = response.headers.remove("x-amz-request-charged"); // parse non-payload
22933         Ok(result)
22934     }
22935 
22936     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html">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> <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> <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 action 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html">GetObjectTagging</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html">DeleteObjectTagging</a> </p> </li> </ul></p>
22937     #[allow(unused_variables, warnings)]
put_object_tagging( &self, input: PutObjectTaggingRequest, ) -> Result<PutObjectTaggingOutput, RusotoError<PutObjectTaggingError>>22938     async fn put_object_tagging(
22939         &self,
22940         input: PutObjectTaggingRequest,
22941     ) -> Result<PutObjectTaggingOutput, RusotoError<PutObjectTaggingError>> {
22942         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
22943 
22944         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22945 
22946         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22947         request.add_optional_header(
22948             "x-amz-expected-bucket-owner",
22949             input.expected_bucket_owner.as_ref(),
22950         );
22951         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
22952         let mut params = Params::new();
22953         if let Some(ref x) = input.version_id {
22954             params.put("versionId", x);
22955         }
22956         params.put_key("tagging");
22957         request.set_params(params);
22958         let mut writer = EventWriter::new(Vec::new());
22959         TaggingSerializer::serialize(&mut writer, "Tagging", &input.tagging);
22960         request.set_payload(Some(writer.into_inner()));
22961         request.maybe_set_content_md5_header();
22962 
22963         let mut response = self
22964             .sign_and_dispatch(request, PutObjectTaggingError::from_response)
22965             .await?;
22966 
22967         let result = PutObjectTaggingOutput::default();
22968         let mut result = result;
22969         result.version_id = response.headers.remove("x-amz-version-id"); // parse non-payload
22970         Ok(result)
22971     }
22972 
22973     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html">GetPublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html">DeletePublicAccessBlock</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html">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>
22974     #[allow(unused_variables, warnings)]
put_public_access_block( &self, input: PutPublicAccessBlockRequest, ) -> Result<(), RusotoError<PutPublicAccessBlockError>>22975     async fn put_public_access_block(
22976         &self,
22977         input: PutPublicAccessBlockRequest,
22978     ) -> Result<(), RusotoError<PutPublicAccessBlockError>> {
22979         let request_uri = format!("/{bucket}", bucket = input.bucket);
22980 
22981         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
22982 
22983         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
22984         request.add_optional_header(
22985             "x-amz-expected-bucket-owner",
22986             input.expected_bucket_owner.as_ref(),
22987         );
22988         let mut params = Params::new();
22989         params.put_key("publicAccessBlock");
22990         request.set_params(params);
22991         let mut writer = EventWriter::new(Vec::new());
22992         PublicAccessBlockConfigurationSerializer::serialize(
22993             &mut writer,
22994             "PublicAccessBlockConfiguration",
22995             &input.public_access_block_configuration,
22996         );
22997         request.set_payload(Some(writer.into_inner()));
22998         request.maybe_set_content_md5_header();
22999 
23000         let mut response = self
23001             .sign_and_dispatch(request, PutPublicAccessBlockError::from_response)
23002             .await?;
23003 
23004         std::mem::drop(response);
23005         Ok(())
23006     }
23007 
23008     /// <p><p>Restores an archived copy of an object back into Amazon S3</p> <p>This action is not supported by Amazon S3 on Outposts.</p> <p>This action 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> 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/userguide/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/userguide/s3-access-control.html">Managing Access Permissions to Your Amazon S3 Resources</a> in the <i>Amazon S3 User 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 S3 User 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 S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">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 S3 User 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 S3 User 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 S3 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 S3 Glacier Select</a> in the <i>Amazon S3 User 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 objects</b> </p> <p>Objects that you archive to the S3 Glacier or S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep Archive tiers are not accessible in real time. For objects in Archive Access or Deep Archive Access tiers you must first initiate a restore request, and then wait until the object is moved into the Frequent Access tier. For objects in S3 Glacier or S3 Glacier Deep Archive storage classes you must first initiate a restore request, and then wait until a temporary copy of the object is available. To access an archived object, you must restore the object for the duration (number of days) that you specify.</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>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 S3 Glacier storage class or S3 Intelligent-Tiering Archive tier 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 is 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 objects stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier.</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 retrieval requests that do not specify the retrieval option. Standard retrievals typically finish within 3–5 hours for objects stored in the S3 Glacier storage class or S3 Intelligent-Tiering Archive tier. They typically finish within 12 hours for objects stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier. Standard retrievals are free for objects stored in S3 Intelligent-Tiering.</p> </li> <li> <p> <b> <code>Bulk</code> </b> - Bulk retrievals are the lowest-cost retrieval option in S3 Glacier, enabling you to retrieve large amounts, even petabytes, of data inexpensively. Bulk retrievals typically finish within 5–12 hours for objects stored in the S3 Glacier storage class or S3 Intelligent-Tiering Archive tier. They typically finish within 48 hours for objects stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier. Bulk retrievals are free for objects stored in S3 Intelligent-Tiering.</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 S3 User 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. 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 S3 User 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 S3 User 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 &lt;a href=&quot;https://docs.aws.amazon.com/AmazonS3/latest/API/API</em>PutBucketLifecycleConfiguration.html&quot;&gt;PutBucketLifecycleConfiguration</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html">Object Lifecycle Management</a> in <i>Amazon S3 User Guide</i>.</p> <p> <b>Responses</b> </p> <p>A successful action returns either the <code>200 OK</code> or <code>202 Accepted</code> status code. </p> <ul> <li> <p>If the object is not previously restored, then Amazon S3 returns <code>202 Accepted</code> in the response. </p> </li> <li> <p>If the object 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> <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> <ul> <li> <p> <i>Code: GlacierExpeditedRetrievalNotAvailable</i> </p> </li> <li> <p> <i>Cause: 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 S3 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html">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 S3 Glacier Select </a> in the <i>Amazon S3 User Guide</i> </p> </li> </ul></p>
23009     #[allow(unused_variables, warnings)]
restore_object( &self, input: RestoreObjectRequest, ) -> Result<RestoreObjectOutput, RusotoError<RestoreObjectError>>23010     async fn restore_object(
23011         &self,
23012         input: RestoreObjectRequest,
23013     ) -> Result<RestoreObjectOutput, RusotoError<RestoreObjectError>> {
23014         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
23015 
23016         let mut request = SignedRequest::new("POST", "s3", &self.region, &request_uri);
23017 
23018         request.add_optional_header(
23019             "x-amz-expected-bucket-owner",
23020             input.expected_bucket_owner.as_ref(),
23021         );
23022         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
23023         let mut params = Params::new();
23024         if let Some(ref x) = input.version_id {
23025             params.put("versionId", x);
23026         }
23027         params.put_key("restore");
23028         request.set_params(params);
23029         if input.restore_request.is_some() {
23030             let mut writer = EventWriter::new(Vec::new());
23031             RestoreRequestSerializer::serialize(
23032                 &mut writer,
23033                 "RestoreRequest",
23034                 input.restore_request.as_ref().unwrap(),
23035             );
23036             request.set_payload(Some(writer.into_inner()));
23037         } else {
23038             request.set_payload(Some(Vec::new()));
23039         }
23040 
23041         let mut response = self
23042             .sign_and_dispatch(request, RestoreObjectError::from_response)
23043             .await?;
23044 
23045         let result = RestoreObjectOutput::default();
23046         let mut result = result;
23047         result.request_charged = response.headers.remove("x-amz-request-charged");
23048         result.restore_output_path = response.headers.remove("x-amz-restore-output-path"); // parse non-payload
23049         Ok(result)
23050     }
23051 
23052     /// <p><p>This action 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>This action is not supported by Amazon S3 on Outposts.</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 S3 User 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 S3 Glacier Select</a> in the <i>Amazon S3 User 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 S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">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 S3 User 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 S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html">Appendix: SelectObjectContent Response</a> .</p> <p/> <p> <b>GetObject Support</b> </p> <p>The <code>SelectObjectContent</code> action does not support the following <code>GetObject</code> functionality. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a>.</p> <ul> <li> <p> <code>Range</code>: Although you can specify a scan range for an Amazon S3 Select request (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html#AmazonS3-SelectObjectContent-request-ScanRange">SelectObjectContentRequest - ScanRange</a> in the request parameters), 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 S3 User Guide</i>.</p> </li> </ul> <p/> <p> <b>Special Errors</b> </p> <p>For a list of special errors for this operation, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#SelectObjectContentErrorCodeList">List of SELECT Object Content Error Codes</a> </p> <p class="title"> <b>Related Resources</b> </p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html">GetBucketLifecycleConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a> </p> </li> </ul></p>
23053     #[allow(unused_variables, warnings)]
select_object_content( &self, input: SelectObjectContentRequest, ) -> Result<SelectObjectContentOutput, RusotoError<SelectObjectContentError>>23054     async fn select_object_content(
23055         &self,
23056         input: SelectObjectContentRequest,
23057     ) -> Result<SelectObjectContentOutput, RusotoError<SelectObjectContentError>> {
23058         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
23059 
23060         let mut request = SignedRequest::new("POST", "s3", &self.region, &request_uri);
23061 
23062         request.add_optional_header(
23063             "x-amz-expected-bucket-owner",
23064             input.expected_bucket_owner.as_ref(),
23065         );
23066         request.add_optional_header(
23067             "x-amz-server-side-encryption-customer-algorithm",
23068             input.sse_customer_algorithm.as_ref(),
23069         );
23070         request.add_optional_header(
23071             "x-amz-server-side-encryption-customer-key",
23072             input.sse_customer_key.as_ref(),
23073         );
23074         request.add_optional_header(
23075             "x-amz-server-side-encryption-customer-key-MD5",
23076             input.sse_customer_key_md5.as_ref(),
23077         );
23078         let mut params = Params::new();
23079         params.put_key("select");
23080         params.put("select-type", "2");
23081         request.set_params(params);
23082         let mut writer = EventWriter::new(Vec::new());
23083         SelectObjectContentRequestSerializer::serialize(
23084             &mut writer,
23085             "SelectObjectContentRequest",
23086             &input,
23087             "http://s3.amazonaws.com/doc/2006-03-01/",
23088         );
23089         request.set_payload(Some(writer.into_inner()));
23090 
23091         let mut response = self
23092             .sign_and_dispatch(request, SelectObjectContentError::from_response)
23093             .await?;
23094 
23095         unimplemented!()
23096     }
23097 
23098     /// <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a> operation. </p> </note> <p>You must initiate a multipart upload (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">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>If the upload request is signed with Signature Version 4, then AWS S3 uses the <code>x-amz-content-sha256</code> header as a checksum instead of <code>Content-MD5</code>. For more information see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html">Authenticating Requests: Using the Authorization Header (AWS Signature Version 4)</a>. </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 S3 User 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 and Permissions</a> in the <i>Amazon S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">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 S3 User 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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">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> <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a> </p> </li> </ul></p>
23099     #[allow(unused_variables, warnings)]
upload_part( &self, input: UploadPartRequest, ) -> Result<UploadPartOutput, RusotoError<UploadPartError>>23100     async fn upload_part(
23101         &self,
23102         input: UploadPartRequest,
23103     ) -> Result<UploadPartOutput, RusotoError<UploadPartError>> {
23104         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
23105 
23106         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23107 
23108         request.add_optional_header("Content-Length", input.content_length.as_ref());
23109         request.add_optional_header("Content-MD5", input.content_md5.as_ref());
23110         request.add_optional_header(
23111             "x-amz-expected-bucket-owner",
23112             input.expected_bucket_owner.as_ref(),
23113         );
23114         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
23115         request.add_optional_header(
23116             "x-amz-server-side-encryption-customer-algorithm",
23117             input.sse_customer_algorithm.as_ref(),
23118         );
23119         request.add_optional_header(
23120             "x-amz-server-side-encryption-customer-key",
23121             input.sse_customer_key.as_ref(),
23122         );
23123         request.add_optional_header(
23124             "x-amz-server-side-encryption-customer-key-MD5",
23125             input.sse_customer_key_md5.as_ref(),
23126         );
23127         let mut params = Params::new();
23128         params.put("partNumber", &input.part_number);
23129         params.put("uploadId", &input.upload_id);
23130         request.set_params(params);
23131         if let Some(__body) = input.body {
23132             request.set_payload_stream(__body);
23133         }
23134 
23135         let mut response = self
23136             .sign_and_dispatch(request, UploadPartError::from_response)
23137             .await?;
23138 
23139         let result = UploadPartOutput::default();
23140         let mut result = result;
23141         result.bucket_key_enabled = response
23142             .headers
23143             .remove("x-amz-server-side-encryption-bucket-key-enabled")
23144             .map(|value| value.parse::<bool>().unwrap());
23145         result.e_tag = response.headers.remove("ETag");
23146         result.request_charged = response.headers.remove("x-amz-request-charged");
23147         result.sse_customer_algorithm = response
23148             .headers
23149             .remove("x-amz-server-side-encryption-customer-algorithm");
23150         result.sse_customer_key_md5 = response
23151             .headers
23152             .remove("x-amz-server-side-encryption-customer-key-MD5");
23153         result.ssekms_key_id = response
23154             .headers
23155             .remove("x-amz-server-side-encryption-aws-kms-key-id");
23156         result.server_side_encryption = response.headers.remove("x-amz-server-side-encryption"); // parse non-payload
23157         Ok(result)
23158     }
23159 
23160     /// <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 S3 User Guide</i>. </p> <note> <p>Instead of using an existing object as part data, you might use the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> action 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 S3 User 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 and Permissions</a> in the <i>Amazon S3 User Guide</i>.</p> </li> <li> <p>For information about copying objects using a single atomic action 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 S3 User Guide</i>.</p> </li> <li> <p>For information about using server-side encryption with customer-provided encryption keys with the UploadPartCopy operation, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">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> <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> <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 href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a> </p> </li> </ul></p>
23161     #[allow(unused_variables, warnings)]
upload_part_copy( &self, input: UploadPartCopyRequest, ) -> Result<UploadPartCopyOutput, RusotoError<UploadPartCopyError>>23162     async fn upload_part_copy(
23163         &self,
23164         input: UploadPartCopyRequest,
23165     ) -> Result<UploadPartCopyOutput, RusotoError<UploadPartCopyError>> {
23166         let request_uri = format!("/{bucket}/{key}", bucket = input.bucket, key = input.key);
23167 
23168         let mut request = SignedRequest::new("PUT", "s3", &self.region, &request_uri);
23169 
23170         request.add_header("x-amz-copy-source", &input.copy_source.to_string());
23171         request.add_optional_header(
23172             "x-amz-copy-source-if-match",
23173             input.copy_source_if_match.as_ref(),
23174         );
23175         request.add_optional_header(
23176             "x-amz-copy-source-if-modified-since",
23177             input.copy_source_if_modified_since.as_ref(),
23178         );
23179         request.add_optional_header(
23180             "x-amz-copy-source-if-none-match",
23181             input.copy_source_if_none_match.as_ref(),
23182         );
23183         request.add_optional_header(
23184             "x-amz-copy-source-if-unmodified-since",
23185             input.copy_source_if_unmodified_since.as_ref(),
23186         );
23187         request.add_optional_header("x-amz-copy-source-range", input.copy_source_range.as_ref());
23188         request.add_optional_header(
23189             "x-amz-copy-source-server-side-encryption-customer-algorithm",
23190             input.copy_source_sse_customer_algorithm.as_ref(),
23191         );
23192         request.add_optional_header(
23193             "x-amz-copy-source-server-side-encryption-customer-key",
23194             input.copy_source_sse_customer_key.as_ref(),
23195         );
23196         request.add_optional_header(
23197             "x-amz-copy-source-server-side-encryption-customer-key-MD5",
23198             input.copy_source_sse_customer_key_md5.as_ref(),
23199         );
23200         request.add_optional_header(
23201             "x-amz-expected-bucket-owner",
23202             input.expected_bucket_owner.as_ref(),
23203         );
23204         request.add_optional_header(
23205             "x-amz-source-expected-bucket-owner",
23206             input.expected_source_bucket_owner.as_ref(),
23207         );
23208         request.add_optional_header("x-amz-request-payer", input.request_payer.as_ref());
23209         request.add_optional_header(
23210             "x-amz-server-side-encryption-customer-algorithm",
23211             input.sse_customer_algorithm.as_ref(),
23212         );
23213         request.add_optional_header(
23214             "x-amz-server-side-encryption-customer-key",
23215             input.sse_customer_key.as_ref(),
23216         );
23217         request.add_optional_header(
23218             "x-amz-server-side-encryption-customer-key-MD5",
23219             input.sse_customer_key_md5.as_ref(),
23220         );
23221         let mut params = Params::new();
23222         params.put("partNumber", &input.part_number);
23223         params.put("uploadId", &input.upload_id);
23224         request.set_params(params);
23225 
23226         let mut response = self
23227             .sign_and_dispatch(request, UploadPartCopyError::from_response)
23228             .await?;
23229 
23230         let mut response = response;
23231         let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
23232             UploadPartCopyOutputDeserializer::deserialize(actual_tag_name, stack)
23233         })
23234         .await?;
23235         let mut result = result;
23236         result.bucket_key_enabled = response
23237             .headers
23238             .remove("x-amz-server-side-encryption-bucket-key-enabled")
23239             .map(|value| value.parse::<bool>().unwrap());
23240         result.copy_source_version_id = response.headers.remove("x-amz-copy-source-version-id");
23241         result.request_charged = response.headers.remove("x-amz-request-charged");
23242         result.sse_customer_algorithm = response
23243             .headers
23244             .remove("x-amz-server-side-encryption-customer-algorithm");
23245         result.sse_customer_key_md5 = response
23246             .headers
23247             .remove("x-amz-server-side-encryption-customer-key-MD5");
23248         result.ssekms_key_id = response
23249             .headers
23250             .remove("x-amz-server-side-encryption-aws-kms-key-id");
23251         result.server_side_encryption = response.headers.remove("x-amz-server-side-encryption"); // parse non-payload
23252         Ok(result)
23253     }
23254 
23255     /// <p>Passes transformed objects to a <code>GetObject</code> operation when using Object Lambda Access Points. For information about Object Lambda Access Points, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html">Transforming objects with Object Lambda Access Points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>This operation supports metadata that can be returned by <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a>, in addition to <code>RequestRoute</code>, <code>RequestToken</code>, <code>StatusCode</code>, <code>ErrorCode</code>, and <code>ErrorMessage</code>. The <code>GetObject</code> response metadata is supported so that the <code>WriteGetObjectResponse</code> caller, typically an AWS Lambda function, can provide the same metadata when it internally invokes <code>GetObject</code>. When <code>WriteGetObjectResponse</code> is called by a customer-owned Lambda function, the metadata returned to the end user <code>GetObject</code> call might differ from what Amazon S3 would normally return.</p> <p>AWS provides some prebuilt Lambda functions that you can use with S3 Object Lambda to detect and redact personally identifiable information (PII) and decompress S3 objects. These Lambda functions are available in the AWS Serverless Application Repository, and can be selected through the AWS Management Console when you create your Object Lambda Access Point.</p> <p>Example 1: PII Access Control - This Lambda function uses Amazon Comprehend, a natural language processing (NLP) service using machine learning to find insights and relationships in text. It automatically detects personally identifiable information (PII) such as names, addresses, dates, credit card numbers, and social security numbers from documents in your Amazon S3 bucket. </p> <p>Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a natural language processing (NLP) service using machine learning to find insights and relationships in text. It automatically redacts personally identifiable information (PII) such as names, addresses, dates, credit card numbers, and social security numbers from documents in your Amazon S3 bucket. </p> <p>Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is equipped to decompress objects stored in S3 in one of six compressed file formats including bzip2, gzip, snappy, zlib, zstandard and ZIP. </p> <p>For information on how to view and use these functions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/olap-examples.html">Using AWS built Lambda functions</a> in the <i>Amazon S3 User Guide</i>.</p>
23256     #[allow(unused_variables, warnings)]
write_get_object_response( &self, input: WriteGetObjectResponseRequest, ) -> Result<(), RusotoError<WriteGetObjectResponseError>>23257     async fn write_get_object_response(
23258         &self,
23259         input: WriteGetObjectResponseRequest,
23260     ) -> Result<(), RusotoError<WriteGetObjectResponseError>> {
23261         let request_uri = "/WriteGetObjectResponse";
23262 
23263         let mut request = SignedRequest::new("POST", "s3", &self.region, &request_uri);
23264 
23265         request.add_optional_header(
23266             "x-amz-fwd-header-accept-ranges",
23267             input.accept_ranges.as_ref(),
23268         );
23269         request.add_optional_header(
23270             "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled",
23271             input.bucket_key_enabled.as_ref(),
23272         );
23273         request.add_optional_header(
23274             "x-amz-fwd-header-Cache-Control",
23275             input.cache_control.as_ref(),
23276         );
23277         request.add_optional_header(
23278             "x-amz-fwd-header-Content-Disposition",
23279             input.content_disposition.as_ref(),
23280         );
23281         request.add_optional_header(
23282             "x-amz-fwd-header-Content-Encoding",
23283             input.content_encoding.as_ref(),
23284         );
23285         request.add_optional_header(
23286             "x-amz-fwd-header-Content-Language",
23287             input.content_language.as_ref(),
23288         );
23289         request.add_optional_header("Content-Length", input.content_length.as_ref());
23290         request.add_optional_header(
23291             "x-amz-fwd-header-Content-Range",
23292             input.content_range.as_ref(),
23293         );
23294         request.add_optional_header("x-amz-fwd-header-Content-Type", input.content_type.as_ref());
23295         request.add_optional_header(
23296             "x-amz-fwd-header-x-amz-delete-marker",
23297             input.delete_marker.as_ref(),
23298         );
23299         request.add_optional_header("x-amz-fwd-header-ETag", input.e_tag.as_ref());
23300         request.add_optional_header("x-amz-fwd-error-code", input.error_code.as_ref());
23301         request.add_optional_header("x-amz-fwd-error-message", input.error_message.as_ref());
23302         request.add_optional_header(
23303             "x-amz-fwd-header-x-amz-expiration",
23304             input.expiration.as_ref(),
23305         );
23306         request.add_optional_header("x-amz-fwd-header-Expires", input.expires.as_ref());
23307         request.add_optional_header(
23308             "x-amz-fwd-header-Last-Modified",
23309             input.last_modified.as_ref(),
23310         );
23311 
23312         if let Some(ref metadata) = input.metadata {
23313             for (header_name, header_value) in metadata.iter() {
23314                 let header = format!("x-amz-meta-{}", header_name);
23315                 request.add_header(header, header_value);
23316             }
23317         }
23318         request.add_optional_header(
23319             "x-amz-fwd-header-x-amz-missing-meta",
23320             input.missing_meta.as_ref(),
23321         );
23322         request.add_optional_header(
23323             "x-amz-fwd-header-x-amz-object-lock-legal-hold",
23324             input.object_lock_legal_hold_status.as_ref(),
23325         );
23326         request.add_optional_header(
23327             "x-amz-fwd-header-x-amz-object-lock-mode",
23328             input.object_lock_mode.as_ref(),
23329         );
23330         request.add_optional_header(
23331             "x-amz-fwd-header-x-amz-object-lock-retain-until-date",
23332             input.object_lock_retain_until_date.as_ref(),
23333         );
23334         request.add_optional_header(
23335             "x-amz-fwd-header-x-amz-mp-parts-count",
23336             input.parts_count.as_ref(),
23337         );
23338         request.add_optional_header(
23339             "x-amz-fwd-header-x-amz-replication-status",
23340             input.replication_status.as_ref(),
23341         );
23342         request.add_optional_header(
23343             "x-amz-fwd-header-x-amz-request-charged",
23344             input.request_charged.as_ref(),
23345         );
23346         request.add_header("x-amz-request-route", &input.request_route.to_string());
23347         request.add_header("x-amz-request-token", &input.request_token.to_string());
23348         request.add_optional_header("x-amz-fwd-header-x-amz-restore", input.restore.as_ref());
23349         request.add_optional_header(
23350             "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm",
23351             input.sse_customer_algorithm.as_ref(),
23352         );
23353         request.add_optional_header(
23354             "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5",
23355             input.sse_customer_key_md5.as_ref(),
23356         );
23357         request.add_optional_header(
23358             "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id",
23359             input.ssekms_key_id.as_ref(),
23360         );
23361         request.add_optional_header(
23362             "x-amz-fwd-header-x-amz-server-side-encryption",
23363             input.server_side_encryption.as_ref(),
23364         );
23365         request.add_optional_header("x-amz-fwd-status", input.status_code.as_ref());
23366         request.add_optional_header(
23367             "x-amz-fwd-header-x-amz-storage-class",
23368             input.storage_class.as_ref(),
23369         );
23370         request.add_optional_header(
23371             "x-amz-fwd-header-x-amz-tagging-count",
23372             input.tag_count.as_ref(),
23373         );
23374         request.add_optional_header(
23375             "x-amz-fwd-header-x-amz-version-id",
23376             input.version_id.as_ref(),
23377         );
23378 
23379         if let Some(__body) = input.body {
23380             request.set_payload_stream(__body);
23381         }
23382 
23383         let mut response = self
23384             .sign_and_dispatch(request, WriteGetObjectResponseError::from_response)
23385             .await?;
23386 
23387         std::mem::drop(response);
23388         Ok(())
23389     }
23390 }
23391 
23392 #[cfg(test)]
23393 mod protocol_tests {
23394 
23395     extern crate rusoto_mock;
23396 
23397     use self::rusoto_mock::*;
23398     use super::*;
23399     use rusoto_core::Region as rusoto_region;
23400 
23401     #[tokio::test]
test_parse_error_s3_create_bucket()23402     async fn test_parse_error_s3_create_bucket() {
23403         let mock_response = MockResponseReader::read_response(
23404             "test_resources/generated/error",
23405             "s3-create-bucket.xml",
23406         );
23407         let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
23408         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
23409         let request = CreateBucketRequest::default();
23410         let result = client.create_bucket(request).await;
23411         assert!(!result.is_ok(), "parse error: {:?}", result);
23412     }
23413 
23414     #[tokio::test]
test_parse_error_s3_list_objects()23415     async fn test_parse_error_s3_list_objects() {
23416         let mock_response = MockResponseReader::read_response(
23417             "test_resources/generated/error",
23418             "s3-list-objects.xml",
23419         );
23420         let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
23421         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
23422         let request = ListObjectsRequest::default();
23423         let result = client.list_objects(request).await;
23424         assert!(!result.is_ok(), "parse error: {:?}", result);
23425     }
23426 
23427     #[tokio::test]
test_parse_valid_s3_get_bucket_acl()23428     async fn test_parse_valid_s3_get_bucket_acl() {
23429         let mock_response = MockResponseReader::read_response(
23430             "test_resources/generated/valid",
23431             "s3-get-bucket-acl.xml",
23432         );
23433         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
23434         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
23435         let request = GetBucketAclRequest::default();
23436         let result = client.get_bucket_acl(request).await;
23437         assert!(result.is_ok(), "parse error: {:?}", result);
23438     }
23439 
23440     #[tokio::test]
test_parse_valid_s3_get_bucket_location()23441     async fn test_parse_valid_s3_get_bucket_location() {
23442         let mock_response = MockResponseReader::read_response(
23443             "test_resources/generated/valid",
23444             "s3-get-bucket-location.xml",
23445         );
23446         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
23447         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
23448         let request = GetBucketLocationRequest::default();
23449         let result = client.get_bucket_location(request).await;
23450         assert!(result.is_ok(), "parse error: {:?}", result);
23451     }
23452 
23453     #[tokio::test]
test_parse_valid_s3_get_bucket_logging()23454     async fn test_parse_valid_s3_get_bucket_logging() {
23455         let mock_response = MockResponseReader::read_response(
23456             "test_resources/generated/valid",
23457             "s3-get-bucket-logging.xml",
23458         );
23459         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
23460         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
23461         let request = GetBucketLoggingRequest::default();
23462         let result = client.get_bucket_logging(request).await;
23463         assert!(result.is_ok(), "parse error: {:?}", result);
23464     }
23465 
23466     #[tokio::test]
test_parse_valid_s3_get_bucket_policy()23467     async fn test_parse_valid_s3_get_bucket_policy() {
23468         let mock_response = MockResponseReader::read_response(
23469             "test_resources/generated/valid",
23470             "s3-get-bucket-policy.xml",
23471         );
23472         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
23473         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
23474         let request = GetBucketPolicyRequest::default();
23475         let result = client.get_bucket_policy(request).await;
23476         assert!(result.is_ok(), "parse error: {:?}", result);
23477     }
23478 
23479     #[tokio::test]
test_parse_valid_s3_list_buckets()23480     async fn test_parse_valid_s3_list_buckets() {
23481         let mock_response = MockResponseReader::read_response(
23482             "test_resources/generated/valid",
23483             "s3-list-buckets.xml",
23484         );
23485         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
23486         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
23487 
23488         let result = client.list_buckets().await;
23489         assert!(result.is_ok(), "parse error: {:?}", result);
23490     }
23491 
23492     #[tokio::test]
test_parse_valid_s3_list_multipart_uploads()23493     async fn test_parse_valid_s3_list_multipart_uploads() {
23494         let mock_response = MockResponseReader::read_response(
23495             "test_resources/generated/valid",
23496             "s3-list-multipart-uploads.xml",
23497         );
23498         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
23499         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
23500         let request = ListMultipartUploadsRequest::default();
23501         let result = client.list_multipart_uploads(request).await;
23502         assert!(result.is_ok(), "parse error: {:?}", result);
23503     }
23504 
23505     #[tokio::test]
test_parse_valid_s3_list_object_versions()23506     async fn test_parse_valid_s3_list_object_versions() {
23507         let mock_response = MockResponseReader::read_response(
23508             "test_resources/generated/valid",
23509             "s3-list-object-versions.xml",
23510         );
23511         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
23512         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
23513         let request = ListObjectVersionsRequest::default();
23514         let result = client.list_object_versions(request).await;
23515         assert!(result.is_ok(), "parse error: {:?}", result);
23516     }
23517 
23518     #[tokio::test]
test_parse_valid_s3_list_objects()23519     async fn test_parse_valid_s3_list_objects() {
23520         let mock_response = MockResponseReader::read_response(
23521             "test_resources/generated/valid",
23522             "s3-list-objects.xml",
23523         );
23524         let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
23525         let client = S3Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
23526         let request = ListObjectsRequest::default();
23527         let result = client.list_objects(request).await;
23528         assert!(result.is_ok(), "parse error: {:?}", result);
23529     }
23530 }
23531