Client Test

Client Test

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

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

@@ -1,1 +126,134 @@
   17     17   
    "aws.protocoltests.query.synthetic",
   18     18   
    "FlattenedXmlMapOutput",
   19     19   
);
   20     20   
static FLATTENEDXMLMAPOUTPUT_MEMBER_MY_MAP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "aws.protocoltests.query.synthetic#FlattenedXmlMapOutput$myMap",
   23     23   
        "aws.protocoltests.query.synthetic",
   24     24   
        "FlattenedXmlMapOutput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Map,
   27         -
    "my_map",
          27  +
    "myMap",
   28     28   
    0,
   29     29   
)
   30     30   
.with_xml_flattened();
   31     31   
static FLATTENEDXMLMAPOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     32   
    FLATTENEDXMLMAPOUTPUT_SCHEMA_ID,
   33     33   
    ::aws_smithy_schema::ShapeType::Structure,
   34     34   
    &[&FLATTENEDXMLMAPOUTPUT_MEMBER_MY_MAP],
   35     35   
);
   36     36   
impl FlattenedXmlMapOutput {
   37     37   
    /// The schema for this shape.
   38     38   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &FLATTENEDXMLMAPOUTPUT_SCHEMA;
   39     39   
}
   40     40   
impl ::aws_smithy_schema::serde::SerializableStruct for FlattenedXmlMapOutput {
   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.my_map {
   47     47   
            ser.write_map(
   48     48   
                &FLATTENEDXMLMAPOUTPUT_MEMBER_MY_MAP,
   49     49   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   50     50   
                    for (key, value) in val {
   51     51   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
   52     52   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value.as_str())?;
   53     53   
                    }
   54     54   
                    Ok(())
   55     55   
                },
   56     56   
            )?;
   57     57   
        }
   58     58   
        Ok(())
   59     59   
    }
   60     60   
}
   61     61   
