aws-sdk-route53 0.25.0

AWS SDK for Amazon Route 53
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_vpc(
    input: &crate::types::Vpc,
    writer: aws_smithy_xml::encode::ElWriter,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope = writer.finish();
    if let Some(var_1) = &input.vpc_region {
        let mut inner_writer = scope.start_el("VPCRegion").finish();
        inner_writer.data(var_1.as_str());
    }
    if let Some(var_2) = &input.vpc_id {
        let mut inner_writer = scope.start_el("VPCId").finish();
        inner_writer.data(var_2.as_str());
    }
    scope.finish();
    Ok(())
}

pub fn de_vpc(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::Vpc, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::Vpc::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("VPCRegion") /* VPCRegion com.amazonaws.route53#VPC$VPCRegion */ =>  {
                let var_3 =
                    Some(
                        Result::<crate::types::VpcRegion, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::VpcRegion::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_vpc_region(var_3);
            }
            ,
            s if s.matches("VPCId") /* VPCId com.amazonaws.route53#VPC$VPCId */ =>  {
                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_vpc_id(var_4);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}