aws-sdk-route53 0.25.1

AWS SDK for Amazon Route 53
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn de_health_check(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::HealthCheck, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::HealthCheck::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("Id") /* Id com.amazonaws.route53#HealthCheck$Id */ =>  {
                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_id(var_1);
            }
            ,
            s if s.matches("CallerReference") /* CallerReference com.amazonaws.route53#HealthCheck$CallerReference */ =>  {
                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_caller_reference(var_2);
            }
            ,
            s if s.matches("LinkedService") /* LinkedService com.amazonaws.route53#HealthCheck$LinkedService */ =>  {
                let var_3 =
                    Some(
                        crate::protocol_serde::shape_linked_service::de_linked_service(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_linked_service(var_3);
            }
            ,
            s if s.matches("HealthCheckConfig") /* HealthCheckConfig com.amazonaws.route53#HealthCheck$HealthCheckConfig */ =>  {
                let var_4 =
                    Some(
                        crate::protocol_serde::shape_health_check_config::de_health_check_config(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_health_check_config(var_4);
            }
            ,
            s if s.matches("HealthCheckVersion") /* HealthCheckVersion com.amazonaws.route53#HealthCheck$HealthCheckVersion */ =>  {
                let var_5 =
                    Some(
                         {
                            <i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.route53#HealthCheckVersion`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_health_check_version(var_5);
            }
            ,
            s if s.matches("CloudWatchAlarmConfiguration") /* CloudWatchAlarmConfiguration com.amazonaws.route53#HealthCheck$CloudWatchAlarmConfiguration */ =>  {
                let var_6 =
                    Some(
                        crate::protocol_serde::shape_cloud_watch_alarm_configuration::de_cloud_watch_alarm_configuration(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_cloud_watch_alarm_configuration(var_6);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}