pub fn ser_iceberg_schema(
object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::types::IcebergSchema,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
if input.schema_id != 0 {
object.key("SchemaId").number(
#[allow(clippy::useless_conversion)]
::aws_smithy_types::Number::NegInt((input.schema_id).into()),
);
}
if let Some(var_1) = &input.identifier_field_ids {
let mut array_2 = object.key("IdentifierFieldIds").start_array();
for item_3 in var_1 {
{
array_2.value().number(
#[allow(clippy::useless_conversion)]
::aws_smithy_types::Number::NegInt((*item_3).into()),
);
}
}
array_2.finish();
}
if let Some(var_4) = &input.r#type {
object.key("Type").string(var_4.as_str());
}
{
let mut array_5 = object.key("Fields").start_array();
for item_6 in &input.fields {
{
#[allow(unused_mut)]
let mut object_7 = array_5.value().start_object();
crate::protocol_serde::shape_iceberg_struct_field::ser_iceberg_struct_field(&mut object_7, item_6)?;
object_7.finish();
}
}
array_5.finish();
}
Ok(())
}