Client Test

Client Test

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_namespaces/_xml_namespaces_input.rs

@@ -1,1 +69,82 @@
   18     18   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   19     19   
    fn serialize_members(
   20     20   
        &self,
   21     21   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   22     22   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   23     23   
        Ok(())
   24     24   
    }
   25     25   
}
   26     26   
impl XmlNamespacesInput {
   27     27   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   28         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   29         -
        deserializer: &mut D,
          28  +
    pub fn deserialize(
          29  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   30     30   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   31     31   
        #[allow(unused_variables, unused_mut)]
   32     32   
        let mut builder = Self::builder();
   33     33   
        #[allow(
   34     34   
            unused_variables,
   35     35   
            unreachable_code,
   36     36   
            clippy::single_match,
   37     37   
            clippy::match_single_binding,
   38     38   
            clippy::diverging_sub_expression
   39     39   
        )]
   40         -
        deserializer.read_struct(&XMLNAMESPACESINPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&XMLNAMESPACESINPUT_SCHEMA, &mut |member, deser| {
   41     41   
            match member.member_index() {
   42     42   
                _ => {}
   43     43   
            }
   44     44   
            Ok(())
   45     45   
        })?;
   46     46   
        builder
   47     47   
            .build()
   48     48   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   49     49   
    }
   50     50   
}
          51  +
impl XmlNamespacesInput {
          52  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          53  +
    pub fn deserialize_with_response(
          54  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          55  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          56  +
        _status: u16,
          57  +
        _body: &[u8],
          58  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          59  +
        Self::builder()
          60  +
            .build()
          61  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
          62  +
    }
          63  +
}
   51     64   
impl XmlNamespacesInput {
   52     65   
    /// Creates a new builder-style object to manufacture [`XmlNamespacesInput`](crate::operation::xml_namespaces::XmlNamespacesInput).
   53     66   
    pub fn builder() -> crate::operation::xml_namespaces::builders::XmlNamespacesInputBuilder {
   54     67   
        crate::operation::xml_namespaces::builders::XmlNamespacesInputBuilder::default()
   55     68   
    }
   56     69   
}
   57     70   
   58     71   
/// A builder for [`XmlNamespacesInput`](crate::operation::xml_namespaces::XmlNamespacesInput).
   59     72   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   60     73   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_namespaces/_xml_namespaces_output.rs

@@ -24,24 +107,118 @@
   44     44   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     45   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     46   
        if let Some(ref val) = self.nested {
   47     47   
            ser.write_struct(&XMLNAMESPACESOUTPUT_MEMBER_NESTED, val)?;
   48     48   
        }
   49     49   
        Ok(())
   50     50   
    }
   51     51   
}
   52     52   
impl XmlNamespacesOutput {
   53     53   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          54  +
    pub fn deserialize(
          55  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     56   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     57   
        #[allow(unused_variables, unused_mut)]
   58     58   
        let mut builder = Self::builder();
   59     59   
        #[allow(
   60     60   
            unused_variables,
   61     61   
            unreachable_code,
   62     62   
            clippy::single_match,
   63     63   
            clippy::match_single_binding,
   64     64   
            clippy::diverging_sub_expression
   65     65   
        )]
   66         -
        deserializer.read_struct(&XMLNAMESPACESOUTPUT_SCHEMA, (), |_, member, deser| {
          66  +
        deserializer.read_struct(&XMLNAMESPACESOUTPUT_SCHEMA, &mut |member, deser| {
   67     67   
            match member.member_index() {
   68     68   
                Some(0) => {
   69     69   
                    builder.nested = Some(crate::types::XmlNamespaceNested::deserialize(deser)?);
   70     70   
                }
   71     71   
                _ => {}
   72     72   
            }
   73     73   
            Ok(())
   74     74   
        })?;
   75     75   
        Ok(builder.build())
   76     76   
    }
   77     77   
}
          78  +
impl XmlNamespacesOutput {
          79  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          80  +
    pub fn deserialize_with_response(
          81  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          82  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          83  +
        _status: u16,
          84  +
        _body: &[u8],
          85  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          86  +
        Self::deserialize(deserializer)
          87  +
    }
          88  +
}
   78     89   
impl XmlNamespacesOutput {
   79     90   
    /// Creates a new builder-style object to manufacture [`XmlNamespacesOutput`](crate::operation::xml_namespaces::XmlNamespacesOutput).
   80     91   
    pub fn builder() -> crate::operation::xml_namespaces::builders::XmlNamespacesOutputBuilder {
   81     92   
        crate::operation::xml_namespaces::builders::XmlNamespacesOutputBuilder::default()
   82     93   
    }
   83     94   
}
   84     95   
   85     96   
/// A builder for [`XmlNamespacesOutput`](crate::operation::xml_namespaces::XmlNamespacesOutput).
   86     97   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   87     98   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_timestamps.rs

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `XmlTimestamps`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct XmlTimestamps;
    6      6   
impl XmlTimestamps {
    7      7   
    /// Creates a new `XmlTimestamps`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::xml_timestamps::XmlTimestampsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::xml_timestamps::XmlTimestampsOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::xml_timestamps::XmlTimestampsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::xml_timestamps::XmlTimestampsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::xml_timestamps::XmlTimestampsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +166,171 @@
  124    128   
                crate::operation::xml_timestamps::XmlTimestampsError,
  125    129   
            >::new());
  126    130   
  127    131   
        ::std::borrow::Cow::Owned(rcb)
  128    132   
    }
  129    133   
}
  130    134   
  131    135   
#[derive(Debug)]
  132    136   