impl FlattenedXmlMapOutput {
   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(&FLATTENEDXMLMAPOUTPUT_SCHEMA, (), |_, member, deser| {
          75  +
        deserializer.read_struct(&FLATTENEDXMLMAPOUTPUT_SCHEMA, &mut |member, deser| {
   76     76   
            match member.member_index() {
   77     77   
                Some(0) => {
   78     78   
                    builder.my_map = Some({
   79         -
                        let container = if let Some(cap) = deser.container_size() {
   80         -
                            std::collections::HashMap::with_capacity(cap)
   81         -
                        } else {
   82         -
                            std::collections::HashMap::new()
   83         -
                        };
   84         -
                        deser.read_map(member, container, |mut map, key, deser| {
   85         -
                            map.insert(key, crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
   86         -
                            Ok(map)
   87         -
                        })?
          79  +
                        let mut container = std::collections::HashMap::new();
          80  +
                        deser.read_map(member, &mut |key, deser| {
          81  +
                            container.insert(key, crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
          82  +
                            Ok(())
          83  +
                        })?;
          84  +
                        container
   88     85   
                    });
   89     86   
                }
   90     87   
                _ => {}
   91     88   
            }
   92     89   
            Ok(())
   93     90   
        })?;
   94     91   
        Ok(builder.build())
   95     92   
    }
   96     93   
}
          94  +
impl FlattenedXmlMapOutput {
          95  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          96  +
    pub fn deserialize_with_response(
          97  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          98  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          99  +
        _status: u16,
         100  +
        _body: &[u8],
         101  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         102  +
        Self::deserialize(deserializer)
         103  +
    }
         104  +
}
   97    105   
impl FlattenedXmlMapOutput {
   98    106   
    /// Creates a new builder-style object to manufacture [`FlattenedXmlMapOutput`](crate::operation::flattened_xml_map::FlattenedXmlMapOutput).
   99    107   
    pub fn builder() -> crate::operation::flattened_xml_map::builders::FlattenedXmlMapOutputBuilder {
  100    108   
        crate::operation::flattened_xml_map::builders::FlattenedXmlMapOutputBuilder::default()
  101    109   
    }
  102    110   
}
  103    111   
  104    112   
/// A builder for [`FlattenedXmlMapOutput`](crate::operation::flattened_xml_map::FlattenedXmlMapOutput).
  105    113   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  106    114   
#[non_exhaustive]

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

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `FlattenedXmlMapWithXmlName`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct FlattenedXmlMapWithXmlName;
    6      6   
impl FlattenedXmlMapWithXmlName {
    7      7   
    /// Creates a new `FlattenedXmlMapWithXmlName`
    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 =
          13  +
        crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +172,179 @@
  130    136   
                crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameError,
  131    137   
            >::new());
  132    138   
  133    139   
        ::std::borrow::Cow::Owned(rcb)
  134    140   
    }
  135    141   
}
  136    142   
  137    143   
#[derive(Debug)]
  138    144   
struct FlattenedXmlMapWithXmlNameResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for FlattenedXmlMapWithXmlNameResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         146  +
    fn deserialize_nonstreaming_with_config(
  141    147   
        &self,
  142    148   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         149  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    150   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    151   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  145    152   
        let headers = response.headers();
  146    153   
        let body = response.body().bytes().expect("body loaded");
  147    154   
        #[allow(unused_mut)]
  148    155   
        let mut force_error = false;
  149    156   
  150    157   
        let parse_result = if !success && status != 200 || force_error {
  151    158   
            crate::protocol_serde::shape_flattened_xml_map_with_xml_name::de_flattened_xml_map_with_xml_name_http_error(status, headers, body)
  152    159   
        } else {
@@ -250,257 +310,321 @@
  270    277   
            .expect("the config must have a deserializer");
  271    278   
  272    279   
        let parsed = de.deserialize_streaming(&mut http_response);
  273    280   
        let parsed = parsed.unwrap_or_else(|| {
  274    281   
            let http_response = http_response.map(|body| {
  275    282   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  276    283   
                    body.bytes().unwrap(),
  277    284   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  278    285   
                )))
  279    286   
            });
  280         -
            de.deserialize_nonstreaming(&http_response)
         287  +
            // Build a config bag with the protocol for schema-based deserialization
         288  +
            #[allow(unused_mut)]
         289  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         290  +
         291  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  281    292   
        });
  282    293   
        let parsed = parsed
  283    294   
            .expect("should be successful response")
  284    295   
            .downcast::<crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameOutput>()
  285    296   
            .unwrap();
  286    297   
        ::pretty_assertions::assert_eq!(parsed.my_map, expected_output.my_map, "Unexpected value for `my_map`");
  287    298   
    }
  288    299   
}
  289    300   
  290    301   
/// Error type for the `FlattenedXmlMapWithXmlNameError` operation.

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

