// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_replicate_key_input_input(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::operation::replicate_key::ReplicateKeyInput,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    if let Some(var_1) = &input.key_id {
        object.key("KeyId").string(var_1.as_str());
    }
    if let Some(var_2) = &input.replica_region {
        object.key("ReplicaRegion").string(var_2.as_str());
    }
    if let Some(var_3) = &input.policy {
        object.key("Policy").string(var_3.as_str());
    }
    if let Some(var_4) = &input.bypass_policy_lockout_safety_check {
        object.key("BypassPolicyLockoutSafetyCheck").boolean(*var_4);
    }
    if let Some(var_5) = &input.description {
        object.key("Description").string(var_5.as_str());
    }
    if let Some(var_6) = &input.tags {
        let mut array_7 = object.key("Tags").start_array();
        for item_8 in var_6 {
            {
                #[allow(unused_mut)]
                let mut object_9 = array_7.value().start_object();
                crate::protocol_serde::shape_tag::ser_tag(&mut object_9, item_8)?;
                object_9.finish();
            }
        }
        array_7.finish();
    }
    Ok(())
}
