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(unused_mut)]
pub fn ser_target_groups_config(
    mut writer: ::aws_smithy_query::QueryValueWriter,
    input: &crate::types::TargetGroupsConfig,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1 = writer.prefix("TargetGroups");
    if let Some(var_2) = &input.target_groups {
        if !var_2.is_empty() {
            let mut list_4 = scope_1.start_list(true, Some("item"));
            for item_3 in var_2 {
                #[allow(unused_mut)]
                let mut entry_5 = list_4.entry();
                crate::protocol_serde::shape_target_group::ser_target_group(entry_5, item_3)?;
            }
            list_4.finish();
        }
    }
    Ok(())
}

#[allow(clippy::needless_question_mark)]
pub fn de_target_groups_config(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::TargetGroupsConfig, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::TargetGroupsConfig::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("targetGroups") /* TargetGroups com.amazonaws.ec2#TargetGroupsConfig$TargetGroups */ =>  {
                let var_6 =
                    Some(
                        crate::protocol_serde::shape_target_groups::de_target_groups(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_target_groups(var_6);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}