Client Test

Client Test

rev. 70b05a5296f85c2653fee05487976373e11ea4dc

Files changed:

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_test_string_map.rs

@@ -1,1 +44,46 @@
    3      3   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      4   
) -> ::std::result::Result<::std::collections::HashMap<::std::string::String, ::std::string::String>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      5   
    fn pair(
    6      6   
        mut map: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
    7      7   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      8   
    ) -> ::std::result::Result<::std::collections::HashMap<::std::string::String, ::std::string::String>, ::aws_smithy_cbor::decode::DeserializeError>
    9      9   
    {
   10     10   
        let key = decoder.string()?;
   11     11   
        let value = match decoder.datatype()? {
   12     12   
            ::aws_smithy_cbor::data::Type::Null => {
   13         -
                decoder.null()?;
   14         -
                return ::std::result::Result::Ok(map);
          13  +
                return ::std::result::Result::Err(::aws_smithy_cbor::decode::DeserializeError::custom(
          14  +
                    "dense map cannot contain null values",
          15  +
                    decoder.position(),
          16  +
                ))
   15     17   
            }
   16     18   
            _ => decoder.string()?,
   17     19   
        };
   18     20   
        map.insert(key, value);
   19     21   
        Ok(map)
   20     22   
    }
   21     23   
   22     24   
    let mut map = ::std::collections::HashMap::new();
   23     25   
   24     26   
    match decoder.map()? {

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_timestamp_list.rs

@@ -1,1 +42,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub(crate) fn de_timestamp_list(
    3      3   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      4   
) -> ::std::result::Result<::std::vec::Vec<::aws_smithy_types::DateTime>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      5   
    fn member(
    6      6   
        mut list: ::std::vec::Vec<::aws_smithy_types::DateTime>,
    7      7   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      8   
    ) -> ::std::result::Result<::std::vec::Vec<::aws_smithy_types::DateTime>, ::aws_smithy_cbor::decode::DeserializeError> {
    9      9   
        let value = match decoder.datatype()? {
   10     10   
            ::aws_smithy_cbor::data::Type::Null => {
   11         -
                decoder.null()?;
   12         -
                return ::std::result::Result::Ok(list);
          11  +
                return ::std::result::Result::Err(::aws_smithy_cbor::decode::DeserializeError::custom(
          12  +
                    "dense list cannot contain null values",
          13  +
                    decoder.position(),
          14  +
                ))
   13     15   
            }
   14     16   
            _ => decoder.timestamp()?,
   15     17   
        };
   16     18   
        list.push(value);
   17     19   
        Ok(list)
   18     20   
    }
   19     21   
   20     22   
    let mut list = ::std::vec::Vec::new();
   21     23   
   22     24   
    match decoder.list()? {

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/protocol_serde/shape_validation_exception_field_list.rs

@@ -1,1 +42,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub(crate) fn de_validation_exception_field_list(
    3      3   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      4   
) -> ::std::result::Result<::std::vec::Vec<crate::types::ValidationExceptionField>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      5   
    fn member(
    6      6   
        mut list: ::std::vec::Vec<crate::types::ValidationExceptionField>,
    7      7   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      8   
    ) -> ::std::result::Result<::std::vec::Vec<crate::types::ValidationExceptionField>, ::aws_smithy_cbor::decode::DeserializeError> {
    9      9   
        let value = match decoder.datatype()? {
   10     10   
            ::aws_smithy_cbor::data::Type::Null => {
   11         -
                decoder.null()?;
   12         -
                return ::std::result::Result::Ok(list);
          11  +
                return ::std::result::Result::Err(::aws_smithy_cbor::decode::DeserializeError::custom(
          12  +
                    "dense list cannot contain null values",
          13  +
                    decoder.position(),
          14  +
                ))
   13     15   
            }
   14     16   
            _ => crate::protocol_serde::shape_validation_exception_field::de_validation_exception_field(decoder)?,
   15     17   
        };
   16     18   
        list.push(value);
   17     19   
        Ok(list)
   18     20   
    }
   19     21   
   20     22   
    let mut list = ::std::vec::Vec::new();
   21     23   
   22     24   
    match decoder.list()? {

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_complex_list.rs

@@ -1,1 +48,50 @@
    7      7   
> {
    8      8   
    fn member(
    9      9   
        mut list: ::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>,
   10     10   
        decoder: &mut ::aws_smithy_cbor::Decoder,
   11     11   
    ) -> ::std::result::Result<
   12     12   
        ::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>,
   13     13   
        ::aws_smithy_cbor::decode::DeserializeError,
   14     14   
    > {
   15     15   
        let value = match decoder.datatype()? {
   16     16   
            ::aws_smithy_cbor::data::Type::Null => {
   17         -
                decoder.null()?;
   18         -
                return ::std::result::Result::Ok(list);
          17  +
                return ::std::result::Result::Err(::aws_smithy_cbor::decode::DeserializeError::custom(
          18  +
                    "dense list cannot contain null values",
          19  +
                    decoder.position(),
          20  +
                ))
   19     21   
            }
   20     22   
            _ => crate::protocol_serde::shape_complex_map::de_complex_map(decoder)?,
   21     23   
        };
   22     24   
        list.push(value);
   23     25   
        Ok(list)
   24     26   
    }
   25     27   
   26     28   
    let mut list = ::std::vec::Vec::new();
   27     29   
   28     30   
    match decoder.list()? {

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_complex_map.rs

@@ -1,1 +47,49 @@
    6      6   
    fn pair(
    7      7   
        mut map: ::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>,
    8      8   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    9      9   
    ) -> ::std::result::Result<
   10     10   
        ::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>,
   11     11   
        ::aws_smithy_cbor::decode::DeserializeError,
   12     12   
    > {
   13     13   
        let key = decoder.string()?;
   14     14   
        let value = match decoder.datatype()? {
   15     15   
            ::aws_smithy_cbor::data::Type::Null => {
   16         -
                decoder.null()?;
   17         -
                return ::std::result::Result::Ok(map);
          16  +
                return ::std::result::Result::Err(::aws_smithy_cbor::decode::DeserializeError::custom(
          17  +
                    "dense map cannot contain null values",
          18  +
                    decoder.position(),
          19  +
                ))
   18     20   
            }
   19     21   
            _ => crate::protocol_serde::shape_complex_union::de_complex_union(decoder)?,
   20     22   
        };
   21     23   
        map.insert(key, value);
   22     24   
        Ok(map)
   23     25   
    }
   24     26   
   25     27   
    let mut map = ::std::collections::HashMap::new();
   26     28   
   27     29   
    match decoder.map()? {

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_simple_list.rs

@@ -1,1 +42,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub(crate) fn de_simple_list(
    3      3   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      4   
) -> ::std::result::Result<::std::vec::Vec<::std::string::String>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      5   
    fn member(
    6      6   
        mut list: ::std::vec::Vec<::std::string::String>,
    7      7   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      8   
    ) -> ::std::result::Result<::std::vec::Vec<::std::string::String>, ::aws_smithy_cbor::decode::DeserializeError> {
    9      9   
        let value = match decoder.datatype()? {
   10     10   
            ::aws_smithy_cbor::data::Type::Null => {
   11         -
                decoder.null()?;
   12         -
                return ::std::result::Result::Ok(list);
          11  +
                return ::std::result::Result::Err(::aws_smithy_cbor::decode::DeserializeError::custom(
          12  +
                    "dense list cannot contain null values",
          13  +
                    decoder.position(),
          14  +
                ))
   13     15   
            }
   14     16   
            _ => decoder.string()?,
   15     17   
        };
   16     18   
        list.push(value);
   17     19   
        Ok(list)
   18     20   
    }
   19     21   
   20     22   
    let mut list = ::std::vec::Vec::new();
   21     23   
   22     24   
    match decoder.list()? {

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_simple_map.rs

@@ -1,1 +43,45 @@
    2      2   
pub(crate) fn de_simple_map(
    3      3   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      4   
) -> ::std::result::Result<::std::collections::HashMap<::std::string::String, i32>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      5   
    fn pair(
    6      6   
        mut map: ::std::collections::HashMap<::std::string::String, i32>,
    7      7   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      8   
    ) -> ::std::result::Result<::std::collections::HashMap<::std::string::String, i32>, ::aws_smithy_cbor::decode::DeserializeError> {
    9      9   
        let key = decoder.string()?;
   10     10   
        let value = match decoder.datatype()? {
   11     11   
            ::aws_smithy_cbor::data::Type::Null => {
   12         -
                decoder.null()?;
   13         -
                return ::std::result::Result::Ok(map);
          12  +
                return ::std::result::Result::Err(::aws_smithy_cbor::decode::DeserializeError::custom(
          13  +
                    "dense map cannot contain null values",
          14  +
                    decoder.position(),
          15  +
                ))
   14     16   
            }
   15     17   
            _ => decoder.integer()?,
   16     18   
        };
   17     19   
        map.insert(key, value);
   18     20   
        Ok(map)
   19     21   
    }
   20     22   
   21     23   
    let mut map = ::std::collections::HashMap::new();
   22     24   
   23     25   
    match decoder.map()? {

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_struct_list.rs

@@ -1,1 +42,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub(crate) fn de_struct_list(
    3      3   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      4   
) -> ::std::result::Result<::std::vec::Vec<crate::types::SimpleStruct>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      5   
    fn member(
    6      6   
        mut list: ::std::vec::Vec<crate::types::SimpleStruct>,
    7      7   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      8   
    ) -> ::std::result::Result<::std::vec::Vec<crate::types::SimpleStruct>, ::aws_smithy_cbor::decode::DeserializeError> {
    9      9   
        let value = match decoder.datatype()? {
   10     10   
            ::aws_smithy_cbor::data::Type::Null => {
   11         -
                decoder.null()?;
   12         -
                return ::std::result::Result::Ok(list);
          11  +
                return ::std::result::Result::Err(::aws_smithy_cbor::decode::DeserializeError::custom(
          12  +
                    "dense list cannot contain null values",
          13  +
                    decoder.position(),
          14  +
                ))
   13     15   
            }
   14     16   
            _ => crate::protocol_serde::shape_simple_struct::de_simple_struct(decoder)?,
   15     17   
        };
   16     18   
        list.push(value);
   17     19   
        Ok(list)
   18     20   
    }
   19     21   
   20     22   
    let mut list = ::std::vec::Vec::new();
   21     23   
   22     24   
    match decoder.list()? {

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/protocol_serde/shape_validation_exception_field_list.rs

@@ -1,1 +42,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub(crate) fn de_validation_exception_field_list(
    3      3   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      4   
) -> ::std::result::Result<::std::vec::Vec<crate::types::ValidationExceptionField>, ::aws_smithy_cbor::decode::DeserializeError> {
    5      5   
    fn member(
    6      6   
        mut list: ::std::vec::Vec<crate::types::ValidationExceptionField>,
    7      7   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    8      8   
    ) -> ::std::result::Result<::std::vec::Vec<crate::types::ValidationExceptionField>, ::aws_smithy_cbor::decode::DeserializeError> {
    9      9   
        let value = match decoder.datatype()? {
   10     10   
            ::aws_smithy_cbor::data::Type::Null => {
   11         -
                decoder.null()?;
   12         -
                return ::std::result::Result::Ok(list);
          11  +
                return ::std::result::Result::Err(::aws_smithy_cbor::decode::DeserializeError::custom(
          12  +
                    "dense list cannot contain null values",
          13  +
                    decoder.position(),
          14  +
                ))
   13     15   
            }
   14     16   
            _ => crate::protocol_serde::shape_validation_exception_field::de_validation_exception_field(decoder)?,
   15     17   
        };
   16     18   
        list.push(value);
   17     19   
        Ok(list)
   18     20   
    }
   19     21   
   20     22   
    let mut list = ::std::vec::Vec::new();
   21     23   
   22     24   
    match decoder.list()? {