aws_sdk_ec2/protocol_serde/
shape_prefix_list.rs1#[allow(clippy::needless_question_mark)]
3pub fn de_prefix_list(
4 decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
5) -> ::std::result::Result<crate::types::PrefixList, ::aws_smithy_xml::decode::XmlDecodeError> {
6 #[allow(unused_mut)]
7 let mut builder = crate::types::PrefixList::builder();
8 while let Some(mut tag) = decoder.next_tag() {
9 match tag.start_el() {
10 s if s.matches("cidrSet") => {
11 let var_1 =
12 Some(
13 crate::protocol_serde::shape_value_string_list::de_value_string_list(&mut tag)
14 ?
15 )
16 ;
17 builder = builder.set_cidrs(var_1);
18 }
19 ,
20 s if s.matches("prefixListId") => {
21 let var_2 =
22 Some(
23 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
24 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
25 .into()
26 )
27 ?
28 )
29 ;
30 builder = builder.set_prefix_list_id(var_2);
31 }
32 ,
33 s if s.matches("prefixListName") => {
34 let var_3 =
35 Some(
36 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
37 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
38 .into()
39 )
40 ?
41 )
42 ;
43 builder = builder.set_prefix_list_name(var_3);
44 }
45 ,
46 _ => {}
47 }
48 }
49 Ok(builder.build())
50}