aws_sdk_ec2/protocol_serde/
shape_create_subnet_cidr_reservation_input.rs1pub fn ser_create_subnet_cidr_reservation_input_input_input(
3 input: &crate::operation::create_subnet_cidr_reservation::CreateSubnetCidrReservationInput,
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, "CreateSubnetCidrReservation", "2016-11-15");
8 #[allow(unused_mut)]
9 let mut scope_1 = writer.prefix("SubnetId");
10 if let Some(var_2) = &input.subnet_id {
11 scope_1.string(var_2);
12 }
13 #[allow(unused_mut)]
14 let mut scope_3 = writer.prefix("Cidr");
15 if let Some(var_4) = &input.cidr {
16 scope_3.string(var_4);
17 }
18 #[allow(unused_mut)]
19 let mut scope_5 = writer.prefix("ReservationType");
20 if let Some(var_6) = &input.reservation_type {
21 scope_5.string(var_6.as_str());
22 }
23 #[allow(unused_mut)]
24 let mut scope_7 = writer.prefix("Description");
25 if let Some(var_8) = &input.description {
26 scope_7.string(var_8);
27 }
28 #[allow(unused_mut)]
29 let mut scope_9 = writer.prefix("DryRun");
30 if let Some(var_10) = &input.dry_run {
31 scope_9.boolean(*var_10);
32 }
33 #[allow(unused_mut)]
34 let mut scope_11 = writer.prefix("TagSpecification");
35 if let Some(var_12) = &input.tag_specifications {
36 if !var_12.is_empty() {
37 let mut list_14 = scope_11.start_list(true, Some("item"));
38 for item_13 in var_12 {
39 #[allow(unused_mut)]
40 let mut entry_15 = list_14.entry();
41 crate::protocol_serde::shape_tag_specification::ser_tag_specification(entry_15, item_13)?;
42 }
43 list_14.finish();
44 }
45 }
46 writer.finish();
47 Ok(::aws_smithy_types::body::SdkBody::from(out))
48}