#[allow(unused_mut)]
pub fn ser_connect(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::Connect,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("Authorization");
if let Some(var_2) = &input.authorization {
scope_1.string(var_2.as_str());
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_connect(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::Connect, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::Connect::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Authorization") => {
let var_3 =
Some(
Result::<crate::types::ServiceAuthorization, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::types::ServiceAuthorization::from(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_authorization(var_3);
}
,
_ => {}
}
}
Ok(crate::serde_util::connect_correct_errors(builder).build())
}