aws_sdk_ec2/protocol_serde/
shape_export_to_s3_task.rs1#[allow(clippy::needless_question_mark)]
3pub fn de_export_to_s3_task(
4 decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
5) -> ::std::result::Result<crate::types::ExportToS3Task, ::aws_smithy_xml::decode::XmlDecodeError> {
6 #[allow(unused_mut)]
7 let mut builder = crate::types::ExportToS3Task::builder();
8 while let Some(mut tag) = decoder.next_tag() {
9 match tag.start_el() {
10 s if s.matches("containerFormat") => {
11 let var_1 =
12 Some(
13 Result::<crate::types::ContainerFormat, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
14 crate::types::ContainerFormat::from(
15 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
16 )
17 )
18 ?
19 )
20 ;
21 builder = builder.set_container_format(var_1);
22 }
23 ,
24 s if s.matches("diskImageFormat") => {
25 let var_2 =
26 Some(
27 Result::<crate::types::DiskImageFormat, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
28 crate::types::DiskImageFormat::from(
29 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
30 )
31 )
32 ?
33 )
34 ;
35 builder = builder.set_disk_image_format(var_2);
36 }
37 ,
38 s if s.matches("s3Bucket") => {
39 let var_3 =
40 Some(
41 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
42 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
43 .into()
44 )
45 ?
46 )
47 ;
48 builder = builder.set_s3_bucket(var_3);
49 }
50 ,
51 s if s.matches("s3Key") => {
52 let var_4 =
53 Some(
54 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
55 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
56 .into()
57 )
58 ?
59 )
60 ;
61 builder = builder.set_s3_key(var_4);
62 }
63 ,
64 _ => {}
65 }
66 }
67 Ok(builder.build())
68}