aws-sdk-s3control 1.119.0

AWS SDK for AWS S3 Control
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_storage_lens_group_level(
    input: &crate::types::StorageLensGroupLevel,
    writer: ::aws_smithy_xml::encode::ElWriter,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    #[allow(unused_mut)]
    let mut scope = writer.finish();
    if let Some(var_1) = &input.selection_criteria {
        let inner_writer = scope.start_el("SelectionCriteria");
        crate::protocol_serde::shape_storage_lens_group_level_selection_criteria::ser_storage_lens_group_level_selection_criteria(
            var_1,
            inner_writer,
        )?
    }
    scope.finish();
    Ok(())
}

#[allow(clippy::needless_question_mark)]
pub fn de_storage_lens_group_level(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
    depth: u32,
) -> ::std::result::Result<crate::types::StorageLensGroupLevel, ::aws_smithy_xml::decode::XmlDecodeError> {
    if depth >= 128u32 {
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom("maximum nesting depth exceeded"));
    }
    #[allow(unused_mut)]
    let mut builder = crate::types::StorageLensGroupLevel::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("SelectionCriteria") /* SelectionCriteria com.amazonaws.s3control#StorageLensGroupLevel$SelectionCriteria */ =>  {
                let var_2 =
                    Some(
                        crate::protocol_serde::shape_storage_lens_group_level_selection_criteria::de_storage_lens_group_level_selection_criteria(&mut tag, depth + 1)
                        ?
                    )
                ;
                builder = builder.set_selection_criteria(var_2);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}