struct XmlTimestampsResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlTimestampsResponseDeserializer {
  134         -
    fn deserialize_nonstreaming(
         138  +
    fn deserialize_nonstreaming_with_config(
  135    139   
        &self,
  136    140   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         141  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  137    142   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  138    143   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  139    144   
        let headers = response.headers();
  140    145   
        let body = response.body().bytes().expect("body loaded");
  141    146   
        #[allow(unused_mut)]
  142    147   
        let mut force_error = false;
  143    148   
  144    149   
        let parse_result = if !success && status != 200 || force_error {
  145    150   
            crate::protocol_serde::shape_xml_timestamps::de_xml_timestamps_http_error(status, headers, body)
  146    151   
        } else {
@@ -241,246 +301,310 @@
  261    266   
            .expect("the config must have a deserializer");
  262    267   
  263    268   
        let parsed = de.deserialize_streaming(&mut http_response);
  264    269   
        let parsed = parsed.unwrap_or_else(|| {
  265    270   
            let http_response = http_response.map(|body| {
  266    271   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  267    272   
                    body.bytes().unwrap(),
  268    273   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  269    274   
                )))
  270    275   
            });
  271         -
            de.deserialize_nonstreaming(&http_response)
         276  +
            // Build a config bag with the protocol for schema-based deserialization
         277  +
            #[allow(unused_mut)]
         278  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         279  +
         280  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  272    281   
        });
  273    282   
        let parsed = parsed
  274    283   
            .expect("should be successful response")
  275    284   
            .downcast::<crate::operation::xml_timestamps::XmlTimestampsOutput>()
  276    285   
            .unwrap();
  277    286   
        ::pretty_assertions::assert_eq!(parsed.normal, expected_output.normal, "Unexpected value for `normal`");
  278    287   
        ::pretty_assertions::assert_eq!(parsed.date_time, expected_output.date_time, "Unexpected value for `date_time`");
  279    288   
        ::pretty_assertions::assert_eq!(
  280    289   
            parsed.date_time_on_target,
  281    290   
            expected_output.date_time_on_target,
@@ -305,314 +365,378 @@
  325    334   
            .expect("the config must have a deserializer");
  326    335   
  327    336   
        let parsed = de.deserialize_streaming(&mut http_response);
  328    337   
        let parsed = parsed.unwrap_or_else(|| {
  329    338   
            let http_response = http_response.map(|body| {
  330    339   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  331    340   
                    body.bytes().unwrap(),
  332    341   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  333    342   
                )))
  334    343   
            });
  335         -
            de.deserialize_nonstreaming(&http_response)
         344  +
            // Build a config bag with the protocol for schema-based deserialization
         345  +
            #[allow(unused_mut)]
         346  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         347  +
         348  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  336    349   
        });
  337    350   
        let parsed = parsed
  338    351   
            .expect("should be successful response")
  339    352   
            .downcast::<crate::operation::xml_timestamps::XmlTimestampsOutput>()
  340    353   
            .unwrap();
  341    354   
        ::pretty_assertions::assert_eq!(parsed.normal, expected_output.normal, "Unexpected value for `normal`");
  342    355   
        ::pretty_assertions::assert_eq!(parsed.date_time, expected_output.date_time, "Unexpected value for `date_time`");
  343    356   
        ::pretty_assertions::assert_eq!(
  344    357   
            parsed.date_time_on_target,
  345    358   
            expected_output.date_time_on_target,
@@ -369,382 +429,446 @@
  389    402   
            .expect("the config must have a deserializer");
  390    403   
  391    404   
        let parsed = de.deserialize_streaming(&mut http_response);
  392    405   
        let parsed = parsed.unwrap_or_else(|| {
  393    406   
            let http_response = http_response.map(|body| {
  394    407   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  395    408   
                    body.bytes().unwrap(),
  396    409   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  397    410   
                )))
  398    411   
            });
  399         -
            de.deserialize_nonstreaming(&http_response)
         412  +
            // Build a config bag with the protocol for schema-based deserialization
         413  +
            #[allow(unused_mut)]
         414  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         415  +
         416  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  400    417   
        });
  401    418   
        let parsed = parsed
  402    419   
            .expect("should be successful response")
  403    420   
            .downcast::<crate::operation::xml_timestamps::XmlTimestampsOutput>()
  404    421   
            .unwrap();
  405    422   
        ::pretty_assertions::assert_eq!(parsed.normal, expected_output.normal, "Unexpected value for `normal`");
  406    423   
        ::pretty_assertions::assert_eq!(parsed.date_time, expected_output.date_time, "Unexpected value for `date_time`");
  407    424   
        ::pretty_assertions::assert_eq!(
  408    425   
            parsed.date_time_on_target,
  409    426   
            expected_output.date_time_on_target,
@@ -433,450 +493,514 @@
  453    470   
            .expect("the config must have a deserializer");
  454    471   
  455    472   
        let parsed = de.deserialize_streaming(&mut http_response);
  456    473   
        let parsed = parsed.unwrap_or_else(|| {
  457    474   
            let http_response = http_response.map(|body| {
  458    475   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  459    476   
                    body.bytes().unwrap(),
  460    477   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  461    478   
                )))
  462    479   
            });
  463         -
            de.deserialize_nonstreaming(&http_response)
         480  +
            // Build a config bag with the protocol for schema-based deserialization
         481  +
            #[allow(unused_mut)]
         482  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         483  +
         484  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  464    485   
        });
  465    486   
        let parsed = parsed
  466    487   
            .expect("should be successful response")
  467    488   
            .downcast::<crate::operation::xml_timestamps::XmlTimestampsOutput>()
  468    489   
            .unwrap();
  469    490   
        ::pretty_assertions::assert_eq!(parsed.normal, expected_output.normal, "Unexpected value for `normal`");
  470    491   
        ::pretty_assertions::assert_eq!(parsed.date_time, expected_output.date_time, "Unexpected value for `date_time`");
  471    492   
        ::pretty_assertions::assert_eq!(
  472    493   
            parsed.date_time_on_target,
  473    494   
            expected_output.date_time_on_target,
@@ -497,518 +557,582 @@
  517    538   
            .expect("the config must have a deserializer");
  518    539   
  519    540   
        let parsed = de.deserialize_streaming(&mut http_response);
  520    541   
        let parsed = parsed.unwrap_or_else(|| {
  521    542   
            let http_response = http_response.map(|body| {
  522    543   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  523    544   
                    body.bytes().unwrap(),
  524    545   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  525    546   
                )))
  526    547   
            });
  527         -
            de.deserialize_nonstreaming(&http_response)
         548  +
            // Build a config bag with the protocol for schema-based deserialization
         549  +
            #[allow(unused_mut)]
         550  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         551  +
         552  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  528    553   
        });
  529    554   
        let parsed = parsed
  530    555   
            .expect("should be successful response")
  531    556   
            .downcast::<crate::operation::xml_timestamps::XmlTimestampsOutput>()
  532    557   
            .unwrap();
  533    558   
        ::pretty_assertions::assert_eq!(parsed.normal, expected_output.normal, "Unexpected value for `normal`");
  534    559   
        ::pretty_assertions::assert_eq!(parsed.date_time, expected_output.date_time, "Unexpected value for `date_time`");
  535    560   
        ::pretty_assertions::assert_eq!(
  536    561   
            parsed.date_time_on_target,
  537    562   
            expected_output.date_time_on_target,
@@ -561,586 +621,650 @@
  581    606   
            .expect("the config must have a deserializer");
  582    607   
  583    608   
        let parsed = de.deserialize_streaming(&mut http_response);
  584    609   
        let parsed = parsed.unwrap_or_else(|| {
  585    610   
            let http_response = http_response.map(|body| {
  586    611   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  587    612   
                    body.bytes().unwrap(),
  588    613   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  589    614   
                )))
  590    615   
            });
  591         -
            de.deserialize_nonstreaming(&http_response)
         616  +
            // Build a config bag with the protocol for schema-based deserialization
         617  +
            #[allow(unused_mut)]
         618  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         619  +
         620  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  592    621   
        });
  593    622   
        let parsed = parsed
  594    623   
            .expect("should be successful response")
  595    624   
            .downcast::<crate::operation::xml_timestamps::XmlTimestampsOutput>()
  596    625   
            .unwrap();
  597    626   
        ::pretty_assertions::assert_eq!(parsed.normal, expected_output.normal, "Unexpected value for `normal`");
  598    627   
        ::pretty_assertions::assert_eq!(parsed.date_time, expected_output.date_time, "Unexpected value for `date_time`");
  599    628   
        ::pretty_assertions::assert_eq!(
  600    629   
            parsed.date_time_on_target,
  601    630   
            expected_output.date_time_on_target,
@@ -625,654 +685,718 @@
  645    674   
            .expect("the config must have a deserializer");
  646    675   
  647    676   
        let parsed = de.deserialize_streaming(&mut http_response);
  648    677   
        let parsed = parsed.unwrap_or_else(|| {
  649    678   
            let http_response = http_response.map(|body| {
  650    679   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  651    680   
                    body.bytes().unwrap(),
  652    681   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  653    682   
                )))
  654    683   
            });
  655         -
            de.deserialize_nonstreaming(&http_response)
         684  +
            // Build a config bag with the protocol for schema-based deserialization
         685  +
            #[allow(unused_mut)]
         686  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         687  +
         688  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  656    689   
        });
  657    690   
        let parsed = parsed
  658    691   
            .expect("should be successful response")
  659    692   
            .downcast::<crate::operation::xml_timestamps::XmlTimestampsOutput>()
  660    693   
            .unwrap();
  661    694   
        ::pretty_assertions::assert_eq!(parsed.normal, expected_output.normal, "Unexpected value for `normal`");
  662    695   
        ::pretty_assertions::assert_eq!(parsed.date_time, expected_output.date_time, "Unexpected value for `date_time`");
  663    696   
        ::pretty_assertions::assert_eq!(
  664    697   
            parsed.date_time_on_target,
  665    698   
            expected_output.date_time_on_target,

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_timestamps/_xml_timestamps_input.rs

@@ -1,1 +69,82 @@
   18     18   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   19     19   
    fn serialize_members(
   20     20   
        &self,
   21     21   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   22     22   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   23     23   
        Ok(())
   24     24   
    }
   25     25   
}
   26     26   
impl XmlTimestampsInput {
   27     27   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   28         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   29         -
        deserializer: &mut D,
          28  +
    pub fn deserialize(
          29  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   30     30   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   31     31   
        #[allow(unused_variables, unused_mut)]
   32     32   
        let mut builder = Self::builder();
   33     33   
        #[allow(
   34     34   
            unused_variables,
   35     35   
            unreachable_code,
   36     36   
            clippy::single_match,
   37     37   
            clippy::match_single_binding,
   38     38   
            clippy::diverging_sub_expression
   39     39   
        )]
   40         -
        deserializer.read_struct(&XMLTIMESTAMPSINPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&XMLTIMESTAMPSINPUT_SCHEMA, &mut |member, deser| {
   41     41   
            match member.member_index() {
   42     42   
                _ => {}
   43     43   
            }
   44     44   
            Ok(())
   45     45   
        })?;
   46     46   
        builder
   47     47   
            .build()
   48     48   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   49     49   
    }
   50     50   
}
          51  +
impl XmlTimestampsInput {
          52  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          53  +
    pub fn deserialize_with_response(
          54  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          55  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          56  +
        _status: u16,
          57  +
        _body: &[u8],
          58  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          59  +
        Self::builder()
          60  +
            .build()
          61  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
          62  +
    }
          63  +
}
   51     64   
