aws-sdk-ec2 1.222.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_neuron_info(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::NeuronInfo, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::NeuronInfo::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("neuronDevices") /* NeuronDevices com.amazonaws.ec2#NeuronInfo$NeuronDevices */ =>  {
                let var_1 =
                    Some(
                        crate::protocol_serde::shape_neuron_device_info_list::de_neuron_device_info_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_neuron_devices(var_1);
            }
            ,
            s if s.matches("totalNeuronDeviceMemoryInMiB") /* TotalNeuronDeviceMemoryInMiB com.amazonaws.ec2#NeuronInfo$TotalNeuronDeviceMemoryInMiB */ =>  {
                let var_2 =
                    Some(
                         {
                            <i32 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 (integer: `com.amazonaws.ec2#TotalNeuronMemory`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_total_neuron_device_memory_in_mib(var_2);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}