aws_sdk_ec2/protocol_serde/
shape_export_image_input.rs1pub fn ser_export_image_input_input_input(
3 input: &crate::operation::export_image::ExportImageInput,
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, "ExportImage", "2016-11-15");
8 #[allow(unused_mut)]
9 let mut scope_1 = writer.prefix("ClientToken");
10 if let Some(var_2) = &input.client_token {
11 scope_1.string(var_2);
12 }
13 #[allow(unused_mut)]
14 let mut scope_3 = writer.prefix("Description");
15 if let Some(var_4) = &input.description {
16 scope_3.string(var_4);
17 }
18 #[allow(unused_mut)]
19 let mut scope_5 = writer.prefix("DiskImageFormat");
20 if let Some(var_6) = &input.disk_image_format {
21 scope_5.string(var_6.as_str());
22 }
23 #[allow(unused_mut)]
24 let mut scope_7 = writer.prefix("DryRun");
25 if let Some(var_8) = &input.dry_run {
26 scope_7.boolean(*var_8);
27 }
28 #[allow(unused_mut)]
29 let mut scope_9 = writer.prefix("ImageId");
30 if let Some(var_10) = &input.image_id {
31 scope_9.string(var_10);
32 }
33 #[allow(unused_mut)]
34 let mut scope_11 = writer.prefix("S3ExportLocation");
35 if let Some(var_12) = &input.s3_export_location {
36 crate::protocol_serde::shape_export_task_s3_location_request::ser_export_task_s3_location_request(scope_11, var_12)?;
37 }
38 #[allow(unused_mut)]
39 let mut scope_13 = writer.prefix("RoleName");
40 if let Some(var_14) = &input.role_name {
41 scope_13.string(var_14);
42 }
43 #[allow(unused_mut)]
44 let mut scope_15 = writer.prefix("TagSpecification");
45 if let Some(var_16) = &input.tag_specifications {
46 if !var_16.is_empty() {
47 let mut list_18 = scope_15.start_list(true, Some("item"));
48 for item_17 in var_16 {
49 #[allow(unused_mut)]
50 let mut entry_19 = list_18.entry();
51 crate::protocol_serde::shape_tag_specification::ser_tag_specification(entry_19, item_17)?;
52 }
53 list_18.finish();
54 }
55 }
56 writer.finish();
57 Ok(::aws_smithy_types::body::SdkBody::from(out))
58}