aws_sdk_s3/protocol_serde/
shape_partitioned_prefix.rs
1#[allow(clippy::needless_question_mark)]
3pub fn de_partitioned_prefix(
4 decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
5) -> ::std::result::Result<crate::types::PartitionedPrefix, ::aws_smithy_xml::decode::XmlDecodeError> {
6 #[allow(unused_mut)]
7 let mut builder = crate::types::PartitionedPrefix::builder();
8 while let Some(mut tag) = decoder.next_tag() {
9 match tag.start_el() {
10 s if s.matches("PartitionDateSource") => {
11 let var_1 =
12 Some(
13 Result::<crate::types::PartitionDateSource, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
14 crate::types::PartitionDateSource::from(
15 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
16 )
17 )
18 ?
19 )
20 ;
21 builder = builder.set_partition_date_source(var_1);
22 }
23 ,
24 _ => {}
25 }
26 }
27 Ok(builder.build())
28}
29
30pub fn ser_partitioned_prefix(
31 input: &crate::types::PartitionedPrefix,
32 writer: ::aws_smithy_xml::encode::ElWriter,
33) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
34 #[allow(unused_mut)]
35 let mut scope = writer.finish();
36 if let Some(var_2) = &input.partition_date_source {
37 let mut inner_writer = scope.start_el("PartitionDateSource").finish();
38 inner_writer.data(var_2.as_str());
39 }
40 scope.finish();
41 Ok(())
42}