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_ipam_prefix_list_resolver(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::IpamPrefixListResolver, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::IpamPrefixListResolver::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#IpamPrefixListResolver$OwnerId */ =>  {
                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_owner_id(var_1);
            }
            ,
            s if s.matches("ipamPrefixListResolverId") /* IpamPrefixListResolverId com.amazonaws.ec2#IpamPrefixListResolver$IpamPrefixListResolverId */ =>  {
                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_ipam_prefix_list_resolver_id(var_2);
            }
            ,
            s if s.matches("ipamPrefixListResolverArn") /* IpamPrefixListResolverArn com.amazonaws.ec2#IpamPrefixListResolver$IpamPrefixListResolverArn */ =>  {
                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_ipam_prefix_list_resolver_arn(var_3);
            }
            ,
            s if s.matches("ipamArn") /* IpamArn com.amazonaws.ec2#IpamPrefixListResolver$IpamArn */ =>  {
                let var_4 =
                    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_ipam_arn(var_4);
            }
            ,
            s if s.matches("ipamRegion") /* IpamRegion com.amazonaws.ec2#IpamPrefixListResolver$IpamRegion */ =>  {
                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_ipam_region(var_5);
            }
            ,
            s if s.matches("description") /* Description com.amazonaws.ec2#IpamPrefixListResolver$Description */ =>  {
                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_description(var_6);
            }
            ,
            s if s.matches("addressFamily") /* AddressFamily com.amazonaws.ec2#IpamPrefixListResolver$AddressFamily */ =>  {
                let var_7 =
                    Some(
                        Result::<crate::types::AddressFamily, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::AddressFamily::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_address_family(var_7);
            }
            ,
            s if s.matches("state") /* State com.amazonaws.ec2#IpamPrefixListResolver$State */ =>  {
                let var_8 =
                    Some(
                        Result::<crate::types::IpamPrefixListResolverState, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::IpamPrefixListResolverState::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_state(var_8);
            }
            ,
            s if s.matches("tagSet") /* Tags com.amazonaws.ec2#IpamPrefixListResolver$Tags */ =>  {
                let var_9 =
                    Some(
                        crate::protocol_serde::shape_tag_list::de_tag_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_tags(var_9);
            }
            ,
            s if s.matches("lastVersionCreationStatus") /* LastVersionCreationStatus com.amazonaws.ec2#IpamPrefixListResolver$LastVersionCreationStatus */ =>  {
                let var_10 =
                    Some(
                        Result::<crate::types::IpamPrefixListResolverVersionCreationStatus, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::IpamPrefixListResolverVersionCreationStatus::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_last_version_creation_status(var_10);
            }
            ,
            s if s.matches("lastVersionCreationStatusMessage") /* LastVersionCreationStatusMessage com.amazonaws.ec2#IpamPrefixListResolver$LastVersionCreationStatusMessage */ =>  {
                let var_11 =
                    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_last_version_creation_status_message(var_11);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}