1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 2 | pub(crate) fn de_timestamp_ranges<'a, I>(
|
3 3 | tokens: &mut ::std::iter::Peekable<I>,
|
4 4 | _value: &'a [u8],
|
5 5 | ) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::TimestampRange>>, ::aws_smithy_json::deserialize::error::DeserializeError>
|
6 6 | where
|
7 7 | I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
|
8 8 | {
|
9 9 | match tokens.next().transpose()? {
|
10 10 | Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
|
11 11 | Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
|
12 12 | let mut items = Vec::new();
|
13 13 | loop {
|
14 14 | match tokens.peek() {
|
15 15 | Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
|
16 16 | tokens.next().transpose().unwrap();
|
17 17 | break;
|
18 18 | }
|
19 19 | _ => {
|
20 20 | let value = crate::protocol_serde::shape_timestamp_range::de_timestamp_range(tokens, _value)?;
|
21 21 | if let Some(value) = value {
|
22 22 | items.push(value);
|
23 + | } else {
|
24 + | return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
25 + | "dense list cannot contain null values",
|
26 + | ));
|
23 27 | }
|
24 28 | }
|
25 29 | }
|
26 30 | }
|
27 31 | Ok(Some(items))
|
28 32 | }
|
29 33 | _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
30 34 | "expected start array or null",
|
31 35 | )),
|
32 36 | }
|