// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_put_organization_config_rule_input_input(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::operation::put_organization_config_rule::PutOrganizationConfigRuleInput,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    if let Some(var_1) = &input.organization_config_rule_name {
        object.key("OrganizationConfigRuleName").string(var_1.as_str());
    }
    if let Some(var_2) = &input.organization_managed_rule_metadata {
        #[allow(unused_mut)]
        let mut object_3 = object.key("OrganizationManagedRuleMetadata").start_object();
        crate::protocol_serde::shape_organization_managed_rule_metadata::ser_organization_managed_rule_metadata(&mut object_3, var_2)?;
        object_3.finish();
    }
    if let Some(var_4) = &input.organization_custom_rule_metadata {
        #[allow(unused_mut)]
        let mut object_5 = object.key("OrganizationCustomRuleMetadata").start_object();
        crate::protocol_serde::shape_organization_custom_rule_metadata::ser_organization_custom_rule_metadata(&mut object_5, var_4)?;
        object_5.finish();
    }
    if let Some(var_6) = &input.excluded_accounts {
        let mut array_7 = object.key("ExcludedAccounts").start_array();
        for item_8 in var_6 {
            {
                array_7.value().string(item_8.as_str());
            }
        }
        array_7.finish();
    }
    if let Some(var_9) = &input.organization_custom_policy_rule_metadata {
        #[allow(unused_mut)]
        let mut object_10 = object.key("OrganizationCustomPolicyRuleMetadata").start_object();
        crate::protocol_serde::shape_organization_custom_policy_rule_metadata::ser_organization_custom_policy_rule_metadata(&mut object_10, var_9)?;
        object_10.finish();
    }
    Ok(())
}