@@ -1,1 +72,85 @@
   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 FlattenedXmlMapWithXmlNameInput {
   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(&FLATTENEDXMLMAPWITHXMLNAMEINPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&FLATTENEDXMLMAPWITHXMLNAMEINPUT_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 FlattenedXmlMapWithXmlNameInput {
          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 FlattenedXmlMapWithXmlNameInput {
   52     65   
    /// Creates a new builder-style object to manufacture [`FlattenedXmlMapWithXmlNameInput`](crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput).
   53     66   
    pub fn builder() -> crate::operation::flattened_xml_map_with_xml_name::builders::FlattenedXmlMapWithXmlNameInputBuilder {
   54     67   
        crate::operation::flattened_xml_map_with_xml_name::builders::FlattenedXmlMapWithXmlNameInputBuilder::default()
   55     68   
    }
   56     69   
}
   57     70   
   58     71   
/// A builder for [`FlattenedXmlMapWithXmlNameInput`](crate::operation::flattened_xml_map_with_xml_name::FlattenedXmlMapWithXmlNameInput).
   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/flattened_xml_map_with_xml_name/_flattened_xml_map_with_xml_name_output.rs

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

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

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `FlattenedXmlMapWithXmlNamespace`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct FlattenedXmlMapWithXmlNamespace;
    6      6   
impl FlattenedXmlMapWithXmlNamespace {
    7      7   
    /// Creates a new `FlattenedXmlMapWithXmlNamespace`
    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 =
          13  +
        crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +172,179 @@
  130    136   
                crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceError,
  131    137   
            >::new());
  132    138   
  133    139   
        ::std::borrow::Cow::Owned(rcb)
  134    140   
    }
  135    141   
}
  136    142   
  137    143   
#[derive(Debug)]
  138    144   
struct FlattenedXmlMapWithXmlNamespaceResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for FlattenedXmlMapWithXmlNamespaceResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         146  +
    fn deserialize_nonstreaming_with_config(
  141    147   
        &self,
  142    148   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         149  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    150   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    151   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  145    152   
        let headers = response.headers();
  146    153   
        let body = response.body().bytes().expect("body loaded");
  147    154   
        #[allow(unused_mut)]
  148    155   
        let mut force_error = false;
  149    156   
  150    157   
        let parse_result = if !success && status != 200 || force_error {
  151    158   
            crate::protocol_serde::shape_flattened_xml_map_with_xml_namespace::de_flattened_xml_map_with_xml_namespace_http_error(
  152    159   
                status, headers, body,
@@ -256,263 +316,327 @@
  276    283   
            .expect("the config must have a deserializer");
  277    284   
  278    285   
        let parsed = de.deserialize_streaming(&mut http_response);
  279    286   
        let parsed = parsed.unwrap_or_else(|| {
  280    287   
            let http_response = http_response.map(|body| {
  281    288   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  282    289   
                    body.bytes().unwrap(),
  283    290   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  284    291   
                )))
  285    292   
            });
  286         -
            de.deserialize_nonstreaming(&http_response)
         293  +
            // Build a config bag with the protocol for schema-based deserialization
         294  +
            #[allow(unused_mut)]
         295  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         296  +
         297  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  287    298   
        });
  288    299   
        let parsed = parsed
  289    300   
            .expect("should be successful response")
  290    301   
            .downcast::<crate::operation::flattened_xml_map_with_xml_namespace::FlattenedXmlMapWithXmlNamespaceOutput>()
  291    302   
            .unwrap();
  292    303   
        ::pretty_assertions::assert_eq!(parsed.my_map, expected_output.my_map, "Unexpected value for `my_map`");
  293    304   
    }
  294    305   
}
  295    306   
  296    307   
/// Error type for the `FlattenedXmlMapWithXmlNamespaceError` operation.

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

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

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

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

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/fractional_seconds.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 `FractionalSeconds`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct FractionalSeconds;
    6      6   
impl FractionalSeconds {
    7      7   
    /// Creates a new `FractionalSeconds`
    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::fractional_seconds::FractionalSecondsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::fractional_seconds::FractionalSecondsOutput::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::fractional_seconds::FractionalSecondsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::fractional_seconds::FractionalSecondsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::fractional_seconds::FractionalSecondsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +166,171 @@
  124    128   
                crate::operation::fractional_seconds::FractionalSecondsError,
  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 FractionalSecondsResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for FractionalSecondsResponseDeserializer {
  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_fractional_seconds::de_fractional_seconds_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::fractional_seconds::FractionalSecondsOutput>()
  276    285   
            .unwrap();
  277    286   
        ::pretty_assertions::assert_eq!(parsed.datetime, expected_output.datetime, "Unexpected value for `datetime`");
  278    287   
    }
  279    288   
}
  280    289   
  281    290   
