aws_sdk_s3/protocol_serde/
shape_object_lock_legal_hold.rspub fn ser_object_lock_legal_hold(
input: &crate::types::ObjectLockLegalHold,
writer: ::aws_smithy_xml::encode::ElWriter,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope = writer.finish();
if let Some(var_1) = &input.status {
let mut inner_writer = scope.start_el("Status").finish();
inner_writer.data(var_1.as_str());
}
scope.finish();
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_object_lock_legal_hold(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::ObjectLockLegalHold, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::ObjectLockLegalHold::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Status") => {
let var_2 =
Some(
Result::<crate::types::ObjectLockLegalHoldStatus, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::types::ObjectLockLegalHoldStatus::from(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2);
}
,
_ => {}
}
}
Ok(builder.build())
}