impl XmlTimestampsInput {
   52     65   
    /// Creates a new builder-style object to manufacture [`XmlTimestampsInput`](crate::operation::xml_timestamps::XmlTimestampsInput).
   53     66   
    pub fn builder() -> crate::operation::xml_timestamps::builders::XmlTimestampsInputBuilder {
   54     67   
        crate::operation::xml_timestamps::builders::XmlTimestampsInputBuilder::default()
   55     68   
    }
   56     69   
}
   57     70   
   58     71   
/// A builder for [`XmlTimestampsInput`](crate::operation::xml_timestamps::XmlTimestampsInput).
   59     72   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   60     73   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_timestamps/_xml_timestamps_output.rs

@@ -43,43 +249,263 @@
   63     63   
    "normal",
   64     64   
    0,
   65     65   
);
   66     66   
static XMLTIMESTAMPSOUTPUT_MEMBER_DATE_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   67     67   
    ::aws_smithy_schema::ShapeId::from_static(
   68     68   
        "aws.protocoltests.query.synthetic#XmlTimestampsOutput$dateTime",
   69     69   
        "aws.protocoltests.query.synthetic",
   70     70   
        "XmlTimestampsOutput",
   71     71   
    ),
   72     72   
    ::aws_smithy_schema::ShapeType::Timestamp,
   73         -
    "date_time",
          73  +
    "dateTime",
   74     74   
    1,
   75     75   
)
   76     76   
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime);
   77     77   
static XMLTIMESTAMPSOUTPUT_MEMBER_DATE_TIME_ON_TARGET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   78     78   
    ::aws_smithy_schema::ShapeId::from_static(
   79     79   
        "aws.protocoltests.query.synthetic#XmlTimestampsOutput$dateTimeOnTarget",
   80     80   
        "aws.protocoltests.query.synthetic",
   81     81   
        "XmlTimestampsOutput",
   82     82   
    ),
   83     83   
    ::aws_smithy_schema::ShapeType::Timestamp,
   84         -
    "date_time_on_target",
          84  +
    "dateTimeOnTarget",
   85     85   
    2,
   86         -
);
          86  +
)
          87  +
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime);
   87     88   
static XMLTIMESTAMPSOUTPUT_MEMBER_EPOCH_SECONDS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   88     89   
    ::aws_smithy_schema::ShapeId::from_static(
   89     90   
        "aws.protocoltests.query.synthetic#XmlTimestampsOutput$epochSeconds",
   90     91   
        "aws.protocoltests.query.synthetic",
   91     92   
        "XmlTimestampsOutput",
   92     93   
    ),
   93     94   
    ::aws_smithy_schema::ShapeType::Timestamp,
   94         -
    "epoch_seconds",
          95  +
    "epochSeconds",
   95     96   
    3,
   96     97   
)
   97     98   
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::EpochSeconds);
   98     99   
static XMLTIMESTAMPSOUTPUT_MEMBER_EPOCH_SECONDS_ON_TARGET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   99    100   
    ::aws_smithy_schema::ShapeId::from_static(
  100    101   
        "aws.protocoltests.query.synthetic#XmlTimestampsOutput$epochSecondsOnTarget",
  101    102   
        "aws.protocoltests.query.synthetic",
  102    103   
        "XmlTimestampsOutput",
  103    104   
    ),
  104    105   
    ::aws_smithy_schema::ShapeType::Timestamp,
  105         -
    "epoch_seconds_on_target",
         106  +
    "epochSecondsOnTarget",
  106    107   
    4,
  107         -
);
         108  +
)
         109  +
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::EpochSeconds);
  108    110   
static XMLTIMESTAMPSOUTPUT_MEMBER_HTTP_DATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  109    111   
    ::aws_smithy_schema::ShapeId::from_static(
  110    112   
        "aws.protocoltests.query.synthetic#XmlTimestampsOutput$httpDate",
  111    113   
        "aws.protocoltests.query.synthetic",
  112    114   
        "XmlTimestampsOutput",
  113    115   
    ),
  114    116   
    ::aws_smithy_schema::ShapeType::Timestamp,
  115         -
    "http_date",
         117  +
    "httpDate",
  116    118   
    5,
  117    119   
)
  118    120   
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::HttpDate);
  119    121   
static XMLTIMESTAMPSOUTPUT_MEMBER_HTTP_DATE_ON_TARGET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  120    122   
    ::aws_smithy_schema::ShapeId::from_static(
  121    123   
        "aws.protocoltests.query.synthetic#XmlTimestampsOutput$httpDateOnTarget",
  122    124   
        "aws.protocoltests.query.synthetic",
  123    125   
        "XmlTimestampsOutput",
  124    126   
    ),
  125    127   
    ::aws_smithy_schema::ShapeType::Timestamp,
  126         -
    "http_date_on_target",
         128  +
    "httpDateOnTarget",
  127    129   
    6,
  128         -
);
         130  +
)
         131  +
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::HttpDate);
  129    132   
static XMLTIMESTAMPSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  130    133   
    XMLTIMESTAMPSOUTPUT_SCHEMA_ID,
  131    134   
    ::aws_smithy_schema::ShapeType::Structure,
  132    135   
    &[
  133    136   
        &XMLTIMESTAMPSOUTPUT_MEMBER_NORMAL,
  134    137   
        &XMLTIMESTAMPSOUTPUT_MEMBER_DATE_TIME,
  135    138   
        &XMLTIMESTAMPSOUTPUT_MEMBER_DATE_TIME_ON_TARGET,
  136    139   
        &XMLTIMESTAMPSOUTPUT_MEMBER_EPOCH_SECONDS,
  137    140   
        &XMLTIMESTAMPSOUTPUT_MEMBER_EPOCH_SECONDS_ON_TARGET,
  138    141   
        &XMLTIMESTAMPSOUTPUT_MEMBER_HTTP_DATE,
  139    142   
        &XMLTIMESTAMPSOUTPUT_MEMBER_HTTP_DATE_ON_TARGET,
  140    143   
    ],
  141    144   
);
  142    145   
impl XmlTimestampsOutput {
  143    146   
    /// The schema for this shape.
  144    147   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &XMLTIMESTAMPSOUTPUT_SCHEMA;
  145    148   
}
  146    149   
impl ::aws_smithy_schema::serde::SerializableStruct for XmlTimestampsOutput {
  147    150   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  148    151   
    fn serialize_members(
  149    152   
        &self,
  150    153   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  151    154   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  152    155   
        if let Some(ref val) = self.normal {
  153    156   
            ser.write_timestamp(&XMLTIMESTAMPSOUTPUT_MEMBER_NORMAL, val)?;
  154    157   
        }
  155    158   
        if let Some(ref val) = self.date_time {
  156    159   
            ser.write_timestamp(&XMLTIMESTAMPSOUTPUT_MEMBER_DATE_TIME, val)?;
  157    160   
        }
  158    161   
        if let Some(ref val) = self.date_time_on_target {
  159    162   
            ser.write_timestamp(&XMLTIMESTAMPSOUTPUT_MEMBER_DATE_TIME_ON_TARGET, val)?;
  160    163   
        }
  161    164   
        if let Some(ref val) = self.epoch_seconds {
  162    165   
            ser.write_timestamp(&XMLTIMESTAMPSOUTPUT_MEMBER_EPOCH_SECONDS, val)?;
  163    166   
        }
  164    167   
        if let Some(ref val) = self.epoch_seconds_on_target {
  165    168   
            ser.write_timestamp(&XMLTIMESTAMPSOUTPUT_MEMBER_EPOCH_SECONDS_ON_TARGET, val)?;
  166    169   
        }
  167    170   
        if let Some(ref val) = self.http_date {
  168    171   
            ser.write_timestamp(&XMLTIMESTAMPSOUTPUT_MEMBER_HTTP_DATE, val)?;
  169    172   
        }
  170    173   
        if let Some(ref val) = self.http_date_on_target {
  171    174   
            ser.write_timestamp(&XMLTIMESTAMPSOUTPUT_MEMBER_HTTP_DATE_ON_TARGET, val)?;
  172    175   
        }
  173    176   
        Ok(())
  174    177   
    }
  175    178   
}
  176    179   
