aws-sdk-ec2 1.224.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_security_group_vpc_association(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::SecurityGroupVpcAssociation, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::SecurityGroupVpcAssociation::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("groupId") /* GroupId com.amazonaws.ec2#SecurityGroupVpcAssociation$GroupId */ =>  {
                let var_1 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_group_id(var_1);
            }
            ,
            s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#SecurityGroupVpcAssociation$VpcId */ =>  {
                let var_2 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_vpc_id(var_2);
            }
            ,
            s if s.matches("vpcOwnerId") /* VpcOwnerId com.amazonaws.ec2#SecurityGroupVpcAssociation$VpcOwnerId */ =>  {
                let var_3 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_vpc_owner_id(var_3);
            }
            ,
            s if s.matches("state") /* State com.amazonaws.ec2#SecurityGroupVpcAssociation$State */ =>  {
                let var_4 =
                    Some(
                        Result::<crate::types::SecurityGroupVpcAssociationState, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::SecurityGroupVpcAssociationState::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_state(var_4);
            }
            ,
            s if s.matches("stateReason") /* StateReason com.amazonaws.ec2#SecurityGroupVpcAssociation$StateReason */ =>  {
                let var_5 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_state_reason(var_5);
            }
            ,
            s if s.matches("groupOwnerId") /* GroupOwnerId com.amazonaws.ec2#SecurityGroupVpcAssociation$GroupOwnerId */ =>  {
                let var_6 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_group_owner_id(var_6);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}