pub(crate) fn de_s3_table_publish_status<'a, I>(
tokens: &mut ::std::iter::Peekable<I>,
_value: &'a [u8],
depth: u32,
) -> ::std::result::Result<Option<crate::types::S3TablePublishStatus>, ::aws_smithy_json::deserialize::error::DeserializeError>
where
I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
{
if depth >= 128u32 {
return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
"maximum nesting depth exceeded",
));
}
match tokens.next().transpose()? {
Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::types::builders::S3TablePublishStatusBuilder::default();
loop {
match tokens.next().transpose()? {
Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
"s3Tables" => {
builder = builder.set_s3_tables(crate::protocol_serde::shape_s3_table_name_list::de_s3_table_name_list(
tokens,
_value,
depth + 1,
)?);
}
"s3TableNamespace" => {
builder = builder.set_s3_table_namespace(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"s3TableGranularity" => {
builder = builder.set_s3_table_granularity(
::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
.map(|s| s.to_unescaped().map(|u| crate::types::S3TableGranularity::from(u.as_ref())))
.transpose()?,
);
}
"enabledAll" => {
builder = builder.set_enabled_all(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
}
"lastIngestionTimes" => {
builder = builder.set_last_ingestion_times(
crate::protocol_serde::shape_s3_table_last_ingestion_time_map::de_s3_table_last_ingestion_time_map(
tokens,
_value,
depth + 1,
)?,
);
}
_ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
},
other => {
return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {other:?}"
)))
}
}
}
Ok(Some(builder.build()))
}
_ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
)),
}
}