impl XmlTimestampsOutput {
  177    180   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  178         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  179         -
        deserializer: &mut D,
         181  +
    pub fn deserialize(
         182  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  180    183   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  181    184   
        #[allow(unused_variables, unused_mut)]
  182    185   
        let mut builder = Self::builder();
  183    186   
        #[allow(
  184    187   
            unused_variables,
  185    188   
            unreachable_code,
  186    189   
            clippy::single_match,
  187    190   
            clippy::match_single_binding,
  188    191   
            clippy::diverging_sub_expression
  189    192   
        )]
  190         -
        deserializer.read_struct(&XMLTIMESTAMPSOUTPUT_SCHEMA, (), |_, member, deser| {
         193  +
        deserializer.read_struct(&XMLTIMESTAMPSOUTPUT_SCHEMA, &mut |member, deser| {
  191    194   
            match member.member_index() {
  192    195   
                Some(0) => {
  193    196   
                    builder.normal = Some(deser.read_timestamp(member)?);
  194    197   
                }
  195    198   
                Some(1) => {
  196    199   
                    builder.date_time = Some(deser.read_timestamp(member)?);
  197    200   
                }
  198    201   
                Some(2) => {
  199    202   
                    builder.date_time_on_target = Some(deser.read_timestamp(member)?);
  200    203   
                }
  201    204   
                Some(3) => {
  202    205   
                    builder.epoch_seconds = Some(deser.read_timestamp(member)?);
  203    206   
                }
  204    207   
                Some(4) => {
  205    208   
                    builder.epoch_seconds_on_target = Some(deser.read_timestamp(member)?);
  206    209   
                }
  207    210   
                Some(5) => {
  208    211   
                    builder.http_date = Some(deser.read_timestamp(member)?);
  209    212   
                }
  210    213   
                Some(6) => {
  211    214   
                    builder.http_date_on_target = Some(deser.read_timestamp(member)?);
  212    215   
                }
  213    216   
                _ => {}
  214    217   
            }
  215    218   
            Ok(())
  216    219   
        })?;
  217    220   
        Ok(builder.build())
  218    221   
    }
  219    222   
}
         223  +
impl XmlTimestampsOutput {
         224  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         225  +
    pub fn deserialize_with_response(
         226  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         227  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         228  +
        _status: u16,
         229  +
        _body: &[u8],
         230  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         231  +
        Self::deserialize(deserializer)
         232  +
    }
         233  +
}
  220    234   
impl XmlTimestampsOutput {
  221    235   
    /// Creates a new builder-style object to manufacture [`XmlTimestampsOutput`](crate::operation::xml_timestamps::XmlTimestampsOutput).
  222    236   
    pub fn builder() -> crate::operation::xml_timestamps::builders::XmlTimestampsOutputBuilder {
  223    237   
        crate::operation::xml_timestamps::builders::XmlTimestampsOutputBuilder::default()
  224    238   
    }
  225    239   
}
  226    240   
  227    241   
/// A builder for [`XmlTimestampsOutput`](crate::operation::xml_timestamps::XmlTimestampsOutput).
  228    242   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  229    243   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_complex_nested_error_data.rs

@@ -1,1 +106,117 @@
   17     17   
    "aws.protocoltests.query",
   18     18   
    "ComplexNestedErrorData",
   19     19   
);
   20     20   
static COMPLEXNESTEDERRORDATA_MEMBER_FOO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "aws.protocoltests.query#ComplexNestedErrorData$Foo",
   23     23   
        "aws.protocoltests.query",
   24     24   
        "ComplexNestedErrorData",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "foo",
          27  +
    "Foo",
   28     28   
    0,
   29     29   
);
   30     30   
static COMPLEXNESTEDERRORDATA_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    COMPLEXNESTEDERRORDATA_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&COMPLEXNESTEDERRORDATA_MEMBER_FOO],
   34     34   
);
   35     35   
impl ComplexNestedErrorData {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &COMPLEXNESTEDERRORDATA_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for ComplexNestedErrorData {
   40     40   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     41   
    fn serialize_members(
   42     42   
        &self,
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        if let Some(ref val) = self.foo {
   46     46   
            ser.write_string(&COMPLEXNESTEDERRORDATA_MEMBER_FOO, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl ComplexNestedErrorData {
   52     52   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          53  +
    pub fn deserialize(
          54  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     55   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     56   
        #[allow(unused_variables, unused_mut)]
   57     57   
        let mut builder = Self::builder();
   58     58   
        #[allow(
   59     59   
            unused_variables,
   60     60   
            unreachable_code,
   61     61   
            clippy::single_match,
   62     62   
            clippy::match_single_binding,
   63     63   
            clippy::diverging_sub_expression
   64     64   
        )]
   65         -
        deserializer.read_struct(&COMPLEXNESTEDERRORDATA_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&COMPLEXNESTEDERRORDATA_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.foo = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        Ok(builder.build())
   75     75   
    }
   76     76   
}
          77  +
impl ComplexNestedErrorData {
          78  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          79  +
    pub fn deserialize_with_response(
          80  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          81  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          82  +
        _status: u16,
          83  +
        _body: &[u8],
          84  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          85  +
        Self::deserialize(deserializer)
          86  +
    }
          87  +
}
   77     88   
impl ComplexNestedErrorData {
   78     89   
    /// Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::types::ComplexNestedErrorData).
   79     90   
    pub fn builder() -> crate::types::builders::ComplexNestedErrorDataBuilder {
   80     91   
        crate::types::builders::ComplexNestedErrorDataBuilder::default()
   81     92   
    }
   82     93   
}
   83     94   
   84     95   
/// A builder for [`ComplexNestedErrorData`](crate::types::ComplexNestedErrorData).
   85     96   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   86     97   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_greeting_struct.rs

@@ -16,16 +99,110 @@
   36     36   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   37     37   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   38     38   
        if let Some(ref val) = self.hi {
   39     39   
            ser.write_string(&GREETINGSTRUCT_MEMBER_HI, val)?;
   40     40   
        }
   41     41   
        Ok(())
   42     42   
    }
   43     43   
}
   44     44   
impl GreetingStruct {
   45     45   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   46         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   47         -
        deserializer: &mut D,
          46  +
    pub fn deserialize(
          47  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   48     48   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   49     49   
        #[allow(unused_variables, unused_mut)]
   50     50   
        let mut builder = Self::builder();
   51     51   
        #[allow(
   52     52   
            unused_variables,
   53     53   
            unreachable_code,
   54     54   
            clippy::single_match,
   55     55   
            clippy::match_single_binding,
   56     56   
            clippy::diverging_sub_expression
   57     57   
        )]
   58         -
        deserializer.read_struct(&GREETINGSTRUCT_SCHEMA, (), |_, member, deser| {
          58  +
        deserializer.read_struct(&GREETINGSTRUCT_SCHEMA, &mut |member, deser| {
   59     59   
            match member.member_index() {
   60     60   
                Some(0) => {
   61     61   
                    builder.hi = Some(deser.read_string(member)?);
   62     62   
                }
   63     63   
                _ => {}
   64     64   
            }
   65     65   
            Ok(())
   66     66   
        })?;
   67     67   
        Ok(builder.build())
   68     68   
    }
   69     69   
}
          70  +
impl GreetingStruct {
          71  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          72  +
    pub fn deserialize_with_response(
          73  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          74  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          75  +
        _status: u16,
          76  +
        _body: &[u8],
          77  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          78  +
        Self::deserialize(deserializer)
          79  +
    }
          80  +
}
   70     81   
impl GreetingStruct {
   71     82   
    /// Creates a new builder-style object to manufacture [`GreetingStruct`](crate::types::GreetingStruct).
   72     83   
    pub fn builder() -> crate::types::builders::GreetingStructBuilder {
   73     84   
        crate::types::builders::GreetingStructBuilder::default()
   74     85   
    }
   75     86   
}
   76     87   
   77     88   
/// A builder for [`GreetingStruct`](crate::types::GreetingStruct).
   78     89   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   79     90   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_nested_struct_with_list.rs

@@ -1,1 +126,127 @@
   19     19   
    "aws.protocoltests.query",
   20     20   
    "NestedStructWithList",
   21     21   
);
   22     22   
static NESTEDSTRUCTWITHLIST_MEMBER_LIST_ARG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   23     23   
    ::aws_smithy_schema::ShapeId::from_static(
   24     24   
        "aws.protocoltests.query#NestedStructWithList$ListArg",
   25     25   
        "aws.protocoltests.query",
   26     26   
        "NestedStructWithList",
   27     27   
    ),
   28     28   
    ::aws_smithy_schema::ShapeType::List,
   29         -
    "list_arg",
          29  +
    "ListArg",
   30     30   
    0,
   31     31   
);
   32     32   
static NESTEDSTRUCTWITHLIST_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   33     33   
    NESTEDSTRUCTWITHLIST_SCHEMA_ID,
   34     34   
    ::aws_smithy_schema::ShapeType::Structure,
   35     35   
    &[&NESTEDSTRUCTWITHLIST_MEMBER_LIST_ARG],
   36     36   
);
   37     37   
