aws_sdk_s3/protocol_serde/
shape_inventory_destination.rs
1#[allow(clippy::needless_question_mark)]
3pub fn de_inventory_destination(
4 decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
5) -> ::std::result::Result<crate::types::InventoryDestination, ::aws_smithy_xml::decode::XmlDecodeError> {
6 #[allow(unused_mut)]
7 let mut builder = crate::types::InventoryDestination::builder();
8 while let Some(mut tag) = decoder.next_tag() {
9 match tag.start_el() {
10 s if s.matches("S3BucketDestination") => {
11 let var_1 =
12 Some(
13 crate::protocol_serde::shape_inventory_s3_bucket_destination::de_inventory_s3_bucket_destination(&mut tag)
14 ?
15 )
16 ;
17 builder = builder.set_s3_bucket_destination(var_1);
18 }
19 ,
20 _ => {}
21 }
22 }
23 Ok(crate::serde_util::inventory_destination_correct_errors(builder).build())
24}
25
26pub fn ser_inventory_destination(
27 input: &crate::types::InventoryDestination,
28 writer: ::aws_smithy_xml::encode::ElWriter,
29) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
30 #[allow(unused_mut)]
31 let mut scope = writer.finish();
32 if let Some(var_2) = &input.s3_bucket_destination {
33 let inner_writer = scope.start_el("S3BucketDestination");
34 crate::protocol_serde::shape_inventory_s3_bucket_destination::ser_inventory_s3_bucket_destination(var_2, inner_writer)?
35 }
36 scope.finish();
37 Ok(())
38}