aws_sdk_s3/protocol_serde/
shape_get_bucket_metadata_table_configuration_result.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(clippy::needless_question_mark)]
3pub fn de_get_bucket_metadata_table_configuration_result(
4    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
5) -> ::std::result::Result<crate::types::GetBucketMetadataTableConfigurationResult, ::aws_smithy_xml::decode::XmlDecodeError> {
6    #[allow(unused_mut)]
7    let mut builder = crate::types::GetBucketMetadataTableConfigurationResult::builder();
8    while let Some(mut tag) = decoder.next_tag() {
9        match tag.start_el() {
10            s if s.matches("MetadataTableConfigurationResult") /* MetadataTableConfigurationResult com.amazonaws.s3#GetBucketMetadataTableConfigurationResult$MetadataTableConfigurationResult */ =>  {
11                let var_1 =
12                    Some(
13                        crate::protocol_serde::shape_metadata_table_configuration_result::de_metadata_table_configuration_result(&mut tag)
14                        ?
15                    )
16                ;
17                builder = builder.set_metadata_table_configuration_result(var_1);
18            }
19            ,
20            s if s.matches("Status") /* Status com.amazonaws.s3#GetBucketMetadataTableConfigurationResult$Status */ =>  {
21                let var_2 =
22                    Some(
23                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
24                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
25                            .into()
26                        )
27                        ?
28                    )
29                ;
30                builder = builder.set_status(var_2);
31            }
32            ,
33            s if s.matches("Error") /* Error com.amazonaws.s3#GetBucketMetadataTableConfigurationResult$Error */ =>  {
34                let var_3 =
35                    Some(
36                        crate::protocol_serde::shape_error_details::de_error_details(&mut tag)
37                        ?
38                    )
39                ;
40                builder = builder.set_error(var_3);
41            }
42            ,
43            _ => {}
44        }
45    }
46    Ok(crate::serde_util::get_bucket_metadata_table_configuration_result_correct_errors(builder)
47        .build()
48        .map_err(|_| ::aws_smithy_xml::decode::XmlDecodeError::custom("missing field"))?)
49}