aws_sdk_s3/protocol_serde/
shape_completed_part.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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_completed_part(
    input: &crate::types::CompletedPart,
    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.e_tag {
        let mut inner_writer = scope.start_el("ETag").finish();
        inner_writer.data(var_1.as_str());
    }
    if let Some(var_2) = &input.checksum_crc32 {
        let mut inner_writer = scope.start_el("ChecksumCRC32").finish();
        inner_writer.data(var_2.as_str());
    }
    if let Some(var_3) = &input.checksum_crc32_c {
        let mut inner_writer = scope.start_el("ChecksumCRC32C").finish();
        inner_writer.data(var_3.as_str());
    }
    if let Some(var_4) = &input.checksum_sha1 {
        let mut inner_writer = scope.start_el("ChecksumSHA1").finish();
        inner_writer.data(var_4.as_str());
    }
    if let Some(var_5) = &input.checksum_sha256 {
        let mut inner_writer = scope.start_el("ChecksumSHA256").finish();
        inner_writer.data(var_5.as_str());
    }
    if let Some(var_6) = &input.part_number {
        let mut inner_writer = scope.start_el("PartNumber").finish();
        inner_writer.data(::aws_smithy_types::primitive::Encoder::from(*var_6).encode());
    }
    scope.finish();
    Ok(())
}