impl NestedStructWithList {
   38     38   
    /// The schema for this shape.
   39     39   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &NESTEDSTRUCTWITHLIST_SCHEMA;
   40     40   
}
   41     41   
impl ::aws_smithy_schema::serde::SerializableStruct for NestedStructWithList {
   42     42   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   43     43   
    fn serialize_members(
   44     44   
        &self,
   45     45   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   46     46   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   47     47   
        if let Some(ref val) = self.list_arg {
   48     48   
            ser.write_list(
   49     49   
                &NESTEDSTRUCTWITHLIST_MEMBER_LIST_ARG,
   50     50   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   51     51   
                    for item in val {
   52     52   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
   53     53   
                    }
   54     54   
                    Ok(())
   55     55   
                },
   56     56   
            )?;
   57     57   
        }
   58     58   
        Ok(())
   59     59   
    }
   60     60   
}
   61     61   
impl NestedStructWithList {
   62     62   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   63         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   64         -
        deserializer: &mut D,
          63  +
    pub fn deserialize(
          64  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   65     65   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   66     66   
        #[allow(unused_variables, unused_mut)]
   67     67   
        let mut builder = Self::builder();
   68     68   
        #[allow(
   69     69   
            unused_variables,
   70     70   
            unreachable_code,
   71     71   
            clippy::single_match,
   72     72   
            clippy::match_single_binding,
   73     73   
            clippy::diverging_sub_expression
   74     74   
        )]
   75         -
        deserializer.read_struct(&NESTEDSTRUCTWITHLIST_SCHEMA, (), |_, member, deser| {
          75  +
        deserializer.read_struct(&NESTEDSTRUCTWITHLIST_SCHEMA, &mut |member, deser| {
   76     76   
            match member.member_index() {
   77     77   
                Some(0) => {
   78         -
                    builder.list_arg = Some({
   79         -
                        let container = if let Some(cap) = deser.container_size() {
   80         -
                            Vec::with_capacity(cap)
   81         -
                        } else {
   82         -
                            Vec::new()
   83         -
                        };
   84         -
                        deser.read_list(member, container, |mut list, deser| {
   85         -
                            list.push(deser.read_string(member)?);
   86         -
                            Ok(list)
   87         -
                        })?
   88         -
                    });
          78  +
                    builder.list_arg = Some(deser.read_string_list(member)?);
   89     79   
                }
   90     80   
                _ => {}
   91     81   
            }
   92     82   
            Ok(())
   93     83   
        })?;
   94     84   
        Ok(builder.build())
   95     85   
    }
   96     86   
}
          87  +
impl NestedStructWithList {
          88  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          89  +
    pub fn deserialize_with_response(
          90  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          91  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          92  +
        _status: u16,
          93  +
        _body: &[u8],
          94  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          95  +
        Self::deserialize(deserializer)
          96  +
    }
          97  +
}
   97     98   
impl NestedStructWithList {
   98     99   
    /// Creates a new builder-style object to manufacture [`NestedStructWithList`](crate::types::NestedStructWithList).
   99    100   
    pub fn builder() -> crate::types::builders::NestedStructWithListBuilder {
  100    101   
        crate::types::builders::NestedStructWithListBuilder::default()
  101    102   
    }
  102    103   
}
  103    104   
  104    105   
/// A builder for [`NestedStructWithList`](crate::types::NestedStructWithList).
  105    106   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  106    107   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_nested_struct_with_map.rs

@@ -1,1 +125,126 @@
   17     17   
    "aws.protocoltests.query",
   18     18   
    "NestedStructWithMap",
   19     19   
);
   20     20   
static NESTEDSTRUCTWITHMAP_MEMBER_MAP_ARG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "aws.protocoltests.query#NestedStructWithMap$MapArg",
   23     23   
        "aws.protocoltests.query",
   24     24   
        "NestedStructWithMap",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Map,
   27         -
    "map_arg",
          27  +
    "MapArg",
   28     28   
    0,
   29     29   
);
   30     30   
static NESTEDSTRUCTWITHMAP_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    NESTEDSTRUCTWITHMAP_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&NESTEDSTRUCTWITHMAP_MEMBER_MAP_ARG],
   34     34   
);
   35     35   
impl NestedStructWithMap {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &NESTEDSTRUCTWITHMAP_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for NestedStructWithMap {
   40     40   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     41   
    fn serialize_members(
   42     42   
        &self,
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        if let Some(ref val) = self.map_arg {
   46     46   
            ser.write_map(
   47     47   
                &NESTEDSTRUCTWITHMAP_MEMBER_MAP_ARG,
   48     48   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   49     49   
                    for (key, value) in val {
   50     50   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
   51     51   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
   52     52   
                    }
   53     53   
                    Ok(())
   54     54   
                },
   55     55   
            )?;
   56     56   
        }
   57     57   
        Ok(())
   58     58   
    }
   59     59   
}
   60     60   
impl NestedStructWithMap {
   61     61   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   62         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   63         -
        deserializer: &mut D,
          62  +
    pub fn deserialize(
          63  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   64     64   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   65     65   
        #[allow(unused_variables, unused_mut)]
   66     66   
        let mut builder = Self::builder();
   67     67   
        #[allow(
   68     68   
            unused_variables,
   69     69   
            unreachable_code,
   70     70   
            clippy::single_match,
   71     71   
            clippy::match_single_binding,
   72     72   
            clippy::diverging_sub_expression
   73     73   
        )]
   74         -
        deserializer.read_struct(&NESTEDSTRUCTWITHMAP_SCHEMA, (), |_, member, deser| {
          74  +
        deserializer.read_struct(&NESTEDSTRUCTWITHMAP_SCHEMA, &mut |member, deser| {
   75     75   
            match member.member_index() {
   76     76   
                Some(0) => {
   77         -
                    builder.map_arg = Some({
   78         -
                        let container = if let Some(cap) = deser.container_size() {
   79         -
                            std::collections::HashMap::with_capacity(cap)
   80         -
                        } else {
   81         -
                            std::collections::HashMap::new()
   82         -
                        };
   83         -
                        deser.read_map(member, container, |mut map, key, deser| {
   84         -
                            map.insert(key, deser.read_string(member)?);
   85         -
                            Ok(map)
   86         -
                        })?
   87         -
                    });
          77  +
                    builder.map_arg = Some(deser.read_string_string_map(member)?);
   88     78   
                }
   89     79   
                _ => {}
   90     80   
            }
   91     81   
            Ok(())
   92     82   
        })?;
   93     83   
        Ok(builder.build())
   94     84   
    }
   95     85   
}
          86  +
impl NestedStructWithMap {
          87  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          88  +
    pub fn deserialize_with_response(
          89  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          90  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          91  +
        _status: u16,
          92  +
        _body: &[u8],
          93  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          94  +
        Self::deserialize(deserializer)
          95  +
    }
          96  +
}
   96     97   
impl NestedStructWithMap {
   97     98   
    /// Creates a new builder-style object to manufacture [`NestedStructWithMap`](crate::types::NestedStructWithMap).
   98     99   
    pub fn builder() -> crate::types::builders::NestedStructWithMapBuilder {
   99    100   
        crate::types::builders::NestedStructWithMapBuilder::default()
  100    101   
    }
  101    102   
}
  102    103   
  103    104   
/// A builder for [`NestedStructWithMap`](crate::types::NestedStructWithMap).
  104    105   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  105    106   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_recursive_xml_shapes_output_nested1.rs

@@ -45,45 +131,142 @@
   65     65   
            ser.write_string(&RECURSIVEXMLSHAPESOUTPUTNESTED1_MEMBER_FOO, val)?;
   66     66   
        }
   67     67   
        if let Some(ref val) = self.nested {
   68     68   
            ser.write_struct(&RECURSIVEXMLSHAPESOUTPUTNESTED1_MEMBER_NESTED, val)?;
   69     69   
        }
   70     70   
        Ok(())
   71     71   
    }
   72     72   
}
   73     73   
