aws_sdk_s3/protocol_serde/
shape_source_selection_criteria.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_source_selection_criteria(
    input: &crate::types::SourceSelectionCriteria,
    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.sse_kms_encrypted_objects {
        let inner_writer = scope.start_el("SseKmsEncryptedObjects");
        crate::protocol_serde::shape_sse_kms_encrypted_objects::ser_sse_kms_encrypted_objects(var_1, inner_writer)?
    }
    if let Some(var_2) = &input.replica_modifications {
        let inner_writer = scope.start_el("ReplicaModifications");
        crate::protocol_serde::shape_replica_modifications::ser_replica_modifications(var_2, inner_writer)?
    }
    scope.finish();
    Ok(())
}

#[allow(clippy::needless_question_mark)]
pub fn de_source_selection_criteria(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::SourceSelectionCriteria, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::SourceSelectionCriteria::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("SseKmsEncryptedObjects") /* SseKmsEncryptedObjects com.amazonaws.s3#SourceSelectionCriteria$SseKmsEncryptedObjects */ =>  {
                let var_3 =
                    Some(
                        crate::protocol_serde::shape_sse_kms_encrypted_objects::de_sse_kms_encrypted_objects(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_sse_kms_encrypted_objects(var_3);
            }
            ,
            s if s.matches("ReplicaModifications") /* ReplicaModifications com.amazonaws.s3#SourceSelectionCriteria$ReplicaModifications */ =>  {
                let var_4 =
                    Some(
                        crate::protocol_serde::shape_replica_modifications::de_replica_modifications(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_replica_modifications(var_4);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}