Client Test

Client Test

rev. e142b602d868dbcdb3ff7160c87686e354cd0986

Files changed:

tmp-codegen-diff/codegen-client-test/big_numbers/rust-client-codegen/src/protocol_serde/shape_big_decimal_list.rs

@@ -1,1 +36,40 @@
   16     16   
                        tokens.next().transpose().unwrap();
   17     17   
                        break;
   18     18   
                    }
   19     19   
                    _ => {
   20     20   
                        let value = ::aws_smithy_json::deserialize::token::expect_number_as_string_or_null(tokens.next(), _value)?
   21     21   
                            .map(<::aws_smithy_types::BigDecimal as ::std::str::FromStr>::from_str)
   22     22   
                            .transpose()
   23     23   
                            .map_err(|e| ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!("invalid BigDecimal: {e}")))?;
   24     24   
                        if let Some(value) = value {
   25     25   
                            items.push(value);
          26  +
                        } else {
          27  +
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          28  +
                                "dense list cannot contain null values",
          29  +
                            ));
   26     30   
                        }
   27     31   
                    }
   28     32   
                }
   29     33   
            }
   30     34   
            Ok(Some(items))
   31     35   
        }
   32     36   
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   33     37   
            "expected start array or null",
   34     38   
        )),
   35     39   
    }

tmp-codegen-diff/codegen-client-test/big_numbers/rust-client-codegen/src/protocol_serde/shape_big_integer_list.rs

@@ -1,1 +36,40 @@
   16     16   
                        tokens.next().transpose().unwrap();
   17     17   
                        break;
   18     18   
                    }
   19     19   
                    _ => {
   20     20   
                        let value = ::aws_smithy_json::deserialize::token::expect_number_as_string_or_null(tokens.next(), _value)?
   21     21   
                            .map(<::aws_smithy_types::BigInteger as ::std::str::FromStr>::from_str)
   22     22   
                            .transpose()
   23     23   
                            .map_err(|e| ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!("invalid BigInteger: {e}")))?;
   24     24   
                        if let Some(value) = value {
   25     25   
                            items.push(value);
          26  +
                        } else {
          27  +
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          28  +
                                "dense list cannot contain null values",
          29  +
                            ));
   26     30   
                        }
   27     31   
                    }
   28     32   
                }
   29     33   
            }
   30     34   
            Ok(Some(items))
   31     35   
        }
   32     36   
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   33     37   
            "expected start array or null",
   34     38   
        )),
   35     39   
    }

tmp-codegen-diff/codegen-client-test/big_numbers/rust-client-codegen/src/protocol_serde/shape_string_to_big_decimal_map.rs

@@ -1,1 +42,49 @@
   15     15   
            let mut map = ::std::collections::HashMap::new();
   16     16   
            loop {
   17     17   
                match tokens.next().transpose()? {
   18     18   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   19     19   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   20     20   
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
   21     21   
                        let value = ::aws_smithy_json::deserialize::token::expect_number_as_string_or_null(tokens.next(), _value)?
   22     22   
                            .map(<::aws_smithy_types::BigDecimal as ::std::str::FromStr>::from_str)
   23     23   
                            .transpose()
   24     24   
                            .map_err(|e| ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!("invalid BigDecimal: {e}")))?;
   25         -
                        if let Some(value) = value {
   26         -
                            map.insert(key, value);
          25  +
                        match value {
          26  +
                            Some(value) => {
          27  +
                                map.insert(key, value);
          28  +
                            }
          29  +
                            None => {
          30  +
                                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          31  +
                                    "dense map cannot contain null values",
          32  +
                                ))
          33  +
                            }
   27     34   
                        }
   28     35   
                    }
   29     36   
                    other => {
   30     37   
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   31     38   
                            "expected object key or end object, found: {other:?}"
   32     39   
                        )))
   33     40   
                    }
   34     41   
                }
   35     42   
            }
   36     43   
            Ok(Some(map))

tmp-codegen-diff/codegen-client-test/big_numbers/rust-client-codegen/src/protocol_serde/shape_string_to_big_integer_map.rs

@@ -1,1 +42,49 @@
   15     15   
            let mut map = ::std::collections::HashMap::new();
   16     16   
            loop {
   17     17   
                match tokens.next().transpose()? {
   18     18   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   19     19   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   20     20   
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
   21     21   
                        let value = ::aws_smithy_json::deserialize::token::expect_number_as_string_or_null(tokens.next(), _value)?
   22     22   
                            .map(<::aws_smithy_types::BigInteger as ::std::str::FromStr>::from_str)
   23     23   
                            .transpose()
   24     24   
                            .map_err(|e| ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!("invalid BigInteger: {e}")))?;
   25         -
                        if let Some(value) = value {
   26         -
                            map.insert(key, value);
          25  +
                        match value {
          26  +
                            Some(value) => {
          27  +
                                map.insert(key, value);
          28  +
                            }
          29  +
                            None => {
          30  +
                                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          31  +
                                    "dense map cannot contain null values",
          32  +
                                ))
          33  +
                            }
   27     34   
                        }
   28     35   
                    }
   29     36   
                    other => {
   30     37   
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   31     38   
                            "expected object key or end object, found: {other:?}"
   32     39   
                        )))
   33     40   
                    }
   34     41   
                }
   35     42   
            }
   36     43   
            Ok(Some(map))

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_attribute_definitions.rs

@@ -1,1 +33,37 @@
   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_attribute_definition::de_attribute_definition(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   
    }

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_attribute_map.rs

