// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_apply_guardrail_input_input(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::operation::apply_guardrail::ApplyGuardrailInput,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    if let Some(var_1) = &input.content {
        let mut array_2 = object.key("content").start_array();
        for item_3 in var_1 {
            {
                #[allow(unused_mut)]
                let mut object_4 = array_2.value().start_object();
                crate::protocol_serde::shape_guardrail_content_block::ser_guardrail_content_block(&mut object_4, item_3)?;
                object_4.finish();
            }
        }
        array_2.finish();
    }
    if let Some(var_5) = &input.output_scope {
        object.key("outputScope").string(var_5.as_str());
    }
    if let Some(var_6) = &input.source {
        object.key("source").string(var_6.as_str());
    }
    Ok(())
}
