aws_sdk_s3/protocol_serde/
shape_restore_object_input.rs
1pub fn ser_restore_request_http_payload(
3 payload: &::std::option::Option<crate::types::RestoreRequest>,
4) -> ::std::result::Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::BuildError> {
5 let payload = match payload.as_ref() {
6 Some(t) => t,
7 None => return Ok(crate::protocol_serde::rest_xml_unset_struct_payload()),
8 };
9 Ok(crate::protocol_serde::shape_restore_object_input::ser_restore_request_payload(payload)?)
10}
11
12pub fn ser_restore_request_payload(
13 input: &crate::types::RestoreRequest,
14) -> std::result::Result<std::vec::Vec<u8>, ::aws_smithy_types::error::operation::SerializationError> {
15 let mut out = String::new();
16 {
17 let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
18 #[allow(unused_mut)]
19 let mut root = writer
20 .start_el("RestoreRequest")
21 .write_ns("http://s3.amazonaws.com/doc/2006-03-01/", None);
22 crate::protocol_serde::shape_restore_request::ser_restore_request(input, root)?
23 }
24 Ok(out.into_bytes())
25}