// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn serialize_structure_crate_input_create_device_pool_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateDevicePoolInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_1) = &input.project_arn {
        object.key("projectArn").string(var_1.as_str());
    }
    if let Some(var_2) = &input.name {
        object.key("name").string(var_2.as_str());
    }
    if let Some(var_3) = &input.description {
        object.key("description").string(var_3.as_str());
    }
    if let Some(var_4) = &input.rules {
        let mut array_5 = object.key("rules").start_array();
        for item_6 in var_4 {
            {
                let mut object_7 = array_5.value().start_object();
                crate::json_ser::serialize_structure_crate_model_rule(&mut object_7, item_6)?;
                object_7.finish();
            }
        }
        array_5.finish();
    }
    if let Some(var_8) = &input.max_devices {
        object.key("maxDevices").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_8).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_instance_profile_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateInstanceProfileInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_9) = &input.name {
        object.key("name").string(var_9.as_str());
    }
    if let Some(var_10) = &input.description {
        object.key("description").string(var_10.as_str());
    }
    if let Some(var_11) = &input.package_cleanup {
        object.key("packageCleanup").boolean(*var_11);
    }
    if let Some(var_12) = &input.exclude_app_packages_from_cleanup {
        let mut array_13 = object.key("excludeAppPackagesFromCleanup").start_array();
        for item_14 in var_12 {
            {
                array_13.value().string(item_14.as_str());
            }
        }
        array_13.finish();
    }
    if let Some(var_15) = &input.reboot_after_use {
        object.key("rebootAfterUse").boolean(*var_15);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_network_profile_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateNetworkProfileInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_16) = &input.project_arn {
        object.key("projectArn").string(var_16.as_str());
    }
    if let Some(var_17) = &input.name {
        object.key("name").string(var_17.as_str());
    }
    if let Some(var_18) = &input.description {
        object.key("description").string(var_18.as_str());
    }
    if let Some(var_19) = &input.r#type {
        object.key("type").string(var_19.as_str());
    }
    if let Some(var_20) = &input.uplink_bandwidth_bits {
        object.key("uplinkBandwidthBits").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_20).into()),
        );
    }
    if let Some(var_21) = &input.downlink_bandwidth_bits {
        object.key("downlinkBandwidthBits").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_21).into()),
        );
    }
    if let Some(var_22) = &input.uplink_delay_ms {
        object.key("uplinkDelayMs").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_22).into()),
        );
    }
    if let Some(var_23) = &input.downlink_delay_ms {
        object.key("downlinkDelayMs").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_23).into()),
        );
    }
    if let Some(var_24) = &input.uplink_jitter_ms {
        object.key("uplinkJitterMs").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_24).into()),
        );
    }
    if let Some(var_25) = &input.downlink_jitter_ms {
        object.key("downlinkJitterMs").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_25).into()),
        );
    }
    if input.uplink_loss_percent != 0 {
        object.key("uplinkLossPercent").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.uplink_loss_percent).into()),
        );
    }
    if input.downlink_loss_percent != 0 {
        object.key("downlinkLossPercent").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.downlink_loss_percent).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_project_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateProjectInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_26) = &input.name {
        object.key("name").string(var_26.as_str());
    }
    if let Some(var_27) = &input.default_job_timeout_minutes {
        object.key("defaultJobTimeoutMinutes").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_27).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_remote_access_session_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateRemoteAccessSessionInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_28) = &input.project_arn {
        object.key("projectArn").string(var_28.as_str());
    }
    if let Some(var_29) = &input.device_arn {
        object.key("deviceArn").string(var_29.as_str());
    }
    if let Some(var_30) = &input.instance_arn {
        object.key("instanceArn").string(var_30.as_str());
    }
    if let Some(var_31) = &input.ssh_public_key {
        object.key("sshPublicKey").string(var_31.as_str());
    }
    if let Some(var_32) = &input.remote_debug_enabled {
        object.key("remoteDebugEnabled").boolean(*var_32);
    }
    if let Some(var_33) = &input.remote_record_enabled {
        object.key("remoteRecordEnabled").boolean(*var_33);
    }
    if let Some(var_34) = &input.remote_record_app_arn {
        object.key("remoteRecordAppArn").string(var_34.as_str());
    }
    if let Some(var_35) = &input.name {
        object.key("name").string(var_35.as_str());
    }
    if let Some(var_36) = &input.client_id {
        object.key("clientId").string(var_36.as_str());
    }
    if let Some(var_37) = &input.configuration {
        let mut object_38 = object.key("configuration").start_object();
        crate::json_ser::serialize_structure_crate_model_create_remote_access_session_configuration(&mut object_38, var_37)?;
        object_38.finish();
    }
    if let Some(var_39) = &input.interaction_mode {
        object.key("interactionMode").string(var_39.as_str());
    }
    if let Some(var_40) = &input.skip_app_resign {
        object.key("skipAppResign").boolean(*var_40);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_test_grid_project_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateTestGridProjectInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_41) = &input.name {
        object.key("name").string(var_41.as_str());
    }
    if let Some(var_42) = &input.description {
        object.key("description").string(var_42.as_str());
    }
    if let Some(var_43) = &input.vpc_config {
        let mut object_44 = object.key("vpcConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_test_grid_vpc_config(
            &mut object_44,
            var_43,
        )?;
        object_44.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_test_grid_url_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateTestGridUrlInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_45) = &input.project_arn {
        object.key("projectArn").string(var_45.as_str());
    }
    if let Some(var_46) = &input.expires_in_seconds {
        object.key("expiresInSeconds").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_46).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_upload_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateUploadInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_47) = &input.project_arn {
        object.key("projectArn").string(var_47.as_str());
    }
    if let Some(var_48) = &input.name {
        object.key("name").string(var_48.as_str());
    }
    if let Some(var_49) = &input.r#type {
        object.key("type").string(var_49.as_str());
    }
    if let Some(var_50) = &input.content_type {
        object.key("contentType").string(var_50.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_vpce_configuration_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateVpceConfigurationInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_51) = &input.vpce_configuration_name {
        object.key("vpceConfigurationName").string(var_51.as_str());
    }
    if let Some(var_52) = &input.vpce_service_name {
        object.key("vpceServiceName").string(var_52.as_str());
    }
    if let Some(var_53) = &input.service_dns_name {
        object.key("serviceDnsName").string(var_53.as_str());
    }
    if let Some(var_54) = &input.vpce_configuration_description {
        object
            .key("vpceConfigurationDescription")
            .string(var_54.as_str());
    }
    Ok(())
}

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

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

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

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

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

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

