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_public_ip_dns_name_options(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::PublicIpDnsNameOptions, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::PublicIpDnsNameOptions::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("dnsHostnameType") /* DnsHostnameType com.amazonaws.ec2#PublicIpDnsNameOptions$DnsHostnameType */ =>  {
                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_dns_hostname_type(var_1);
            }
            ,
            s if s.matches("publicIpv4DnsName") /* PublicIpv4DnsName com.amazonaws.ec2#PublicIpDnsNameOptions$PublicIpv4DnsName */ =>  {
                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_public_ipv4_dns_name(var_2);
            }
            ,
            s if s.matches("publicIpv6DnsName") /* PublicIpv6DnsName com.amazonaws.ec2#PublicIpDnsNameOptions$PublicIpv6DnsName */ =>  {
                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_public_ipv6_dns_name(var_3);
            }
            ,
            s if s.matches("publicDualStackDnsName") /* PublicDualStackDnsName com.amazonaws.ec2#PublicIpDnsNameOptions$PublicDualStackDnsName */ =>  {
                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_public_dual_stack_dns_name(var_4);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}