pub fn ser_job_manifest(
input: &crate::types::JobManifest,
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.spec {
let inner_writer = scope.start_el("Spec");
crate::protocol_serde::shape_job_manifest_spec::ser_job_manifest_spec(var_1, inner_writer)?
}
if let Some(var_2) = &input.location {
let inner_writer = scope.start_el("Location");
crate::protocol_serde::shape_job_manifest_location::ser_job_manifest_location(var_2, inner_writer)?
}
scope.finish();
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_job_manifest(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
depth: u32,
) -> ::std::result::Result<crate::types::JobManifest, ::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::JobManifest::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Spec") => {
let var_3 =
Some(
crate::protocol_serde::shape_job_manifest_spec::de_job_manifest_spec(&mut tag, depth + 1)
?
)
;
builder = builder.set_spec(var_3);
}
,
s if s.matches("Location") => {
let var_4 =
Some(
crate::protocol_serde::shape_job_manifest_location::de_job_manifest_location(&mut tag, depth + 1)
?
)
;
builder = builder.set_location(var_4);
}
,
_ => {}
}
}
Ok(crate::serde_util::job_manifest_correct_errors(builder).build())
}