@@ -1,1 +39,46 @@
   12     12   
    match tokens.next().transpose()? {
   13     13   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   14     14   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   15     15   
            let mut map = ::std::collections::HashMap::new();
   16     16   
            loop {
   17     17   
                match tokens.next().transpose()? {
   18     18   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   19     19   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   20     20   
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
   21     21   
                        let value = crate::protocol_serde::shape_attribute_value::de_attribute_value(tokens, _value)?;
   22         -
                        if let Some(value) = value {
   23         -
                            map.insert(key, value);
          22  +
                        match value {
          23  +
                            Some(value) => {
          24  +
                                map.insert(key, value);
          25  +
                            }
          26  +
                            None => {
          27  +
                                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          28  +
                                    "dense map cannot contain null values",
          29  +
                                ))
          30  +
                            }
   24     31   
                        }
   25     32   
                    }
   26     33   
                    other => {
   27     34   
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   28     35   
                            "expected object key or end object, found: {other:?}"
   29     36   
                        )))
   30     37   
                    }
   31     38   
                }
   32     39   
            }
   33     40   
            Ok(Some(map))

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_attribute_name_list.rs

@@ -1,1 +35,39 @@
   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 = ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21     21   
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22     22   
                            .transpose()?;
   23     23   
                        if let Some(value) = value {
   24     24   
                            items.push(value);
          25  +
                        } else {
          26  +
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          27  +
                                "dense list cannot contain null values",
          28  +
                            ));
   25     29   
                        }
   26     30   
                    }
   27     31   
                }
   28     32   
            }
   29     33   
            Ok(Some(items))
   30     34   
        }
   31     35   
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   32     36   
            "expected start array or null",
   33     37   
        )),
   34     38   
    }

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_auto_scaling_policy_description_list.rs

@@ -1,1 +33,37 @@
   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_auto_scaling_policy_description::de_auto_scaling_policy_description(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   
    }

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_backup_summaries.rs

@@ -1,1 +33,37 @@
   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_backup_summary::de_backup_summary(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   
    }

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_batch_get_request_map.rs

@@ -1,1 +39,46 @@
   12     12   
    match tokens.next().transpose()? {
   13     13   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   14     14   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   15     15   
            let mut map = ::std::collections::HashMap::new();
   16     16   
            loop {
   17     17   
                match tokens.next().transpose()? {
   18     18   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   19     19   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   20     20   
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
   21     21   
                        let value = crate::protocol_serde::shape_keys_and_attributes::de_keys_and_attributes(tokens, _value)?;
   22         -
                        if let Some(value) = value {
   23         -
                            map.insert(key, value);
          22  +
                        match value {
          23  +
                            Some(value) => {
          24  +
                                map.insert(key, value);
          25  +
                            }
          26  +
                            None => {
          27  +
                                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          28  +
                                    "dense map cannot contain null values",
          29  +
                                ))
          30  +
                            }
   24     31   
                        }
   25     32   
                    }
   26     33   
                    other => {
   27     34   
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   28     35   
                            "expected object key or end object, found: {other:?}"
   29     36   
                        )))
   30     37   
                    }
   31     38   
                }
   32     39   
            }
   33     40   
            Ok(Some(map))

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_batch_get_response_map.rs

@@ -1,1 +44,51 @@
   17     17   
    match tokens.next().transpose()? {
   18     18   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   19     19   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   20     20   
            let mut map = ::std::collections::HashMap::new();
   21     21   
            loop {
   22     22   
                match tokens.next().transpose()? {
   23     23   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   24     24   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   25     25   
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
   26     26   
                        let value = crate::protocol_serde::shape_item_list::de_item_list(tokens, _value)?;
   27         -
                        if let Some(value) = value {
   28         -
                            map.insert(key, value);
          27  +
                        match value {
          28  +
                            Some(value) => {
          29  +
                                map.insert(key, value);
          30  +
                            }
          31  +
                            None => {
          32  +
                                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          33  +
                                    "dense map cannot contain null values",
          34  +
                                ))
          35  +
                            }
   29     36   
                        }
   30     37   
                    }
   31     38   
                    other => {
   32     39   
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   33     40   
                            "expected object key or end object, found: {other:?}"
   34     41   
                        )))
   35     42   
                    }
   36     43   
                }
   37     44   
            }
   38     45   
            Ok(Some(map))

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_batch_write_item_request_map.rs

@@ -1,1 +39,46 @@
   12     12   
    match tokens.next().transpose()? {
   13     13   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   14     14   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   15     15   
            let mut map = ::std::collections::HashMap::new();
   16     16   
            loop {
   17     17   
                match tokens.next().transpose()? {
   18     18   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   19     19   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   20     20   
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
   21     21   
                        let value = crate::protocol_serde::shape_write_requests::de_write_requests(tokens, _value)?;
   22         -
                        if let Some(value) = value {
   23         -
                            map.insert(key, value);
          22  +
                        match value {
          23  +
                            Some(value) => {
          24  +
                                map.insert(key, value);
          25  +
                            }
          26  +
                            None => {
          27  +
                                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          28  +
                                    "dense map cannot contain null values",
          29  +
                                ))
          30  +
                            }
   24     31   
                        }
   25     32   
                    }
   26     33   
                    other => {
   27     34   
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   28     35   
                            "expected object key or end object, found: {other:?}"
   29     36   
                        )))
   30     37   
                    }
   31     38   
                }
   32     39   
            }
   33     40   
            Ok(Some(map))

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_binary_set_attribute_value.rs

@@ -1,1 +33,37 @@
   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 = ::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?;
   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   
    }

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_cancellation_reason_list.rs

@@ -1,1 +33,37 @@
   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_cancellation_reason::de_cancellation_reason(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   
    }

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_consumed_capacity_multiple.rs

@@ -1,1 +33,37 @@
   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_consumed_capacity::de_consumed_capacity(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   
    }