pub fn serialize_structure_crate_input_delete_test_grid_project_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteTestGridProjectInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_61) = &input.project_arn {
        object.key("projectArn").string(var_61.as_str());
    }
    Ok(())
}

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

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

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

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

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

pub fn serialize_structure_crate_input_get_device_pool_compatibility_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetDevicePoolCompatibilityInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_67) = &input.device_pool_arn {
        object.key("devicePoolArn").string(var_67.as_str());
    }
    if let Some(var_68) = &input.app_arn {
        object.key("appArn").string(var_68.as_str());
    }
    if let Some(var_69) = &input.test_type {
        object.key("testType").string(var_69.as_str());
    }
    if let Some(var_70) = &input.test {
        let mut object_71 = object.key("test").start_object();
        crate::json_ser::serialize_structure_crate_model_schedule_run_test(&mut object_71, var_70)?;
        object_71.finish();
    }
    if let Some(var_72) = &input.configuration {
        let mut object_73 = object.key("configuration").start_object();
        crate::json_ser::serialize_structure_crate_model_schedule_run_configuration(
            &mut object_73,
            var_72,
        )?;
        object_73.finish();
    }
    Ok(())
}

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

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

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

pub fn serialize_structure_crate_input_get_offering_status_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetOfferingStatusInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_77) = &input.next_token {
        object.key("nextToken").string(var_77.as_str());
    }
    Ok(())
}

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

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

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

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

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

