// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_text_event_payload(
    input: &crate::types::TextEvent,
) -> std::result::Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::SerializationError> {
    let mut out = String::new();
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
    crate::protocol_serde::shape_text_event::ser_text_event(&mut object, input)?;
    object.finish();
    Ok(out.into_bytes())
}

pub fn ser_close_stream_event_payload(
    input: &crate::types::CloseStreamEvent,
) -> std::result::Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::SerializationError> {
    let mut out = String::new();
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
    crate::protocol_serde::shape_close_stream_event::ser_close_stream_event(&mut object, input)?;
    object.finish();
    Ok(out.into_bytes())
}
