aws_sdk_ec2/protocol_serde/
shape_create_snapshots_input.rs1pub fn ser_create_snapshots_input_input_input(
3 input: &crate::operation::create_snapshots::CreateSnapshotsInput,
4) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
5 let mut out = String::new();
6 #[allow(unused_mut)]
7 let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "CreateSnapshots", "2016-11-15");
8 #[allow(unused_mut)]
9 let mut scope_1 = writer.prefix("Description");
10 if let Some(var_2) = &input.description {
11 scope_1.string(var_2);
12 }
13 #[allow(unused_mut)]
14 let mut scope_3 = writer.prefix("InstanceSpecification");
15 if let Some(var_4) = &input.instance_specification {
16 crate::protocol_serde::shape_instance_specification::ser_instance_specification(scope_3, var_4)?;
17 }
18 #[allow(unused_mut)]
19 let mut scope_5 = writer.prefix("OutpostArn");
20 if let Some(var_6) = &input.outpost_arn {
21 scope_5.string(var_6);
22 }
23 #[allow(unused_mut)]
24 let mut scope_7 = writer.prefix("TagSpecification");
25 if let Some(var_8) = &input.tag_specifications {
26 if !var_8.is_empty() {
27 let mut list_10 = scope_7.start_list(true, Some("item"));
28 for item_9 in var_8 {
29 #[allow(unused_mut)]
30 let mut entry_11 = list_10.entry();
31 crate::protocol_serde::shape_tag_specification::ser_tag_specification(entry_11, item_9)?;
32 }
33 list_10.finish();
34 }
35 }
36 #[allow(unused_mut)]
37 let mut scope_12 = writer.prefix("DryRun");
38 if let Some(var_13) = &input.dry_run {
39 scope_12.boolean(*var_13);
40 }
41 #[allow(unused_mut)]
42 let mut scope_14 = writer.prefix("CopyTagsFromSource");
43 if let Some(var_15) = &input.copy_tags_from_source {
44 scope_14.string(var_15.as_str());
45 }
46 #[allow(unused_mut)]
47 let mut scope_16 = writer.prefix("Location");
48 if let Some(var_17) = &input.location {
49 scope_16.string(var_17.as_str());
50 }
51 writer.finish();
52 Ok(::aws_smithy_types::body::SdkBody::from(out))
53}