pub fn serialize_structure_crate_input_get_test_grid_project_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetTestGridProjectInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_83) = &input.project_arn {
        object.key("projectArn").string(var_83.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_test_grid_session_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetTestGridSessionInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_84) = &input.project_arn {
        object.key("projectArn").string(var_84.as_str());
    }
    if let Some(var_85) = &input.session_id {
        object.key("sessionId").string(var_85.as_str());
    }
    if let Some(var_86) = &input.session_arn {
        object.key("sessionArn").string(var_86.as_str());
    }
    Ok(())
}

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

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

pub fn serialize_structure_crate_input_install_to_remote_access_session_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::InstallToRemoteAccessSessionInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_89) = &input.remote_access_session_arn {
        object.key("remoteAccessSessionArn").string(var_89.as_str());
    }
    if let Some(var_90) = &input.app_arn {
        object.key("appArn").string(var_90.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_artifacts_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListArtifactsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_91) = &input.arn {
        object.key("arn").string(var_91.as_str());
    }
    if let Some(var_92) = &input.r#type {
        object.key("type").string(var_92.as_str());
    }
    if let Some(var_93) = &input.next_token {
        object.key("nextToken").string(var_93.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_device_instances_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListDeviceInstancesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_94) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_94).into()),
        );
    }
    if let Some(var_95) = &input.next_token {
        object.key("nextToken").string(var_95.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_device_pools_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListDevicePoolsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_96) = &input.arn {
        object.key("arn").string(var_96.as_str());
    }
    if let Some(var_97) = &input.r#type {
        object.key("type").string(var_97.as_str());
    }
    if let Some(var_98) = &input.next_token {
        object.key("nextToken").string(var_98.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_devices_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListDevicesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_99) = &input.arn {
        object.key("arn").string(var_99.as_str());
    }
    if let Some(var_100) = &input.next_token {
        object.key("nextToken").string(var_100.as_str());
    }
    if let Some(var_101) = &input.filters {
        let mut array_102 = object.key("filters").start_array();
        for item_103 in var_101 {
            {
                let mut object_104 = array_102.value().start_object();
                crate::json_ser::serialize_structure_crate_model_device_filter(
                    &mut object_104,
                    item_103,
                )?;
                object_104.finish();
            }
        }
        array_102.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_instance_profiles_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListInstanceProfilesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_105) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_105).into()),
        );
    }
    if let Some(var_106) = &input.next_token {
        object.key("nextToken").string(var_106.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_jobs_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListJobsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_107) = &input.arn {
        object.key("arn").string(var_107.as_str());
    }
    if let Some(var_108) = &input.next_token {
        object.key("nextToken").string(var_108.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_network_profiles_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListNetworkProfilesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_109) = &input.arn {
        object.key("arn").string(var_109.as_str());
    }
    if let Some(var_110) = &input.r#type {
        object.key("type").string(var_110.as_str());
    }
    if let Some(var_111) = &input.next_token {
        object.key("nextToken").string(var_111.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_offering_promotions_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListOfferingPromotionsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_112) = &input.next_token {
        object.key("nextToken").string(var_112.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_offerings_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListOfferingsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_113) = &input.next_token {
        object.key("nextToken").string(var_113.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_offering_transactions_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListOfferingTransactionsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_114) = &input.next_token {
        object.key("nextToken").string(var_114.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_projects_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListProjectsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_115) = &input.arn {
        object.key("arn").string(var_115.as_str());
    }
    if let Some(var_116) = &input.next_token {
        object.key("nextToken").string(var_116.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_remote_access_sessions_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListRemoteAccessSessionsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_117) = &input.arn {
        object.key("arn").string(var_117.as_str());
    }
    if let Some(var_118) = &input.next_token {
        object.key("nextToken").string(var_118.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_runs_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListRunsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_119) = &input.arn {
        object.key("arn").string(var_119.as_str());
    }
    if let Some(var_120) = &input.next_token {
        object.key("nextToken").string(var_120.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_samples_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListSamplesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_121) = &input.arn {
        object.key("arn").string(var_121.as_str());
    }
    if let Some(var_122) = &input.next_token {
        object.key("nextToken").string(var_122.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_suites_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListSuitesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_123) = &input.arn {
        object.key("arn").string(var_123.as_str());
    }
    if let Some(var_124) = &input.next_token {
        object.key("nextToken").string(var_124.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_tags_for_resource_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListTagsForResourceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_125) = &input.resource_arn {
        object.key("ResourceARN").string(var_125.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_test_grid_projects_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListTestGridProjectsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_126) = &input.max_result {
        object.key("maxResult").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_126).into()),
        );
    }
    if let Some(var_127) = &input.next_token {
        object.key("nextToken").string(var_127.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_test_grid_session_actions_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListTestGridSessionActionsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_128) = &input.session_arn {
        object.key("sessionArn").string(var_128.as_str());
    }
    if let Some(var_129) = &input.max_result {
        object.key("maxResult").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_129).into()),
        );
    }
    if let Some(var_130) = &input.next_token {
        object.key("nextToken").string(var_130.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_test_grid_session_artifacts_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListTestGridSessionArtifactsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_131) = &input.session_arn {
        object.key("sessionArn").string(var_131.as_str());
    }
    if let Some(var_132) = &input.r#type {
        object.key("type").string(var_132.as_str());
    }
    if let Some(var_133) = &input.max_result {
        object.key("maxResult").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_133).into()),
        );
    }
    if let Some(var_134) = &input.next_token {
        object.key("nextToken").string(var_134.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_test_grid_sessions_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListTestGridSessionsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_135) = &input.project_arn {
        object.key("projectArn").string(var_135.as_str());
    }
    if let Some(var_136) = &input.status {
        object.key("status").string(var_136.as_str());
    }
    if let Some(var_137) = &input.creation_time_after {
        object
            .key("creationTimeAfter")
            .date_time(var_137, aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    if let Some(var_138) = &input.creation_time_before {
        object
            .key("creationTimeBefore")
            .date_time(var_138, aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    if let Some(var_139) = &input.end_time_after {
        object
            .key("endTimeAfter")
            .date_time(var_139, aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    if let Some(var_140) = &input.end_time_before {
        object
            .key("endTimeBefore")
            .date_time(var_140, aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    if let Some(var_141) = &input.max_result {
        object.key("maxResult").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_141).into()),
        );
    }
    if let Some(var_142) = &input.next_token {
        object.key("nextToken").string(var_142.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_tests_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListTestsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_143) = &input.arn {
        object.key("arn").string(var_143.as_str());
    }
    if let Some(var_144) = &input.next_token {
        object.key("nextToken").string(var_144.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_unique_problems_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListUniqueProblemsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_145) = &input.arn {
        object.key("arn").string(var_145.as_str());
    }
    if let Some(var_146) = &input.next_token {
        object.key("nextToken").string(var_146.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_uploads_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListUploadsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_147) = &input.arn {
        object.key("arn").string(var_147.as_str());
    }
    if let Some(var_148) = &input.r#type {
        object.key("type").string(var_148.as_str());
    }
    if let Some(var_149) = &input.next_token {
        object.key("nextToken").string(var_149.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_vpce_configurations_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListVpceConfigurationsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_150) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_150).into()),
        );
    }
    if let Some(var_151) = &input.next_token {
        object.key("nextToken").string(var_151.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_purchase_offering_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::PurchaseOfferingInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_152) = &input.offering_id {
        object.key("offeringId").string(var_152.as_str());
    }
    if let Some(var_153) = &input.quantity {
        object.key("quantity").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_153).into()),
        );
    }
    if let Some(var_154) = &input.offering_promotion_id {
        object.key("offeringPromotionId").string(var_154.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_renew_offering_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::RenewOfferingInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_155) = &input.offering_id {
        object.key("offeringId").string(var_155.as_str());
    }
    if let Some(var_156) = &input.quantity {
        object.key("quantity").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_156).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_schedule_run_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ScheduleRunInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_157) = &input.project_arn {
        object.key("projectArn").string(var_157.as_str());
    }
    if let Some(var_158) = &input.app_arn {
        object.key("appArn").string(var_158.as_str());
    }
    if let Some(var_159) = &input.device_pool_arn {
        object.key("devicePoolArn").string(var_159.as_str());
    }
    if let Some(var_160) = &input.device_selection_configuration {
        let mut object_161 = object.key("deviceSelectionConfiguration").start_object();
        crate::json_ser::serialize_structure_crate_model_device_selection_configuration(
            &mut object_161,
            var_160,
        )?;
        object_161.finish();
    }
    if let Some(var_162) = &input.name {
        object.key("name").string(var_162.as_str());
    }
    if let Some(var_163) = &input.test {
        let mut object_164 = object.key("test").start_object();
        crate::json_ser::serialize_structure_crate_model_schedule_run_test(
            &mut object_164,
            var_163,
        )?;
        object_164.finish();
    }
    if let Some(var_165) = &input.configuration {
        let mut object_166 = object.key("configuration").start_object();
        crate::json_ser::serialize_structure_crate_model_schedule_run_configuration(
            &mut object_166,
            var_165,
        )?;
        object_166.finish();
    }
    if let Some(var_167) = &input.execution_configuration {
        let mut object_168 = object.key("executionConfiguration").start_object();
        crate::json_ser::serialize_structure_crate_model_execution_configuration(
            &mut object_168,
            var_167,
        )?;
        object_168.finish();
    }
    Ok(())
}

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

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

pub fn serialize_structure_crate_input_stop_run_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StopRunInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_171) = &input.arn {
        object.key("arn").string(var_171.as_str());
    }
    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_172) = &input.resource_arn {
        object.key("ResourceARN").string(var_172.as_str());
    }
    if let Some(var_173) = &input.tags {
        let mut array_174 = object.key("Tags").start_array();
        for item_175 in var_173 {
            {
                let mut object_176 = array_174.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_176, item_175)?;
                object_176.finish();
            }
        }
        array_174.finish();
    }
    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_177) = &input.resource_arn {
        object.key("ResourceARN").string(var_177.as_str());
    }
    if let Some(var_178) = &input.tag_keys {
        let mut array_179 = object.key("TagKeys").start_array();
        for item_180 in var_178 {
            {
                array_179.value().string(item_180.as_str());
            }
        }
        array_179.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_device_instance_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateDeviceInstanceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_181) = &input.arn {
        object.key("arn").string(var_181.as_str());
    }
    if let Some(var_182) = &input.profile_arn {
        object.key("profileArn").string(var_182.as_str());
    }
    if let Some(var_183) = &input.labels {
        let mut array_184 = object.key("labels").start_array();
        for item_185 in var_183 {
            {
                array_184.value().string(item_185.as_str());
            }
        }
        array_184.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_device_pool_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateDevicePoolInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_186) = &input.arn {
        object.key("arn").string(var_186.as_str());
    }
    if let Some(var_187) = &input.name {
        object.key("name").string(var_187.as_str());
    }
    if let Some(var_188) = &input.description {
        object.key("description").string(var_188.as_str());
    }
    if let Some(var_189) = &input.rules {
        let mut array_190 = object.key("rules").start_array();
        for item_191 in var_189 {
            {
                let mut object_192 = array_190.value().start_object();
                crate::json_ser::serialize_structure_crate_model_rule(&mut object_192, item_191)?;
                object_192.finish();
            }
        }
        array_190.finish();
    }
    if let Some(var_193) = &input.max_devices {
        object.key("maxDevices").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_193).into()),
        );
    }
    if let Some(var_194) = &input.clear_max_devices {
        object.key("clearMaxDevices").boolean(*var_194);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_instance_profile_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateInstanceProfileInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_195) = &input.arn {
        object.key("arn").string(var_195.as_str());
    }
    if let Some(var_196) = &input.name {
        object.key("name").string(var_196.as_str());
    }
    if let Some(var_197) = &input.description {
        object.key("description").string(var_197.as_str());
    }
    if let Some(var_198) = &input.package_cleanup {
        object.key("packageCleanup").boolean(*var_198);
    }
    if let Some(var_199) = &input.exclude_app_packages_from_cleanup {
        let mut array_200 = object.key("excludeAppPackagesFromCleanup").start_array();
        for item_201 in var_199 {
            {
                array_200.value().string(item_201.as_str());
            }
        }
        array_200.finish();
    }
    if let Some(var_202) = &input.reboot_after_use {
        object.key("rebootAfterUse").boolean(*var_202);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_network_profile_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateNetworkProfileInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_203) = &input.arn {
        object.key("arn").string(var_203.as_str());
    }
    if let Some(var_204) = &input.name {
        object.key("name").string(var_204.as_str());
    }
    if let Some(var_205) = &input.description {
        object.key("description").string(var_205.as_str());
    }
    if let Some(var_206) = &input.r#type {
        object.key("type").string(var_206.as_str());
    }
    if let Some(var_207) = &input.uplink_bandwidth_bits {
        object.key("uplinkBandwidthBits").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_207).into()),
        );
    }
    if let Some(var_208) = &input.downlink_bandwidth_bits {
        object.key("downlinkBandwidthBits").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_208).into()),
        );
    }
    if let Some(var_209) = &input.uplink_delay_ms {
        object.key("uplinkDelayMs").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_209).into()),
        );
    }
    if let Some(var_210) = &input.downlink_delay_ms {
        object.key("downlinkDelayMs").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_210).into()),
        );
    }
    if let Some(var_211) = &input.uplink_jitter_ms {
        object.key("uplinkJitterMs").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_211).into()),
        );
    }
    if let Some(var_212) = &input.downlink_jitter_ms {
        object.key("downlinkJitterMs").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_212).into()),
        );
    }
    if input.uplink_loss_percent != 0 {
        object.key("uplinkLossPercent").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.uplink_loss_percent).into()),
        );
    }
    if input.downlink_loss_percent != 0 {
        object.key("downlinkLossPercent").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.downlink_loss_percent).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_project_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateProjectInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_213) = &input.arn {
        object.key("arn").string(var_213.as_str());
    }
    if let Some(var_214) = &input.name {
        object.key("name").string(var_214.as_str());
    }
    if let Some(var_215) = &input.default_job_timeout_minutes {
        object.key("defaultJobTimeoutMinutes").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_215).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_test_grid_project_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateTestGridProjectInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_216) = &input.project_arn {
        object.key("projectArn").string(var_216.as_str());
    }
    if let Some(var_217) = &input.name {
        object.key("name").string(var_217.as_str());
    }
    if let Some(var_218) = &input.description {
        object.key("description").string(var_218.as_str());
    }
    if let Some(var_219) = &input.vpc_config {
        let mut object_220 = object.key("vpcConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_test_grid_vpc_config(
            &mut object_220,
            var_219,
        )?;
        object_220.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_upload_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateUploadInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_221) = &input.arn {
        object.key("arn").string(var_221.as_str());
    }
    if let Some(var_222) = &input.name {
        object.key("name").string(var_222.as_str());
    }
    if let Some(var_223) = &input.content_type {
        object.key("contentType").string(var_223.as_str());
    }
    if let Some(var_224) = &input.edit_content {
        object.key("editContent").boolean(*var_224);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_vpce_configuration_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateVpceConfigurationInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_225) = &input.arn {
        object.key("arn").string(var_225.as_str());
    }
    if let Some(var_226) = &input.vpce_configuration_name {
        object.key("vpceConfigurationName").string(var_226.as_str());
    }
    if let Some(var_227) = &input.vpce_service_name {
        object.key("vpceServiceName").string(var_227.as_str());
    }
    if let Some(var_228) = &input.service_dns_name {
        object.key("serviceDnsName").string(var_228.as_str());
    }
    if let Some(var_229) = &input.vpce_configuration_description {
        object
            .key("vpceConfigurationDescription")
            .string(var_229.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_rule(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Rule,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_230) = &input.attribute {
        object.key("attribute").string(var_230.as_str());
    }
    if let Some(var_231) = &input.operator {
        object.key("operator").string(var_231.as_str());
    }
    if let Some(var_232) = &input.value {
        object.key("value").string(var_232.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_create_remote_access_session_configuration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::CreateRemoteAccessSessionConfiguration,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_233) = &input.billing_method {
        object.key("billingMethod").string(var_233.as_str());
    }
    if let Some(var_234) = &input.vpce_configuration_arns {
        let mut array_235 = object.key("vpceConfigurationArns").start_array();
        for item_236 in var_234 {
            {
                array_235.value().string(item_236.as_str());
            }
        }
        array_235.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_test_grid_vpc_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::TestGridVpcConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_237) = &input.security_group_ids {
        let mut array_238 = object.key("securityGroupIds").start_array();
        for item_239 in var_237 {
            {
                array_238.value().string(item_239.as_str());
            }
        }
        array_238.finish();
    }
    if let Some(var_240) = &input.subnet_ids {
        let mut array_241 = object.key("subnetIds").start_array();
        for item_242 in var_240 {
            {
                array_241.value().string(item_242.as_str());
            }
        }
        array_241.finish();
    }
    if let Some(var_243) = &input.vpc_id {
        object.key("vpcId").string(var_243.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_schedule_run_test(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ScheduleRunTest,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_244) = &input.r#type {
        object.key("type").string(var_244.as_str());
    }
    if let Some(var_245) = &input.test_package_arn {
        object.key("testPackageArn").string(var_245.as_str());
    }
    if let Some(var_246) = &input.test_spec_arn {
        object.key("testSpecArn").string(var_246.as_str());
    }
    if let Some(var_247) = &input.filter {
        object.key("filter").string(var_247.as_str());
    }
    if let Some(var_248) = &input.parameters {
        let mut object_249 = object.key("parameters").start_object();
        for (key_250, value_251) in var_248 {
            {
                object_249.key(key_250).string(value_251.as_str());
            }
        }
        object_249.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_schedule_run_configuration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ScheduleRunConfiguration,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_252) = &input.extra_data_package_arn {
        object.key("extraDataPackageArn").string(var_252.as_str());
    }
    if let Some(var_253) = &input.network_profile_arn {
        object.key("networkProfileArn").string(var_253.as_str());
    }
    if let Some(var_254) = &input.locale {
        object.key("locale").string(var_254.as_str());
    }
    if let Some(var_255) = &input.location {
        let mut object_256 = object.key("location").start_object();
        crate::json_ser::serialize_structure_crate_model_location(&mut object_256, var_255)?;
        object_256.finish();
    }
    if let Some(var_257) = &input.vpce_configuration_arns {
        let mut array_258 = object.key("vpceConfigurationArns").start_array();
        for item_259 in var_257 {
            {
                array_258.value().string(item_259.as_str());
            }
        }
        array_258.finish();
    }
    if let Some(var_260) = &input.customer_artifact_paths {
        let mut object_261 = object.key("customerArtifactPaths").start_object();
        crate::json_ser::serialize_structure_crate_model_customer_artifact_paths(
            &mut object_261,
            var_260,
        )?;
        object_261.finish();
    }
    if let Some(var_262) = &input.radios {
        let mut object_263 = object.key("radios").start_object();
        crate::json_ser::serialize_structure_crate_model_radios(&mut object_263, var_262)?;
        object_263.finish();
    }
    if let Some(var_264) = &input.auxiliary_apps {
        let mut array_265 = object.key("auxiliaryApps").start_array();
        for item_266 in var_264 {
            {
                array_265.value().string(item_266.as_str());
            }
        }
        array_265.finish();
    }
    if let Some(var_267) = &input.billing_method {
        object.key("billingMethod").string(var_267.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_device_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::DeviceFilter,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_268) = &input.attribute {
        object.key("attribute").string(var_268.as_str());
    }
    if let Some(var_269) = &input.operator {
        object.key("operator").string(var_269.as_str());
    }
    if let Some(var_270) = &input.values {
        let mut array_271 = object.key("values").start_array();
        for item_272 in var_270 {
            {
                array_271.value().string(item_272.as_str());
            }
        }
        array_271.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_device_selection_configuration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::DeviceSelectionConfiguration,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_273) = &input.filters {
        let mut array_274 = object.key("filters").start_array();
        for item_275 in var_273 {
            {
                let mut object_276 = array_274.value().start_object();
                crate::json_ser::serialize_structure_crate_model_device_filter(
                    &mut object_276,
                    item_275,
                )?;
                object_276.finish();
            }
        }
        array_274.finish();
    }
    if let Some(var_277) = &input.max_devices {
        object.key("maxDevices").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_277).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_model_execution_configuration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ExecutionConfiguration,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_278) = &input.job_timeout_minutes {
        object.key("jobTimeoutMinutes").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_278).into()),
        );
    }
    if let Some(var_279) = &input.accounts_cleanup {
        object.key("accountsCleanup").boolean(*var_279);
    }
    if let Some(var_280) = &input.app_packages_cleanup {
        object.key("appPackagesCleanup").boolean(*var_280);
    }
    if let Some(var_281) = &input.video_capture {
        object.key("videoCapture").boolean(*var_281);
    }
    if let Some(var_282) = &input.skip_app_resign {
        object.key("skipAppResign").boolean(*var_282);
    }
    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_283) = &input.key {
        object.key("Key").string(var_283.as_str());
    }
    if let Some(var_284) = &input.value {
        object.key("Value").string(var_284.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_location(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Location,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_285) = &input.latitude {
        object.key("latitude").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::Float((*var_285).into()),
        );
    }
    if let Some(var_286) = &input.longitude {
        object.key("longitude").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::Float((*var_286).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_model_customer_artifact_paths(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::CustomerArtifactPaths,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_287) = &input.ios_paths {
        let mut array_288 = object.key("iosPaths").start_array();
        for item_289 in var_287 {
            {
                array_288.value().string(item_289.as_str());
            }
        }
        array_288.finish();
    }
    if let Some(var_290) = &input.android_paths {
        let mut array_291 = object.key("androidPaths").start_array();
        for item_292 in var_290 {
            {
                array_291.value().string(item_292.as_str());
            }
        }
        array_291.finish();
    }
    if let Some(var_293) = &input.device_host_paths {
        let mut array_294 = object.key("deviceHostPaths").start_array();
        for item_295 in var_293 {
            {
                array_294.value().string(item_295.as_str());
            }
        }
        array_294.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_radios(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Radios,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_296) = &input.wifi {
        object.key("wifi").boolean(*var_296);
    }
    if let Some(var_297) = &input.bluetooth {
        object.key("bluetooth").boolean(*var_297);
    }
    if let Some(var_298) = &input.nfc {
        object.key("nfc").boolean(*var_298);
    }
    if let Some(var_299) = &input.gps {
        object.key("gps").boolean(*var_299);
    }
    Ok(())
}