impl RecursiveXmlShapesOutputNested1 {
   74     74   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   75         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   76         -
        deserializer: &mut D,
          75  +
    pub fn deserialize(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   77     77   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   78     78   
        #[allow(unused_variables, unused_mut)]
   79     79   
        let mut builder = Self::builder();
   80     80   
        #[allow(
   81     81   
            unused_variables,
   82     82   
            unreachable_code,
   83     83   
            clippy::single_match,
   84     84   
            clippy::match_single_binding,
   85     85   
            clippy::diverging_sub_expression
   86     86   
        )]
   87         -
        deserializer.read_struct(&RECURSIVEXMLSHAPESOUTPUTNESTED1_SCHEMA, (), |_, member, deser| {
          87  +
        deserializer.read_struct(&RECURSIVEXMLSHAPESOUTPUTNESTED1_SCHEMA, &mut |member, deser| {
   88     88   
            match member.member_index() {
   89     89   
                Some(0) => {
   90     90   
                    builder.foo = Some(deser.read_string(member)?);
   91     91   
                }
   92     92   
                Some(1) => {
   93     93   
                    builder.nested = Some(Box::new(crate::types::RecursiveXmlShapesOutputNested2::deserialize(deser)?));
   94     94   
                }
   95     95   
                _ => {}
   96     96   
            }
   97     97   
            Ok(())
   98     98   
        })?;
   99     99   
        Ok(builder.build())
  100    100   
    }
  101    101   
}
         102  +
impl RecursiveXmlShapesOutputNested1 {
         103  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         104  +
    pub fn deserialize_with_response(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         106  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         107  +
        _status: u16,
         108  +
        _body: &[u8],
         109  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         110  +
        Self::deserialize(deserializer)
         111  +
    }
         112  +
}
  102    113   
impl RecursiveXmlShapesOutputNested1 {
  103    114   
    /// Creates a new builder-style object to manufacture [`RecursiveXmlShapesOutputNested1`](crate::types::RecursiveXmlShapesOutputNested1).
  104    115   
    pub fn builder() -> crate::types::builders::RecursiveXmlShapesOutputNested1Builder {
  105    116   
        crate::types::builders::RecursiveXmlShapesOutputNested1Builder::default()
  106    117   
    }
  107    118   
}
  108    119   
  109    120   
/// A builder for [`RecursiveXmlShapesOutputNested1`](crate::types::RecursiveXmlShapesOutputNested1).
  110    121   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  111    122   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_recursive_xml_shapes_output_nested2.rs

@@ -13,13 +131,142 @@
   33     33   
    "bar",
   34     34   
    0,
   35     35   
);
   36     36   
static RECURSIVEXMLSHAPESOUTPUTNESTED2_MEMBER_RECURSIVE_MEMBER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   37     37   
    ::aws_smithy_schema::ShapeId::from_static(
   38     38   
        "aws.protocoltests.query#RecursiveXmlShapesOutputNested2$recursiveMember",
   39     39   
        "aws.protocoltests.query",
   40     40   
        "RecursiveXmlShapesOutputNested2",
   41     41   
    ),
   42     42   
    ::aws_smithy_schema::ShapeType::Structure,
   43         -
    "recursive_member",
          43  +
    "recursiveMember",
   44     44   
    1,
   45     45   
);
   46     46   
static RECURSIVEXMLSHAPESOUTPUTNESTED2_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   47     47   
    RECURSIVEXMLSHAPESOUTPUTNESTED2_SCHEMA_ID,
   48     48   
    ::aws_smithy_schema::ShapeType::Structure,
   49     49   
    &[
   50     50   
        &RECURSIVEXMLSHAPESOUTPUTNESTED2_MEMBER_BAR,
   51     51   
        &RECURSIVEXMLSHAPESOUTPUTNESTED2_MEMBER_RECURSIVE_MEMBER,
   52     52   
    ],
   53     53   
);
   54     54   
impl RecursiveXmlShapesOutputNested2 {
   55     55   
    /// The schema for this shape.
   56     56   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &RECURSIVEXMLSHAPESOUTPUTNESTED2_SCHEMA;
   57     57   
}
   58     58   
impl ::aws_smithy_schema::serde::SerializableStruct for RecursiveXmlShapesOutputNested2 {
   59     59   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   60     60   
    fn serialize_members(
   61     61   
        &self,
   62     62   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   63     63   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   64     64   
        if let Some(ref val) = self.bar {
   65     65   
            ser.write_string(&RECURSIVEXMLSHAPESOUTPUTNESTED2_MEMBER_BAR, val)?;
   66     66   
        }
   67     67   
        if let Some(ref val) = self.recursive_member {
   68     68   
            ser.write_struct(&RECURSIVEXMLSHAPESOUTPUTNESTED2_MEMBER_RECURSIVE_MEMBER, val)?;
   69     69   
        }
   70     70   
        Ok(())
   71     71   
    }
   72     72   
}
   73     73   
impl RecursiveXmlShapesOutputNested2 {
   74     74   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   75         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   76         -
        deserializer: &mut D,
          75  +
    pub fn deserialize(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   77     77   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   78     78   
        #[allow(unused_variables, unused_mut)]
   79     79   
        let mut builder = Self::builder();
   80     80   
        #[allow(
   81     81   
            unused_variables,
   82     82   
            unreachable_code,
   83     83   
            clippy::single_match,
   84     84   
            clippy::match_single_binding,
   85     85   
            clippy::diverging_sub_expression
   86     86   
        )]
   87         -
        deserializer.read_struct(&RECURSIVEXMLSHAPESOUTPUTNESTED2_SCHEMA, (), |_, member, deser| {
          87  +
        deserializer.read_struct(&RECURSIVEXMLSHAPESOUTPUTNESTED2_SCHEMA, &mut |member, deser| {
   88     88   
            match member.member_index() {
   89     89   
                Some(0) => {
   90     90   
                    builder.bar = Some(deser.read_string(member)?);
   91     91   
                }
   92     92   
                Some(1) => {
   93     93   
                    builder.recursive_member = Some(crate::types::RecursiveXmlShapesOutputNested1::deserialize(deser)?);
   94     94   
                }
   95     95   
                _ => {}
   96     96   
            }
   97     97   
            Ok(())
   98     98   
        })?;
   99     99   
        Ok(builder.build())
  100    100   
    }
  101    101   
}
         102  +
impl RecursiveXmlShapesOutputNested2 {
         103  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         104  +
    pub fn deserialize_with_response(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         106  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         107  +
        _status: u16,
         108  +
        _body: &[u8],
         109  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         110  +
        Self::deserialize(deserializer)
         111  +
    }
         112  +
}
  102    113   
impl RecursiveXmlShapesOutputNested2 {
  103    114   
    /// Creates a new builder-style object to manufacture [`RecursiveXmlShapesOutputNested2`](crate::types::RecursiveXmlShapesOutputNested2).
  104    115   
    pub fn builder() -> crate::types::builders::RecursiveXmlShapesOutputNested2Builder {
  105    116   
        crate::types::builders::RecursiveXmlShapesOutputNested2Builder::default()
  106    117   
    }
  107    118   
}
  108    119   
  109    120   
/// A builder for [`RecursiveXmlShapesOutputNested2`](crate::types::RecursiveXmlShapesOutputNested2).
  110    121   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  111    122   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_struct_arg.rs

@@ -2,2 +135,146 @@
   22     22   
    #[allow(missing_docs)] // documentation missing in model
   23     23   
    pub fn recursive_arg(&self) -> ::std::option::Option<&crate::types::StructArg> {
   24     24   
        self.recursive_arg.as_deref()
   25     25   
    }
   26     26   
}
   27     27   
static STRUCTARG_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
   28     28   
    ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.query#StructArg", "aws.protocoltests.query", "StructArg");
   29     29   
static STRUCTARG_MEMBER_STRING_ARG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   30     30   
    ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.query#StructArg$StringArg", "aws.protocoltests.query", "StructArg"),
   31     31   
    ::aws_smithy_schema::ShapeType::String,
   32         -
    "string_arg",
          32  +
    "StringArg",
   33     33   
    0,
   34     34   
);
   35     35   
static STRUCTARG_MEMBER_OTHER_ARG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   36     36   
    ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.query#StructArg$OtherArg", "aws.protocoltests.query", "StructArg"),
   37     37   
    ::aws_smithy_schema::ShapeType::Boolean,
   38         -
    "other_arg",
          38  +
    "OtherArg",
   39     39   
    1,
   40     40   
);
   41     41   
static STRUCTARG_MEMBER_RECURSIVE_ARG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   42     42   
    ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.query#StructArg$RecursiveArg", "aws.protocoltests.query", "StructArg"),
   43     43   
    ::aws_smithy_schema::ShapeType::Structure,
   44         -
    "recursive_arg",
          44  +
    "RecursiveArg",
   45     45   
    2,
   46     46   
);
   47     47   
static STRUCTARG_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   48     48   
    STRUCTARG_SCHEMA_ID,
   49     49   
    ::aws_smithy_schema::ShapeType::Structure,
   50     50   
    &[&STRUCTARG_MEMBER_STRING_ARG, &STRUCTARG_MEMBER_OTHER_ARG, &STRUCTARG_MEMBER_RECURSIVE_ARG],
   51     51   
);
   52     52   
