// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_organization_custom_policy_rule_metadata(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::types::OrganizationCustomPolicyRuleMetadata,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    if let Some(var_1) = &input.description {
        object.key("Description").string(var_1.as_str());
    }
    if let Some(var_2) = &input.organization_config_rule_trigger_types {
        let mut array_3 = object.key("OrganizationConfigRuleTriggerTypes").start_array();
        for item_4 in var_2 {
            {
                array_3.value().string(item_4.as_str());
            }
        }
        array_3.finish();
    }
    if let Some(var_5) = &input.input_parameters {
        object.key("InputParameters").string(var_5.as_str());
    }
    if let Some(var_6) = &input.maximum_execution_frequency {
        object.key("MaximumExecutionFrequency").string(var_6.as_str());
    }
    if let Some(var_7) = &input.resource_types_scope {
        let mut array_8 = object.key("ResourceTypesScope").start_array();
        for item_9 in var_7 {
            {
                array_8.value().string(item_9.as_str());
            }
        }
        array_8.finish();
    }
    if let Some(var_10) = &input.resource_id_scope {
        object.key("ResourceIdScope").string(var_10.as_str());
    }
    if let Some(var_11) = &input.tag_key_scope {
        object.key("TagKeyScope").string(var_11.as_str());
    }
    if let Some(var_12) = &input.tag_value_scope {
        object.key("TagValueScope").string(var_12.as_str());
    }
    {
        object.key("PolicyRuntime").string(input.policy_runtime.as_str());
    }
    {
        object.key("PolicyText").string(input.policy_text.as_str());
    }
    if let Some(var_13) = &input.debug_log_delivery_accounts {
        let mut array_14 = object.key("DebugLogDeliveryAccounts").start_array();
        for item_15 in var_13 {
            {
                array_14.value().string(item_15.as_str());
            }
        }
        array_14.finish();
    }
    Ok(())
}
