#[allow(clippy::needless_question_mark)]
pub fn de_access_grants_location_configuration(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::AccessGrantsLocationConfiguration, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::AccessGrantsLocationConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("S3SubPrefix") => {
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_s3_sub_prefix(var_1);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn ser_access_grants_location_configuration(
input: &crate::types::AccessGrantsLocationConfiguration,
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_2) = &input.s3_sub_prefix {
let mut inner_writer = scope.start_el("S3SubPrefix").finish();
inner_writer.data(var_2.as_str());
}
scope.finish();
Ok(())
}