// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn serialize_structure_crate_input_finalize_device_claim_input(
    object: &mut smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::FinalizeDeviceClaimInput,
) {
    if let Some(var_1) = &input.tags {
        let mut object_2 = object.key("tags").start_object();
        for (key_3, value_4) in var_1 {
            {
                object_2.key(key_3).string(value_4);
            }
        }
        object_2.finish();
    }
}

pub fn serialize_structure_crate_input_invoke_device_method_input(
    object: &mut smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::InvokeDeviceMethodInput,
) {
    if let Some(var_5) = &input.device_method {
        let mut object_6 = object.key("deviceMethod").start_object();
        crate::json_ser::serialize_structure_crate_model_device_method(&mut object_6, var_5);
        object_6.finish();
    }
    if let Some(var_7) = &input.device_method_parameters {
        object.key("deviceMethodParameters").string(var_7);
    }
}

pub fn serialize_structure_crate_input_tag_resource_input(
    object: &mut smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::TagResourceInput,
) {
    if let Some(var_8) = &input.tags {
        let mut object_9 = object.key("tags").start_object();
        for (key_10, value_11) in var_8 {
            {
                object_9.key(key_10).string(value_11);
            }
        }
        object_9.finish();
    }
}

pub fn serialize_structure_crate_input_update_device_state_input(
    object: &mut smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateDeviceStateInput,
) {
    if input.enabled {
        object.key("enabled").boolean(input.enabled);
    }
}

pub fn serialize_structure_crate_model_device_method(
    object: &mut smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::DeviceMethod,
) {
    if let Some(var_12) = &input.device_type {
        object.key("deviceType").string(var_12);
    }
    if let Some(var_13) = &input.method_name {
        object.key("methodName").string(var_13);
    }
}