/// Error type for the `FractionalSecondsError` operation.

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/fractional_seconds/_fractional_seconds_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 FractionalSecondsInput {
   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(&FRACTIONALSECONDSINPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&FRACTIONALSECONDSINPUT_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 FractionalSecondsInput {
          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 FractionalSecondsInput {
   52     65   
    /// Creates a new builder-style object to manufacture [`FractionalSecondsInput`](crate::operation::fractional_seconds::FractionalSecondsInput).
   53     66   
    pub fn builder() -> crate::operation::fractional_seconds::builders::FractionalSecondsInputBuilder {
   54     67   
        crate::operation::fractional_seconds::builders::FractionalSecondsInputBuilder::default()
   55     68   
    }
   56     69   
}
   57     70   
   58     71   
/// A builder for [`FractionalSecondsInput`](crate::operation::fractional_seconds::FractionalSecondsInput).
   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/fractional_seconds/_fractional_seconds_output.rs

@@ -1,1 +106,118 @@
   19     19   
);
   20     20   
static FRACTIONALSECONDSOUTPUT_MEMBER_DATETIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "aws.protocoltests.query.synthetic#FractionalSecondsOutput$datetime",
   23     23   
        "aws.protocoltests.query.synthetic",
   24     24   
        "FractionalSecondsOutput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Timestamp,
   27     27   
    "datetime",
   28     28   
    0,
   29         -
);
          29  +
)
          30  +
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime);
   30     31   
static FRACTIONALSECONDSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     32   
    FRACTIONALSECONDSOUTPUT_SCHEMA_ID,
   32     33   
    ::aws_smithy_schema::ShapeType::Structure,
   33     34   
    &[&FRACTIONALSECONDSOUTPUT_MEMBER_DATETIME],
   34     35   
);
   35     36   
impl FractionalSecondsOutput {
   36     37   
    /// The schema for this shape.
   37     38   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &FRACTIONALSECONDSOUTPUT_SCHEMA;
   38     39   
}
   39     40   
impl ::aws_smithy_schema::serde::SerializableStruct for FractionalSecondsOutput {
   40     41   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     42   
    fn serialize_members(
   42     43   
        &self,
   43     44   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     45   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     46   
        if let Some(ref val) = self.datetime {
   46     47   
            ser.write_timestamp(&FRACTIONALSECONDSOUTPUT_MEMBER_DATETIME, val)?;
   47     48   
        }
   48     49   
        Ok(())
   49     50   
    }
   50     51   
}
   51     52   
impl FractionalSecondsOutput {
   52     53   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          54  +
    pub fn deserialize(
          55  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     56   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     57   
        #[allow(unused_variables, unused_mut)]
   57     58   
        let mut builder = Self::builder();
   58     59   
        #[allow(
   59     60   
            unused_variables,
   60     61   
            unreachable_code,
   61     62   
            clippy::single_match,
   62     63   
            clippy::match_single_binding,
   63     64   
            clippy::diverging_sub_expression
   64     65   
        )]
   65         -
        deserializer.read_struct(&FRACTIONALSECONDSOUTPUT_SCHEMA, (), |_, member, deser| {
          66  +
        deserializer.read_struct(&FRACTIONALSECONDSOUTPUT_SCHEMA, &mut |member, deser| {
   66     67   
            match member.member_index() {
   67     68   
                Some(0) => {
   68     69   
                    builder.datetime = Some(deser.read_timestamp(member)?);
   69     70   
                }
   70     71   
                _ => {}
   71     72   
            }
   72     73   
            Ok(())
   73     74   
        })?;
   74     75   
        Ok(builder.build())
   75     76   
    }
   76     77   
}
          78  +
impl FractionalSecondsOutput {
          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  +
}
   77     89   
impl FractionalSecondsOutput {
   78     90   
    /// Creates a new builder-style object to manufacture [`FractionalSecondsOutput`](crate::operation::fractional_seconds::FractionalSecondsOutput).
   79     91   
    pub fn builder() -> crate::operation::fractional_seconds::builders::FractionalSecondsOutputBuilder {
   80     92   
        crate::operation::fractional_seconds::builders::FractionalSecondsOutputBuilder::default()
   81     93   
    }
   82     94   
}
   83     95   
   84     96   
/// A builder for [`FractionalSecondsOutput`](crate::operation::fractional_seconds::FractionalSecondsOutput).
   85     97   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   86     98   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/greeting_with_errors.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 `GreetingWithErrors`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct GreetingWithErrors;
    6      6   
