pub fn ser_instance_network_interface_specification(
encoder: &mut ::aws_smithy_cbor::Encoder,
#[allow(unused)] input: &crate::types::InstanceNetworkInterfaceSpecification,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
encoder.begin_map();
if let Some(var_1) = &input.associate_carrier_ip_address {
encoder.str("AssociateCarrierIpAddress").boolean(*var_1);
}
if let Some(var_2) = &input.associate_public_ip_address {
encoder.str("AssociatePublicIpAddress").boolean(*var_2);
}
if let Some(var_3) = &input.connection_tracking_specification {
encoder.str("ConnectionTrackingSpecification");
crate::protocol_serde::shape_connection_tracking_specification_request::ser_connection_tracking_specification_request(encoder, var_3)?;
}
if let Some(var_4) = &input.description {
encoder.str("Description").str(var_4.as_str());
}
if let Some(var_5) = &input.device_index {
encoder.str("DeviceIndex").integer(*var_5);
}
if let Some(var_6) = &input.ena_srd_specification {
encoder.str("EnaSrdSpecification");
crate::protocol_serde::shape_ena_srd_specification_request::ser_ena_srd_specification_request(encoder, var_6)?;
}
if let Some(var_7) = &input.interface_type {
encoder.str("InterfaceType").str(var_7.as_str());
}
if let Some(var_8) = &input.ipv4_prefixes {
encoder.str("Ipv4Prefixes");
encoder.array((*var_8).len());
for item_9 in var_8 {
{
crate::protocol_serde::shape_ipv4_prefix_specification_request::ser_ipv4_prefix_specification_request(encoder, item_9)?;
}
}
}
if let Some(var_10) = &input.ipv4_prefix_count {
encoder.str("Ipv4PrefixCount").integer(*var_10);
}
if let Some(var_11) = &input.ipv6_address_count {
encoder.str("Ipv6AddressCount").integer(*var_11);
}
if let Some(var_12) = &input.ipv6_addresses {
encoder.str("Ipv6Addresses");
encoder.array((*var_12).len());
for item_13 in var_12 {
{
crate::protocol_serde::shape_instance_ipv6_address::ser_instance_ipv6_address(encoder, item_13)?;
}
}
}
if let Some(var_14) = &input.ipv6_prefixes {
encoder.str("Ipv6Prefixes");
encoder.array((*var_14).len());
for item_15 in var_14 {
{
crate::protocol_serde::shape_ipv6_prefix_specification_request::ser_ipv6_prefix_specification_request(encoder, item_15)?;
}
}
}
if let Some(var_16) = &input.ipv6_prefix_count {
encoder.str("Ipv6PrefixCount").integer(*var_16);
}
if let Some(var_17) = &input.network_card_index {
encoder.str("NetworkCardIndex").integer(*var_17);
}
if let Some(var_18) = &input.network_interface_id {
encoder.str("NetworkInterfaceId").str(var_18.as_str());
}
if let Some(var_19) = &input.primary_ipv6 {
encoder.str("PrimaryIpv6").boolean(*var_19);
}
if let Some(var_20) = &input.private_ip_address {
encoder.str("PrivateIpAddress").str(var_20.as_str());
}
if let Some(var_21) = &input.private_ip_addresses {
encoder.str("PrivateIpAddresses");
encoder.array((*var_21).len());
for item_22 in var_21 {
{
crate::protocol_serde::shape_private_ip_address_specification::ser_private_ip_address_specification(encoder, item_22)?;
}
}
}
if let Some(var_23) = &input.secondary_private_ip_address_count {
encoder.str("SecondaryPrivateIpAddressCount").integer(*var_23);
}
if let Some(var_24) = &input.groups {
encoder.str("Groups");
encoder.array((*var_24).len());
for item_25 in var_24 {
{
encoder.str(item_25.as_str());
}
}
}
if let Some(var_26) = &input.subnet_id {
encoder.str("SubnetId").str(var_26.as_str());
}
encoder.end();
Ok(())
}