aws-sdk-ec2 1.222.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_client_vpn_authentication(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::ClientVpnAuthentication, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::ClientVpnAuthentication::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("type") /* Type com.amazonaws.ec2#ClientVpnAuthentication$Type */ =>  {
                let var_1 =
                    Some(
                        Result::<crate::types::ClientVpnAuthenticationType, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::ClientVpnAuthenticationType::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_type(var_1);
            }
            ,
            s if s.matches("activeDirectory") /* ActiveDirectory com.amazonaws.ec2#ClientVpnAuthentication$ActiveDirectory */ =>  {
                let var_2 =
                    Some(
                        crate::protocol_serde::shape_directory_service_authentication::de_directory_service_authentication(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_active_directory(var_2);
            }
            ,
            s if s.matches("mutualAuthentication") /* MutualAuthentication com.amazonaws.ec2#ClientVpnAuthentication$MutualAuthentication */ =>  {
                let var_3 =
                    Some(
                        crate::protocol_serde::shape_certificate_authentication::de_certificate_authentication(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_mutual_authentication(var_3);
            }
            ,
            s if s.matches("federatedAuthentication") /* FederatedAuthentication com.amazonaws.ec2#ClientVpnAuthentication$FederatedAuthentication */ =>  {
                let var_4 =
                    Some(
                        crate::protocol_serde::shape_federated_authentication::de_federated_authentication(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_federated_authentication(var_4);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}