aws_sdk_ec2/protocol_serde/
shape_packet_header_statement.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(clippy::needless_question_mark)]
3pub fn de_packet_header_statement(
4    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
5) -> ::std::result::Result<crate::types::PacketHeaderStatement, ::aws_smithy_xml::decode::XmlDecodeError> {
6    #[allow(unused_mut)]
7    let mut builder = crate::types::PacketHeaderStatement::builder();
8    while let Some(mut tag) = decoder.next_tag() {
9        match tag.start_el() {
10            s if s.matches("sourceAddressSet") /* SourceAddresses com.amazonaws.ec2#PacketHeaderStatement$SourceAddresses */ =>  {
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_source_addresses(var_1);
18            }
19            ,
20            s if s.matches("destinationAddressSet") /* DestinationAddresses com.amazonaws.ec2#PacketHeaderStatement$DestinationAddresses */ =>  {
21                let var_2 =
22                    Some(
23                        crate::protocol_serde::shape_value_string_list::de_value_string_list(&mut tag)
24                        ?
25                    )
26                ;
27                builder = builder.set_destination_addresses(var_2);
28            }
29            ,
30            s if s.matches("sourcePortSet") /* SourcePorts com.amazonaws.ec2#PacketHeaderStatement$SourcePorts */ =>  {
31                let var_3 =
32                    Some(
33                        crate::protocol_serde::shape_value_string_list::de_value_string_list(&mut tag)
34                        ?
35                    )
36                ;
37                builder = builder.set_source_ports(var_3);
38            }
39            ,
40            s if s.matches("destinationPortSet") /* DestinationPorts com.amazonaws.ec2#PacketHeaderStatement$DestinationPorts */ =>  {
41                let var_4 =
42                    Some(
43                        crate::protocol_serde::shape_value_string_list::de_value_string_list(&mut tag)
44                        ?
45                    )
46                ;
47                builder = builder.set_destination_ports(var_4);
48            }
49            ,
50            s if s.matches("sourcePrefixListSet") /* SourcePrefixLists com.amazonaws.ec2#PacketHeaderStatement$SourcePrefixLists */ =>  {
51                let var_5 =
52                    Some(
53                        crate::protocol_serde::shape_value_string_list::de_value_string_list(&mut tag)
54                        ?
55                    )
56                ;
57                builder = builder.set_source_prefix_lists(var_5);
58            }
59            ,
60            s if s.matches("destinationPrefixListSet") /* DestinationPrefixLists com.amazonaws.ec2#PacketHeaderStatement$DestinationPrefixLists */ =>  {
61                let var_6 =
62                    Some(
63                        crate::protocol_serde::shape_value_string_list::de_value_string_list(&mut tag)
64                        ?
65                    )
66                ;
67                builder = builder.set_destination_prefix_lists(var_6);
68            }
69            ,
70            s if s.matches("protocolSet") /* Protocols com.amazonaws.ec2#PacketHeaderStatement$Protocols */ =>  {
71                let var_7 =
72                    Some(
73                        crate::protocol_serde::shape_protocol_list::de_protocol_list(&mut tag)
74                        ?
75                    )
76                ;
77                builder = builder.set_protocols(var_7);
78            }
79            ,
80            _ => {}
81        }
82    }
83    Ok(builder.build())
84}