aws_sdk_s3/protocol_serde/
shape_analytics_export_destination.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(clippy::needless_question_mark)]
pub fn de_analytics_export_destination(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::AnalyticsExportDestination, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::AnalyticsExportDestination::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("S3BucketDestination") /* S3BucketDestination com.amazonaws.s3#AnalyticsExportDestination$S3BucketDestination */ =>  {
                let var_1 =
                    Some(
                        crate::protocol_serde::shape_analytics_s3_bucket_destination::de_analytics_s3_bucket_destination(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_s3_bucket_destination(var_1);
            }
            ,
            _ => {}
        }
    }
    Ok(crate::serde_util::analytics_export_destination_correct_errors(builder).build())
}

pub fn ser_analytics_export_destination(
    input: &crate::types::AnalyticsExportDestination,
    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_2) = &input.s3_bucket_destination {
        let inner_writer = scope.start_el("S3BucketDestination");
        crate::protocol_serde::shape_analytics_s3_bucket_destination::ser_analytics_s3_bucket_destination(var_2, inner_writer)?
    }
    scope.finish();
    Ok(())
}