aws-sdk-transfer 0.24.0

AWS SDK for AWS Transfer Family
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn serialize_structure_crate_input_create_access_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateAccessInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_1) = &input.home_directory {
        object.key("HomeDirectory").string(var_1.as_str());
    }
    if let Some(var_2) = &input.home_directory_type {
        object.key("HomeDirectoryType").string(var_2.as_str());
    }
    if let Some(var_3) = &input.home_directory_mappings {
        let mut array_4 = object.key("HomeDirectoryMappings").start_array();
        for item_5 in var_3 {
            {
                #[allow(unused_mut)]
                let mut object_6 = array_4.value().start_object();
                crate::json_ser::serialize_structure_crate_model_home_directory_map_entry(
                    &mut object_6,
                    item_5,
                )?;
                object_6.finish();
            }
        }
        array_4.finish();
    }
    if let Some(var_7) = &input.policy {
        object.key("Policy").string(var_7.as_str());
    }
    if let Some(var_8) = &input.posix_profile {
        #[allow(unused_mut)]
        let mut object_9 = object.key("PosixProfile").start_object();
        crate::json_ser::serialize_structure_crate_model_posix_profile(&mut object_9, var_8)?;
        object_9.finish();
    }
    if let Some(var_10) = &input.role {
        object.key("Role").string(var_10.as_str());
    }
    if let Some(var_11) = &input.server_id {
        object.key("ServerId").string(var_11.as_str());
    }
    if let Some(var_12) = &input.external_id {
        object.key("ExternalId").string(var_12.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_agreement_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateAgreementInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_13) = &input.description {
        object.key("Description").string(var_13.as_str());
    }
    if let Some(var_14) = &input.server_id {
        object.key("ServerId").string(var_14.as_str());
    }
    if let Some(var_15) = &input.local_profile_id {
        object.key("LocalProfileId").string(var_15.as_str());
    }
    if let Some(var_16) = &input.partner_profile_id {
        object.key("PartnerProfileId").string(var_16.as_str());
    }
    if let Some(var_17) = &input.base_directory {
        object.key("BaseDirectory").string(var_17.as_str());
    }
    if let Some(var_18) = &input.access_role {
        object.key("AccessRole").string(var_18.as_str());
    }
    if let Some(var_19) = &input.status {
        object.key("Status").string(var_19.as_str());
    }
    if let Some(var_20) = &input.tags {
        let mut array_21 = object.key("Tags").start_array();
        for item_22 in var_20 {
            {
                #[allow(unused_mut)]
                let mut object_23 = array_21.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_23, item_22)?;
                object_23.finish();
            }
        }
        array_21.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_connector_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateConnectorInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_24) = &input.url {
        object.key("Url").string(var_24.as_str());
    }
    if let Some(var_25) = &input.as2_config {
        #[allow(unused_mut)]
        let mut object_26 = object.key("As2Config").start_object();
        crate::json_ser::serialize_structure_crate_model_as2_connector_config(
            &mut object_26,
            var_25,
        )?;
        object_26.finish();
    }
    if let Some(var_27) = &input.access_role {
        object.key("AccessRole").string(var_27.as_str());
    }
    if let Some(var_28) = &input.logging_role {
        object.key("LoggingRole").string(var_28.as_str());
    }
    if let Some(var_29) = &input.tags {
        let mut array_30 = object.key("Tags").start_array();
        for item_31 in var_29 {
            {
                #[allow(unused_mut)]
                let mut object_32 = array_30.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_32, item_31)?;
                object_32.finish();
            }
        }
        array_30.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_profile_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateProfileInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_33) = &input.as2_id {
        object.key("As2Id").string(var_33.as_str());
    }
    if let Some(var_34) = &input.profile_type {
        object.key("ProfileType").string(var_34.as_str());
    }
    if let Some(var_35) = &input.certificate_ids {
        let mut array_36 = object.key("CertificateIds").start_array();
        for item_37 in var_35 {
            {
                array_36.value().string(item_37.as_str());
            }
        }
        array_36.finish();
    }
    if let Some(var_38) = &input.tags {
        let mut array_39 = object.key("Tags").start_array();
        for item_40 in var_38 {
            {
                #[allow(unused_mut)]
                let mut object_41 = array_39.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_41, item_40)?;
                object_41.finish();
            }
        }
        array_39.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_server_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateServerInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_42) = &input.certificate {
        object.key("Certificate").string(var_42.as_str());
    }
    if let Some(var_43) = &input.domain {
        object.key("Domain").string(var_43.as_str());
    }
    if let Some(var_44) = &input.endpoint_details {
        #[allow(unused_mut)]
        let mut object_45 = object.key("EndpointDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_endpoint_details(&mut object_45, var_44)?;
        object_45.finish();
    }
    if let Some(var_46) = &input.endpoint_type {
        object.key("EndpointType").string(var_46.as_str());
    }
    if let Some(var_47) = &input.host_key {
        object.key("HostKey").string(var_47.as_str());
    }
    if let Some(var_48) = &input.identity_provider_details {
        #[allow(unused_mut)]
        let mut object_49 = object.key("IdentityProviderDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_identity_provider_details(
            &mut object_49,
            var_48,
        )?;
        object_49.finish();
    }
    if let Some(var_50) = &input.identity_provider_type {
        object.key("IdentityProviderType").string(var_50.as_str());
    }
    if let Some(var_51) = &input.logging_role {
        object.key("LoggingRole").string(var_51.as_str());
    }
    if let Some(var_52) = &input.post_authentication_login_banner {
        object
            .key("PostAuthenticationLoginBanner")
            .string(var_52.as_str());
    }
    if let Some(var_53) = &input.pre_authentication_login_banner {
        object
            .key("PreAuthenticationLoginBanner")
            .string(var_53.as_str());
    }
    if let Some(var_54) = &input.protocols {
        let mut array_55 = object.key("Protocols").start_array();
        for item_56 in var_54 {
            {
                array_55.value().string(item_56.as_str());
            }
        }
        array_55.finish();
    }
    if let Some(var_57) = &input.protocol_details {
        #[allow(unused_mut)]
        let mut object_58 = object.key("ProtocolDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_protocol_details(&mut object_58, var_57)?;
        object_58.finish();
    }
    if let Some(var_59) = &input.security_policy_name {
        object.key("SecurityPolicyName").string(var_59.as_str());
    }
    if let Some(var_60) = &input.tags {
        let mut array_61 = object.key("Tags").start_array();
        for item_62 in var_60 {
            {
                #[allow(unused_mut)]
                let mut object_63 = array_61.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_63, item_62)?;
                object_63.finish();
            }
        }
        array_61.finish();
    }
    if let Some(var_64) = &input.workflow_details {
        #[allow(unused_mut)]
        let mut object_65 = object.key("WorkflowDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_workflow_details(&mut object_65, var_64)?;
        object_65.finish();
    }
    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::error::SerializationError> {
    if let Some(var_66) = &input.home_directory {
        object.key("HomeDirectory").string(var_66.as_str());
    }
    if let Some(var_67) = &input.home_directory_type {
        object.key("HomeDirectoryType").string(var_67.as_str());
    }
    if let Some(var_68) = &input.home_directory_mappings {
        let mut array_69 = object.key("HomeDirectoryMappings").start_array();
        for item_70 in var_68 {
            {
                #[allow(unused_mut)]
                let mut object_71 = array_69.value().start_object();
                crate::json_ser::serialize_structure_crate_model_home_directory_map_entry(
                    &mut object_71,
                    item_70,
                )?;
                object_71.finish();
            }
        }
        array_69.finish();
    }
    if let Some(var_72) = &input.policy {
        object.key("Policy").string(var_72.as_str());
    }
    if let Some(var_73) = &input.posix_profile {
        #[allow(unused_mut)]
        let mut object_74 = object.key("PosixProfile").start_object();
        crate::json_ser::serialize_structure_crate_model_posix_profile(&mut object_74, var_73)?;
        object_74.finish();
    }
    if let Some(var_75) = &input.role {
        object.key("Role").string(var_75.as_str());
    }
    if let Some(var_76) = &input.server_id {
        object.key("ServerId").string(var_76.as_str());
    }
    if let Some(var_77) = &input.ssh_public_key_body {
        object.key("SshPublicKeyBody").string(var_77.as_str());
    }
    if let Some(var_78) = &input.tags {
        let mut array_79 = object.key("Tags").start_array();
        for item_80 in var_78 {
            {
                #[allow(unused_mut)]
                let mut object_81 = array_79.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_81, item_80)?;
                object_81.finish();
            }
        }
        array_79.finish();
    }
    if let Some(var_82) = &input.user_name {
        object.key("UserName").string(var_82.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_workflow_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateWorkflowInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_83) = &input.description {
        object.key("Description").string(var_83.as_str());
    }
    if let Some(var_84) = &input.steps {
        let mut array_85 = object.key("Steps").start_array();
        for item_86 in var_84 {
            {
                #[allow(unused_mut)]
                let mut object_87 = array_85.value().start_object();
                crate::json_ser::serialize_structure_crate_model_workflow_step(
                    &mut object_87,
                    item_86,
                )?;
                object_87.finish();
            }
        }
        array_85.finish();
    }
    if let Some(var_88) = &input.on_exception_steps {
        let mut array_89 = object.key("OnExceptionSteps").start_array();
        for item_90 in var_88 {
            {
                #[allow(unused_mut)]
                let mut object_91 = array_89.value().start_object();
                crate::json_ser::serialize_structure_crate_model_workflow_step(
                    &mut object_91,
                    item_90,
                )?;
                object_91.finish();
            }
        }
        array_89.finish();
    }
    if let Some(var_92) = &input.tags {
        let mut array_93 = object.key("Tags").start_array();
        for item_94 in var_92 {
            {
                #[allow(unused_mut)]
                let mut object_95 = array_93.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_95, item_94)?;
                object_95.finish();
            }
        }
        array_93.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_access_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteAccessInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_96) = &input.server_id {
        object.key("ServerId").string(var_96.as_str());
    }
    if let Some(var_97) = &input.external_id {
        object.key("ExternalId").string(var_97.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_agreement_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteAgreementInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_98) = &input.agreement_id {
        object.key("AgreementId").string(var_98.as_str());
    }
    if let Some(var_99) = &input.server_id {
        object.key("ServerId").string(var_99.as_str());
    }
    Ok(())
}

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

pub fn serialize_structure_crate_input_delete_connector_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteConnectorInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_101) = &input.connector_id {
        object.key("ConnectorId").string(var_101.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_host_key_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteHostKeyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_102) = &input.server_id {
        object.key("ServerId").string(var_102.as_str());
    }
    if let Some(var_103) = &input.host_key_id {
        object.key("HostKeyId").string(var_103.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_profile_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteProfileInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_104) = &input.profile_id {
        object.key("ProfileId").string(var_104.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_server_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteServerInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_105) = &input.server_id {
        object.key("ServerId").string(var_105.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_ssh_public_key_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteSshPublicKeyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_106) = &input.server_id {
        object.key("ServerId").string(var_106.as_str());
    }
    if let Some(var_107) = &input.ssh_public_key_id {
        object.key("SshPublicKeyId").string(var_107.as_str());
    }
    if let Some(var_108) = &input.user_name {
        object.key("UserName").string(var_108.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_user_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteUserInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_109) = &input.server_id {
        object.key("ServerId").string(var_109.as_str());
    }
    if let Some(var_110) = &input.user_name {
        object.key("UserName").string(var_110.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_workflow_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteWorkflowInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_111) = &input.workflow_id {
        object.key("WorkflowId").string(var_111.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_access_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeAccessInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_112) = &input.server_id {
        object.key("ServerId").string(var_112.as_str());
    }
    if let Some(var_113) = &input.external_id {
        object.key("ExternalId").string(var_113.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_agreement_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeAgreementInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_114) = &input.agreement_id {
        object.key("AgreementId").string(var_114.as_str());
    }
    if let Some(var_115) = &input.server_id {
        object.key("ServerId").string(var_115.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_certificate_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeCertificateInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_116) = &input.certificate_id {
        object.key("CertificateId").string(var_116.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_connector_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeConnectorInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_117) = &input.connector_id {
        object.key("ConnectorId").string(var_117.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_execution_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeExecutionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_118) = &input.execution_id {
        object.key("ExecutionId").string(var_118.as_str());
    }
    if let Some(var_119) = &input.workflow_id {
        object.key("WorkflowId").string(var_119.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_host_key_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeHostKeyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_120) = &input.server_id {
        object.key("ServerId").string(var_120.as_str());
    }
    if let Some(var_121) = &input.host_key_id {
        object.key("HostKeyId").string(var_121.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_profile_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeProfileInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_122) = &input.profile_id {
        object.key("ProfileId").string(var_122.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_security_policy_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeSecurityPolicyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_123) = &input.security_policy_name {
        object.key("SecurityPolicyName").string(var_123.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_server_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeServerInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_124) = &input.server_id {
        object.key("ServerId").string(var_124.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_user_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeUserInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_125) = &input.server_id {
        object.key("ServerId").string(var_125.as_str());
    }
    if let Some(var_126) = &input.user_name {
        object.key("UserName").string(var_126.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_workflow_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeWorkflowInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_127) = &input.workflow_id {
        object.key("WorkflowId").string(var_127.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_import_certificate_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ImportCertificateInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_128) = &input.usage {
        object.key("Usage").string(var_128.as_str());
    }
    if let Some(var_129) = &input.certificate {
        object.key("Certificate").string(var_129.as_str());
    }
    if let Some(var_130) = &input.certificate_chain {
        object.key("CertificateChain").string(var_130.as_str());
    }
    if let Some(var_131) = &input.private_key {
        object.key("PrivateKey").string(var_131.as_str());
    }
    if let Some(var_132) = &input.active_date {
        object
            .key("ActiveDate")
            .date_time(var_132, aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    if let Some(var_133) = &input.inactive_date {
        object
            .key("InactiveDate")
            .date_time(var_133, aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    if let Some(var_134) = &input.description {
        object.key("Description").string(var_134.as_str());
    }
    if let Some(var_135) = &input.tags {
        let mut array_136 = object.key("Tags").start_array();
        for item_137 in var_135 {
            {
                #[allow(unused_mut)]
                let mut object_138 = array_136.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_138, item_137)?;
                object_138.finish();
            }
        }
        array_136.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_import_host_key_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ImportHostKeyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_139) = &input.server_id {
        object.key("ServerId").string(var_139.as_str());
    }
    if let Some(var_140) = &input.host_key_body {
        object.key("HostKeyBody").string(var_140.as_str());
    }
    if let Some(var_141) = &input.description {
        object.key("Description").string(var_141.as_str());
    }
    if let Some(var_142) = &input.tags {
        let mut array_143 = object.key("Tags").start_array();
        for item_144 in var_142 {
            {
                #[allow(unused_mut)]
                let mut object_145 = array_143.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_145, item_144)?;
                object_145.finish();
            }
        }
        array_143.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_import_ssh_public_key_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ImportSshPublicKeyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_146) = &input.server_id {
        object.key("ServerId").string(var_146.as_str());
    }
    if let Some(var_147) = &input.ssh_public_key_body {
        object.key("SshPublicKeyBody").string(var_147.as_str());
    }
    if let Some(var_148) = &input.user_name {
        object.key("UserName").string(var_148.as_str());
    }
    Ok(())
}

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

pub fn serialize_structure_crate_input_list_agreements_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListAgreementsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_152) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_152).into()),
        );
    }
    if let Some(var_153) = &input.next_token {
        object.key("NextToken").string(var_153.as_str());
    }
    if let Some(var_154) = &input.server_id {
        object.key("ServerId").string(var_154.as_str());
    }
    Ok(())
}

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

pub fn serialize_structure_crate_input_list_connectors_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListConnectorsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_157) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_157).into()),
        );
    }
    if let Some(var_158) = &input.next_token {
        object.key("NextToken").string(var_158.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_executions_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListExecutionsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_159) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_159).into()),
        );
    }
    if let Some(var_160) = &input.next_token {
        object.key("NextToken").string(var_160.as_str());
    }
    if let Some(var_161) = &input.workflow_id {
        object.key("WorkflowId").string(var_161.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_host_keys_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListHostKeysInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_162) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_162).into()),
        );
    }
    if let Some(var_163) = &input.next_token {
        object.key("NextToken").string(var_163.as_str());
    }
    if let Some(var_164) = &input.server_id {
        object.key("ServerId").string(var_164.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_profiles_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListProfilesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_165) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_165).into()),
        );
    }
    if let Some(var_166) = &input.next_token {
        object.key("NextToken").string(var_166.as_str());
    }
    if let Some(var_167) = &input.profile_type {
        object.key("ProfileType").string(var_167.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_security_policies_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListSecurityPoliciesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_168) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_168).into()),
        );
    }
    if let Some(var_169) = &input.next_token {
        object.key("NextToken").string(var_169.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_servers_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListServersInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_170) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_170).into()),
        );
    }
    if let Some(var_171) = &input.next_token {
        object.key("NextToken").string(var_171.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::error::SerializationError> {
    if let Some(var_172) = &input.arn {
        object.key("Arn").string(var_172.as_str());
    }
    if let Some(var_173) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_173).into()),
        );
    }
    if let Some(var_174) = &input.next_token {
        object.key("NextToken").string(var_174.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_users_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListUsersInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_175) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_175).into()),
        );
    }
    if let Some(var_176) = &input.next_token {
        object.key("NextToken").string(var_176.as_str());
    }
    if let Some(var_177) = &input.server_id {
        object.key("ServerId").string(var_177.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_workflows_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListWorkflowsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_178) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_178).into()),
        );
    }
    if let Some(var_179) = &input.next_token {
        object.key("NextToken").string(var_179.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_send_workflow_step_state_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::SendWorkflowStepStateInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_180) = &input.workflow_id {
        object.key("WorkflowId").string(var_180.as_str());
    }
    if let Some(var_181) = &input.execution_id {
        object.key("ExecutionId").string(var_181.as_str());
    }
    if let Some(var_182) = &input.token {
        object.key("Token").string(var_182.as_str());
    }
    if let Some(var_183) = &input.status {
        object.key("Status").string(var_183.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_start_file_transfer_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StartFileTransferInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_184) = &input.connector_id {
        object.key("ConnectorId").string(var_184.as_str());
    }
    if let Some(var_185) = &input.send_file_paths {
        let mut array_186 = object.key("SendFilePaths").start_array();
        for item_187 in var_185 {
            {
                array_186.value().string(item_187.as_str());
            }
        }
        array_186.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_start_server_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StartServerInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_188) = &input.server_id {
        object.key("ServerId").string(var_188.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_stop_server_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StopServerInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_189) = &input.server_id {
        object.key("ServerId").string(var_189.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::error::SerializationError> {
    if let Some(var_190) = &input.arn {
        object.key("Arn").string(var_190.as_str());
    }
    if let Some(var_191) = &input.tags {
        let mut array_192 = object.key("Tags").start_array();
        for item_193 in var_191 {
            {
                #[allow(unused_mut)]
                let mut object_194 = array_192.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_194, item_193)?;
                object_194.finish();
            }
        }
        array_192.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_test_identity_provider_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::TestIdentityProviderInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_195) = &input.server_id {
        object.key("ServerId").string(var_195.as_str());
    }
    if let Some(var_196) = &input.server_protocol {
        object.key("ServerProtocol").string(var_196.as_str());
    }
    if let Some(var_197) = &input.source_ip {
        object.key("SourceIp").string(var_197.as_str());
    }
    if let Some(var_198) = &input.user_name {
        object.key("UserName").string(var_198.as_str());
    }
    if let Some(var_199) = &input.user_password {
        object.key("UserPassword").string(var_199.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_untag_resource_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UntagResourceInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_200) = &input.arn {
        object.key("Arn").string(var_200.as_str());
    }
    if let Some(var_201) = &input.tag_keys {
        let mut array_202 = object.key("TagKeys").start_array();
        for item_203 in var_201 {
            {
                array_202.value().string(item_203.as_str());
            }
        }
        array_202.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_access_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateAccessInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_204) = &input.home_directory {
        object.key("HomeDirectory").string(var_204.as_str());
    }
    if let Some(var_205) = &input.home_directory_type {
        object.key("HomeDirectoryType").string(var_205.as_str());
    }
    if let Some(var_206) = &input.home_directory_mappings {
        let mut array_207 = object.key("HomeDirectoryMappings").start_array();
        for item_208 in var_206 {
            {
                #[allow(unused_mut)]
                let mut object_209 = array_207.value().start_object();
                crate::json_ser::serialize_structure_crate_model_home_directory_map_entry(
                    &mut object_209,
                    item_208,
                )?;
                object_209.finish();
            }
        }
        array_207.finish();
    }
    if let Some(var_210) = &input.policy {
        object.key("Policy").string(var_210.as_str());
    }
    if let Some(var_211) = &input.posix_profile {
        #[allow(unused_mut)]
        let mut object_212 = object.key("PosixProfile").start_object();
        crate::json_ser::serialize_structure_crate_model_posix_profile(&mut object_212, var_211)?;
        object_212.finish();
    }
    if let Some(var_213) = &input.role {
        object.key("Role").string(var_213.as_str());
    }
    if let Some(var_214) = &input.server_id {
        object.key("ServerId").string(var_214.as_str());
    }
    if let Some(var_215) = &input.external_id {
        object.key("ExternalId").string(var_215.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_agreement_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateAgreementInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_216) = &input.agreement_id {
        object.key("AgreementId").string(var_216.as_str());
    }
    if let Some(var_217) = &input.server_id {
        object.key("ServerId").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.status {
        object.key("Status").string(var_219.as_str());
    }
    if let Some(var_220) = &input.local_profile_id {
        object.key("LocalProfileId").string(var_220.as_str());
    }
    if let Some(var_221) = &input.partner_profile_id {
        object.key("PartnerProfileId").string(var_221.as_str());
    }
    if let Some(var_222) = &input.base_directory {
        object.key("BaseDirectory").string(var_222.as_str());
    }
    if let Some(var_223) = &input.access_role {
        object.key("AccessRole").string(var_223.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_certificate_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateCertificateInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_224) = &input.certificate_id {
        object.key("CertificateId").string(var_224.as_str());
    }
    if let Some(var_225) = &input.active_date {
        object
            .key("ActiveDate")
            .date_time(var_225, aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    if let Some(var_226) = &input.inactive_date {
        object
            .key("InactiveDate")
            .date_time(var_226, aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    if let Some(var_227) = &input.description {
        object.key("Description").string(var_227.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_connector_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateConnectorInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_228) = &input.connector_id {
        object.key("ConnectorId").string(var_228.as_str());
    }
    if let Some(var_229) = &input.url {
        object.key("Url").string(var_229.as_str());
    }
    if let Some(var_230) = &input.as2_config {
        #[allow(unused_mut)]
        let mut object_231 = object.key("As2Config").start_object();
        crate::json_ser::serialize_structure_crate_model_as2_connector_config(
            &mut object_231,
            var_230,
        )?;
        object_231.finish();
    }
    if let Some(var_232) = &input.access_role {
        object.key("AccessRole").string(var_232.as_str());
    }
    if let Some(var_233) = &input.logging_role {
        object.key("LoggingRole").string(var_233.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_host_key_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateHostKeyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_234) = &input.server_id {
        object.key("ServerId").string(var_234.as_str());
    }
    if let Some(var_235) = &input.host_key_id {
        object.key("HostKeyId").string(var_235.as_str());
    }
    if let Some(var_236) = &input.description {
        object.key("Description").string(var_236.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_profile_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateProfileInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_237) = &input.profile_id {
        object.key("ProfileId").string(var_237.as_str());
    }
    if let Some(var_238) = &input.certificate_ids {
        let mut array_239 = object.key("CertificateIds").start_array();
        for item_240 in var_238 {
            {
                array_239.value().string(item_240.as_str());
            }
        }
        array_239.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_server_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateServerInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_241) = &input.certificate {
        object.key("Certificate").string(var_241.as_str());
    }
    if let Some(var_242) = &input.protocol_details {
        #[allow(unused_mut)]
        let mut object_243 = object.key("ProtocolDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_protocol_details(
            &mut object_243,
            var_242,
        )?;
        object_243.finish();
    }
    if let Some(var_244) = &input.endpoint_details {
        #[allow(unused_mut)]
        let mut object_245 = object.key("EndpointDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_endpoint_details(
            &mut object_245,
            var_244,
        )?;
        object_245.finish();
    }
    if let Some(var_246) = &input.endpoint_type {
        object.key("EndpointType").string(var_246.as_str());
    }
    if let Some(var_247) = &input.host_key {
        object.key("HostKey").string(var_247.as_str());
    }
    if let Some(var_248) = &input.identity_provider_details {
        #[allow(unused_mut)]
        let mut object_249 = object.key("IdentityProviderDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_identity_provider_details(
            &mut object_249,
            var_248,
        )?;
        object_249.finish();
    }
    if let Some(var_250) = &input.logging_role {
        object.key("LoggingRole").string(var_250.as_str());
    }
    if let Some(var_251) = &input.post_authentication_login_banner {
        object
            .key("PostAuthenticationLoginBanner")
            .string(var_251.as_str());
    }
    if let Some(var_252) = &input.pre_authentication_login_banner {
        object
            .key("PreAuthenticationLoginBanner")
            .string(var_252.as_str());
    }
    if let Some(var_253) = &input.protocols {
        let mut array_254 = object.key("Protocols").start_array();
        for item_255 in var_253 {
            {
                array_254.value().string(item_255.as_str());
            }
        }
        array_254.finish();
    }
    if let Some(var_256) = &input.security_policy_name {
        object.key("SecurityPolicyName").string(var_256.as_str());
    }
    if let Some(var_257) = &input.server_id {
        object.key("ServerId").string(var_257.as_str());
    }
    if let Some(var_258) = &input.workflow_details {
        #[allow(unused_mut)]
        let mut object_259 = object.key("WorkflowDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_workflow_details(
            &mut object_259,
            var_258,
        )?;
        object_259.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_user_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateUserInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_260) = &input.home_directory {
        object.key("HomeDirectory").string(var_260.as_str());
    }
    if let Some(var_261) = &input.home_directory_type {
        object.key("HomeDirectoryType").string(var_261.as_str());
    }
    if let Some(var_262) = &input.home_directory_mappings {
        let mut array_263 = object.key("HomeDirectoryMappings").start_array();
        for item_264 in var_262 {
            {
                #[allow(unused_mut)]
                let mut object_265 = array_263.value().start_object();
                crate::json_ser::serialize_structure_crate_model_home_directory_map_entry(
                    &mut object_265,
                    item_264,
                )?;
                object_265.finish();
            }
        }
        array_263.finish();
    }
    if let Some(var_266) = &input.policy {
        object.key("Policy").string(var_266.as_str());
    }
    if let Some(var_267) = &input.posix_profile {
        #[allow(unused_mut)]
        let mut object_268 = object.key("PosixProfile").start_object();
        crate::json_ser::serialize_structure_crate_model_posix_profile(&mut object_268, var_267)?;
        object_268.finish();
    }
    if let Some(var_269) = &input.role {
        object.key("Role").string(var_269.as_str());
    }
    if let Some(var_270) = &input.server_id {
        object.key("ServerId").string(var_270.as_str());
    }
    if let Some(var_271) = &input.user_name {
        object.key("UserName").string(var_271.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_home_directory_map_entry(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::HomeDirectoryMapEntry,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_272) = &input.entry {
        object.key("Entry").string(var_272.as_str());
    }
    if let Some(var_273) = &input.target {
        object.key("Target").string(var_273.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_posix_profile(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::PosixProfile,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_274) = &input.uid {
        object.key("Uid").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_274).into()),
        );
    }
    if let Some(var_275) = &input.gid {
        object.key("Gid").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_275).into()),
        );
    }
    if let Some(var_276) = &input.secondary_gids {
        let mut array_277 = object.key("SecondaryGids").start_array();
        for item_278 in var_276 {
            {
                array_277.value().number(
                    #[allow(clippy::useless_conversion)]
                    aws_smithy_types::Number::NegInt((*item_278).into()),
                );
            }
        }
        array_277.finish();
    }
    Ok(())
}

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

pub fn serialize_structure_crate_model_as2_connector_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::As2ConnectorConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_281) = &input.local_profile_id {
        object.key("LocalProfileId").string(var_281.as_str());
    }
    if let Some(var_282) = &input.partner_profile_id {
        object.key("PartnerProfileId").string(var_282.as_str());
    }
    if let Some(var_283) = &input.message_subject {
        object.key("MessageSubject").string(var_283.as_str());
    }
    if let Some(var_284) = &input.compression {
        object.key("Compression").string(var_284.as_str());
    }
    if let Some(var_285) = &input.encryption_algorithm {
        object.key("EncryptionAlgorithm").string(var_285.as_str());
    }
    if let Some(var_286) = &input.signing_algorithm {
        object.key("SigningAlgorithm").string(var_286.as_str());
    }
    if let Some(var_287) = &input.mdn_signing_algorithm {
        object.key("MdnSigningAlgorithm").string(var_287.as_str());
    }
    if let Some(var_288) = &input.mdn_response {
        object.key("MdnResponse").string(var_288.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_endpoint_details(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::EndpointDetails,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_289) = &input.address_allocation_ids {
        let mut array_290 = object.key("AddressAllocationIds").start_array();
        for item_291 in var_289 {
            {
                array_290.value().string(item_291.as_str());
            }
        }
        array_290.finish();
    }
    if let Some(var_292) = &input.subnet_ids {
        let mut array_293 = object.key("SubnetIds").start_array();
        for item_294 in var_292 {
            {
                array_293.value().string(item_294.as_str());
            }
        }
        array_293.finish();
    }
    if let Some(var_295) = &input.vpc_endpoint_id {
        object.key("VpcEndpointId").string(var_295.as_str());
    }
    if let Some(var_296) = &input.vpc_id {
        object.key("VpcId").string(var_296.as_str());
    }
    if let Some(var_297) = &input.security_group_ids {
        let mut array_298 = object.key("SecurityGroupIds").start_array();
        for item_299 in var_297 {
            {
                array_298.value().string(item_299.as_str());
            }
        }
        array_298.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_identity_provider_details(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::IdentityProviderDetails,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_300) = &input.url {
        object.key("Url").string(var_300.as_str());
    }
    if let Some(var_301) = &input.invocation_role {
        object.key("InvocationRole").string(var_301.as_str());
    }
    if let Some(var_302) = &input.directory_id {
        object.key("DirectoryId").string(var_302.as_str());
    }
    if let Some(var_303) = &input.function {
        object.key("Function").string(var_303.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_protocol_details(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ProtocolDetails,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_304) = &input.passive_ip {
        object.key("PassiveIp").string(var_304.as_str());
    }
    if let Some(var_305) = &input.tls_session_resumption_mode {
        object
            .key("TlsSessionResumptionMode")
            .string(var_305.as_str());
    }
    if let Some(var_306) = &input.set_stat_option {
        object.key("SetStatOption").string(var_306.as_str());
    }
    if let Some(var_307) = &input.as2_transports {
        let mut array_308 = object.key("As2Transports").start_array();
        for item_309 in var_307 {
            {
                array_308.value().string(item_309.as_str());
            }
        }
        array_308.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_workflow_details(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::WorkflowDetails,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_310) = &input.on_upload {
        let mut array_311 = object.key("OnUpload").start_array();
        for item_312 in var_310 {
            {
                #[allow(unused_mut)]
                let mut object_313 = array_311.value().start_object();
                crate::json_ser::serialize_structure_crate_model_workflow_detail(
                    &mut object_313,
                    item_312,
                )?;
                object_313.finish();
            }
        }
        array_311.finish();
    }
    if let Some(var_314) = &input.on_partial_upload {
        let mut array_315 = object.key("OnPartialUpload").start_array();
        for item_316 in var_314 {
            {
                #[allow(unused_mut)]
                let mut object_317 = array_315.value().start_object();
                crate::json_ser::serialize_structure_crate_model_workflow_detail(
                    &mut object_317,
                    item_316,
                )?;
                object_317.finish();
            }
        }
        array_315.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_workflow_step(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::WorkflowStep,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_318) = &input.r#type {
        object.key("Type").string(var_318.as_str());
    }
    if let Some(var_319) = &input.copy_step_details {
        #[allow(unused_mut)]
        let mut object_320 = object.key("CopyStepDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_copy_step_details(
            &mut object_320,
            var_319,
        )?;
        object_320.finish();
    }
    if let Some(var_321) = &input.custom_step_details {
        #[allow(unused_mut)]
        let mut object_322 = object.key("CustomStepDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_custom_step_details(
            &mut object_322,
            var_321,
        )?;
        object_322.finish();
    }
    if let Some(var_323) = &input.delete_step_details {
        #[allow(unused_mut)]
        let mut object_324 = object.key("DeleteStepDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_delete_step_details(
            &mut object_324,
            var_323,
        )?;
        object_324.finish();
    }
    if let Some(var_325) = &input.tag_step_details {
        #[allow(unused_mut)]
        let mut object_326 = object.key("TagStepDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_tag_step_details(
            &mut object_326,
            var_325,
        )?;
        object_326.finish();
    }
    if let Some(var_327) = &input.decrypt_step_details {
        #[allow(unused_mut)]
        let mut object_328 = object.key("DecryptStepDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_decrypt_step_details(
            &mut object_328,
            var_327,
        )?;
        object_328.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_workflow_detail(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::WorkflowDetail,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_329) = &input.workflow_id {
        object.key("WorkflowId").string(var_329.as_str());
    }
    if let Some(var_330) = &input.execution_role {
        object.key("ExecutionRole").string(var_330.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_copy_step_details(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::CopyStepDetails,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_331) = &input.name {
        object.key("Name").string(var_331.as_str());
    }
    if let Some(var_332) = &input.destination_file_location {
        #[allow(unused_mut)]
        let mut object_333 = object.key("DestinationFileLocation").start_object();
        crate::json_ser::serialize_structure_crate_model_input_file_location(
            &mut object_333,
            var_332,
        )?;
        object_333.finish();
    }
    if let Some(var_334) = &input.overwrite_existing {
        object.key("OverwriteExisting").string(var_334.as_str());
    }
    if let Some(var_335) = &input.source_file_location {
        object.key("SourceFileLocation").string(var_335.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_custom_step_details(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::CustomStepDetails,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_336) = &input.name {
        object.key("Name").string(var_336.as_str());
    }
    if let Some(var_337) = &input.target {
        object.key("Target").string(var_337.as_str());
    }
    if let Some(var_338) = &input.timeout_seconds {
        object.key("TimeoutSeconds").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_338).into()),
        );
    }
    if let Some(var_339) = &input.source_file_location {
        object.key("SourceFileLocation").string(var_339.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_delete_step_details(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::DeleteStepDetails,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_340) = &input.name {
        object.key("Name").string(var_340.as_str());
    }
    if let Some(var_341) = &input.source_file_location {
        object.key("SourceFileLocation").string(var_341.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_tag_step_details(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::TagStepDetails,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_342) = &input.name {
        object.key("Name").string(var_342.as_str());
    }
    if let Some(var_343) = &input.tags {
        let mut array_344 = object.key("Tags").start_array();
        for item_345 in var_343 {
            {
                #[allow(unused_mut)]
                let mut object_346 = array_344.value().start_object();
                crate::json_ser::serialize_structure_crate_model_s3_tag(&mut object_346, item_345)?;
                object_346.finish();
            }
        }
        array_344.finish();
    }
    if let Some(var_347) = &input.source_file_location {
        object.key("SourceFileLocation").string(var_347.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_decrypt_step_details(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::DecryptStepDetails,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_348) = &input.name {
        object.key("Name").string(var_348.as_str());
    }
    if let Some(var_349) = &input.r#type {
        object.key("Type").string(var_349.as_str());
    }
    if let Some(var_350) = &input.source_file_location {
        object.key("SourceFileLocation").string(var_350.as_str());
    }
    if let Some(var_351) = &input.overwrite_existing {
        object.key("OverwriteExisting").string(var_351.as_str());
    }
    if let Some(var_352) = &input.destination_file_location {
        #[allow(unused_mut)]
        let mut object_353 = object.key("DestinationFileLocation").start_object();
        crate::json_ser::serialize_structure_crate_model_input_file_location(
            &mut object_353,
            var_352,
        )?;
        object_353.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_input_file_location(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::InputFileLocation,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_354) = &input.s3_file_location {
        #[allow(unused_mut)]
        let mut object_355 = object.key("S3FileLocation").start_object();
        crate::json_ser::serialize_structure_crate_model_s3_input_file_location(
            &mut object_355,
            var_354,
        )?;
        object_355.finish();
    }
    if let Some(var_356) = &input.efs_file_location {
        #[allow(unused_mut)]
        let mut object_357 = object.key("EfsFileLocation").start_object();
        crate::json_ser::serialize_structure_crate_model_efs_file_location(
            &mut object_357,
            var_356,
        )?;
        object_357.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_s3_tag(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::S3Tag,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_358) = &input.key {
        object.key("Key").string(var_358.as_str());
    }
    if let Some(var_359) = &input.value {
        object.key("Value").string(var_359.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_s3_input_file_location(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::S3InputFileLocation,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_360) = &input.bucket {
        object.key("Bucket").string(var_360.as_str());
    }
    if let Some(var_361) = &input.key {
        object.key("Key").string(var_361.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_efs_file_location(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::EfsFileLocation,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_362) = &input.file_system_id {
        object.key("FileSystemId").string(var_362.as_str());
    }
    if let Some(var_363) = &input.path {
        object.key("Path").string(var_363.as_str());
    }
    Ok(())
}