aws_sdk_s3/protocol_serde/
shape_s3_location.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_s3_location(
    input: &crate::types::S3Location,
    writer: ::aws_smithy_xml::encode::ElWriter,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    #[allow(unused_mut)]
    let mut scope = writer.finish();
    {
        let mut inner_writer = scope.start_el("BucketName").finish();
        inner_writer.data(input.bucket_name.as_str());
    }
    {
        let mut inner_writer = scope.start_el("Prefix").finish();
        inner_writer.data(input.prefix.as_str());
    }
    if let Some(var_1) = &input.encryption {
        let inner_writer = scope.start_el("Encryption");
        crate::protocol_serde::shape_encryption::ser_encryption(var_1, inner_writer)?
    }
    if let Some(var_2) = &input.canned_acl {
        let mut inner_writer = scope.start_el("CannedACL").finish();
        inner_writer.data(var_2.as_str());
    }
    if let Some(var_3) = &input.access_control_list {
        let mut inner_writer = scope.start_el("AccessControlList").finish();
        for list_item_4 in var_3 {
            {
                let inner_writer = inner_writer.start_el("Grant");
                crate::protocol_serde::shape_grant::ser_grant(list_item_4, inner_writer)?
            }
        }
    }
    if let Some(var_5) = &input.tagging {
        let inner_writer = scope.start_el("Tagging");
        crate::protocol_serde::shape_tagging::ser_tagging(var_5, inner_writer)?
    }
    if let Some(var_6) = &input.user_metadata {
        let mut inner_writer = scope.start_el("UserMetadata").finish();
        for list_item_7 in var_6 {
            {
                let inner_writer = inner_writer.start_el("MetadataEntry");
                crate::protocol_serde::shape_metadata_entry::ser_metadata_entry(list_item_7, inner_writer)?
            }
        }
    }
    if let Some(var_8) = &input.storage_class {
        let mut inner_writer = scope.start_el("StorageClass").finish();
        inner_writer.data(var_8.as_str());
    }
    scope.finish();
    Ok(())
}