// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn serialize_structure_crate_input_allocate_static_ip_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AllocateStaticIpInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_1) = &input.static_ip_name {
        object.key("staticIpName").string(var_1);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_attach_certificate_to_distribution_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AttachCertificateToDistributionInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_2) = &input.distribution_name {
        object.key("distributionName").string(var_2);
    }
    if let Some(var_3) = &input.certificate_name {
        object.key("certificateName").string(var_3);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_attach_disk_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AttachDiskInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_4) = &input.disk_name {
        object.key("diskName").string(var_4);
    }
    if let Some(var_5) = &input.instance_name {
        object.key("instanceName").string(var_5);
    }
    if let Some(var_6) = &input.disk_path {
        object.key("diskPath").string(var_6);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_attach_instances_to_load_balancer_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AttachInstancesToLoadBalancerInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_7) = &input.load_balancer_name {
        object.key("loadBalancerName").string(var_7);
    }
    if let Some(var_8) = &input.instance_names {
        let mut array_9 = object.key("instanceNames").start_array();
        for item_10 in var_8 {
            {
                array_9.value().string(item_10);
            }
        }
        array_9.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_attach_load_balancer_tls_certificate_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AttachLoadBalancerTlsCertificateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_11) = &input.load_balancer_name {
        object.key("loadBalancerName").string(var_11);
    }
    if let Some(var_12) = &input.certificate_name {
        object.key("certificateName").string(var_12);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_attach_static_ip_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AttachStaticIpInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_13) = &input.static_ip_name {
        object.key("staticIpName").string(var_13);
    }
    if let Some(var_14) = &input.instance_name {
        object.key("instanceName").string(var_14);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_close_instance_public_ports_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CloseInstancePublicPortsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_15) = &input.port_info {
        let mut object_16 = object.key("portInfo").start_object();
        crate::json_ser::serialize_structure_crate_model_port_info(&mut object_16, var_15)?;
        object_16.finish();
    }
    if let Some(var_17) = &input.instance_name {
        object.key("instanceName").string(var_17);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_copy_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CopySnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_18) = &input.source_snapshot_name {
        object.key("sourceSnapshotName").string(var_18);
    }
    if let Some(var_19) = &input.source_resource_name {
        object.key("sourceResourceName").string(var_19);
    }
    if let Some(var_20) = &input.restore_date {
        object.key("restoreDate").string(var_20);
    }
    if let Some(var_21) = &input.use_latest_restorable_auto_snapshot {
        object
            .key("useLatestRestorableAutoSnapshot")
            .boolean(*var_21);
    }
    if let Some(var_22) = &input.target_snapshot_name {
        object.key("targetSnapshotName").string(var_22);
    }
    if let Some(var_23) = &input.source_region {
        object.key("sourceRegion").string(var_23.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_bucket_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateBucketInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_24) = &input.bucket_name {
        object.key("bucketName").string(var_24);
    }
    if let Some(var_25) = &input.bundle_id {
        object.key("bundleId").string(var_25);
    }
    if let Some(var_26) = &input.tags {
        let mut array_27 = object.key("tags").start_array();
        for item_28 in var_26 {
            {
                let mut object_29 = array_27.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_29, item_28)?;
                object_29.finish();
            }
        }
        array_27.finish();
    }
    if let Some(var_30) = &input.enable_object_versioning {
        object.key("enableObjectVersioning").boolean(*var_30);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_bucket_access_key_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateBucketAccessKeyInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_31) = &input.bucket_name {
        object.key("bucketName").string(var_31);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_certificate_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateCertificateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_32) = &input.certificate_name {
        object.key("certificateName").string(var_32);
    }
    if let Some(var_33) = &input.domain_name {
        object.key("domainName").string(var_33);
    }
    if let Some(var_34) = &input.subject_alternative_names {
        let mut array_35 = object.key("subjectAlternativeNames").start_array();
        for item_36 in var_34 {
            {
                array_35.value().string(item_36);
            }
        }
        array_35.finish();
    }
    if let Some(var_37) = &input.tags {
        let mut array_38 = object.key("tags").start_array();
        for item_39 in var_37 {
            {
                let mut object_40 = array_38.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_40, item_39)?;
                object_40.finish();
            }
        }
        array_38.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_cloud_formation_stack_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateCloudFormationStackInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_41) = &input.instances {
        let mut array_42 = object.key("instances").start_array();
        for item_43 in var_41 {
            {
                let mut object_44 = array_42.value().start_object();
                crate::json_ser::serialize_structure_crate_model_instance_entry(
                    &mut object_44,
                    item_43,
                )?;
                object_44.finish();
            }
        }
        array_42.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_contact_method_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateContactMethodInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_45) = &input.protocol {
        object.key("protocol").string(var_45.as_str());
    }
    if let Some(var_46) = &input.contact_endpoint {
        object.key("contactEndpoint").string(var_46);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_container_service_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateContainerServiceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_47) = &input.service_name {
        object.key("serviceName").string(var_47);
    }
    if let Some(var_48) = &input.power {
        object.key("power").string(var_48.as_str());
    }
    if let Some(var_49) = &input.scale {
        object.key("scale").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_49).into()),
        );
    }
    if let Some(var_50) = &input.tags {
        let mut array_51 = object.key("tags").start_array();
        for item_52 in var_50 {
            {
                let mut object_53 = array_51.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_53, item_52)?;
                object_53.finish();
            }
        }
        array_51.finish();
    }
    if let Some(var_54) = &input.public_domain_names {
        let mut object_55 = object.key("publicDomainNames").start_object();
        for (key_56, value_57) in var_54 {
            {
                let mut array_58 = object_55.key(key_56).start_array();
                for item_59 in value_57 {
                    {
                        array_58.value().string(item_59);
                    }
                }
                array_58.finish();
            }
        }
        object_55.finish();
    }
    if let Some(var_60) = &input.deployment {
        let mut object_61 = object.key("deployment").start_object();
        crate::json_ser::serialize_structure_crate_model_container_service_deployment_request(
            &mut object_61,
            var_60,
        )?;
        object_61.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_container_service_deployment_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateContainerServiceDeploymentInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_62) = &input.service_name {
        object.key("serviceName").string(var_62);
    }
    if let Some(var_63) = &input.containers {
        let mut object_64 = object.key("containers").start_object();
        for (key_65, value_66) in var_63 {
            {
                let mut object_67 = object_64.key(key_65).start_object();
                crate::json_ser::serialize_structure_crate_model_container(
                    &mut object_67,
                    value_66,
                )?;
                object_67.finish();
            }
        }
        object_64.finish();
    }
    if let Some(var_68) = &input.public_endpoint {
        let mut object_69 = object.key("publicEndpoint").start_object();
        crate::json_ser::serialize_structure_crate_model_endpoint_request(&mut object_69, var_68)?;
        object_69.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_disk_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateDiskInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_70) = &input.disk_name {
        object.key("diskName").string(var_70);
    }
    if let Some(var_71) = &input.availability_zone {
        object.key("availabilityZone").string(var_71);
    }
    if let Some(var_72) = &input.size_in_gb {
        object.key("sizeInGb").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_72).into()),
        );
    }
    if let Some(var_73) = &input.tags {
        let mut array_74 = object.key("tags").start_array();
        for item_75 in var_73 {
            {
                let mut object_76 = array_74.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_76, item_75)?;
                object_76.finish();
            }
        }
        array_74.finish();
    }
    if let Some(var_77) = &input.add_ons {
        let mut array_78 = object.key("addOns").start_array();
        for item_79 in var_77 {
            {
                let mut object_80 = array_78.value().start_object();
                crate::json_ser::serialize_structure_crate_model_add_on_request(
                    &mut object_80,
                    item_79,
                )?;
                object_80.finish();
            }
        }
        array_78.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_disk_from_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateDiskFromSnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_81) = &input.disk_name {
        object.key("diskName").string(var_81);
    }
    if let Some(var_82) = &input.disk_snapshot_name {
        object.key("diskSnapshotName").string(var_82);
    }
    if let Some(var_83) = &input.availability_zone {
        object.key("availabilityZone").string(var_83);
    }
    if let Some(var_84) = &input.size_in_gb {
        object.key("sizeInGb").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_84).into()),
        );
    }
    if let Some(var_85) = &input.tags {
        let mut array_86 = object.key("tags").start_array();
        for item_87 in var_85 {
            {
                let mut object_88 = array_86.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_88, item_87)?;
                object_88.finish();
            }
        }
        array_86.finish();
    }
    if let Some(var_89) = &input.add_ons {
        let mut array_90 = object.key("addOns").start_array();
        for item_91 in var_89 {
            {
                let mut object_92 = array_90.value().start_object();
                crate::json_ser::serialize_structure_crate_model_add_on_request(
                    &mut object_92,
                    item_91,
                )?;
                object_92.finish();
            }
        }
        array_90.finish();
    }
    if let Some(var_93) = &input.source_disk_name {
        object.key("sourceDiskName").string(var_93);
    }
    if let Some(var_94) = &input.restore_date {
        object.key("restoreDate").string(var_94);
    }
    if let Some(var_95) = &input.use_latest_restorable_auto_snapshot {
        object
            .key("useLatestRestorableAutoSnapshot")
            .boolean(*var_95);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_disk_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateDiskSnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_96) = &input.disk_name {
        object.key("diskName").string(var_96);
    }
    if let Some(var_97) = &input.disk_snapshot_name {
        object.key("diskSnapshotName").string(var_97);
    }
    if let Some(var_98) = &input.instance_name {
        object.key("instanceName").string(var_98);
    }
    if let Some(var_99) = &input.tags {
        let mut array_100 = object.key("tags").start_array();
        for item_101 in var_99 {
            {
                let mut object_102 = array_100.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_102, item_101)?;
                object_102.finish();
            }
        }
        array_100.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_distribution_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateDistributionInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_103) = &input.distribution_name {
        object.key("distributionName").string(var_103);
    }
    if let Some(var_104) = &input.origin {
        let mut object_105 = object.key("origin").start_object();
        crate::json_ser::serialize_structure_crate_model_input_origin(&mut object_105, var_104)?;
        object_105.finish();
    }
    if let Some(var_106) = &input.default_cache_behavior {
        let mut object_107 = object.key("defaultCacheBehavior").start_object();
        crate::json_ser::serialize_structure_crate_model_cache_behavior(&mut object_107, var_106)?;
        object_107.finish();
    }
    if let Some(var_108) = &input.cache_behavior_settings {
        let mut object_109 = object.key("cacheBehaviorSettings").start_object();
        crate::json_ser::serialize_structure_crate_model_cache_settings(&mut object_109, var_108)?;
        object_109.finish();
    }
    if let Some(var_110) = &input.cache_behaviors {
        let mut array_111 = object.key("cacheBehaviors").start_array();
        for item_112 in var_110 {
            {
                let mut object_113 = array_111.value().start_object();
                crate::json_ser::serialize_structure_crate_model_cache_behavior_per_path(
                    &mut object_113,
                    item_112,
                )?;
                object_113.finish();
            }
        }
        array_111.finish();
    }
    if let Some(var_114) = &input.bundle_id {
        object.key("bundleId").string(var_114);
    }
    if let Some(var_115) = &input.ip_address_type {
        object.key("ipAddressType").string(var_115.as_str());
    }
    if let Some(var_116) = &input.tags {
        let mut array_117 = object.key("tags").start_array();
        for item_118 in var_116 {
            {
                let mut object_119 = array_117.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_119, item_118)?;
                object_119.finish();
            }
        }
        array_117.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_domain_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateDomainInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_120) = &input.domain_name {
        object.key("domainName").string(var_120);
    }
    if let Some(var_121) = &input.tags {
        let mut array_122 = object.key("tags").start_array();
        for item_123 in var_121 {
            {
                let mut object_124 = array_122.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_124, item_123)?;
                object_124.finish();
            }
        }
        array_122.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_domain_entry_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateDomainEntryInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_125) = &input.domain_name {
        object.key("domainName").string(var_125);
    }
    if let Some(var_126) = &input.domain_entry {
        let mut object_127 = object.key("domainEntry").start_object();
        crate::json_ser::serialize_structure_crate_model_domain_entry(&mut object_127, var_126)?;
        object_127.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_instances_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateInstancesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_128) = &input.instance_names {
        let mut array_129 = object.key("instanceNames").start_array();
        for item_130 in var_128 {
            {
                array_129.value().string(item_130);
            }
        }
        array_129.finish();
    }
    if let Some(var_131) = &input.availability_zone {
        object.key("availabilityZone").string(var_131);
    }
    if let Some(var_132) = &input.custom_image_name {
        object.key("customImageName").string(var_132);
    }
    if let Some(var_133) = &input.blueprint_id {
        object.key("blueprintId").string(var_133);
    }
    if let Some(var_134) = &input.bundle_id {
        object.key("bundleId").string(var_134);
    }
    if let Some(var_135) = &input.user_data {
        object.key("userData").string(var_135);
    }
    if let Some(var_136) = &input.key_pair_name {
        object.key("keyPairName").string(var_136);
    }
    if let Some(var_137) = &input.tags {
        let mut array_138 = object.key("tags").start_array();
        for item_139 in var_137 {
            {
                let mut object_140 = array_138.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_140, item_139)?;
                object_140.finish();
            }
        }
        array_138.finish();
    }
    if let Some(var_141) = &input.add_ons {
        let mut array_142 = object.key("addOns").start_array();
        for item_143 in var_141 {
            {
                let mut object_144 = array_142.value().start_object();
                crate::json_ser::serialize_structure_crate_model_add_on_request(
                    &mut object_144,
                    item_143,
                )?;
                object_144.finish();
            }
        }
        array_142.finish();
    }
    if let Some(var_145) = &input.ip_address_type {
        object.key("ipAddressType").string(var_145.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_instances_from_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateInstancesFromSnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_146) = &input.instance_names {
        let mut array_147 = object.key("instanceNames").start_array();
        for item_148 in var_146 {
            {
                array_147.value().string(item_148);
            }
        }
        array_147.finish();
    }
    if let Some(var_149) = &input.attached_disk_mapping {
        let mut object_150 = object.key("attachedDiskMapping").start_object();
        for (key_151, value_152) in var_149 {
            {
                let mut array_153 = object_150.key(key_151).start_array();
                for item_154 in value_152 {
                    {
                        let mut object_155 = array_153.value().start_object();
                        crate::json_ser::serialize_structure_crate_model_disk_map(
                            &mut object_155,
                            item_154,
                        )?;
                        object_155.finish();
                    }
                }
                array_153.finish();
            }
        }
        object_150.finish();
    }
    if let Some(var_156) = &input.availability_zone {
        object.key("availabilityZone").string(var_156);
    }
    if let Some(var_157) = &input.instance_snapshot_name {
        object.key("instanceSnapshotName").string(var_157);
    }
    if let Some(var_158) = &input.bundle_id {
        object.key("bundleId").string(var_158);
    }
    if let Some(var_159) = &input.user_data {
        object.key("userData").string(var_159);
    }
    if let Some(var_160) = &input.key_pair_name {
        object.key("keyPairName").string(var_160);
    }
    if let Some(var_161) = &input.tags {
        let mut array_162 = object.key("tags").start_array();
        for item_163 in var_161 {
            {
                let mut object_164 = array_162.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_164, item_163)?;
                object_164.finish();
            }
        }
        array_162.finish();
    }
    if let Some(var_165) = &input.add_ons {
        let mut array_166 = object.key("addOns").start_array();
        for item_167 in var_165 {
            {
                let mut object_168 = array_166.value().start_object();
                crate::json_ser::serialize_structure_crate_model_add_on_request(
                    &mut object_168,
                    item_167,
                )?;
                object_168.finish();
            }
        }
        array_166.finish();
    }
    if let Some(var_169) = &input.ip_address_type {
        object.key("ipAddressType").string(var_169.as_str());
    }
    if let Some(var_170) = &input.source_instance_name {
        object.key("sourceInstanceName").string(var_170);
    }
    if let Some(var_171) = &input.restore_date {
        object.key("restoreDate").string(var_171);
    }
    if let Some(var_172) = &input.use_latest_restorable_auto_snapshot {
        object
            .key("useLatestRestorableAutoSnapshot")
            .boolean(*var_172);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_instance_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateInstanceSnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_173) = &input.instance_snapshot_name {
        object.key("instanceSnapshotName").string(var_173);
    }
    if let Some(var_174) = &input.instance_name {
        object.key("instanceName").string(var_174);
    }
    if let Some(var_175) = &input.tags {
        let mut array_176 = object.key("tags").start_array();
        for item_177 in var_175 {
            {
                let mut object_178 = array_176.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_178, item_177)?;
                object_178.finish();
            }
        }
        array_176.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_key_pair_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateKeyPairInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_179) = &input.key_pair_name {
        object.key("keyPairName").string(var_179);
    }
    if let Some(var_180) = &input.tags {
        let mut array_181 = object.key("tags").start_array();
        for item_182 in var_180 {
            {
                let mut object_183 = array_181.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_183, item_182)?;
                object_183.finish();
            }
        }
        array_181.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_load_balancer_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateLoadBalancerInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_184) = &input.load_balancer_name {
        object.key("loadBalancerName").string(var_184);
    }
    {
        object.key("instancePort").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.instance_port).into()),
        );
    }
    if let Some(var_185) = &input.health_check_path {
        object.key("healthCheckPath").string(var_185);
    }
    if let Some(var_186) = &input.certificate_name {
        object.key("certificateName").string(var_186);
    }
    if let Some(var_187) = &input.certificate_domain_name {
        object.key("certificateDomainName").string(var_187);
    }
    if let Some(var_188) = &input.certificate_alternative_names {
        let mut array_189 = object.key("certificateAlternativeNames").start_array();
        for item_190 in var_188 {
            {
                array_189.value().string(item_190);
            }
        }
        array_189.finish();
    }
    if let Some(var_191) = &input.tags {
        let mut array_192 = object.key("tags").start_array();
        for item_193 in var_191 {
            {
                let mut object_194 = array_192.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_194, item_193)?;
                object_194.finish();
            }
        }
        array_192.finish();
    }
    if let Some(var_195) = &input.ip_address_type {
        object.key("ipAddressType").string(var_195.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_load_balancer_tls_certificate_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateLoadBalancerTlsCertificateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_196) = &input.load_balancer_name {
        object.key("loadBalancerName").string(var_196);
    }
    if let Some(var_197) = &input.certificate_name {
        object.key("certificateName").string(var_197);
    }
    if let Some(var_198) = &input.certificate_domain_name {
        object.key("certificateDomainName").string(var_198);
    }
    if let Some(var_199) = &input.certificate_alternative_names {
        let mut array_200 = object.key("certificateAlternativeNames").start_array();
        for item_201 in var_199 {
            {
                array_200.value().string(item_201);
            }
        }
        array_200.finish();
    }
    if let Some(var_202) = &input.tags {
        let mut array_203 = object.key("tags").start_array();
        for item_204 in var_202 {
            {
                let mut object_205 = array_203.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_205, item_204)?;
                object_205.finish();
            }
        }
        array_203.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_relational_database_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateRelationalDatabaseInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_206) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_206);
    }
    if let Some(var_207) = &input.availability_zone {
        object.key("availabilityZone").string(var_207);
    }
    if let Some(var_208) = &input.relational_database_blueprint_id {
        object.key("relationalDatabaseBlueprintId").string(var_208);
    }
    if let Some(var_209) = &input.relational_database_bundle_id {
        object.key("relationalDatabaseBundleId").string(var_209);
    }
    if let Some(var_210) = &input.master_database_name {
        object.key("masterDatabaseName").string(var_210);
    }
    if let Some(var_211) = &input.master_username {
        object.key("masterUsername").string(var_211);
    }
    if let Some(var_212) = &input.master_user_password {
        object.key("masterUserPassword").string(var_212);
    }
    if let Some(var_213) = &input.preferred_backup_window {
        object.key("preferredBackupWindow").string(var_213);
    }
    if let Some(var_214) = &input.preferred_maintenance_window {
        object.key("preferredMaintenanceWindow").string(var_214);
    }
    if let Some(var_215) = &input.publicly_accessible {
        object.key("publiclyAccessible").boolean(*var_215);
    }
    if let Some(var_216) = &input.tags {
        let mut array_217 = object.key("tags").start_array();
        for item_218 in var_216 {
            {
                let mut object_219 = array_217.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_219, item_218)?;
                object_219.finish();
            }
        }
        array_217.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_relational_database_from_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateRelationalDatabaseFromSnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_220) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_220);
    }
    if let Some(var_221) = &input.availability_zone {
        object.key("availabilityZone").string(var_221);
    }
    if let Some(var_222) = &input.publicly_accessible {
        object.key("publiclyAccessible").boolean(*var_222);
    }
    if let Some(var_223) = &input.relational_database_snapshot_name {
        object.key("relationalDatabaseSnapshotName").string(var_223);
    }
    if let Some(var_224) = &input.relational_database_bundle_id {
        object.key("relationalDatabaseBundleId").string(var_224);
    }
    if let Some(var_225) = &input.source_relational_database_name {
        object.key("sourceRelationalDatabaseName").string(var_225);
    }
    if let Some(var_226) = &input.restore_time {
        object
            .key("restoreTime")
            .instant(var_226, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_227) = &input.use_latest_restorable_time {
        object.key("useLatestRestorableTime").boolean(*var_227);
    }
    if let Some(var_228) = &input.tags {
        let mut array_229 = object.key("tags").start_array();
        for item_230 in var_228 {
            {
                let mut object_231 = array_229.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_231, item_230)?;
                object_231.finish();
            }
        }
        array_229.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_relational_database_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateRelationalDatabaseSnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_232) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_232);
    }
    if let Some(var_233) = &input.relational_database_snapshot_name {
        object.key("relationalDatabaseSnapshotName").string(var_233);
    }
    if let Some(var_234) = &input.tags {
        let mut array_235 = object.key("tags").start_array();
        for item_236 in var_234 {
            {
                let mut object_237 = array_235.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_237, item_236)?;
                object_237.finish();
            }
        }
        array_235.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_alarm_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteAlarmInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_238) = &input.alarm_name {
        object.key("alarmName").string(var_238);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_auto_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteAutoSnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_239) = &input.resource_name {
        object.key("resourceName").string(var_239);
    }
    if let Some(var_240) = &input.date {
        object.key("date").string(var_240);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_bucket_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteBucketInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_241) = &input.bucket_name {
        object.key("bucketName").string(var_241);
    }
    if let Some(var_242) = &input.force_delete {
        object.key("forceDelete").boolean(*var_242);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_bucket_access_key_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteBucketAccessKeyInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_243) = &input.bucket_name {
        object.key("bucketName").string(var_243);
    }
    if let Some(var_244) = &input.access_key_id {
        object.key("accessKeyId").string(var_244);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_certificate_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteCertificateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_245) = &input.certificate_name {
        object.key("certificateName").string(var_245);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_contact_method_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteContactMethodInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_246) = &input.protocol {
        object.key("protocol").string(var_246.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_container_image_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteContainerImageInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_247) = &input.service_name {
        object.key("serviceName").string(var_247);
    }
    if let Some(var_248) = &input.image {
        object.key("image").string(var_248);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_container_service_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteContainerServiceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_249) = &input.service_name {
        object.key("serviceName").string(var_249);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_disk_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteDiskInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_250) = &input.disk_name {
        object.key("diskName").string(var_250);
    }
    if let Some(var_251) = &input.force_delete_add_ons {
        object.key("forceDeleteAddOns").boolean(*var_251);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_disk_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteDiskSnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_252) = &input.disk_snapshot_name {
        object.key("diskSnapshotName").string(var_252);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_distribution_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteDistributionInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_253) = &input.distribution_name {
        object.key("distributionName").string(var_253);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_domain_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteDomainInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_254) = &input.domain_name {
        object.key("domainName").string(var_254);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_domain_entry_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteDomainEntryInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_255) = &input.domain_name {
        object.key("domainName").string(var_255);
    }
    if let Some(var_256) = &input.domain_entry {
        let mut object_257 = object.key("domainEntry").start_object();
        crate::json_ser::serialize_structure_crate_model_domain_entry(&mut object_257, var_256)?;
        object_257.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_instance_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteInstanceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_258) = &input.instance_name {
        object.key("instanceName").string(var_258);
    }
    if let Some(var_259) = &input.force_delete_add_ons {
        object.key("forceDeleteAddOns").boolean(*var_259);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_instance_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteInstanceSnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_260) = &input.instance_snapshot_name {
        object.key("instanceSnapshotName").string(var_260);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_key_pair_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteKeyPairInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_261) = &input.key_pair_name {
        object.key("keyPairName").string(var_261);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_known_host_keys_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteKnownHostKeysInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_262) = &input.instance_name {
        object.key("instanceName").string(var_262);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_load_balancer_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteLoadBalancerInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_263) = &input.load_balancer_name {
        object.key("loadBalancerName").string(var_263);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_load_balancer_tls_certificate_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteLoadBalancerTlsCertificateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_264) = &input.load_balancer_name {
        object.key("loadBalancerName").string(var_264);
    }
    if let Some(var_265) = &input.certificate_name {
        object.key("certificateName").string(var_265);
    }
    if let Some(var_266) = &input.force {
        object.key("force").boolean(*var_266);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_relational_database_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteRelationalDatabaseInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_267) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_267);
    }
    if let Some(var_268) = &input.skip_final_snapshot {
        object.key("skipFinalSnapshot").boolean(*var_268);
    }
    if let Some(var_269) = &input.final_relational_database_snapshot_name {
        object
            .key("finalRelationalDatabaseSnapshotName")
            .string(var_269);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_relational_database_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteRelationalDatabaseSnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_270) = &input.relational_database_snapshot_name {
        object.key("relationalDatabaseSnapshotName").string(var_270);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_detach_certificate_from_distribution_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DetachCertificateFromDistributionInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_271) = &input.distribution_name {
        object.key("distributionName").string(var_271);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_detach_disk_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DetachDiskInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_272) = &input.disk_name {
        object.key("diskName").string(var_272);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_detach_instances_from_load_balancer_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DetachInstancesFromLoadBalancerInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_273) = &input.load_balancer_name {
        object.key("loadBalancerName").string(var_273);
    }
    if let Some(var_274) = &input.instance_names {
        let mut array_275 = object.key("instanceNames").start_array();
        for item_276 in var_274 {
            {
                array_275.value().string(item_276);
            }
        }
        array_275.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_detach_static_ip_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DetachStaticIpInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_277) = &input.static_ip_name {
        object.key("staticIpName").string(var_277);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_disable_add_on_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DisableAddOnInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_278) = &input.add_on_type {
        object.key("addOnType").string(var_278.as_str());
    }
    if let Some(var_279) = &input.resource_name {
        object.key("resourceName").string(var_279);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_enable_add_on_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::EnableAddOnInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_280) = &input.resource_name {
        object.key("resourceName").string(var_280);
    }
    if let Some(var_281) = &input.add_on_request {
        let mut object_282 = object.key("addOnRequest").start_object();
        crate::json_ser::serialize_structure_crate_model_add_on_request(&mut object_282, var_281)?;
        object_282.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_export_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ExportSnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_283) = &input.source_snapshot_name {
        object.key("sourceSnapshotName").string(var_283);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_active_names_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetActiveNamesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_284) = &input.page_token {
        object.key("pageToken").string(var_284);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_alarms_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetAlarmsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_285) = &input.alarm_name {
        object.key("alarmName").string(var_285);
    }
    if let Some(var_286) = &input.page_token {
        object.key("pageToken").string(var_286);
    }
    if let Some(var_287) = &input.monitored_resource_name {
        object.key("monitoredResourceName").string(var_287);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_auto_snapshots_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetAutoSnapshotsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_288) = &input.resource_name {
        object.key("resourceName").string(var_288);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_blueprints_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetBlueprintsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_289) = &input.include_inactive {
        object.key("includeInactive").boolean(*var_289);
    }
    if let Some(var_290) = &input.page_token {
        object.key("pageToken").string(var_290);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_bucket_access_keys_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetBucketAccessKeysInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_291) = &input.bucket_name {
        object.key("bucketName").string(var_291);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_bucket_bundles_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetBucketBundlesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_292) = &input.include_inactive {
        object.key("includeInactive").boolean(*var_292);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_bucket_metric_data_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetBucketMetricDataInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_293) = &input.bucket_name {
        object.key("bucketName").string(var_293);
    }
    if let Some(var_294) = &input.metric_name {
        object.key("metricName").string(var_294.as_str());
    }
    if let Some(var_295) = &input.start_time {
        object
            .key("startTime")
            .instant(var_295, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_296) = &input.end_time {
        object
            .key("endTime")
            .instant(var_296, aws_smithy_types::instant::Format::EpochSeconds);
    }
    {
        object.key("period").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.period).into()),
        );
    }
    if let Some(var_297) = &input.statistics {
        let mut array_298 = object.key("statistics").start_array();
        for item_299 in var_297 {
            {
                array_298.value().string(item_299.as_str());
            }
        }
        array_298.finish();
    }
    if let Some(var_300) = &input.unit {
        object.key("unit").string(var_300.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_buckets_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetBucketsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_301) = &input.bucket_name {
        object.key("bucketName").string(var_301);
    }
    if let Some(var_302) = &input.page_token {
        object.key("pageToken").string(var_302);
    }
    if let Some(var_303) = &input.include_connected_resources {
        object.key("includeConnectedResources").boolean(*var_303);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_bundles_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetBundlesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_304) = &input.include_inactive {
        object.key("includeInactive").boolean(*var_304);
    }
    if let Some(var_305) = &input.page_token {
        object.key("pageToken").string(var_305);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_certificates_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetCertificatesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_306) = &input.certificate_statuses {
        let mut array_307 = object.key("certificateStatuses").start_array();
        for item_308 in var_306 {
            {
                array_307.value().string(item_308.as_str());
            }
        }
        array_307.finish();
    }
    if input.include_certificate_details {
        object
            .key("includeCertificateDetails")
            .boolean(input.include_certificate_details);
    }
    if let Some(var_309) = &input.certificate_name {
        object.key("certificateName").string(var_309);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_cloud_formation_stack_records_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetCloudFormationStackRecordsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_310) = &input.page_token {
        object.key("pageToken").string(var_310);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_contact_methods_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetContactMethodsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_311) = &input.protocols {
        let mut array_312 = object.key("protocols").start_array();
        for item_313 in var_311 {
            {
                array_312.value().string(item_313.as_str());
            }
        }
        array_312.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_container_images_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetContainerImagesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_314) = &input.service_name {
        object.key("serviceName").string(var_314);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_container_log_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetContainerLogInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_315) = &input.service_name {
        object.key("serviceName").string(var_315);
    }
    if let Some(var_316) = &input.container_name {
        object.key("containerName").string(var_316);
    }
    if let Some(var_317) = &input.start_time {
        object
            .key("startTime")
            .instant(var_317, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_318) = &input.end_time {
        object
            .key("endTime")
            .instant(var_318, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_319) = &input.filter_pattern {
        object.key("filterPattern").string(var_319);
    }
    if let Some(var_320) = &input.page_token {
        object.key("pageToken").string(var_320);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_container_service_deployments_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetContainerServiceDeploymentsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_321) = &input.service_name {
        object.key("serviceName").string(var_321);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_container_service_metric_data_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetContainerServiceMetricDataInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_322) = &input.service_name {
        object.key("serviceName").string(var_322);
    }
    if let Some(var_323) = &input.metric_name {
        object.key("metricName").string(var_323.as_str());
    }
    if let Some(var_324) = &input.start_time {
        object
            .key("startTime")
            .instant(var_324, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_325) = &input.end_time {
        object
            .key("endTime")
            .instant(var_325, aws_smithy_types::instant::Format::EpochSeconds);
    }
    {
        object.key("period").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.period).into()),
        );
    }
    if let Some(var_326) = &input.statistics {
        let mut array_327 = object.key("statistics").start_array();
        for item_328 in var_326 {
            {
                array_327.value().string(item_328.as_str());
            }
        }
        array_327.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_container_services_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetContainerServicesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_329) = &input.service_name {
        object.key("serviceName").string(var_329);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_disk_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetDiskInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_330) = &input.disk_name {
        object.key("diskName").string(var_330);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_disks_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetDisksInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_331) = &input.page_token {
        object.key("pageToken").string(var_331);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_disk_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetDiskSnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_332) = &input.disk_snapshot_name {
        object.key("diskSnapshotName").string(var_332);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_disk_snapshots_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetDiskSnapshotsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_333) = &input.page_token {
        object.key("pageToken").string(var_333);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_distribution_latest_cache_reset_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetDistributionLatestCacheResetInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_334) = &input.distribution_name {
        object.key("distributionName").string(var_334);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_distribution_metric_data_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetDistributionMetricDataInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_335) = &input.distribution_name {
        object.key("distributionName").string(var_335);
    }
    if let Some(var_336) = &input.metric_name {
        object.key("metricName").string(var_336.as_str());
    }
    if let Some(var_337) = &input.start_time {
        object
            .key("startTime")
            .instant(var_337, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_338) = &input.end_time {
        object
            .key("endTime")
            .instant(var_338, aws_smithy_types::instant::Format::EpochSeconds);
    }
    {
        object.key("period").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.period).into()),
        );
    }
    if let Some(var_339) = &input.unit {
        object.key("unit").string(var_339.as_str());
    }
    if let Some(var_340) = &input.statistics {
        let mut array_341 = object.key("statistics").start_array();
        for item_342 in var_340 {
            {
                array_341.value().string(item_342.as_str());
            }
        }
        array_341.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_distributions_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetDistributionsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_343) = &input.distribution_name {
        object.key("distributionName").string(var_343);
    }
    if let Some(var_344) = &input.page_token {
        object.key("pageToken").string(var_344);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_domain_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetDomainInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_345) = &input.domain_name {
        object.key("domainName").string(var_345);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_domains_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetDomainsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_346) = &input.page_token {
        object.key("pageToken").string(var_346);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_export_snapshot_records_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetExportSnapshotRecordsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_347) = &input.page_token {
        object.key("pageToken").string(var_347);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_instance_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetInstanceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_348) = &input.instance_name {
        object.key("instanceName").string(var_348);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_instance_access_details_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetInstanceAccessDetailsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_349) = &input.instance_name {
        object.key("instanceName").string(var_349);
    }
    if let Some(var_350) = &input.protocol {
        object.key("protocol").string(var_350.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_instance_metric_data_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetInstanceMetricDataInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_351) = &input.instance_name {
        object.key("instanceName").string(var_351);
    }
    if let Some(var_352) = &input.metric_name {
        object.key("metricName").string(var_352.as_str());
    }
    {
        object.key("period").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.period).into()),
        );
    }
    if let Some(var_353) = &input.start_time {
        object
            .key("startTime")
            .instant(var_353, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_354) = &input.end_time {
        object
            .key("endTime")
            .instant(var_354, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_355) = &input.unit {
        object.key("unit").string(var_355.as_str());
    }
    if let Some(var_356) = &input.statistics {
        let mut array_357 = object.key("statistics").start_array();
        for item_358 in var_356 {
            {
                array_357.value().string(item_358.as_str());
            }
        }
        array_357.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_instance_port_states_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetInstancePortStatesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_359) = &input.instance_name {
        object.key("instanceName").string(var_359);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_instances_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetInstancesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_360) = &input.page_token {
        object.key("pageToken").string(var_360);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_instance_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetInstanceSnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_361) = &input.instance_snapshot_name {
        object.key("instanceSnapshotName").string(var_361);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_instance_snapshots_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetInstanceSnapshotsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_362) = &input.page_token {
        object.key("pageToken").string(var_362);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_instance_state_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetInstanceStateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_363) = &input.instance_name {
        object.key("instanceName").string(var_363);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_key_pair_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetKeyPairInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_364) = &input.key_pair_name {
        object.key("keyPairName").string(var_364);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_key_pairs_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetKeyPairsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_365) = &input.page_token {
        object.key("pageToken").string(var_365);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_load_balancer_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetLoadBalancerInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_366) = &input.load_balancer_name {
        object.key("loadBalancerName").string(var_366);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_load_balancer_metric_data_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetLoadBalancerMetricDataInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_367) = &input.load_balancer_name {
        object.key("loadBalancerName").string(var_367);
    }
    if let Some(var_368) = &input.metric_name {
        object.key("metricName").string(var_368.as_str());
    }
    {
        object.key("period").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.period).into()),
        );
    }
    if let Some(var_369) = &input.start_time {
        object
            .key("startTime")
            .instant(var_369, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_370) = &input.end_time {
        object
            .key("endTime")
            .instant(var_370, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_371) = &input.unit {
        object.key("unit").string(var_371.as_str());
    }
    if let Some(var_372) = &input.statistics {
        let mut array_373 = object.key("statistics").start_array();
        for item_374 in var_372 {
            {
                array_373.value().string(item_374.as_str());
            }
        }
        array_373.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_load_balancers_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetLoadBalancersInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_375) = &input.page_token {
        object.key("pageToken").string(var_375);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_load_balancer_tls_certificates_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetLoadBalancerTlsCertificatesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_376) = &input.load_balancer_name {
        object.key("loadBalancerName").string(var_376);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_operation_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetOperationInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_377) = &input.operation_id {
        object.key("operationId").string(var_377);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_operations_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetOperationsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_378) = &input.page_token {
        object.key("pageToken").string(var_378);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_operations_for_resource_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetOperationsForResourceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_379) = &input.resource_name {
        object.key("resourceName").string(var_379);
    }
    if let Some(var_380) = &input.page_token {
        object.key("pageToken").string(var_380);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_regions_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetRegionsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_381) = &input.include_availability_zones {
        object.key("includeAvailabilityZones").boolean(*var_381);
    }
    if let Some(var_382) = &input.include_relational_database_availability_zones {
        object
            .key("includeRelationalDatabaseAvailabilityZones")
            .boolean(*var_382);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_relational_database_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetRelationalDatabaseInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_383) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_383);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_relational_database_blueprints_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetRelationalDatabaseBlueprintsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_384) = &input.page_token {
        object.key("pageToken").string(var_384);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_relational_database_bundles_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetRelationalDatabaseBundlesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_385) = &input.page_token {
        object.key("pageToken").string(var_385);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_relational_database_events_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetRelationalDatabaseEventsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_386) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_386);
    }
    if let Some(var_387) = &input.duration_in_minutes {
        object.key("durationInMinutes").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_387).into()),
        );
    }
    if let Some(var_388) = &input.page_token {
        object.key("pageToken").string(var_388);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_relational_database_log_events_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetRelationalDatabaseLogEventsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_389) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_389);
    }
    if let Some(var_390) = &input.log_stream_name {
        object.key("logStreamName").string(var_390);
    }
    if let Some(var_391) = &input.start_time {
        object
            .key("startTime")
            .instant(var_391, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_392) = &input.end_time {
        object
            .key("endTime")
            .instant(var_392, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_393) = &input.start_from_head {
        object.key("startFromHead").boolean(*var_393);
    }
    if let Some(var_394) = &input.page_token {
        object.key("pageToken").string(var_394);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_relational_database_log_streams_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetRelationalDatabaseLogStreamsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_395) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_395);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_relational_database_master_user_password_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetRelationalDatabaseMasterUserPasswordInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_396) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_396);
    }
    if let Some(var_397) = &input.password_version {
        object.key("passwordVersion").string(var_397.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_relational_database_metric_data_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetRelationalDatabaseMetricDataInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_398) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_398);
    }
    if let Some(var_399) = &input.metric_name {
        object.key("metricName").string(var_399.as_str());
    }
    {
        object.key("period").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.period).into()),
        );
    }
    if let Some(var_400) = &input.start_time {
        object
            .key("startTime")
            .instant(var_400, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_401) = &input.end_time {
        object
            .key("endTime")
            .instant(var_401, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_402) = &input.unit {
        object.key("unit").string(var_402.as_str());
    }
    if let Some(var_403) = &input.statistics {
        let mut array_404 = object.key("statistics").start_array();
        for item_405 in var_403 {
            {
                array_404.value().string(item_405.as_str());
            }
        }
        array_404.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_relational_database_parameters_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetRelationalDatabaseParametersInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_406) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_406);
    }
    if let Some(var_407) = &input.page_token {
        object.key("pageToken").string(var_407);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_relational_databases_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetRelationalDatabasesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_408) = &input.page_token {
        object.key("pageToken").string(var_408);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_relational_database_snapshot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetRelationalDatabaseSnapshotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_409) = &input.relational_database_snapshot_name {
        object.key("relationalDatabaseSnapshotName").string(var_409);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_relational_database_snapshots_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetRelationalDatabaseSnapshotsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_410) = &input.page_token {
        object.key("pageToken").string(var_410);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_static_ip_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetStaticIpInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_411) = &input.static_ip_name {
        object.key("staticIpName").string(var_411);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_static_ips_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetStaticIpsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_412) = &input.page_token {
        object.key("pageToken").string(var_412);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_import_key_pair_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ImportKeyPairInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_413) = &input.key_pair_name {
        object.key("keyPairName").string(var_413);
    }
    if let Some(var_414) = &input.public_key_base64 {
        object.key("publicKeyBase64").string(var_414);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_open_instance_public_ports_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::OpenInstancePublicPortsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_415) = &input.port_info {
        let mut object_416 = object.key("portInfo").start_object();
        crate::json_ser::serialize_structure_crate_model_port_info(&mut object_416, var_415)?;
        object_416.finish();
    }
    if let Some(var_417) = &input.instance_name {
        object.key("instanceName").string(var_417);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_put_alarm_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::PutAlarmInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_418) = &input.alarm_name {
        object.key("alarmName").string(var_418);
    }
    if let Some(var_419) = &input.metric_name {
        object.key("metricName").string(var_419.as_str());
    }
    if let Some(var_420) = &input.monitored_resource_name {
        object.key("monitoredResourceName").string(var_420);
    }
    if let Some(var_421) = &input.comparison_operator {
        object.key("comparisonOperator").string(var_421.as_str());
    }
    if let Some(var_422) = &input.threshold {
        object.key("threshold").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::Float((*var_422).into()),
        );
    }
    if let Some(var_423) = &input.evaluation_periods {
        object.key("evaluationPeriods").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_423).into()),
        );
    }
    if let Some(var_424) = &input.datapoints_to_alarm {
        object.key("datapointsToAlarm").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_424).into()),
        );
    }
    if let Some(var_425) = &input.treat_missing_data {
        object.key("treatMissingData").string(var_425.as_str());
    }
    if let Some(var_426) = &input.contact_protocols {
        let mut array_427 = object.key("contactProtocols").start_array();
        for item_428 in var_426 {
            {
                array_427.value().string(item_428.as_str());
            }
        }
        array_427.finish();
    }
    if let Some(var_429) = &input.notification_triggers {
        let mut array_430 = object.key("notificationTriggers").start_array();
        for item_431 in var_429 {
            {
                array_430.value().string(item_431.as_str());
            }
        }
        array_430.finish();
    }
    if let Some(var_432) = &input.notification_enabled {
        object.key("notificationEnabled").boolean(*var_432);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_put_instance_public_ports_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::PutInstancePublicPortsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_433) = &input.port_infos {
        let mut array_434 = object.key("portInfos").start_array();
        for item_435 in var_433 {
            {
                let mut object_436 = array_434.value().start_object();
                crate::json_ser::serialize_structure_crate_model_port_info(
                    &mut object_436,
                    item_435,
                )?;
                object_436.finish();
            }
        }
        array_434.finish();
    }
    if let Some(var_437) = &input.instance_name {
        object.key("instanceName").string(var_437);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_reboot_instance_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::RebootInstanceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_438) = &input.instance_name {
        object.key("instanceName").string(var_438);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_reboot_relational_database_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::RebootRelationalDatabaseInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_439) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_439);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_register_container_image_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::RegisterContainerImageInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_440) = &input.service_name {
        object.key("serviceName").string(var_440);
    }
    if let Some(var_441) = &input.label {
        object.key("label").string(var_441);
    }
    if let Some(var_442) = &input.digest {
        object.key("digest").string(var_442);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_release_static_ip_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ReleaseStaticIpInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_443) = &input.static_ip_name {
        object.key("staticIpName").string(var_443);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_reset_distribution_cache_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ResetDistributionCacheInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_444) = &input.distribution_name {
        object.key("distributionName").string(var_444);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_send_contact_method_verification_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::SendContactMethodVerificationInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_445) = &input.protocol {
        object.key("protocol").string(var_445.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_set_ip_address_type_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::SetIpAddressTypeInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_446) = &input.resource_type {
        object.key("resourceType").string(var_446.as_str());
    }
    if let Some(var_447) = &input.resource_name {
        object.key("resourceName").string(var_447);
    }
    if let Some(var_448) = &input.ip_address_type {
        object.key("ipAddressType").string(var_448.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_set_resource_access_for_bucket_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::SetResourceAccessForBucketInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_449) = &input.resource_name {
        object.key("resourceName").string(var_449);
    }
    if let Some(var_450) = &input.bucket_name {
        object.key("bucketName").string(var_450);
    }
    if let Some(var_451) = &input.access {
        object.key("access").string(var_451.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_start_instance_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StartInstanceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_452) = &input.instance_name {
        object.key("instanceName").string(var_452);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_start_relational_database_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StartRelationalDatabaseInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_453) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_453);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_stop_instance_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StopInstanceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_454) = &input.instance_name {
        object.key("instanceName").string(var_454);
    }
    if let Some(var_455) = &input.force {
        object.key("force").boolean(*var_455);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_stop_relational_database_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StopRelationalDatabaseInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_456) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_456);
    }
    if let Some(var_457) = &input.relational_database_snapshot_name {
        object.key("relationalDatabaseSnapshotName").string(var_457);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_tag_resource_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::TagResourceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_458) = &input.resource_name {
        object.key("resourceName").string(var_458);
    }
    if let Some(var_459) = &input.resource_arn {
        object.key("resourceArn").string(var_459);
    }
    if let Some(var_460) = &input.tags {
        let mut array_461 = object.key("tags").start_array();
        for item_462 in var_460 {
            {
                let mut object_463 = array_461.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_463, item_462)?;
                object_463.finish();
            }
        }
        array_461.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_test_alarm_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::TestAlarmInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_464) = &input.alarm_name {
        object.key("alarmName").string(var_464);
    }
    if let Some(var_465) = &input.state {
        object.key("state").string(var_465.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_untag_resource_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UntagResourceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_466) = &input.resource_name {
        object.key("resourceName").string(var_466);
    }
    if let Some(var_467) = &input.resource_arn {
        object.key("resourceArn").string(var_467);
    }
    if let Some(var_468) = &input.tag_keys {
        let mut array_469 = object.key("tagKeys").start_array();
        for item_470 in var_468 {
            {
                array_469.value().string(item_470);
            }
        }
        array_469.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_bucket_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateBucketInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_471) = &input.bucket_name {
        object.key("bucketName").string(var_471);
    }
    if let Some(var_472) = &input.access_rules {
        let mut object_473 = object.key("accessRules").start_object();
        crate::json_ser::serialize_structure_crate_model_access_rules(&mut object_473, var_472)?;
        object_473.finish();
    }
    if let Some(var_474) = &input.versioning {
        object.key("versioning").string(var_474);
    }
    if let Some(var_475) = &input.readonly_access_accounts {
        let mut array_476 = object.key("readonlyAccessAccounts").start_array();
        for item_477 in var_475 {
            {
                array_476.value().string(item_477);
            }
        }
        array_476.finish();
    }
    if let Some(var_478) = &input.access_log_config {
        let mut object_479 = object.key("accessLogConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_bucket_access_log_config(
            &mut object_479,
            var_478,
        )?;
        object_479.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_bucket_bundle_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateBucketBundleInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_480) = &input.bucket_name {
        object.key("bucketName").string(var_480);
    }
    if let Some(var_481) = &input.bundle_id {
        object.key("bundleId").string(var_481);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_container_service_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateContainerServiceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_482) = &input.service_name {
        object.key("serviceName").string(var_482);
    }
    if let Some(var_483) = &input.power {
        object.key("power").string(var_483.as_str());
    }
    if let Some(var_484) = &input.scale {
        object.key("scale").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_484).into()),
        );
    }
    if let Some(var_485) = &input.is_disabled {
        object.key("isDisabled").boolean(*var_485);
    }
    if let Some(var_486) = &input.public_domain_names {
        let mut object_487 = object.key("publicDomainNames").start_object();
        for (key_488, value_489) in var_486 {
            {
                let mut array_490 = object_487.key(key_488).start_array();
                for item_491 in value_489 {
                    {
                        array_490.value().string(item_491);
                    }
                }
                array_490.finish();
            }
        }
        object_487.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_distribution_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateDistributionInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_492) = &input.distribution_name {
        object.key("distributionName").string(var_492);
    }
    if let Some(var_493) = &input.origin {
        let mut object_494 = object.key("origin").start_object();
        crate::json_ser::serialize_structure_crate_model_input_origin(&mut object_494, var_493)?;
        object_494.finish();
    }
    if let Some(var_495) = &input.default_cache_behavior {
        let mut object_496 = object.key("defaultCacheBehavior").start_object();
        crate::json_ser::serialize_structure_crate_model_cache_behavior(&mut object_496, var_495)?;
        object_496.finish();
    }
    if let Some(var_497) = &input.cache_behavior_settings {
        let mut object_498 = object.key("cacheBehaviorSettings").start_object();
        crate::json_ser::serialize_structure_crate_model_cache_settings(&mut object_498, var_497)?;
        object_498.finish();
    }
    if let Some(var_499) = &input.cache_behaviors {
        let mut array_500 = object.key("cacheBehaviors").start_array();
        for item_501 in var_499 {
            {
                let mut object_502 = array_500.value().start_object();
                crate::json_ser::serialize_structure_crate_model_cache_behavior_per_path(
                    &mut object_502,
                    item_501,
                )?;
                object_502.finish();
            }
        }
        array_500.finish();
    }
    if let Some(var_503) = &input.is_enabled {
        object.key("isEnabled").boolean(*var_503);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_distribution_bundle_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateDistributionBundleInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_504) = &input.distribution_name {
        object.key("distributionName").string(var_504);
    }
    if let Some(var_505) = &input.bundle_id {
        object.key("bundleId").string(var_505);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_domain_entry_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateDomainEntryInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_506) = &input.domain_name {
        object.key("domainName").string(var_506);
    }
    if let Some(var_507) = &input.domain_entry {
        let mut object_508 = object.key("domainEntry").start_object();
        crate::json_ser::serialize_structure_crate_model_domain_entry(&mut object_508, var_507)?;
        object_508.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_load_balancer_attribute_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateLoadBalancerAttributeInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_509) = &input.load_balancer_name {
        object.key("loadBalancerName").string(var_509);
    }
    if let Some(var_510) = &input.attribute_name {
        object.key("attributeName").string(var_510.as_str());
    }
    if let Some(var_511) = &input.attribute_value {
        object.key("attributeValue").string(var_511);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_relational_database_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateRelationalDatabaseInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_512) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_512);
    }
    if let Some(var_513) = &input.master_user_password {
        object.key("masterUserPassword").string(var_513);
    }
    if let Some(var_514) = &input.rotate_master_user_password {
        object.key("rotateMasterUserPassword").boolean(*var_514);
    }
    if let Some(var_515) = &input.preferred_backup_window {
        object.key("preferredBackupWindow").string(var_515);
    }
    if let Some(var_516) = &input.preferred_maintenance_window {
        object.key("preferredMaintenanceWindow").string(var_516);
    }
    if let Some(var_517) = &input.enable_backup_retention {
        object.key("enableBackupRetention").boolean(*var_517);
    }
    if let Some(var_518) = &input.disable_backup_retention {
        object.key("disableBackupRetention").boolean(*var_518);
    }
    if let Some(var_519) = &input.publicly_accessible {
        object.key("publiclyAccessible").boolean(*var_519);
    }
    if let Some(var_520) = &input.apply_immediately {
        object.key("applyImmediately").boolean(*var_520);
    }
    if let Some(var_521) = &input.ca_certificate_identifier {
        object.key("caCertificateIdentifier").string(var_521);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_relational_database_parameters_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateRelationalDatabaseParametersInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_522) = &input.relational_database_name {
        object.key("relationalDatabaseName").string(var_522);
    }
    if let Some(var_523) = &input.parameters {
        let mut array_524 = object.key("parameters").start_array();
        for item_525 in var_523 {
            {
                let mut object_526 = array_524.value().start_object();
                crate::json_ser::serialize_structure_crate_model_relational_database_parameter(
                    &mut object_526,
                    item_525,
                )?;
                object_526.finish();
            }
        }
        array_524.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_port_info(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::PortInfo,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if input.from_port != 0 {
        object.key("fromPort").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.from_port).into()),
        );
    }
    if input.to_port != 0 {
        object.key("toPort").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.to_port).into()),
        );
    }
    if let Some(var_527) = &input.protocol {
        object.key("protocol").string(var_527.as_str());
    }
    if let Some(var_528) = &input.cidrs {
        let mut array_529 = object.key("cidrs").start_array();
        for item_530 in var_528 {
            {
                array_529.value().string(item_530);
            }
        }
        array_529.finish();
    }
    if let Some(var_531) = &input.ipv6_cidrs {
        let mut array_532 = object.key("ipv6Cidrs").start_array();
        for item_533 in var_531 {
            {
                array_532.value().string(item_533);
            }
        }
        array_532.finish();
    }
    if let Some(var_534) = &input.cidr_list_aliases {
        let mut array_535 = object.key("cidrListAliases").start_array();
        for item_536 in var_534 {
            {
                array_535.value().string(item_536);
            }
        }
        array_535.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_tag(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Tag,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_537) = &input.key {
        object.key("key").string(var_537);
    }
    if let Some(var_538) = &input.value {
        object.key("value").string(var_538);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_instance_entry(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::InstanceEntry,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_539) = &input.source_name {
        object.key("sourceName").string(var_539);
    }
    if let Some(var_540) = &input.instance_type {
        object.key("instanceType").string(var_540);
    }
    if let Some(var_541) = &input.port_info_source {
        object.key("portInfoSource").string(var_541.as_str());
    }
    if let Some(var_542) = &input.user_data {
        object.key("userData").string(var_542);
    }
    if let Some(var_543) = &input.availability_zone {
        object.key("availabilityZone").string(var_543);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_container_service_deployment_request(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ContainerServiceDeploymentRequest,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_544) = &input.containers {
        let mut object_545 = object.key("containers").start_object();
        for (key_546, value_547) in var_544 {
            {
                let mut object_548 = object_545.key(key_546).start_object();
                crate::json_ser::serialize_structure_crate_model_container(
                    &mut object_548,
                    value_547,
                )?;
                object_548.finish();
            }
        }
        object_545.finish();
    }
    if let Some(var_549) = &input.public_endpoint {
        let mut object_550 = object.key("publicEndpoint").start_object();
        crate::json_ser::serialize_structure_crate_model_endpoint_request(
            &mut object_550,
            var_549,
        )?;
        object_550.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_container(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Container,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_551) = &input.image {
        object.key("image").string(var_551);
    }
    if let Some(var_552) = &input.command {
        let mut array_553 = object.key("command").start_array();
        for item_554 in var_552 {
            {
                array_553.value().string(item_554);
            }
        }
        array_553.finish();
    }
    if let Some(var_555) = &input.environment {
        let mut object_556 = object.key("environment").start_object();
        for (key_557, value_558) in var_555 {
            {
                object_556.key(key_557).string(value_558);
            }
        }
        object_556.finish();
    }
    if let Some(var_559) = &input.ports {
        let mut object_560 = object.key("ports").start_object();
        for (key_561, value_562) in var_559 {
            {
                object_560.key(key_561).string(value_562.as_str());
            }
        }
        object_560.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_endpoint_request(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::EndpointRequest,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_563) = &input.container_name {
        object.key("containerName").string(var_563);
    }
    if let Some(var_564) = &input.container_port {
        object.key("containerPort").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_564).into()),
        );
    }
    if let Some(var_565) = &input.health_check {
        let mut object_566 = object.key("healthCheck").start_object();
        crate::json_ser::serialize_structure_crate_model_container_service_health_check_config(
            &mut object_566,
            var_565,
        )?;
        object_566.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_add_on_request(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::AddOnRequest,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_567) = &input.add_on_type {
        object.key("addOnType").string(var_567.as_str());
    }
    if let Some(var_568) = &input.auto_snapshot_add_on_request {
        let mut object_569 = object.key("autoSnapshotAddOnRequest").start_object();
        crate::json_ser::serialize_structure_crate_model_auto_snapshot_add_on_request(
            &mut object_569,
            var_568,
        )?;
        object_569.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_input_origin(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::InputOrigin,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_570) = &input.name {
        object.key("name").string(var_570);
    }
    if let Some(var_571) = &input.region_name {
        object.key("regionName").string(var_571.as_str());
    }
    if let Some(var_572) = &input.protocol_policy {
        object.key("protocolPolicy").string(var_572.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_cache_behavior(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::CacheBehavior,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_573) = &input.behavior {
        object.key("behavior").string(var_573.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_cache_settings(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::CacheSettings,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_574) = &input.default_ttl {
        object.key("defaultTTL").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_574).into()),
        );
    }
    if let Some(var_575) = &input.minimum_ttl {
        object.key("minimumTTL").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_575).into()),
        );
    }
    if let Some(var_576) = &input.maximum_ttl {
        object.key("maximumTTL").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_576).into()),
        );
    }
    if let Some(var_577) = &input.allowed_http_methods {
        object.key("allowedHTTPMethods").string(var_577);
    }
    if let Some(var_578) = &input.cached_http_methods {
        object.key("cachedHTTPMethods").string(var_578);
    }
    if let Some(var_579) = &input.forwarded_cookies {
        let mut object_580 = object.key("forwardedCookies").start_object();
        crate::json_ser::serialize_structure_crate_model_cookie_object(&mut object_580, var_579)?;
        object_580.finish();
    }
    if let Some(var_581) = &input.forwarded_headers {
        let mut object_582 = object.key("forwardedHeaders").start_object();
        crate::json_ser::serialize_structure_crate_model_header_object(&mut object_582, var_581)?;
        object_582.finish();
    }
    if let Some(var_583) = &input.forwarded_query_strings {
        let mut object_584 = object.key("forwardedQueryStrings").start_object();
        crate::json_ser::serialize_structure_crate_model_query_string_object(
            &mut object_584,
            var_583,
        )?;
        object_584.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_cache_behavior_per_path(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::CacheBehaviorPerPath,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_585) = &input.path {
        object.key("path").string(var_585);
    }
    if let Some(var_586) = &input.behavior {
        object.key("behavior").string(var_586.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_domain_entry(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::DomainEntry,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_587) = &input.id {
        object.key("id").string(var_587);
    }
    if let Some(var_588) = &input.name {
        object.key("name").string(var_588);
    }
    if let Some(var_589) = &input.target {
        object.key("target").string(var_589);
    }
    if let Some(var_590) = &input.is_alias {
        object.key("isAlias").boolean(*var_590);
    }
    if let Some(var_591) = &input.r#type {
        object.key("type").string(var_591);
    }
    if let Some(var_592) = &input.options {
        let mut object_593 = object.key("options").start_object();
        for (key_594, value_595) in var_592 {
            {
                object_593.key(key_594).string(value_595);
            }
        }
        object_593.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_disk_map(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::DiskMap,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_596) = &input.original_disk_path {
        object.key("originalDiskPath").string(var_596);
    }
    if let Some(var_597) = &input.new_disk_name {
        object.key("newDiskName").string(var_597);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_access_rules(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::AccessRules,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_598) = &input.get_object {
        object.key("getObject").string(var_598.as_str());
    }
    if let Some(var_599) = &input.allow_public_overrides {
        object.key("allowPublicOverrides").boolean(*var_599);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_bucket_access_log_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::BucketAccessLogConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_600) = &input.enabled {
        object.key("enabled").boolean(*var_600);
    }
    if let Some(var_601) = &input.destination {
        object.key("destination").string(var_601);
    }
    if let Some(var_602) = &input.prefix {
        object.key("prefix").string(var_602);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_relational_database_parameter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::RelationalDatabaseParameter,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_603) = &input.allowed_values {
        object.key("allowedValues").string(var_603);
    }
    if let Some(var_604) = &input.apply_method {
        object.key("applyMethod").string(var_604);
    }
    if let Some(var_605) = &input.apply_type {
        object.key("applyType").string(var_605);
    }
    if let Some(var_606) = &input.data_type {
        object.key("dataType").string(var_606);
    }
    if let Some(var_607) = &input.description {
        object.key("description").string(var_607);
    }
    if let Some(var_608) = &input.is_modifiable {
        object.key("isModifiable").boolean(*var_608);
    }
    if let Some(var_609) = &input.parameter_name {
        object.key("parameterName").string(var_609);
    }
    if let Some(var_610) = &input.parameter_value {
        object.key("parameterValue").string(var_610);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_container_service_health_check_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ContainerServiceHealthCheckConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_611) = &input.healthy_threshold {
        object.key("healthyThreshold").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_611).into()),
        );
    }
    if let Some(var_612) = &input.unhealthy_threshold {
        object.key("unhealthyThreshold").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_612).into()),
        );
    }
    if let Some(var_613) = &input.timeout_seconds {
        object.key("timeoutSeconds").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_613).into()),
        );
    }
    if let Some(var_614) = &input.interval_seconds {
        object.key("intervalSeconds").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_614).into()),
        );
    }
    if let Some(var_615) = &input.path {
        object.key("path").string(var_615);
    }
    if let Some(var_616) = &input.success_codes {
        object.key("successCodes").string(var_616);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_auto_snapshot_add_on_request(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::AutoSnapshotAddOnRequest,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_617) = &input.snapshot_time_of_day {
        object.key("snapshotTimeOfDay").string(var_617);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_cookie_object(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::CookieObject,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_618) = &input.option {
        object.key("option").string(var_618.as_str());
    }
    if let Some(var_619) = &input.cookies_allow_list {
        let mut array_620 = object.key("cookiesAllowList").start_array();
        for item_621 in var_619 {
            {
                array_620.value().string(item_621);
            }
        }
        array_620.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_header_object(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::HeaderObject,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_622) = &input.option {
        object.key("option").string(var_622.as_str());
    }
    if let Some(var_623) = &input.headers_allow_list {
        let mut array_624 = object.key("headersAllowList").start_array();
        for item_625 in var_623 {
            {
                array_624.value().string(item_625.as_str());
            }
        }
        array_624.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_query_string_object(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::QueryStringObject,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_626) = &input.option {
        object.key("option").boolean(*var_626);
    }
    if let Some(var_627) = &input.query_strings_allow_list {
        let mut array_628 = object.key("queryStringsAllowList").start_array();
        for item_629 in var_627 {
            {
                array_628.value().string(item_629);
            }
        }
        array_628.finish();
    }
    Ok(())
}
