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

pub fn serialize_structure_crate_input_associate_bot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AssociateBotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_2) = &input.lex_bot {
        let mut object_3 = object.key("LexBot").start_object();
        crate::json_ser::serialize_structure_crate_model_lex_bot(&mut object_3, var_2)?;
        object_3.finish();
    }
    if let Some(var_4) = &input.lex_v2_bot {
        let mut object_5 = object.key("LexV2Bot").start_object();
        crate::json_ser::serialize_structure_crate_model_lex_v2_bot(&mut object_5, var_4)?;
        object_5.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_associate_default_vocabulary_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AssociateDefaultVocabularyInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_6) = &input.vocabulary_id {
        object.key("VocabularyId").string(var_6.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_associate_instance_storage_config_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AssociateInstanceStorageConfigInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_7) = &input.resource_type {
        object.key("ResourceType").string(var_7.as_str());
    }
    if let Some(var_8) = &input.storage_config {
        let mut object_9 = object.key("StorageConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_instance_storage_config(
            &mut object_9,
            var_8,
        )?;
        object_9.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_associate_lambda_function_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AssociateLambdaFunctionInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_10) = &input.function_arn {
        object.key("FunctionArn").string(var_10.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_associate_lex_bot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AssociateLexBotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_11) = &input.lex_bot {
        let mut object_12 = object.key("LexBot").start_object();
        crate::json_ser::serialize_structure_crate_model_lex_bot(&mut object_12, var_11)?;
        object_12.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_associate_queue_quick_connects_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AssociateQueueQuickConnectsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_13) = &input.quick_connect_ids {
        let mut array_14 = object.key("QuickConnectIds").start_array();
        for item_15 in var_13 {
            {
                array_14.value().string(item_15.as_str());
            }
        }
        array_14.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_associate_routing_profile_queues_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AssociateRoutingProfileQueuesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_16) = &input.queue_configs {
        let mut array_17 = object.key("QueueConfigs").start_array();
        for item_18 in var_16 {
            {
                let mut object_19 = array_17.value().start_object();
                crate::json_ser::serialize_structure_crate_model_routing_profile_queue_config(
                    &mut object_19,
                    item_18,
                )?;
                object_19.finish();
            }
        }
        array_17.finish();
    }
    Ok(())
}

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

pub fn serialize_structure_crate_input_create_agent_status_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateAgentStatusInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_21) = &input.description {
        object.key("Description").string(var_21.as_str());
    }
    if let Some(var_22) = &input.display_order {
        object.key("DisplayOrder").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_22).into()),
        );
    }
    if let Some(var_23) = &input.name {
        object.key("Name").string(var_23.as_str());
    }
    if let Some(var_24) = &input.state {
        object.key("State").string(var_24.as_str());
    }
    if let Some(var_25) = &input.tags {
        let mut object_26 = object.key("Tags").start_object();
        for (key_27, value_28) in var_25 {
            {
                object_26.key(key_27).string(value_28.as_str());
            }
        }
        object_26.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_contact_flow_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateContactFlowInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_29) = &input.content {
        object.key("Content").string(var_29.as_str());
    }
    if let Some(var_30) = &input.description {
        object.key("Description").string(var_30.as_str());
    }
    if let Some(var_31) = &input.name {
        object.key("Name").string(var_31.as_str());
    }
    if let Some(var_32) = &input.tags {
        let mut object_33 = object.key("Tags").start_object();
        for (key_34, value_35) in var_32 {
            {
                object_33.key(key_34).string(value_35.as_str());
            }
        }
        object_33.finish();
    }
    if let Some(var_36) = &input.r#type {
        object.key("Type").string(var_36.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_contact_flow_module_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateContactFlowModuleInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_37) = &input.client_token {
        object.key("ClientToken").string(var_37.as_str());
    }
    if let Some(var_38) = &input.content {
        object.key("Content").string(var_38.as_str());
    }
    if let Some(var_39) = &input.description {
        object.key("Description").string(var_39.as_str());
    }
    if let Some(var_40) = &input.name {
        object.key("Name").string(var_40.as_str());
    }
    if let Some(var_41) = &input.tags {
        let mut object_42 = object.key("Tags").start_object();
        for (key_43, value_44) in var_41 {
            {
                object_42.key(key_43).string(value_44.as_str());
            }
        }
        object_42.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_hours_of_operation_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateHoursOfOperationInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_45) = &input.config {
        let mut array_46 = object.key("Config").start_array();
        for item_47 in var_45 {
            {
                let mut object_48 = array_46.value().start_object();
                crate::json_ser::serialize_structure_crate_model_hours_of_operation_config(
                    &mut object_48,
                    item_47,
                )?;
                object_48.finish();
            }
        }
        array_46.finish();
    }
    if let Some(var_49) = &input.description {
        object.key("Description").string(var_49.as_str());
    }
    if let Some(var_50) = &input.name {
        object.key("Name").string(var_50.as_str());
    }
    if let Some(var_51) = &input.tags {
        let mut object_52 = object.key("Tags").start_object();
        for (key_53, value_54) in var_51 {
            {
                object_52.key(key_53).string(value_54.as_str());
            }
        }
        object_52.finish();
    }
    if let Some(var_55) = &input.time_zone {
        object.key("TimeZone").string(var_55.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_instance_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateInstanceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_56) = &input.client_token {
        object.key("ClientToken").string(var_56.as_str());
    }
    if let Some(var_57) = &input.directory_id {
        object.key("DirectoryId").string(var_57.as_str());
    }
    if let Some(var_58) = &input.identity_management_type {
        object.key("IdentityManagementType").string(var_58.as_str());
    }
    if let Some(var_59) = &input.inbound_calls_enabled {
        object.key("InboundCallsEnabled").boolean(*var_59);
    }
    if let Some(var_60) = &input.instance_alias {
        object.key("InstanceAlias").string(var_60.as_str());
    }
    if let Some(var_61) = &input.outbound_calls_enabled {
        object.key("OutboundCallsEnabled").boolean(*var_61);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_integration_association_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateIntegrationAssociationInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_62) = &input.integration_arn {
        object.key("IntegrationArn").string(var_62.as_str());
    }
    if let Some(var_63) = &input.integration_type {
        object.key("IntegrationType").string(var_63.as_str());
    }
    if let Some(var_64) = &input.source_application_name {
        object.key("SourceApplicationName").string(var_64.as_str());
    }
    if let Some(var_65) = &input.source_application_url {
        object.key("SourceApplicationUrl").string(var_65.as_str());
    }
    if let Some(var_66) = &input.source_type {
        object.key("SourceType").string(var_66.as_str());
    }
    if let Some(var_67) = &input.tags {
        let mut object_68 = object.key("Tags").start_object();
        for (key_69, value_70) in var_67 {
            {
                object_68.key(key_69).string(value_70.as_str());
            }
        }
        object_68.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_queue_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateQueueInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_71) = &input.description {
        object.key("Description").string(var_71.as_str());
    }
    if let Some(var_72) = &input.hours_of_operation_id {
        object.key("HoursOfOperationId").string(var_72.as_str());
    }
    if let Some(var_73) = &input.max_contacts {
        object.key("MaxContacts").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_73).into()),
        );
    }
    if let Some(var_74) = &input.name {
        object.key("Name").string(var_74.as_str());
    }
    if let Some(var_75) = &input.outbound_caller_config {
        let mut object_76 = object.key("OutboundCallerConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_outbound_caller_config(
            &mut object_76,
            var_75,
        )?;
        object_76.finish();
    }
    if let Some(var_77) = &input.quick_connect_ids {
        let mut array_78 = object.key("QuickConnectIds").start_array();
        for item_79 in var_77 {
            {
                array_78.value().string(item_79.as_str());
            }
        }
        array_78.finish();
    }
    if let Some(var_80) = &input.tags {
        let mut object_81 = object.key("Tags").start_object();
        for (key_82, value_83) in var_80 {
            {
                object_81.key(key_82).string(value_83.as_str());
            }
        }
        object_81.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_quick_connect_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateQuickConnectInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_84) = &input.description {
        object.key("Description").string(var_84.as_str());
    }
    if let Some(var_85) = &input.name {
        object.key("Name").string(var_85.as_str());
    }
    if let Some(var_86) = &input.quick_connect_config {
        let mut object_87 = object.key("QuickConnectConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_quick_connect_config(
            &mut object_87,
            var_86,
        )?;
        object_87.finish();
    }
    if let Some(var_88) = &input.tags {
        let mut object_89 = object.key("Tags").start_object();
        for (key_90, value_91) in var_88 {
            {
                object_89.key(key_90).string(value_91.as_str());
            }
        }
        object_89.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_routing_profile_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateRoutingProfileInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_92) = &input.default_outbound_queue_id {
        object.key("DefaultOutboundQueueId").string(var_92.as_str());
    }
    if let Some(var_93) = &input.description {
        object.key("Description").string(var_93.as_str());
    }
    if let Some(var_94) = &input.media_concurrencies {
        let mut array_95 = object.key("MediaConcurrencies").start_array();
        for item_96 in var_94 {
            {
                let mut object_97 = array_95.value().start_object();
                crate::json_ser::serialize_structure_crate_model_media_concurrency(
                    &mut object_97,
                    item_96,
                )?;
                object_97.finish();
            }
        }
        array_95.finish();
    }
    if let Some(var_98) = &input.name {
        object.key("Name").string(var_98.as_str());
    }
    if let Some(var_99) = &input.queue_configs {
        let mut array_100 = object.key("QueueConfigs").start_array();
        for item_101 in var_99 {
            {
                let mut object_102 = array_100.value().start_object();
                crate::json_ser::serialize_structure_crate_model_routing_profile_queue_config(
                    &mut object_102,
                    item_101,
                )?;
                object_102.finish();
            }
        }
        array_100.finish();
    }
    if let Some(var_103) = &input.tags {
        let mut object_104 = object.key("Tags").start_object();
        for (key_105, value_106) in var_103 {
            {
                object_104.key(key_105).string(value_106.as_str());
            }
        }
        object_104.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_security_profile_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateSecurityProfileInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_107) = &input.description {
        object.key("Description").string(var_107.as_str());
    }
    if let Some(var_108) = &input.permissions {
        let mut array_109 = object.key("Permissions").start_array();
        for item_110 in var_108 {
            {
                array_109.value().string(item_110.as_str());
            }
        }
        array_109.finish();
    }
    if let Some(var_111) = &input.security_profile_name {
        object.key("SecurityProfileName").string(var_111.as_str());
    }
    if let Some(var_112) = &input.tags {
        let mut object_113 = object.key("Tags").start_object();
        for (key_114, value_115) in var_112 {
            {
                object_113.key(key_114).string(value_115.as_str());
            }
        }
        object_113.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_use_case_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateUseCaseInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_116) = &input.tags {
        let mut object_117 = object.key("Tags").start_object();
        for (key_118, value_119) in var_116 {
            {
                object_117.key(key_118).string(value_119.as_str());
            }
        }
        object_117.finish();
    }
    if let Some(var_120) = &input.use_case_type {
        object.key("UseCaseType").string(var_120.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_user_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateUserInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_121) = &input.directory_user_id {
        object.key("DirectoryUserId").string(var_121.as_str());
    }
    if let Some(var_122) = &input.hierarchy_group_id {
        object.key("HierarchyGroupId").string(var_122.as_str());
    }
    if let Some(var_123) = &input.identity_info {
        let mut object_124 = object.key("IdentityInfo").start_object();
        crate::json_ser::serialize_structure_crate_model_user_identity_info(
            &mut object_124,
            var_123,
        )?;
        object_124.finish();
    }
    if let Some(var_125) = &input.password {
        object.key("Password").string(var_125.as_str());
    }
    if let Some(var_126) = &input.phone_config {
        let mut object_127 = object.key("PhoneConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_user_phone_config(
            &mut object_127,
            var_126,
        )?;
        object_127.finish();
    }
    if let Some(var_128) = &input.routing_profile_id {
        object.key("RoutingProfileId").string(var_128.as_str());
    }
    if let Some(var_129) = &input.security_profile_ids {
        let mut array_130 = object.key("SecurityProfileIds").start_array();
        for item_131 in var_129 {
            {
                array_130.value().string(item_131.as_str());
            }
        }
        array_130.finish();
    }
    if let Some(var_132) = &input.tags {
        let mut object_133 = object.key("Tags").start_object();
        for (key_134, value_135) in var_132 {
            {
                object_133.key(key_134).string(value_135.as_str());
            }
        }
        object_133.finish();
    }
    if let Some(var_136) = &input.username {
        object.key("Username").string(var_136.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_user_hierarchy_group_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateUserHierarchyGroupInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_137) = &input.name {
        object.key("Name").string(var_137.as_str());
    }
    if let Some(var_138) = &input.parent_group_id {
        object.key("ParentGroupId").string(var_138.as_str());
    }
    if let Some(var_139) = &input.tags {
        let mut object_140 = object.key("Tags").start_object();
        for (key_141, value_142) in var_139 {
            {
                object_140.key(key_141).string(value_142.as_str());
            }
        }
        object_140.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_vocabulary_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateVocabularyInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_143) = &input.client_token {
        object.key("ClientToken").string(var_143.as_str());
    }
    if let Some(var_144) = &input.content {
        object.key("Content").string(var_144.as_str());
    }
    if let Some(var_145) = &input.language_code {
        object.key("LanguageCode").string(var_145.as_str());
    }
    if let Some(var_146) = &input.tags {
        let mut object_147 = object.key("Tags").start_object();
        for (key_148, value_149) in var_146 {
            {
                object_147.key(key_148).string(value_149.as_str());
            }
        }
        object_147.finish();
    }
    if let Some(var_150) = &input.vocabulary_name {
        object.key("VocabularyName").string(var_150.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_disassociate_bot_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DisassociateBotInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_151) = &input.lex_bot {
        let mut object_152 = object.key("LexBot").start_object();
        crate::json_ser::serialize_structure_crate_model_lex_bot(&mut object_152, var_151)?;
        object_152.finish();
    }
    if let Some(var_153) = &input.lex_v2_bot {
        let mut object_154 = object.key("LexV2Bot").start_object();
        crate::json_ser::serialize_structure_crate_model_lex_v2_bot(&mut object_154, var_153)?;
        object_154.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_disassociate_queue_quick_connects_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DisassociateQueueQuickConnectsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_155) = &input.quick_connect_ids {
        let mut array_156 = object.key("QuickConnectIds").start_array();
        for item_157 in var_155 {
            {
                array_156.value().string(item_157.as_str());
            }
        }
        array_156.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_disassociate_routing_profile_queues_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DisassociateRoutingProfileQueuesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_158) = &input.queue_references {
        let mut array_159 = object.key("QueueReferences").start_array();
        for item_160 in var_158 {
            {
                let mut object_161 = array_159.value().start_object();
                crate::json_ser::serialize_structure_crate_model_routing_profile_queue_reference(
                    &mut object_161,
                    item_160,
                )?;
                object_161.finish();
            }
        }
        array_159.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_current_metric_data_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetCurrentMetricDataInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_162) = &input.current_metrics {
        let mut array_163 = object.key("CurrentMetrics").start_array();
        for item_164 in var_162 {
            {
                let mut object_165 = array_163.value().start_object();
                crate::json_ser::serialize_structure_crate_model_current_metric(
                    &mut object_165,
                    item_164,
                )?;
                object_165.finish();
            }
        }
        array_163.finish();
    }
    if let Some(var_166) = &input.filters {
        let mut object_167 = object.key("Filters").start_object();
        crate::json_ser::serialize_structure_crate_model_filters(&mut object_167, var_166)?;
        object_167.finish();
    }
    if let Some(var_168) = &input.groupings {
        let mut array_169 = object.key("Groupings").start_array();
        for item_170 in var_168 {
            {
                array_169.value().string(item_170.as_str());
            }
        }
        array_169.finish();
    }
    if let Some(var_171) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_171).into()),
        );
    }
    if let Some(var_172) = &input.next_token {
        object.key("NextToken").string(var_172.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_metric_data_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetMetricDataInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_173) = &input.end_time {
        object
            .key("EndTime")
            .date_time(var_173, aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    if let Some(var_174) = &input.filters {
        let mut object_175 = object.key("Filters").start_object();
        crate::json_ser::serialize_structure_crate_model_filters(&mut object_175, var_174)?;
        object_175.finish();
    }
    if let Some(var_176) = &input.groupings {
        let mut array_177 = object.key("Groupings").start_array();
        for item_178 in var_176 {
            {
                array_177.value().string(item_178.as_str());
            }
        }
        array_177.finish();
    }
    if let Some(var_179) = &input.historical_metrics {
        let mut array_180 = object.key("HistoricalMetrics").start_array();
        for item_181 in var_179 {
            {
                let mut object_182 = array_180.value().start_object();
                crate::json_ser::serialize_structure_crate_model_historical_metric(
                    &mut object_182,
                    item_181,
                )?;
                object_182.finish();
            }
        }
        array_180.finish();
    }
    if let Some(var_183) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_183).into()),
        );
    }
    if let Some(var_184) = &input.next_token {
        object.key("NextToken").string(var_184.as_str());
    }
    if let Some(var_185) = &input.start_time {
        object
            .key("StartTime")
            .date_time(var_185, aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_default_vocabularies_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListDefaultVocabulariesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_186) = &input.language_code {
        object.key("LanguageCode").string(var_186.as_str());
    }
    if input.max_results != 0 {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.max_results).into()),
        );
    }
    if let Some(var_187) = &input.next_token {
        object.key("NextToken").string(var_187.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_resume_contact_recording_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ResumeContactRecordingInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_188) = &input.contact_id {
        object.key("ContactId").string(var_188.as_str());
    }
    if let Some(var_189) = &input.initial_contact_id {
        object.key("InitialContactId").string(var_189.as_str());
    }
    if let Some(var_190) = &input.instance_id {
        object.key("InstanceId").string(var_190.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_search_vocabularies_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::SearchVocabulariesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_191) = &input.language_code {
        object.key("LanguageCode").string(var_191.as_str());
    }
    if input.max_results != 0 {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.max_results).into()),
        );
    }
    if let Some(var_192) = &input.name_starts_with {
        object.key("NameStartsWith").string(var_192.as_str());
    }
    if let Some(var_193) = &input.next_token {
        object.key("NextToken").string(var_193.as_str());
    }
    if let Some(var_194) = &input.state {
        object.key("State").string(var_194.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_start_chat_contact_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StartChatContactInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_195) = &input.attributes {
        let mut object_196 = object.key("Attributes").start_object();
        for (key_197, value_198) in var_195 {
            {
                object_196.key(key_197).string(value_198.as_str());
            }
        }
        object_196.finish();
    }
    if let Some(var_199) = &input.chat_duration_in_minutes {
        object.key("ChatDurationInMinutes").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_199).into()),
        );
    }
    if let Some(var_200) = &input.client_token {
        object.key("ClientToken").string(var_200.as_str());
    }
    if let Some(var_201) = &input.contact_flow_id {
        object.key("ContactFlowId").string(var_201.as_str());
    }
    if let Some(var_202) = &input.initial_message {
        let mut object_203 = object.key("InitialMessage").start_object();
        crate::json_ser::serialize_structure_crate_model_chat_message(&mut object_203, var_202)?;
        object_203.finish();
    }
    if let Some(var_204) = &input.instance_id {
        object.key("InstanceId").string(var_204.as_str());
    }
    if let Some(var_205) = &input.participant_details {
        let mut object_206 = object.key("ParticipantDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_participant_details(
            &mut object_206,
            var_205,
        )?;
        object_206.finish();
    }
    if let Some(var_207) = &input.supported_messaging_content_types {
        let mut array_208 = object.key("SupportedMessagingContentTypes").start_array();
        for item_209 in var_207 {
            {
                array_208.value().string(item_209.as_str());
            }
        }
        array_208.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_start_contact_recording_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StartContactRecordingInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_210) = &input.contact_id {
        object.key("ContactId").string(var_210.as_str());
    }
    if let Some(var_211) = &input.initial_contact_id {
        object.key("InitialContactId").string(var_211.as_str());
    }
    if let Some(var_212) = &input.instance_id {
        object.key("InstanceId").string(var_212.as_str());
    }
    if let Some(var_213) = &input.voice_recording_configuration {
        let mut object_214 = object.key("VoiceRecordingConfiguration").start_object();
        crate::json_ser::serialize_structure_crate_model_voice_recording_configuration(
            &mut object_214,
            var_213,
        )?;
        object_214.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_start_contact_streaming_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StartContactStreamingInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_215) = &input.chat_streaming_configuration {
        let mut object_216 = object.key("ChatStreamingConfiguration").start_object();
        crate::json_ser::serialize_structure_crate_model_chat_streaming_configuration(
            &mut object_216,
            var_215,
        )?;
        object_216.finish();
    }
    if let Some(var_217) = &input.client_token {
        object.key("ClientToken").string(var_217.as_str());
    }
    if let Some(var_218) = &input.contact_id {
        object.key("ContactId").string(var_218.as_str());
    }
    if let Some(var_219) = &input.instance_id {
        object.key("InstanceId").string(var_219.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_start_outbound_voice_contact_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StartOutboundVoiceContactInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_220) = &input.answer_machine_detection_config {
        let mut object_221 = object.key("AnswerMachineDetectionConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_answer_machine_detection_config(
            &mut object_221,
            var_220,
        )?;
        object_221.finish();
    }
    if let Some(var_222) = &input.attributes {
        let mut object_223 = object.key("Attributes").start_object();
        for (key_224, value_225) in var_222 {
            {
                object_223.key(key_224).string(value_225.as_str());
            }
        }
        object_223.finish();
    }
    if let Some(var_226) = &input.campaign_id {
        object.key("CampaignId").string(var_226.as_str());
    }
    if let Some(var_227) = &input.client_token {
        object.key("ClientToken").string(var_227.as_str());
    }
    if let Some(var_228) = &input.contact_flow_id {
        object.key("ContactFlowId").string(var_228.as_str());
    }
    if let Some(var_229) = &input.destination_phone_number {
        object
            .key("DestinationPhoneNumber")
            .string(var_229.as_str());
    }
    if let Some(var_230) = &input.instance_id {
        object.key("InstanceId").string(var_230.as_str());
    }
    if let Some(var_231) = &input.queue_id {
        object.key("QueueId").string(var_231.as_str());
    }
    if let Some(var_232) = &input.source_phone_number {
        object.key("SourcePhoneNumber").string(var_232.as_str());
    }
    if let Some(var_233) = &input.traffic_type {
        object.key("TrafficType").string(var_233.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_start_task_contact_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StartTaskContactInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_234) = &input.attributes {
        let mut object_235 = object.key("Attributes").start_object();
        for (key_236, value_237) in var_234 {
            {
                object_235.key(key_236).string(value_237.as_str());
            }
        }
        object_235.finish();
    }
    if let Some(var_238) = &input.client_token {
        object.key("ClientToken").string(var_238.as_str());
    }
    if let Some(var_239) = &input.contact_flow_id {
        object.key("ContactFlowId").string(var_239.as_str());
    }
    if let Some(var_240) = &input.description {
        object.key("Description").string(var_240.as_str());
    }
    if let Some(var_241) = &input.instance_id {
        object.key("InstanceId").string(var_241.as_str());
    }
    if let Some(var_242) = &input.name {
        object.key("Name").string(var_242.as_str());
    }
    if let Some(var_243) = &input.previous_contact_id {
        object.key("PreviousContactId").string(var_243.as_str());
    }
    if let Some(var_244) = &input.references {
        let mut object_245 = object.key("References").start_object();
        for (key_246, value_247) in var_244 {
            {
                let mut object_248 = object_245.key(key_246).start_object();
                crate::json_ser::serialize_structure_crate_model_reference(
                    &mut object_248,
                    value_247,
                )?;
                object_248.finish();
            }
        }
        object_245.finish();
    }
    if let Some(var_249) = &input.scheduled_time {
        object
            .key("ScheduledTime")
            .date_time(var_249, aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    Ok(())
}

pub fn serialize_structure_crate_input_stop_contact_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StopContactInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_250) = &input.contact_id {
        object.key("ContactId").string(var_250.as_str());
    }
    if let Some(var_251) = &input.instance_id {
        object.key("InstanceId").string(var_251.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_stop_contact_recording_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StopContactRecordingInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_252) = &input.contact_id {
        object.key("ContactId").string(var_252.as_str());
    }
    if let Some(var_253) = &input.initial_contact_id {
        object.key("InitialContactId").string(var_253.as_str());
    }
    if let Some(var_254) = &input.instance_id {
        object.key("InstanceId").string(var_254.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_stop_contact_streaming_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StopContactStreamingInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_255) = &input.contact_id {
        object.key("ContactId").string(var_255.as_str());
    }
    if let Some(var_256) = &input.instance_id {
        object.key("InstanceId").string(var_256.as_str());
    }
    if let Some(var_257) = &input.streaming_id {
        object.key("StreamingId").string(var_257.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_suspend_contact_recording_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::SuspendContactRecordingInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_258) = &input.contact_id {
        object.key("ContactId").string(var_258.as_str());
    }
    if let Some(var_259) = &input.initial_contact_id {
        object.key("InitialContactId").string(var_259.as_str());
    }
    if let Some(var_260) = &input.instance_id {
        object.key("InstanceId").string(var_260.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_261) = &input.tags {
        let mut object_262 = object.key("tags").start_object();
        for (key_263, value_264) in var_261 {
            {
                object_262.key(key_263).string(value_264.as_str());
            }
        }
        object_262.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_agent_status_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateAgentStatusInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_265) = &input.description {
        object.key("Description").string(var_265.as_str());
    }
    if let Some(var_266) = &input.display_order {
        object.key("DisplayOrder").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_266).into()),
        );
    }
    if let Some(var_267) = &input.name {
        object.key("Name").string(var_267.as_str());
    }
    if input.reset_order_number {
        object
            .key("ResetOrderNumber")
            .boolean(input.reset_order_number);
    }
    if let Some(var_268) = &input.state {
        object.key("State").string(var_268.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_contact_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateContactInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_269) = &input.description {
        object.key("Description").string(var_269.as_str());
    }
    if let Some(var_270) = &input.name {
        object.key("Name").string(var_270.as_str());
    }
    if let Some(var_271) = &input.references {
        let mut object_272 = object.key("References").start_object();
        for (key_273, value_274) in var_271 {
            {
                let mut object_275 = object_272.key(key_273).start_object();
                crate::json_ser::serialize_structure_crate_model_reference(
                    &mut object_275,
                    value_274,
                )?;
                object_275.finish();
            }
        }
        object_272.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_contact_attributes_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateContactAttributesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_276) = &input.attributes {
        let mut object_277 = object.key("Attributes").start_object();
        for (key_278, value_279) in var_276 {
            {
                object_277.key(key_278).string(value_279.as_str());
            }
        }
        object_277.finish();
    }
    if let Some(var_280) = &input.initial_contact_id {
        object.key("InitialContactId").string(var_280.as_str());
    }
    if let Some(var_281) = &input.instance_id {
        object.key("InstanceId").string(var_281.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_contact_flow_content_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateContactFlowContentInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_282) = &input.content {
        object.key("Content").string(var_282.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_contact_flow_metadata_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateContactFlowMetadataInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_283) = &input.contact_flow_state {
        object.key("ContactFlowState").string(var_283.as_str());
    }
    if let Some(var_284) = &input.description {
        object.key("Description").string(var_284.as_str());
    }
    if let Some(var_285) = &input.name {
        object.key("Name").string(var_285.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_contact_flow_module_content_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateContactFlowModuleContentInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_286) = &input.content {
        object.key("Content").string(var_286.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_contact_flow_module_metadata_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateContactFlowModuleMetadataInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_287) = &input.description {
        object.key("Description").string(var_287.as_str());
    }
    if let Some(var_288) = &input.name {
        object.key("Name").string(var_288.as_str());
    }
    if let Some(var_289) = &input.state {
        object.key("State").string(var_289.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_contact_flow_name_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateContactFlowNameInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_290) = &input.description {
        object.key("Description").string(var_290.as_str());
    }
    if let Some(var_291) = &input.name {
        object.key("Name").string(var_291.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_contact_schedule_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateContactScheduleInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_292) = &input.contact_id {
        object.key("ContactId").string(var_292.as_str());
    }
    if let Some(var_293) = &input.instance_id {
        object.key("InstanceId").string(var_293.as_str());
    }
    if let Some(var_294) = &input.scheduled_time {
        object
            .key("ScheduledTime")
            .date_time(var_294, aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_hours_of_operation_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateHoursOfOperationInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_295) = &input.config {
        let mut array_296 = object.key("Config").start_array();
        for item_297 in var_295 {
            {
                let mut object_298 = array_296.value().start_object();
                crate::json_ser::serialize_structure_crate_model_hours_of_operation_config(
                    &mut object_298,
                    item_297,
                )?;
                object_298.finish();
            }
        }
        array_296.finish();
    }
    if let Some(var_299) = &input.description {
        object.key("Description").string(var_299.as_str());
    }
    if let Some(var_300) = &input.name {
        object.key("Name").string(var_300.as_str());
    }
    if let Some(var_301) = &input.time_zone {
        object.key("TimeZone").string(var_301.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_instance_attribute_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateInstanceAttributeInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_302) = &input.value {
        object.key("Value").string(var_302.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_instance_storage_config_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateInstanceStorageConfigInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_303) = &input.storage_config {
        let mut object_304 = object.key("StorageConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_instance_storage_config(
            &mut object_304,
            var_303,
        )?;
        object_304.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_queue_hours_of_operation_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateQueueHoursOfOperationInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_305) = &input.hours_of_operation_id {
        object.key("HoursOfOperationId").string(var_305.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_queue_max_contacts_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateQueueMaxContactsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_306) = &input.max_contacts {
        object.key("MaxContacts").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_306).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_queue_name_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateQueueNameInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_307) = &input.description {
        object.key("Description").string(var_307.as_str());
    }
    if let Some(var_308) = &input.name {
        object.key("Name").string(var_308.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_queue_outbound_caller_config_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateQueueOutboundCallerConfigInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_309) = &input.outbound_caller_config {
        let mut object_310 = object.key("OutboundCallerConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_outbound_caller_config(
            &mut object_310,
            var_309,
        )?;
        object_310.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_queue_status_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateQueueStatusInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_311) = &input.status {
        object.key("Status").string(var_311.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_quick_connect_config_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateQuickConnectConfigInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_312) = &input.quick_connect_config {
        let mut object_313 = object.key("QuickConnectConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_quick_connect_config(
            &mut object_313,
            var_312,
        )?;
        object_313.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_quick_connect_name_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateQuickConnectNameInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_314) = &input.description {
        object.key("Description").string(var_314.as_str());
    }
    if let Some(var_315) = &input.name {
        object.key("Name").string(var_315.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_routing_profile_concurrency_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateRoutingProfileConcurrencyInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_316) = &input.media_concurrencies {
        let mut array_317 = object.key("MediaConcurrencies").start_array();
        for item_318 in var_316 {
            {
                let mut object_319 = array_317.value().start_object();
                crate::json_ser::serialize_structure_crate_model_media_concurrency(
                    &mut object_319,
                    item_318,
                )?;
                object_319.finish();
            }
        }
        array_317.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_routing_profile_default_outbound_queue_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateRoutingProfileDefaultOutboundQueueInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_320) = &input.default_outbound_queue_id {
        object
            .key("DefaultOutboundQueueId")
            .string(var_320.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_routing_profile_name_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateRoutingProfileNameInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_321) = &input.description {
        object.key("Description").string(var_321.as_str());
    }
    if let Some(var_322) = &input.name {
        object.key("Name").string(var_322.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_routing_profile_queues_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateRoutingProfileQueuesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_323) = &input.queue_configs {
        let mut array_324 = object.key("QueueConfigs").start_array();
        for item_325 in var_323 {
            {
                let mut object_326 = array_324.value().start_object();
                crate::json_ser::serialize_structure_crate_model_routing_profile_queue_config(
                    &mut object_326,
                    item_325,
                )?;
                object_326.finish();
            }
        }
        array_324.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_security_profile_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateSecurityProfileInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_327) = &input.description {
        object.key("Description").string(var_327.as_str());
    }
    if let Some(var_328) = &input.permissions {
        let mut array_329 = object.key("Permissions").start_array();
        for item_330 in var_328 {
            {
                array_329.value().string(item_330.as_str());
            }
        }
        array_329.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_user_hierarchy_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateUserHierarchyInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_331) = &input.hierarchy_group_id {
        object.key("HierarchyGroupId").string(var_331.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_user_hierarchy_group_name_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateUserHierarchyGroupNameInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_332) = &input.name {
        object.key("Name").string(var_332.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_user_hierarchy_structure_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateUserHierarchyStructureInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_333) = &input.hierarchy_structure {
        let mut object_334 = object.key("HierarchyStructure").start_object();
        crate::json_ser::serialize_structure_crate_model_hierarchy_structure_update(
            &mut object_334,
            var_333,
        )?;
        object_334.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_user_identity_info_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateUserIdentityInfoInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_335) = &input.identity_info {
        let mut object_336 = object.key("IdentityInfo").start_object();
        crate::json_ser::serialize_structure_crate_model_user_identity_info(
            &mut object_336,
            var_335,
        )?;
        object_336.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_user_phone_config_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateUserPhoneConfigInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_337) = &input.phone_config {
        let mut object_338 = object.key("PhoneConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_user_phone_config(
            &mut object_338,
            var_337,
        )?;
        object_338.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_user_routing_profile_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateUserRoutingProfileInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_339) = &input.routing_profile_id {
        object.key("RoutingProfileId").string(var_339.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_user_security_profiles_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateUserSecurityProfilesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_340) = &input.security_profile_ids {
        let mut array_341 = object.key("SecurityProfileIds").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_model_lex_bot(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::LexBot,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_343) = &input.name {
        object.key("Name").string(var_343.as_str());
    }
    if let Some(var_344) = &input.lex_region {
        object.key("LexRegion").string(var_344.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_lex_v2_bot(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::LexV2Bot,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_345) = &input.alias_arn {
        object.key("AliasArn").string(var_345.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_instance_storage_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::InstanceStorageConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_346) = &input.association_id {
        object.key("AssociationId").string(var_346.as_str());
    }
    if let Some(var_347) = &input.storage_type {
        object.key("StorageType").string(var_347.as_str());
    }
    if let Some(var_348) = &input.s3_config {
        let mut object_349 = object.key("S3Config").start_object();
        crate::json_ser::serialize_structure_crate_model_s3_config(&mut object_349, var_348)?;
        object_349.finish();
    }
    if let Some(var_350) = &input.kinesis_video_stream_config {
        let mut object_351 = object.key("KinesisVideoStreamConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_kinesis_video_stream_config(
            &mut object_351,
            var_350,
        )?;
        object_351.finish();
    }
    if let Some(var_352) = &input.kinesis_stream_config {
        let mut object_353 = object.key("KinesisStreamConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_kinesis_stream_config(
            &mut object_353,
            var_352,
        )?;
        object_353.finish();
    }
    if let Some(var_354) = &input.kinesis_firehose_config {
        let mut object_355 = object.key("KinesisFirehoseConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_kinesis_firehose_config(
            &mut object_355,
            var_354,
        )?;
        object_355.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_routing_profile_queue_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::RoutingProfileQueueConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_356) = &input.queue_reference {
        let mut object_357 = object.key("QueueReference").start_object();
        crate::json_ser::serialize_structure_crate_model_routing_profile_queue_reference(
            &mut object_357,
            var_356,
        )?;
        object_357.finish();
    }
    if let Some(var_358) = &input.priority {
        object.key("Priority").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_358).into()),
        );
    }
    if let Some(var_359) = &input.delay {
        object.key("Delay").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_359).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_model_hours_of_operation_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::HoursOfOperationConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_360) = &input.day {
        object.key("Day").string(var_360.as_str());
    }
    if let Some(var_361) = &input.start_time {
        let mut object_362 = object.key("StartTime").start_object();
        crate::json_ser::serialize_structure_crate_model_hours_of_operation_time_slice(
            &mut object_362,
            var_361,
        )?;
        object_362.finish();
    }
    if let Some(var_363) = &input.end_time {
        let mut object_364 = object.key("EndTime").start_object();
        crate::json_ser::serialize_structure_crate_model_hours_of_operation_time_slice(
            &mut object_364,
            var_363,
        )?;
        object_364.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_outbound_caller_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::OutboundCallerConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_365) = &input.outbound_caller_id_name {
        object.key("OutboundCallerIdName").string(var_365.as_str());
    }
    if let Some(var_366) = &input.outbound_caller_id_number_id {
        object
            .key("OutboundCallerIdNumberId")
            .string(var_366.as_str());
    }
    if let Some(var_367) = &input.outbound_flow_id {
        object.key("OutboundFlowId").string(var_367.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_quick_connect_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::QuickConnectConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_368) = &input.quick_connect_type {
        object.key("QuickConnectType").string(var_368.as_str());
    }
    if let Some(var_369) = &input.user_config {
        let mut object_370 = object.key("UserConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_user_quick_connect_config(
            &mut object_370,
            var_369,
        )?;
        object_370.finish();
    }
    if let Some(var_371) = &input.queue_config {
        let mut object_372 = object.key("QueueConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_queue_quick_connect_config(
            &mut object_372,
            var_371,
        )?;
        object_372.finish();
    }
    if let Some(var_373) = &input.phone_config {
        let mut object_374 = object.key("PhoneConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_phone_number_quick_connect_config(
            &mut object_374,
            var_373,
        )?;
        object_374.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_media_concurrency(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::MediaConcurrency,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_375) = &input.channel {
        object.key("Channel").string(var_375.as_str());
    }
    {
        object.key("Concurrency").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.concurrency).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_model_user_identity_info(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::UserIdentityInfo,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_376) = &input.first_name {
        object.key("FirstName").string(var_376.as_str());
    }
    if let Some(var_377) = &input.last_name {
        object.key("LastName").string(var_377.as_str());
    }
    if let Some(var_378) = &input.email {
        object.key("Email").string(var_378.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_user_phone_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::UserPhoneConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_379) = &input.phone_type {
        object.key("PhoneType").string(var_379.as_str());
    }
    if input.auto_accept {
        object.key("AutoAccept").boolean(input.auto_accept);
    }
    if input.after_contact_work_time_limit != 0 {
        object.key("AfterContactWorkTimeLimit").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.after_contact_work_time_limit).into()),
        );
    }
    if let Some(var_380) = &input.desk_phone_number {
        object.key("DeskPhoneNumber").string(var_380.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_routing_profile_queue_reference(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::RoutingProfileQueueReference,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_381) = &input.queue_id {
        object.key("QueueId").string(var_381.as_str());
    }
    if let Some(var_382) = &input.channel {
        object.key("Channel").string(var_382.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_current_metric(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::CurrentMetric,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_383) = &input.name {
        object.key("Name").string(var_383.as_str());
    }
    if let Some(var_384) = &input.unit {
        object.key("Unit").string(var_384.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_filters(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Filters,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_385) = &input.queues {
        let mut array_386 = object.key("Queues").start_array();
        for item_387 in var_385 {
            {
                array_386.value().string(item_387.as_str());
            }
        }
        array_386.finish();
    }
    if let Some(var_388) = &input.channels {
        let mut array_389 = object.key("Channels").start_array();
        for item_390 in var_388 {
            {
                array_389.value().string(item_390.as_str());
            }
        }
        array_389.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_historical_metric(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::HistoricalMetric,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_391) = &input.name {
        object.key("Name").string(var_391.as_str());
    }
    if let Some(var_392) = &input.threshold {
        let mut object_393 = object.key("Threshold").start_object();
        crate::json_ser::serialize_structure_crate_model_threshold(&mut object_393, var_392)?;
        object_393.finish();
    }
    if let Some(var_394) = &input.statistic {
        object.key("Statistic").string(var_394.as_str());
    }
    if let Some(var_395) = &input.unit {
        object.key("Unit").string(var_395.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_chat_message(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ChatMessage,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_396) = &input.content_type {
        object.key("ContentType").string(var_396.as_str());
    }
    if let Some(var_397) = &input.content {
        object.key("Content").string(var_397.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_participant_details(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ParticipantDetails,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_398) = &input.display_name {
        object.key("DisplayName").string(var_398.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_voice_recording_configuration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::VoiceRecordingConfiguration,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_399) = &input.voice_recording_track {
        object.key("VoiceRecordingTrack").string(var_399.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_chat_streaming_configuration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ChatStreamingConfiguration,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_400) = &input.streaming_endpoint_arn {
        object.key("StreamingEndpointArn").string(var_400.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_answer_machine_detection_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::AnswerMachineDetectionConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if input.enable_answer_machine_detection {
        object
            .key("EnableAnswerMachineDetection")
            .boolean(input.enable_answer_machine_detection);
    }
    if input.await_answer_machine_prompt {
        object
            .key("AwaitAnswerMachinePrompt")
            .boolean(input.await_answer_machine_prompt);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_reference(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Reference,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_401) = &input.value {
        object.key("Value").string(var_401.as_str());
    }
    if let Some(var_402) = &input.r#type {
        object.key("Type").string(var_402.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_hierarchy_structure_update(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::HierarchyStructureUpdate,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_403) = &input.level_one {
        let mut object_404 = object.key("LevelOne").start_object();
        crate::json_ser::serialize_structure_crate_model_hierarchy_level_update(
            &mut object_404,
            var_403,
        )?;
        object_404.finish();
    }
    if let Some(var_405) = &input.level_two {
        let mut object_406 = object.key("LevelTwo").start_object();
        crate::json_ser::serialize_structure_crate_model_hierarchy_level_update(
            &mut object_406,
            var_405,
        )?;
        object_406.finish();
    }
    if let Some(var_407) = &input.level_three {
        let mut object_408 = object.key("LevelThree").start_object();
        crate::json_ser::serialize_structure_crate_model_hierarchy_level_update(
            &mut object_408,
            var_407,
        )?;
        object_408.finish();
    }
    if let Some(var_409) = &input.level_four {
        let mut object_410 = object.key("LevelFour").start_object();
        crate::json_ser::serialize_structure_crate_model_hierarchy_level_update(
            &mut object_410,
            var_409,
        )?;
        object_410.finish();
    }
    if let Some(var_411) = &input.level_five {
        let mut object_412 = object.key("LevelFive").start_object();
        crate::json_ser::serialize_structure_crate_model_hierarchy_level_update(
            &mut object_412,
            var_411,
        )?;
        object_412.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_s3_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::S3Config,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_413) = &input.bucket_name {
        object.key("BucketName").string(var_413.as_str());
    }
    if let Some(var_414) = &input.bucket_prefix {
        object.key("BucketPrefix").string(var_414.as_str());
    }
    if let Some(var_415) = &input.encryption_config {
        let mut object_416 = object.key("EncryptionConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_encryption_config(
            &mut object_416,
            var_415,
        )?;
        object_416.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_kinesis_video_stream_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::KinesisVideoStreamConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_417) = &input.prefix {
        object.key("Prefix").string(var_417.as_str());
    }
    {
        object.key("RetentionPeriodHours").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.retention_period_hours).into()),
        );
    }
    if let Some(var_418) = &input.encryption_config {
        let mut object_419 = object.key("EncryptionConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_encryption_config(
            &mut object_419,
            var_418,
        )?;
        object_419.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_kinesis_stream_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::KinesisStreamConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_420) = &input.stream_arn {
        object.key("StreamArn").string(var_420.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_kinesis_firehose_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::KinesisFirehoseConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_421) = &input.firehose_arn {
        object.key("FirehoseArn").string(var_421.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_hours_of_operation_time_slice(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::HoursOfOperationTimeSlice,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_422) = &input.hours {
        object.key("Hours").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_422).into()),
        );
    }
    if let Some(var_423) = &input.minutes {
        object.key("Minutes").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_423).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_model_user_quick_connect_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::UserQuickConnectConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_424) = &input.user_id {
        object.key("UserId").string(var_424.as_str());
    }
    if let Some(var_425) = &input.contact_flow_id {
        object.key("ContactFlowId").string(var_425.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_queue_quick_connect_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::QueueQuickConnectConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_426) = &input.queue_id {
        object.key("QueueId").string(var_426.as_str());
    }
    if let Some(var_427) = &input.contact_flow_id {
        object.key("ContactFlowId").string(var_427.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_phone_number_quick_connect_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::PhoneNumberQuickConnectConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_428) = &input.phone_number {
        object.key("PhoneNumber").string(var_428.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_threshold(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Threshold,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_429) = &input.comparison {
        object.key("Comparison").string(var_429.as_str());
    }
    if let Some(var_430) = &input.threshold_value {
        object.key("ThresholdValue").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::Float((*var_430).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_model_hierarchy_level_update(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::HierarchyLevelUpdate,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_431) = &input.name {
        object.key("Name").string(var_431.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_encryption_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::EncryptionConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_432) = &input.encryption_type {
        object.key("EncryptionType").string(var_432.as_str());
    }
    if let Some(var_433) = &input.key_id {
        object.key("KeyId").string(var_433.as_str());
    }
    Ok(())
}