impl GreetingWithErrors {
    7      7   
    /// Creates a new `GreetingWithErrors`
    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::greeting_with_errors::GreetingWithErrorsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::greeting_with_errors::GreetingWithErrorsOutput::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::greeting_with_errors::GreetingWithErrorsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::greeting_with_errors::GreetingWithErrorsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::greeting_with_errors::GreetingWithErrorsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +166,171 @@
  124    128   
                crate::operation::greeting_with_errors::GreetingWithErrorsError,
  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 GreetingWithErrorsResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GreetingWithErrorsResponseDeserializer {
  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_greeting_with_errors::de_greeting_with_errors_http_error(status, headers, body)
  146    151   
        } else {
@@ -239,244 +429,450 @@
  259    264   
            .expect("the config must have a deserializer");
  260    265   
  261    266   
        let parsed = de.deserialize_streaming(&mut http_response);
  262    267   
        let parsed = parsed.unwrap_or_else(|| {
  263    268   
            let http_response = http_response.map(|body| {
  264    269   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  265    270   
                    body.bytes().unwrap(),
  266    271   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  267    272   
                )))
  268    273   
            });
  269         -
            de.deserialize_nonstreaming(&http_response)
         274  +
            // Build a config bag with the protocol for schema-based deserialization
         275  +
            #[allow(unused_mut)]
         276  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         277  +
         278  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  270    279   
        });
  271    280   
        let parsed = parsed
  272    281   
            .expect("should be successful response")
  273    282   
            .downcast::<crate::operation::greeting_with_errors::GreetingWithErrorsOutput>()
  274    283   
            .unwrap();
  275    284   
        ::pretty_assertions::assert_eq!(parsed.greeting, expected_output.greeting, "Unexpected value for `greeting`");
  276    285   
    }
  277    286   
  278    287   
    /// Parses simple XML errors
  279    288   
    /// Test ID: QueryInvalidGreetingError
  280    289   
    #[::tokio::test]
  281    290   
    #[::tracing_test::traced_test]
  282    291   
    async fn query_invalid_greeting_error_response() {
  283    292   
        let expected_output = crate::types::error::InvalidGreeting::builder()
  284    293   
            .set_message(::std::option::Option::Some("Hi".to_owned()))
  285    294   
            .build();
  286    295   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(::http_1x::response::Builder::new()
  287    296   
        .header("Content-Type", "text/xml")
  288    297   
        .status(400)
  289    298   
                    .body(::aws_smithy_types::body::SdkBody::from("<ErrorResponse>\n   <Error>\n      <Type>Sender</Type>\n      <Code>InvalidGreeting</Code>\n      <Message>Hi</Message>\n   </Error>\n   <RequestId>foo-id</RequestId>\n</ErrorResponse>\n"))
  290    299   
                    .unwrap()
  291    300   
                    ).unwrap();
  292    301   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  293    302   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  294    303   
  295    304   
        let op = crate::operation::greeting_with_errors::GreetingWithErrors::new();
  296    305   
        let config = op.config().expect("the operation has config");
  297    306   
        let de = config
  298    307   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  299    308   
            .expect("the config must have a deserializer");
  300    309   
  301    310   
        let parsed = de.deserialize_streaming(&mut http_response);
  302    311   
        let parsed = parsed.unwrap_or_else(|| {
  303    312   
            let http_response = http_response.map(|body| {
  304    313   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  305    314   
                    body.bytes().unwrap(),
  306    315   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  307    316   
                )))
  308    317   
            });
  309         -
            de.deserialize_nonstreaming(&http_response)
         318  +
            // Build a config bag with the protocol for schema-based deserialization
         319  +
            #[allow(unused_mut)]
         320  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         321  +
         322  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  310    323   
        });
  311    324   
        let parsed = parsed.expect_err("should be error response");
  312    325   
        let parsed: &crate::operation::greeting_with_errors::GreetingWithErrorsError =
  313    326   
            parsed.as_operation_error().expect("operation error").downcast_ref().unwrap();
  314    327   
        if let crate::operation::greeting_with_errors::GreetingWithErrorsError::InvalidGreeting(parsed) = parsed {
  315    328   
            ::pretty_assertions::assert_eq!(parsed.message, expected_output.message, "Unexpected value for `message`");
  316    329   
        } else {
  317    330   
            panic!("wrong variant: Got: {:?}. Expected: {:?}", parsed, expected_output);
  318    331   
        }
  319    332   
    }
  320    333   
    /// Test ID: QueryComplexError
  321    334   
    #[::tokio::test]
  322    335   
    #[::tracing_test::traced_test]
  323    336   
    async fn query_complex_error_response() {
  324    337   
        let expected_output = crate::types::error::ComplexError::builder()
  325    338   
            .set_top_level(::std::option::Option::Some("Top level".to_owned()))
  326    339   
            .set_nested(::std::option::Option::Some(
  327    340   
                crate::types::ComplexNestedErrorData::builder()
  328    341   
                    .set_foo(::std::option::Option::Some("bar".to_owned()))
  329    342   
                    .build(),
  330    343   
            ))
  331    344   
            .build();
  332    345   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(::http_1x::response::Builder::new()
  333    346   
        .header("Content-Type", "text/xml")
  334    347   
        .status(400)
  335    348   
                    .body(::aws_smithy_types::body::SdkBody::from("<ErrorResponse>\n   <Error>\n      <Type>Sender</Type>\n      <Code>ComplexError</Code>\n      <TopLevel>Top level</TopLevel>\n      <Nested>\n          <Foo>bar</Foo>\n      </Nested>\n   </Error>\n   <RequestId>foo-id</RequestId>\n</ErrorResponse>\n"))
  336    349   
                    .unwrap()
  337    350   
                    ).unwrap();
  338    351   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  339    352   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  340    353   
  341    354   
        let op = crate::operation::greeting_with_errors::GreetingWithErrors::new();
  342    355   
        let config = op.config().expect("the operation has config");
  343    356   
        let de = config
  344    357   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  345    358   
            .expect("the config must have a deserializer");
  346    359   
  347    360   
        let parsed = de.deserialize_streaming(&mut http_response);
  348    361   
        let parsed = parsed.unwrap_or_else(|| {
  349    362   
            let http_response = http_response.map(|body| {
  350    363   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  351    364   
                    body.bytes().unwrap(),
  352    365   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  353    366   
                )))
  354    367   
            });
  355         -
            de.deserialize_nonstreaming(&http_response)
         368  +
            // Build a config bag with the protocol for schema-based deserialization
         369  +
            #[allow(unused_mut)]
         370  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         371  +
         372  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  356    373   
        });
  357    374   
        let parsed = parsed.expect_err("should be error response");
  358    375   
        let parsed: &crate::operation::greeting_with_errors::GreetingWithErrorsError =
  359    376   
            parsed.as_operation_error().expect("operation error").downcast_ref().unwrap();
  360    377   
        if let crate::operation::greeting_with_errors::GreetingWithErrorsError::ComplexError(parsed) = parsed {
  361    378   
            ::pretty_assertions::assert_eq!(parsed.top_level, expected_output.top_level, "Unexpected value for `top_level`");
  362    379   
            ::pretty_assertions::assert_eq!(parsed.nested, expected_output.nested, "Unexpected value for `nested`");
  363    380   
        } else {
  364    381   
            panic!("wrong variant: Got: {:?}. Expected: {:?}", parsed, expected_output);
  365    382   
        }
  366    383   
    }
  367    384   
  368    385   
    /// Parses customized XML errors
  369    386   
    /// Test ID: QueryCustomizedError
  370    387   
    #[::tokio::test]
  371    388   
    #[::tracing_test::traced_test]
  372    389   
    async fn query_customized_error_response() {
  373    390   
        let expected_output = crate::types::error::CustomCodeError::builder()
  374    391   
            .set_message(::std::option::Option::Some("Hi".to_owned()))
  375    392   
            .build();
  376    393   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(::http_1x::response::Builder::new()
  377    394   
        .header("Content-Type", "text/xml")
  378    395   
        .status(402)
  379    396   
                    .body(::aws_smithy_types::body::SdkBody::from("<ErrorResponse>\n   <Error>\n      <Type>Sender</Type>\n      <Code>Customized</Code>\n      <Message>Hi</Message>\n   </Error>\n   <RequestId>foo-id</RequestId>\n</ErrorResponse>\n"))
  380    397   
                    .unwrap()
  381    398   
                    ).unwrap();
  382    399   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  383    400   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  384    401   
  385    402   
        let op = crate::operation::greeting_with_errors::GreetingWithErrors::new();
  386    403   
        let config = op.config().expect("the operation has config");
  387    404   
        let de = config
  388    405   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  389    406   
            .expect("the config must have a deserializer");
  390    407   
  391    408   
        let parsed = de.deserialize_streaming(&mut http_response);
  392    409   
        let parsed = parsed.unwrap_or_else(|| {
  393    410   
            let http_response = http_response.map(|body| {
  394    411   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  395    412   
                    body.bytes().unwrap(),
  396    413   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  397    414   
                )))
  398    415   
            });
  399         -
            de.deserialize_nonstreaming(&http_response)
         416  +
            // Build a config bag with the protocol for schema-based deserialization
         417  +
            #[allow(unused_mut)]
         418  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         419  +
         420  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  400    421   
        });
  401    422   
        let parsed = parsed.expect_err("should be error response");
  402    423   
        let parsed: &crate::operation::greeting_with_errors::GreetingWithErrorsError =
  403    424   
            parsed.as_operation_error().expect("operation error").downcast_ref().unwrap();
  404    425   
        if let crate::operation::greeting_with_errors::GreetingWithErrorsError::CustomCodeError(parsed) = parsed {
  405    426   
            ::pretty_assertions::assert_eq!(parsed.message, expected_output.message, "Unexpected value for `message`");
  406    427   
        } else {
  407    428   
            panic!("wrong variant: Got: {:?}. Expected: {:?}", parsed, expected_output);
  408    429   
        }
  409    430   
    }

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

