aws_sdk_ec2/protocol_serde/
shape_storage.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(unused_mut)]
3pub fn ser_storage(
4    mut writer: ::aws_smithy_query::QueryValueWriter,
5    input: &crate::types::Storage,
6) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
7    #[allow(unused_mut)]
8    let mut scope_1 = writer.prefix("S3");
9    if let Some(var_2) = &input.s3 {
10        crate::protocol_serde::shape_s3_storage::ser_s3_storage(scope_1, var_2)?;
11    }
12    Ok(())
13}
14
15#[allow(clippy::needless_question_mark)]
16pub fn de_storage(
17    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
18) -> ::std::result::Result<crate::types::Storage, ::aws_smithy_xml::decode::XmlDecodeError> {
19    #[allow(unused_mut)]
20    let mut builder = crate::types::Storage::builder();
21    while let Some(mut tag) = decoder.next_tag() {
22        match tag.start_el() {
23            s if s.matches("S3") /* S3 com.amazonaws.ec2#Storage$S3 */ =>  {
24                let var_3 =
25                    Some(
26                        crate::protocol_serde::shape_s3_storage::de_s3_storage(&mut tag)
27                        ?
28                    )
29                ;
30                builder = builder.set_s3(var_3);
31            }
32            ,
33            _ => {}
34        }
35    }
36    Ok(builder.build())
37}