#[allow(unused_mut)]
pub fn ser_logging_config(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::LoggingConfig,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("LogRoleArn");
if let Some(var_2) = &input.log_role_arn {
scope_1.string(var_2);
}
#[allow(unused_mut)]
let mut scope_3 = writer.prefix("LogGroupName");
if let Some(var_4) = &input.log_group_name {
scope_3.string(var_4);
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_logging_config(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::LoggingConfig, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::LoggingConfig::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("LogRoleArn") => {
let var_5 =
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_log_role_arn(var_5);
}
,
s if s.matches("LogGroupName") => {
let var_6 =
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_log_group_name(var_6);
}
,
_ => {}
}
}
Ok(crate::serde_util::logging_config_correct_errors(builder).build())
}