pub(crate) fn de_provisioned_concurrency_config_list<'a, I>(
tokens: &mut ::std::iter::Peekable<I>,
_value: &'a [u8],
depth: u32,
) -> ::std::result::Result<
Option<::std::vec::Vec<crate::types::ProvisionedConcurrencyConfigListItem>>,
::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::StartArray { .. }) => {
let mut items = Vec::new();
loop {
match tokens.peek() {
Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
tokens.next().transpose().unwrap();
break;
}
_ => {
let value =
crate::protocol_serde::shape_provisioned_concurrency_config_list_item::de_provisioned_concurrency_config_list_item(
tokens,
_value,
depth + 1,
)?;
if let Some(value) = value {
items.push(value);
} else {
return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
"dense list cannot contain null values",
));
}
}
}
}
Ok(Some(items))
}
_ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start array or null",
)),
}
}