aws-sdk-ec2 1.218.0

AWS SDK for Amazon Elastic Compute Cloud
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(clippy::needless_question_mark)]
pub fn de_vpc_encryption_control_exclusions(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::VpcEncryptionControlExclusions, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::VpcEncryptionControlExclusions::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("internetGateway") /* InternetGateway com.amazonaws.ec2#VpcEncryptionControlExclusions$InternetGateway */ =>  {
                let var_1 =
                    Some(
                        crate::protocol_serde::shape_vpc_encryption_control_exclusion::de_vpc_encryption_control_exclusion(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_internet_gateway(var_1);
            }
            ,
            s if s.matches("egressOnlyInternetGateway") /* EgressOnlyInternetGateway com.amazonaws.ec2#VpcEncryptionControlExclusions$EgressOnlyInternetGateway */ =>  {
                let var_2 =
                    Some(
                        crate::protocol_serde::shape_vpc_encryption_control_exclusion::de_vpc_encryption_control_exclusion(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_egress_only_internet_gateway(var_2);
            }
            ,
            s if s.matches("natGateway") /* NatGateway com.amazonaws.ec2#VpcEncryptionControlExclusions$NatGateway */ =>  {
                let var_3 =
                    Some(
                        crate::protocol_serde::shape_vpc_encryption_control_exclusion::de_vpc_encryption_control_exclusion(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_nat_gateway(var_3);
            }
            ,
            s if s.matches("virtualPrivateGateway") /* VirtualPrivateGateway com.amazonaws.ec2#VpcEncryptionControlExclusions$VirtualPrivateGateway */ =>  {
                let var_4 =
                    Some(
                        crate::protocol_serde::shape_vpc_encryption_control_exclusion::de_vpc_encryption_control_exclusion(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_virtual_private_gateway(var_4);
            }
            ,
            s if s.matches("vpcPeering") /* VpcPeering com.amazonaws.ec2#VpcEncryptionControlExclusions$VpcPeering */ =>  {
                let var_5 =
                    Some(
                        crate::protocol_serde::shape_vpc_encryption_control_exclusion::de_vpc_encryption_control_exclusion(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_vpc_peering(var_5);
            }
            ,
            s if s.matches("lambda") /* Lambda com.amazonaws.ec2#VpcEncryptionControlExclusions$Lambda */ =>  {
                let var_6 =
                    Some(
                        crate::protocol_serde::shape_vpc_encryption_control_exclusion::de_vpc_encryption_control_exclusion(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_lambda(var_6);
            }
            ,
            s if s.matches("vpcLattice") /* VpcLattice com.amazonaws.ec2#VpcEncryptionControlExclusions$VpcLattice */ =>  {
                let var_7 =
                    Some(
                        crate::protocol_serde::shape_vpc_encryption_control_exclusion::de_vpc_encryption_control_exclusion(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_vpc_lattice(var_7);
            }
            ,
            s if s.matches("elasticFileSystem") /* ElasticFileSystem com.amazonaws.ec2#VpcEncryptionControlExclusions$ElasticFileSystem */ =>  {
                let var_8 =
                    Some(
                        crate::protocol_serde::shape_vpc_encryption_control_exclusion::de_vpc_encryption_control_exclusion(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_elastic_file_system(var_8);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}