impl StructArg {
   53     53   
    /// The schema for this shape.
   54     54   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STRUCTARG_SCHEMA;
   55     55   
}
   56     56   
impl ::aws_smithy_schema::serde::SerializableStruct for StructArg {
   57     57   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   58     58   
    fn serialize_members(
   59     59   
        &self,
   60     60   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   61     61   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   62     62   
        if let Some(ref val) = self.string_arg {
   63     63   
            ser.write_string(&STRUCTARG_MEMBER_STRING_ARG, val)?;
   64     64   
        }
   65     65   
        if let Some(ref val) = self.other_arg {
   66     66   
            ser.write_boolean(&STRUCTARG_MEMBER_OTHER_ARG, *val)?;
   67     67   
        }
   68     68   
        if let Some(ref val) = self.recursive_arg {
   69     69   
            ser.write_struct(&STRUCTARG_MEMBER_RECURSIVE_ARG, val)?;
   70     70   
        }
   71     71   
        Ok(())
   72     72   
    }
   73     73   
}
   74     74   
impl StructArg {
   75     75   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   76         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   77         -
        deserializer: &mut D,
          76  +
    pub fn deserialize(
          77  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   78     78   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   79     79   
        #[allow(unused_variables, unused_mut)]
   80     80   
        let mut builder = Self::builder();
   81     81   
        #[allow(
   82     82   
            unused_variables,
   83     83   
            unreachable_code,
   84     84   
            clippy::single_match,
   85     85   
            clippy::match_single_binding,
   86     86   
            clippy::diverging_sub_expression
   87     87   
        )]
   88         -
        deserializer.read_struct(&STRUCTARG_SCHEMA, (), |_, member, deser| {
          88  +
        deserializer.read_struct(&STRUCTARG_SCHEMA, &mut |member, deser| {
   89     89   
            match member.member_index() {
   90     90   
                Some(0) => {
   91     91   
                    builder.string_arg = Some(deser.read_string(member)?);
   92     92   
                }
   93     93   
                Some(1) => {
   94     94   
                    builder.other_arg = Some(deser.read_boolean(member)?);
   95     95   
                }
   96     96   
                Some(2) => {
   97     97   
                    builder.recursive_arg = Some(Box::new(crate::types::StructArg::deserialize(deser)?));
   98     98   
                }
   99     99   
                _ => {}
  100    100   
            }
  101    101   
            Ok(())
  102    102   
        })?;
  103    103   
        Ok(builder.build())
  104    104   
    }
  105    105   
}
         106  +
impl StructArg {
         107  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         108  +
    pub fn deserialize_with_response(
         109  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         110  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         111  +
        _status: u16,
         112  +
        _body: &[u8],
         113  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         114  +
        Self::deserialize(deserializer)
         115  +
    }
         116  +
}
  106    117   
impl StructArg {
  107    118   
    /// Creates a new builder-style object to manufacture [`StructArg`](crate::types::StructArg).
  108    119   
    pub fn builder() -> crate::types::builders::StructArgBuilder {
  109    120   
        crate::types::builders::StructArgBuilder::default()
  110    121   
    }
  111    122   
}
  112    123   
  113    124   
/// A builder for [`StructArg`](crate::types::StructArg).
  114    125   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  115    126   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_structure_list_member.rs

@@ -44,44 +130,141 @@
   64     64   
            ser.write_string(&STRUCTURELISTMEMBER_MEMBER_A, val)?;
   65     65   
        }
   66     66   
        if let Some(ref val) = self.b {
   67     67   
            ser.write_string(&STRUCTURELISTMEMBER_MEMBER_B, val)?;
   68     68   
        }
   69     69   
        Ok(())
   70     70   
    }
   71     71   
}
   72     72   
impl StructureListMember {
   73     73   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   74         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   75         -
        deserializer: &mut D,
          74  +
    pub fn deserialize(
          75  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   76     76   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   77     77   
        #[allow(unused_variables, unused_mut)]
   78     78   
        let mut builder = Self::builder();
   79     79   
        #[allow(
   80     80   
            unused_variables,
   81     81   
            unreachable_code,
   82     82   
            clippy::single_match,
   83     83   
            clippy::match_single_binding,
   84     84   
            clippy::diverging_sub_expression
   85     85   
        )]
   86         -
        deserializer.read_struct(&STRUCTURELISTMEMBER_SCHEMA, (), |_, member, deser| {
          86  +
        deserializer.read_struct(&STRUCTURELISTMEMBER_SCHEMA, &mut |member, deser| {
   87     87   
            match member.member_index() {
   88     88   
                Some(0) => {
   89     89   
                    builder.a = Some(deser.read_string(member)?);
   90     90   
                }
   91     91   
                Some(1) => {
   92     92   
                    builder.b = Some(deser.read_string(member)?);
   93     93   
                }
   94     94   
                _ => {}
   95     95   
            }
   96     96   
            Ok(())
   97     97   
        })?;
   98     98   
        Ok(builder.build())
   99     99   
    }
  100    100   
}
         101  +
impl StructureListMember {
         102  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         103  +
    pub fn deserialize_with_response(
         104  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         105  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         106  +
        _status: u16,
         107  +
        _body: &[u8],
         108  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         109  +
        Self::deserialize(deserializer)
         110  +
    }
         111  +
}
  101    112   
impl StructureListMember {
  102    113   
    /// Creates a new builder-style object to manufacture [`StructureListMember`](crate::types::StructureListMember).
  103    114   
    pub fn builder() -> crate::types::builders::StructureListMemberBuilder {
  104    115   
        crate::types::builders::StructureListMemberBuilder::default()
  105    116   
    }
  106    117   
}
  107    118   
  108    119   
/// A builder for [`StructureListMember`](crate::types::StructureListMember).
  109    120   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  110    121   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/_xml_namespace_nested.rs

@@ -55,55 +151,152 @@
   75     75   
                    }
   76     76   
                    Ok(())
   77     77   
                },
   78     78   
            )?;
   79     79   
        }
   80     80   
        Ok(())
   81     81   
    }
   82     82   
}
   83     83   
impl XmlNamespaceNested {
   84     84   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   85         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   86         -
        deserializer: &mut D,
          85  +
    pub fn deserialize(
          86  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   87     87   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   88     88   
        #[allow(unused_variables, unused_mut)]
   89     89   
        let mut builder = Self::builder();
   90     90   
        #[allow(
   91     91   
            unused_variables,
   92     92   
            unreachable_code,
   93     93   
            clippy::single_match,
   94     94   
            clippy::match_single_binding,
   95     95   
            clippy::diverging_sub_expression
   96     96   
        )]
   97         -
        deserializer.read_struct(&XMLNAMESPACENESTED_SCHEMA, (), |_, member, deser| {
          97  +
        deserializer.read_struct(&XMLNAMESPACENESTED_SCHEMA, &mut |member, deser| {
   98     98   
            match member.member_index() {
   99     99   
                Some(0) => {
  100    100   
                    builder.foo = Some(deser.read_string(member)?);
  101    101   
                }
  102    102   
                Some(1) => {
  103         -
                    builder.values = Some({
  104         -
                        let container = if let Some(cap) = deser.container_size() {
  105         -
                            Vec::with_capacity(cap)
  106         -
                        } else {
  107         -
                            Vec::new()
  108         -
                        };
  109         -
                        deser.read_list(member, container, |mut list, deser| {
  110         -
                            list.push(deser.read_string(member)?);
  111         -
                            Ok(list)
  112         -
                        })?
  113         -
                    });
         103  +
                    builder.values = Some(deser.read_string_list(member)?);
  114    104   
                }
  115    105   
                _ => {}
  116    106   
            }
  117    107   
            Ok(())
  118    108   
        })?;
  119    109   
        Ok(builder.build())
  120    110   
    }
  121    111   
}
         112  +
impl XmlNamespaceNested {
         113  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         114  +
    pub fn deserialize_with_response(
         115  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         116  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         117  +
        _status: u16,
         118  +
        _body: &[u8],
         119  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         120  +
        Self::deserialize(deserializer)
         121  +
    }
         122  +
}
  122    123   
impl XmlNamespaceNested {
  123    124   
    /// Creates a new builder-style object to manufacture [`XmlNamespaceNested`](crate::types::XmlNamespaceNested).
  124    125   
    pub fn builder() -> crate::types::builders::XmlNamespaceNestedBuilder {
  125    126   
        crate::types::builders::XmlNamespaceNestedBuilder::default()
  126    127   
    }
  127    128   
}
  128    129   
  129    130   
