aws-sdk-bedrockruntime 1.130.0

AWS SDK for Amazon Bedrock Runtime
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_system_content_block(
    object_31: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::types::SystemContentBlock,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    match input {
        crate::types::SystemContentBlock::Text(inner) => {
            object_31.key("text").string(inner.as_str());
        }
        crate::types::SystemContentBlock::GuardContent(inner) => {
            #[allow(unused_mut)]
            let mut object_1 = object_31.key("guardContent").start_object();
            crate::protocol_serde::shape_guardrail_converse_content_block::ser_guardrail_converse_content_block(&mut object_1, inner)?;
            object_1.finish();
        }
        crate::types::SystemContentBlock::CachePoint(inner) => {
            #[allow(unused_mut)]
            let mut object_2 = object_31.key("cachePoint").start_object();
            crate::protocol_serde::shape_cache_point_block::ser_cache_point_block(&mut object_2, inner)?;
            object_2.finish();
        }
        crate::types::SystemContentBlock::Unknown => {
            return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant(
                "SystemContentBlock",
            ))
        }
    }
    Ok(())
}