@@ -1,1 +70,83 @@
   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 GreetingWithErrorsInput {
   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(&GREETINGWITHERRORSINPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&GREETINGWITHERRORSINPUT_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 GreetingWithErrorsInput {
          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 GreetingWithErrorsInput {
   52     65   
    /// Creates a new builder-style object to manufacture [`GreetingWithErrorsInput`](crate::operation::greeting_with_errors::GreetingWithErrorsInput).
   53     66   
    pub fn builder() -> crate::operation::greeting_with_errors::builders::GreetingWithErrorsInputBuilder {
   54     67   
        crate::operation::greeting_with_errors::builders::GreetingWithErrorsInputBuilder::default()
   55     68   
    }
   56     69   
}
   57     70   
   58     71   
/// A builder for [`GreetingWithErrorsInput`](crate::operation::greeting_with_errors::GreetingWithErrorsInput).
   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/greeting_with_errors/_greeting_with_errors_output.rs

@@ -23,23 +106,117 @@
   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.greeting {
   46     46   
            ser.write_string(&GREETINGWITHERRORSOUTPUT_MEMBER_GREETING, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl GreetingWithErrorsOutput {
   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(&GREETINGWITHERRORSOUTPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&GREETINGWITHERRORSOUTPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.greeting = 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 GreetingWithErrorsOutput {
          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 GreetingWithErrorsOutput {
   78     89   
    /// Creates a new builder-style object to manufacture [`GreetingWithErrorsOutput`](crate::operation::greeting_with_errors::GreetingWithErrorsOutput).
   79     90   
    pub fn builder() -> crate::operation::greeting_with_errors::builders::GreetingWithErrorsOutputBuilder {
   80     91   
        crate::operation::greeting_with_errors::builders::GreetingWithErrorsOutputBuilder::default()
   81     92   
    }
   82     93   
}
   83     94   
   84     95   
/// A builder for [`GreetingWithErrorsOutput`](crate::operation::greeting_with_errors::GreetingWithErrorsOutput).
   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/operation/host_with_path_operation.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 `HostWithPathOperation`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct HostWithPathOperation;
    6      6   
impl HostWithPathOperation {
    7      7   
    /// Creates a new `HostWithPathOperation`
    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::host_with_path_operation::HostWithPathOperationInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::host_with_path_operation::HostWithPathOperationOutput::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::host_with_path_operation::HostWithPathOperationInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::host_with_path_operation::HostWithPathOperationOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::host_with_path_operation::HostWithPathOperationError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -110,114 +172,177 @@
  130    134   
                crate::operation::host_with_path_operation::HostWithPathOperationError,
  131    135   
            >::new());
  132    136   
  133    137   
        ::std::borrow::Cow::Owned(rcb)
  134    138   
    }
  135    139   
}
  136    140   
  137    141   
#[derive(Debug)]
  138    142   
struct HostWithPathOperationResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HostWithPathOperationResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         144  +
    fn deserialize_nonstreaming_with_config(
  141    145   
        &self,
  142    146   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         147  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  145    150   
        let headers = response.headers();
  146    151   
        let body = response.body().bytes().expect("body loaded");
  147    152   
        #[allow(unused_mut)]
  148    153   
        let mut force_error = false;
  149    154   
  150    155   
        let parse_result = if !success && status != 200 || force_error {
  151    156   
            crate::protocol_serde::shape_host_with_path_operation::de_host_with_path_operation_http_error(status, headers, body)
  152    157   
        } else {

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

@@ -1,1 +70,83 @@
   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 HostWithPathOperationInput {
   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(&HOSTWITHPATHOPERATIONINPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&HOSTWITHPATHOPERATIONINPUT_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 HostWithPathOperationInput {
          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 HostWithPathOperationInput {
   52     65   
    /// Creates a new builder-style object to manufacture [`HostWithPathOperationInput`](crate::operation::host_with_path_operation::HostWithPathOperationInput).
   53     66   
    pub fn builder() -> crate::operation::host_with_path_operation::builders::HostWithPathOperationInputBuilder {
   54     67   
        crate::operation::host_with_path_operation::builders::HostWithPathOperationInputBuilder::default()
   55     68   
    }
   56     69   
}
   57     70   
   58     71   
/// A builder for [`HostWithPathOperationInput`](crate::operation::host_with_path_operation::HostWithPathOperationInput).
   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/host_with_path_operation/_host_with_path_operation_output.rs

@@ -1,1 +65,76 @@
   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 HostWithPathOperationOutput {
   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(&HOSTWITHPATHOPERATIONOUTPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&HOSTWITHPATHOPERATIONOUTPUT_SCHEMA, &mut |member, deser| {
   41     41   
            match member.member_index() {
   42     42   
                _ => {}
   43     43   
            }
   44     44   
            Ok(())
   45     45   
        })?;
   46     46   
        Ok(builder.build())
   47     47   
    }
   48     48   
}
          49  +
impl HostWithPathOperationOutput {
          50  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          51  +
    pub fn deserialize_with_response(
          52  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          53  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          54  +
        _status: u16,
          55  +
        _body: &[u8],
          56  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          57  +
        Ok(Self::builder().build())
          58  +
    }
          59  +
}
   49     60   
impl HostWithPathOperationOutput {
   50     61   
    /// Creates a new builder-style object to manufacture [`HostWithPathOperationOutput`](crate::operation::host_with_path_operation::HostWithPathOperationOutput).
   51     62   
    pub fn builder() -> crate::operation::host_with_path_operation::builders::HostWithPathOperationOutputBuilder {
   52     63   
        crate::operation::host_with_path_operation::builders::HostWithPathOperationOutputBuilder::default()
   53     64   
    }
   54     65   
}
   55     66   
   56     67   
/// A builder for [`HostWithPathOperationOutput`](crate::operation::host_with_path_operation::HostWithPathOperationOutput).
   57     68   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   58     69   
#[non_exhaustive]