/// A builder for [`XmlNamespaceNested`](crate::types::XmlNamespaceNested).
  130    131   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  131    132   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/error/_complex_error.rs

@@ -1,1 +119,130 @@
   18     18   
    #[allow(missing_docs)] // documentation missing in model
   19     19   
    pub fn nested(&self) -> ::std::option::Option<&crate::types::ComplexNestedErrorData> {
   20     20   
        self.nested.as_ref()
   21     21   
    }
   22     22   
}
   23     23   
static COMPLEXERROR_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
   24     24   
    ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.query#ComplexError", "aws.protocoltests.query", "ComplexError");
   25     25   
static COMPLEXERROR_MEMBER_TOP_LEVEL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   26     26   
    ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.query#ComplexError$TopLevel", "aws.protocoltests.query", "ComplexError"),
   27     27   
    ::aws_smithy_schema::ShapeType::String,
   28         -
    "top_level",
          28  +
    "TopLevel",
   29     29   
    0,
   30     30   
);
   31     31   
static COMPLEXERROR_MEMBER_NESTED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   32     32   
    ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.query#ComplexError$Nested", "aws.protocoltests.query", "ComplexError"),
   33     33   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    "nested",
          34  +
    "Nested",
   35     35   
    1,
   36     36   
);
   37     37   
static COMPLEXERROR_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   38     38   
    COMPLEXERROR_SCHEMA_ID,
   39     39   
    ::aws_smithy_schema::ShapeType::Structure,
   40     40   
    &[&COMPLEXERROR_MEMBER_TOP_LEVEL, &COMPLEXERROR_MEMBER_NESTED],
   41     41   
);
   42     42   
impl ComplexError {
   43     43   
    /// The schema for this shape.
   44     44   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &COMPLEXERROR_SCHEMA;
   45     45   
}
   46     46   
impl ::aws_smithy_schema::serde::SerializableStruct for ComplexError {
   47     47   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   48     48   
    fn serialize_members(
   49     49   
        &self,
   50     50   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   51     51   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   52     52   
        if let Some(ref val) = self.top_level {
   53     53   
            ser.write_string(&COMPLEXERROR_MEMBER_TOP_LEVEL, val)?;
   54     54   
        }
   55     55   
        if let Some(ref val) = self.nested {
   56     56   
            ser.write_struct(&COMPLEXERROR_MEMBER_NESTED, val)?;
   57     57   
        }
   58     58   
        Ok(())
   59     59   
    }
   60     60   
}
   61     61   
impl ComplexError {
   62     62   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   63         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   64         -
        deserializer: &mut D,
          63  +
    pub fn deserialize(
          64  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   65     65   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   66     66   
        #[allow(unused_variables, unused_mut)]
   67     67   
        let mut builder = Self::builder();
   68     68   
        #[allow(
   69     69   
            unused_variables,
   70     70   
            unreachable_code,
   71     71   
            clippy::single_match,
   72     72   
            clippy::match_single_binding,
   73     73   
            clippy::diverging_sub_expression
   74     74   
        )]
   75         -
        deserializer.read_struct(&COMPLEXERROR_SCHEMA, (), |_, member, deser| {
          75  +
        deserializer.read_struct(&COMPLEXERROR_SCHEMA, &mut |member, deser| {
   76     76   
            match member.member_index() {
   77     77   
                Some(0) => {
   78     78   
                    builder.top_level = Some(deser.read_string(member)?);
   79     79   
                }
   80     80   
                Some(1) => {
   81     81   
                    builder.nested = Some(crate::types::ComplexNestedErrorData::deserialize(deser)?);
   82     82   
                }
   83     83   
                _ => {}
   84     84   
            }
   85     85   
            Ok(())
   86     86   
        })?;
   87     87   
        Ok(builder.build())
   88     88   
    }
   89     89   
}
          90  +
impl ComplexError {
          91  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          92  +
    pub fn deserialize_with_response(
          93  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          94  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          95  +
        _status: u16,
          96  +
        _body: &[u8],
          97  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          98  +
        Self::deserialize(deserializer)
          99  +
    }
         100  +
}
   90    101   
impl ComplexError {}
   91    102   
impl ::std::fmt::Display for ComplexError {
   92    103   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   93    104   
        ::std::write!(f, "ComplexError")?;
   94    105   
        Ok(())
   95    106   
    }
   96    107   
}
   97    108   
impl ::std::error::Error for ComplexError {}
   98    109   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ComplexError {
   99    110   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/types/error/_custom_code_error.rs

@@ -1,1 +107,118 @@
    9      9   
}
   10     10   
static CUSTOMCODEERROR_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
   11     11   
    ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.query#CustomCodeError", "aws.protocoltests.query", "CustomCodeError");
   12     12   
static CUSTOMCODEERROR_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   13     13   
    ::aws_smithy_schema::ShapeId::from_static(
   14     14   
        "aws.protocoltests.query#CustomCodeError$Message",
   15     15   
        "aws.protocoltests.query",
   16     16   
        "CustomCodeError",
   17     17   
    ),
   18     18   
    ::aws_smithy_schema::ShapeType::String,
   19         -
    "message",
          19  +
    "Message",
   20     20   
    0,
   21     21   
);
   22     22   
static CUSTOMCODEERROR_TRAITS: std::sync::LazyLock<::aws_smithy_schema::TraitMap> = std::sync::LazyLock::new(|| {
   23     23   
    let mut map = ::aws_smithy_schema::TraitMap::new();
   24     24   
    map.insert(Box::new(::aws_smithy_schema::DocumentTrait::new(
   25     25   
        ::aws_smithy_schema::ShapeId::from_static("aws.protocols#awsQueryError", "aws.protocols", "awsQueryError"),
   26     26   
        ::aws_smithy_types::Document::String("{\"code\":\"Customized\",\"httpResponseCode\":402}".to_string()),
   27     27   
    )));
   28     28   
    map
   29     29   
});
   30     30   
static CUSTOMCODEERROR_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    CUSTOMCODEERROR_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&CUSTOMCODEERROR_MEMBER_MESSAGE],
   34     34   
)
   35     35   
.with_traits(&CUSTOMCODEERROR_TRAITS);
   36     36   
impl CustomCodeError {
   37     37   
    /// The schema for this shape.
   38     38   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CUSTOMCODEERROR_SCHEMA;
   39     39   
}
   40     40   
impl ::aws_smithy_schema::serde::SerializableStruct for CustomCodeError {
   41     41   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   42     42   
    fn serialize_members(
   43     43   
        &self,
   44     44   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     45   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     46   
        if let Some(ref val) = self.message {
   47     47   
            ser.write_string(&CUSTOMCODEERROR_MEMBER_MESSAGE, val)?;
   48     48   
        }
   49     49   
        Ok(())
   50     50   
    }
   51     51   
}
   52     52   
impl CustomCodeError {
   53     53   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          54  +
    pub fn deserialize(
          55  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     56   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     57   
        #[allow(unused_variables, unused_mut)]
   58     58   
        let mut builder = Self::builder();
   59     59   
        #[allow(
   60     60   
            unused_variables,
   61     61   
            unreachable_code,
   62     62   
            clippy::single_match,
   63     63   
            clippy::match_single_binding,
   64     64   
            clippy::diverging_sub_expression
   65     65   
        )]
   66         -
        deserializer.read_struct(&CUSTOMCODEERROR_SCHEMA, (), |_, member, deser| {
          66  +
        deserializer.read_struct(&CUSTOMCODEERROR_SCHEMA, &mut |member, deser| {
   67     67   
            match member.member_index() {
   68     68   
                Some(0) => {
   69     69   
                    builder.message = Some(deser.read_string(member)?);
   70     70   
                }
   71     71   
                _ => {}
   72     72   
            }
   73     73   
            Ok(())
   74     74   
        })?;
   75     75   
        Ok(builder.build())
   76     76   
    }
   77     77   
}
          78  +
impl CustomCodeError {
          79  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          80  +
    pub fn deserialize_with_response(
          81  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          82  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          83  +
        _status: u16,
          84  +
        _body: &[u8],
          85  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          86  +
        Self::deserialize(deserializer)
          87  +
    }
          88  +
}
   78     89   
impl CustomCodeError {
   79     90   
    /// Returns the error message.
   80     91   
    pub fn message(&self) -> ::std::option::Option<&str> {
   81     92   
        self.message.as_deref()
   82     93   
    }
   83     94   
}
   84     95   
impl ::std::fmt::Display for CustomCodeError {
   85     96   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   86     97   
        ::std::write!(f, "CustomCodeError")?;
   87     98   
        if let ::std::option::Option::Some(inner_1) = &self.message {