aws-sdk-bedrockagentcore 1.44.0

AWS SDK for Amazon Bedrock AgentCore
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_inline_ground_truth(
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::types::InlineGroundTruth,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    if let Some(var_1) = &input.assertions {
        let mut array_2 = object.key("assertions").start_array();
        for item_3 in var_1 {
            {
                #[allow(unused_mut)]
                let mut object_4 = array_2.value().start_object();
                crate::protocol_serde::shape_evaluation_content::ser_evaluation_content(&mut object_4, item_3)?;
                object_4.finish();
            }
        }
        array_2.finish();
    }
    if let Some(var_5) = &input.expected_trajectory {
        #[allow(unused_mut)]
        let mut object_6 = object.key("expectedTrajectory").start_object();
        crate::protocol_serde::shape_evaluation_expected_trajectory::ser_evaluation_expected_trajectory(&mut object_6, var_5)?;
        object_6.finish();
    }
    if let Some(var_7) = &input.turns {
        let mut array_8 = object.key("turns").start_array();
        for item_9 in var_7 {
            {
                #[allow(unused_mut)]
                let mut object_10 = array_8.value().start_object();
                crate::protocol_serde::shape_ground_truth_turn::ser_ground_truth_turn(&mut object_10, item_9)?;
                object_10.finish();
            }
        }
        array_8.finish();
    }
    Ok(())
}