aws_sdk_ec2/protocol_serde/
shape_modify_subnet_attribute_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub fn ser_modify_subnet_attribute_input_input_input(
3    input: &crate::operation::modify_subnet_attribute::ModifySubnetAttributeInput,
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, "ModifySubnetAttribute", "2016-11-15");
8    #[allow(unused_mut)]
9    let mut scope_1 = writer.prefix("AssignIpv6AddressOnCreation");
10    if let Some(var_2) = &input.assign_ipv6_address_on_creation {
11        crate::protocol_serde::shape_attribute_boolean_value::ser_attribute_boolean_value(scope_1, var_2)?;
12    }
13    #[allow(unused_mut)]
14    let mut scope_3 = writer.prefix("MapPublicIpOnLaunch");
15    if let Some(var_4) = &input.map_public_ip_on_launch {
16        crate::protocol_serde::shape_attribute_boolean_value::ser_attribute_boolean_value(scope_3, var_4)?;
17    }
18    #[allow(unused_mut)]
19    let mut scope_5 = writer.prefix("SubnetId");
20    if let Some(var_6) = &input.subnet_id {
21        scope_5.string(var_6);
22    }
23    #[allow(unused_mut)]
24    let mut scope_7 = writer.prefix("MapCustomerOwnedIpOnLaunch");
25    if let Some(var_8) = &input.map_customer_owned_ip_on_launch {
26        crate::protocol_serde::shape_attribute_boolean_value::ser_attribute_boolean_value(scope_7, var_8)?;
27    }
28    #[allow(unused_mut)]
29    let mut scope_9 = writer.prefix("CustomerOwnedIpv4Pool");
30    if let Some(var_10) = &input.customer_owned_ipv4_pool {
31        scope_9.string(var_10);
32    }
33    #[allow(unused_mut)]
34    let mut scope_11 = writer.prefix("EnableDns64");
35    if let Some(var_12) = &input.enable_dns64 {
36        crate::protocol_serde::shape_attribute_boolean_value::ser_attribute_boolean_value(scope_11, var_12)?;
37    }
38    #[allow(unused_mut)]
39    let mut scope_13 = writer.prefix("PrivateDnsHostnameTypeOnLaunch");
40    if let Some(var_14) = &input.private_dns_hostname_type_on_launch {
41        scope_13.string(var_14.as_str());
42    }
43    #[allow(unused_mut)]
44    let mut scope_15 = writer.prefix("EnableResourceNameDnsARecordOnLaunch");
45    if let Some(var_16) = &input.enable_resource_name_dns_a_record_on_launch {
46        crate::protocol_serde::shape_attribute_boolean_value::ser_attribute_boolean_value(scope_15, var_16)?;
47    }
48    #[allow(unused_mut)]
49    let mut scope_17 = writer.prefix("EnableResourceNameDnsAAAARecordOnLaunch");
50    if let Some(var_18) = &input.enable_resource_name_dns_aaaa_record_on_launch {
51        crate::protocol_serde::shape_attribute_boolean_value::ser_attribute_boolean_value(scope_17, var_18)?;
52    }
53    #[allow(unused_mut)]
54    let mut scope_19 = writer.prefix("EnableLniAtDeviceIndex");
55    if let Some(var_20) = &input.enable_lni_at_device_index {
56        scope_19.number(
57            #[allow(clippy::useless_conversion)]
58            ::aws_smithy_types::Number::NegInt((*var_20).into()),
59        );
60    }
61    #[allow(unused_mut)]
62    let mut scope_21 = writer.prefix("DisableLniAtDeviceIndex");
63    if let Some(var_22) = &input.disable_lni_at_device_index {
64        crate::protocol_serde::shape_attribute_boolean_value::ser_attribute_boolean_value(scope_21, var_22)?;
65    }
66    writer.finish();
67    Ok(::aws_smithy_types::body::SdkBody::from(out))
68}