Client Test

Client Test

rev. 32b1b3c3761061baed26023be3219639e42d7d12

Files changed:

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/create_foo.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 `CreateFoo`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateFoo;
    6      6   
impl CreateFoo {
    7      7   
    /// Creates a new `CreateFoo`
    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::create_foo::CreateFooInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_foo::CreateFooOutput::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::create_foo::CreateFooInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_foo::CreateFooOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_foo::CreateFooError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +166,171 @@
  124    128   
                crate::operation::create_foo::CreateFooError,
  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 CreateFooResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateFooResponseDeserializer {
  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_create_foo::de_create_foo_http_error(status, headers, body)
  146    151   
        } else {

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/create_foo/_create_foo_input.rs

@@ -4,4 +108,120 @@
   24     24   
        "CreateFooInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Structure,
   27     27   
    "input",
   28     28   
    0,
   29     29   
);
   30     30   
static CREATEFOOINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    CREATEFOOINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&CREATEFOOINPUT_MEMBER_INPUT],
   34         -
);
          34  +
)
          35  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/reused-input", None));
   35     36   
impl CreateFooInput {
   36     37   
    /// The schema for this shape.
   37     38   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEFOOINPUT_SCHEMA;
   38     39   
}
   39     40   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateFooInput {
   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.input {
   46     47   
            ser.write_struct(&CREATEFOOINPUT_MEMBER_INPUT, val)?;
   47     48   
        }
   48     49   
        Ok(())
   49     50   
    }
   50     51   
}
   51     52   
impl CreateFooInput {
   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(&CREATEFOOINPUT_SCHEMA, (), |_, member, deser| {
          66  +
        deserializer.read_struct(&CREATEFOOINPUT_SCHEMA, &mut |member, deser| {
   66     67   
            match member.member_index() {
   67     68   
                Some(0) => {
   68     69   
                    builder.input = Some(crate::types::CreateFooInput::deserialize(deser)?);
   69     70   
                }
   70     71   
                _ => {}
   71     72   
            }
   72     73   
            Ok(())
   73     74   
        })?;
   74     75   
        builder
   75     76   
            .build()
   76     77   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     78   
    }
   78     79   
}
          80  +
impl CreateFooInput {
          81  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          82  +
    pub fn deserialize_with_response(
          83  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          84  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          85  +
        _status: u16,
          86  +
        _body: &[u8],
          87  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          88  +
        Self::deserialize(deserializer)
          89  +
    }
          90  +
}
   79     91   
impl CreateFooInput {
   80     92   
    /// Creates a new builder-style object to manufacture [`CreateFooInput`](crate::operation::create_foo::CreateFooInput).
   81     93   
    pub fn builder() -> crate::operation::create_foo::builders::CreateFooInputBuilder {
   82     94   
        crate::operation::create_foo::builders::CreateFooInputBuilder::default()
   83     95   
    }
   84     96   
}
   85     97   
   86     98   
/// A builder for [`CreateFooInput`](crate::operation::create_foo::CreateFooInput).
   87     99   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   88    100   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/create_foo/_create_foo_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 CreateFooOutput {
   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(&CREATEFOOOUTPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&CREATEFOOOUTPUT_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 CreateFooOutput {
          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 CreateFooOutput {
   50     61   
    /// Creates a new builder-style object to manufacture [`CreateFooOutput`](crate::operation::create_foo::CreateFooOutput).
   51     62   
    pub fn builder() -> crate::operation::create_foo::builders::CreateFooOutputBuilder {
   52     63   
        crate::operation::create_foo::builders::CreateFooOutputBuilder::default()
   53     64   
    }
   54     65   
}
   55     66   
   56     67   
/// A builder for [`CreateFooOutput`](crate::operation::create_foo::CreateFooOutput).
   57     68   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   58     69   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/enum_keys.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 `EnumKeys`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct EnumKeys;
    6      6   
impl EnumKeys {
    7      7   
    /// Creates a new `EnumKeys`
    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::enum_keys::EnumKeysInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::enum_keys::EnumKeysOutput::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::enum_keys::EnumKeysInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::enum_keys::EnumKeysOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::enum_keys::EnumKeysError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -100,104 +162,167 @@
  120    124   
                crate::operation::enum_keys::EnumKeysError,
  121    125   
            >::new());
  122    126   
  123    127   
        ::std::borrow::Cow::Owned(rcb)
  124    128   
    }
  125    129   
}
  126    130   
  127    131   
#[derive(Debug)]
  128    132   
struct EnumKeysResponseDeserializer;
  129    133   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for EnumKeysResponseDeserializer {
  130         -
    fn deserialize_nonstreaming(
         134  +
    fn deserialize_nonstreaming_with_config(
  131    135   
        &self,
  132    136   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         137  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  133    138   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  134    139   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  135    140   
        let headers = response.headers();
  136    141   
        let body = response.body().bytes().expect("body loaded");
  137    142   
        #[allow(unused_mut)]
  138    143   
        let mut force_error = false;
  139    144   
  140    145   
        let parse_result = if !success && status != 200 || force_error {
  141    146   
            crate::protocol_serde::shape_enum_keys::de_enum_keys_http_error(status, headers, body)
  142    147   
        } else {
@@ -279,284 +339,348 @@
  299    304   
            .expect("the config must have a deserializer");
  300    305   
  301    306   
        let parsed = de.deserialize_streaming(&mut http_response);
  302    307   
        let parsed = parsed.unwrap_or_else(|| {
  303    308   
            let http_response = http_response.map(|body| {
  304    309   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  305    310   
                    body.bytes().unwrap(),
  306    311   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  307    312   
                )))
  308    313   
            });
  309         -
            de.deserialize_nonstreaming(&http_response)
         314  +
            // Build a config bag with the protocol for schema-based deserialization
         315  +
            #[allow(unused_mut)]
         316  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         317  +
         318  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  310    319   
        });
  311    320   
        let parsed = parsed
  312    321   
            .expect("should be successful response")
  313    322   
            .downcast::<crate::operation::enum_keys::EnumKeysOutput>()
  314    323   
            .unwrap();
  315    324   
        ::pretty_assertions::assert_eq!(parsed.data, expected_output.data, "Unexpected value for `data`");
  316    325   
    }
  317    326   
}
  318    327   
  319    328   
/// Error type for the `EnumKeysError` operation.

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/enum_keys/_enum_keys_input.rs

@@ -4,4 +127,136 @@
   24     24   
        "EnumKeysInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Map,
   27     27   
    "data",
   28     28   
    0,
   29     29   
);
   30     30   
static ENUMKEYSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    ENUMKEYSINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&ENUMKEYSINPUT_MEMBER_DATA],
   34         -
);
          34  +
)
          35  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/enumkeys", None));
   35     36   
impl EnumKeysInput {
   36     37   
    /// The schema for this shape.
   37     38   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ENUMKEYSINPUT_SCHEMA;
   38     39   
}
   39     40   
impl ::aws_smithy_schema::serde::SerializableStruct for EnumKeysInput {
   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.data {
   46     47   
            ser.write_map(
   47     48   
                &ENUMKEYSINPUT_MEMBER_DATA,
   48     49   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   49     50   
                    for (key, value) in val {
   50     51   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key.as_str())?;
   51     52   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
   52     53   
                    }
   53     54   
                    Ok(())
   54     55   
                },
   55     56   
            )?;
   56     57   
        }
   57     58   
        Ok(())
   58     59   
    }
   59     60   
}
   60     61   
impl EnumKeysInput {
   61     62   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   62         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   63         -
        deserializer: &mut D,
          63  +
    pub fn deserialize(
          64  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   64     65   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   65     66   
        #[allow(unused_variables, unused_mut)]
   66     67   
        let mut builder = Self::builder();
   67     68   
        #[allow(
   68     69   
            unused_variables,
   69     70   
            unreachable_code,
   70     71   
            clippy::single_match,
   71     72   
            clippy::match_single_binding,
   72     73   
            clippy::diverging_sub_expression
   73     74   
        )]
   74         -
        deserializer.read_struct(&ENUMKEYSINPUT_SCHEMA, (), |_, member, deser| {
          75  +
        deserializer.read_struct(&ENUMKEYSINPUT_SCHEMA, &mut |member, deser| {
   75     76   
            match member.member_index() {
   76     77   
                Some(0) => {
   77     78   
                    builder.data = 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(crate::types::StringEnum::from(key.as_str()), deser.read_string(member)?);
   85         -
                            Ok(map)
   86         -
                        })?
          79  +
                        let mut container = std::collections::HashMap::new();
          80  +
                        deser.read_map(member, &mut |key, deser| {
          81  +
                            container.insert(crate::types::StringEnum::from(key.as_str()), deser.read_string(member)?);
          82  +
                            Ok(())
          83  +
                        })?;
          84  +
                        container
   87     85   
                    });
   88     86   
                }
   89     87   
                _ => {}
   90     88   
            }
   91     89   
            Ok(())
   92     90   
        })?;
   93     91   
        builder
   94     92   
            .build()
   95     93   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   96     94   
    }
   97     95   
}
          96  +
impl EnumKeysInput {
          97  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          98  +
    pub fn deserialize_with_response(
          99  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         100  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         101  +
        _status: u16,
         102  +
        _body: &[u8],
         103  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         104  +
        Self::deserialize(deserializer)
         105  +
    }
         106  +
}
   98    107   
impl EnumKeysInput {
   99    108   
    /// Creates a new builder-style object to manufacture [`EnumKeysInput`](crate::operation::enum_keys::EnumKeysInput).
  100    109   
    pub fn builder() -> crate::operation::enum_keys::builders::EnumKeysInputBuilder {
  101    110   
        crate::operation::enum_keys::builders::EnumKeysInputBuilder::default()
  102    111   
    }
  103    112   
}
  104    113   
  105    114   
/// A builder for [`EnumKeysInput`](crate::operation::enum_keys::EnumKeysInput).
  106    115   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  107    116   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/enum_keys/_enum_keys_output.rs

@@ -32,32 +125,133 @@
   52     52   
                    }
   53     53   
                    Ok(())
   54     54   
                },
   55     55   
            )?;
   56     56   
        }
   57     57   
        Ok(())
   58     58   
    }
   59     59   
}
   60     60   
impl EnumKeysOutput {
   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(&ENUMKEYSOUTPUT_SCHEMA, (), |_, member, deser| {
          74  +
        deserializer.read_struct(&ENUMKEYSOUTPUT_SCHEMA, &mut |member, deser| {
   75     75   
            match member.member_index() {
   76     76   
                Some(0) => {
   77     77   
                    builder.data = 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(crate::types::StringEnum::from(key.as_str()), deser.read_string(member)?);
   85         -
                            Ok(map)
   86         -
                        })?
          78  +
                        let mut container = std::collections::HashMap::new();
          79  +
                        deser.read_map(member, &mut |key, deser| {
          80  +
                            container.insert(crate::types::StringEnum::from(key.as_str()), deser.read_string(member)?);
          81  +
                            Ok(())
          82  +
                        })?;
          83  +
                        container
   87     84   
                    });
   88     85   
                }
   89     86   
                _ => {}
   90     87   
            }
   91     88   
            Ok(())
   92     89   
        })?;
   93     90   
        Ok(builder.build())
   94     91   
    }
   95     92   
}
          93  +
impl EnumKeysOutput {
          94  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          95  +
    pub fn deserialize_with_response(
          96  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          97  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          98  +
        _status: u16,
          99  +
        _body: &[u8],
         100  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         101  +
        Self::deserialize(deserializer)
         102  +
    }
         103  +
}
   96    104   
impl EnumKeysOutput {
   97    105   
    /// Creates a new builder-style object to manufacture [`EnumKeysOutput`](crate::operation::enum_keys::EnumKeysOutput).
   98    106   
    pub fn builder() -> crate::operation::enum_keys::builders::EnumKeysOutputBuilder {
   99    107   
        crate::operation::enum_keys::builders::EnumKeysOutputBuilder::default()
  100    108   
    }
  101    109   
}
  102    110   
  103    111   
/// A builder for [`EnumKeysOutput`](crate::operation::enum_keys::EnumKeysOutput).
  104    112   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  105    113   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/primitive_int_op_xml.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 `PrimitiveIntOpXml`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PrimitiveIntOpXml;
    6      6   
impl PrimitiveIntOpXml {
    7      7   
    /// Creates a new `PrimitiveIntOpXml`
    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::primitive_int_op_xml::PrimitiveIntOpXmlInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::primitive_int_op_xml::PrimitiveIntOpXmlOutput::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::primitive_int_op_xml::PrimitiveIntOpXmlInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::primitive_int_op_xml::PrimitiveIntOpXmlOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::primitive_int_op_xml::PrimitiveIntOpXmlError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -110,114 +172,177 @@
  130    134   
                crate::operation::primitive_int_op_xml::PrimitiveIntOpXmlError,
  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 PrimitiveIntOpXmlResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PrimitiveIntOpXmlResponseDeserializer {
  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_primitive_int_op_xml::de_primitive_int_op_xml_http_error(status, headers, body)
  152    157   
        } else {

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/primitive_int_op_xml/_primitive_int_op_xml_input.rs

@@ -13,13 +130,142 @@
   33     33   
    "value",
   34     34   
    0,
   35     35   
);
   36     36   
static PRIMITIVEINTOPXMLINPUT_MEMBER_DEFAULTED_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   37     37   
    ::aws_smithy_schema::ShapeId::from_static(
   38     38   
        "aws.protocoltests.restxml.synthetic#PrimitiveIntOpXmlInput$defaultedValue",
   39     39   
        "aws.protocoltests.restxml.synthetic",
   40     40   
        "PrimitiveIntOpXmlInput",
   41     41   
    ),
   42     42   
    ::aws_smithy_schema::ShapeType::Integer,
   43         -
    "defaulted_value",
          43  +
    "defaultedValue",
   44     44   
    1,
   45     45   
);
   46     46   
static PRIMITIVEINTOPXMLINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   47     47   
    PRIMITIVEINTOPXMLINPUT_SCHEMA_ID,
   48     48   
    ::aws_smithy_schema::ShapeType::Structure,
   49     49   
    &[&PRIMITIVEINTOPXMLINPUT_MEMBER_VALUE, &PRIMITIVEINTOPXMLINPUT_MEMBER_DEFAULTED_VALUE],
   50         -
);
          50  +
)
          51  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/primitive-document", None));
   51     52   
impl PrimitiveIntOpXmlInput {
   52     53   
    /// The schema for this shape.
   53     54   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PRIMITIVEINTOPXMLINPUT_SCHEMA;
   54     55   
}
   55     56   
impl ::aws_smithy_schema::serde::SerializableStruct for PrimitiveIntOpXmlInput {
   56     57   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   57     58   
    fn serialize_members(
   58     59   
        &self,
   59     60   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   60     61   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   61     62   
        if let Some(ref val) = self.value {
   62     63   
            ser.write_integer(&PRIMITIVEINTOPXMLINPUT_MEMBER_VALUE, *val)?;
   63     64   
        }
   64     65   
        if let Some(ref val) = self.defaulted_value {
   65     66   
            ser.write_integer(&PRIMITIVEINTOPXMLINPUT_MEMBER_DEFAULTED_VALUE, *val)?;
   66     67   
        }
   67     68   
        Ok(())
   68     69   
    }
   69     70   
}
   70     71   
impl PrimitiveIntOpXmlInput {
   71     72   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   72         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   73         -
        deserializer: &mut D,
          73  +
    pub fn deserialize(
          74  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   74     75   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   75     76   
        #[allow(unused_variables, unused_mut)]
   76     77   
        let mut builder = Self::builder();
   77     78   
        #[allow(
   78     79   
            unused_variables,
   79     80   
            unreachable_code,
   80     81   
            clippy::single_match,
   81     82   
            clippy::match_single_binding,
   82     83   
            clippy::diverging_sub_expression
   83     84   
        )]
   84         -
        deserializer.read_struct(&PRIMITIVEINTOPXMLINPUT_SCHEMA, (), |_, member, deser| {
          85  +
        deserializer.read_struct(&PRIMITIVEINTOPXMLINPUT_SCHEMA, &mut |member, deser| {
   85     86   
            match member.member_index() {
   86     87   
                Some(0) => {
   87     88   
                    builder.value = Some(deser.read_integer(member)?);
   88     89   
                }
   89     90   
                Some(1) => {
   90     91   
                    builder.defaulted_value = Some(deser.read_integer(member)?);
   91     92   
                }
   92     93   
                _ => {}
   93     94   
            }
   94     95   
            Ok(())
   95     96   
        })?;
   96     97   
        builder
   97     98   
            .build()
   98     99   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   99    100   
    }
  100    101   
}
         102  +
impl PrimitiveIntOpXmlInput {
         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  +
}
  101    113   
impl PrimitiveIntOpXmlInput {
  102    114   
    /// Creates a new builder-style object to manufacture [`PrimitiveIntOpXmlInput`](crate::operation::primitive_int_op_xml::PrimitiveIntOpXmlInput).
  103    115   
    pub fn builder() -> crate::operation::primitive_int_op_xml::builders::PrimitiveIntOpXmlInputBuilder {
  104    116   
        crate::operation::primitive_int_op_xml::builders::PrimitiveIntOpXmlInputBuilder::default()
  105    117   
    }
  106    118   
}
  107    119   
  108    120   
/// A builder for [`PrimitiveIntOpXmlInput`](crate::operation::primitive_int_op_xml::PrimitiveIntOpXmlInput).
  109    121   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  110    122   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/primitive_int_op_xml/_primitive_int_op_xml_output.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/required_member.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 `RequiredMember`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct RequiredMember;
    6      6   
impl RequiredMember {
    7      7   
    /// Creates a new `RequiredMember`
    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::required_member::RequiredMemberInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::required_member::RequiredMemberOutput::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::required_member::RequiredMemberInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::required_member::RequiredMemberOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::required_member::RequiredMemberError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +166,171 @@
  124    128   
                crate::operation::required_member::RequiredMemberError,
  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 RequiredMemberResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for RequiredMemberResponseDeserializer {
  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_required_member::de_required_member_http_error(status, headers, body)
  146    151   
        } else {

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/required_member/_required_member_input.rs

@@ -1,1 +108,121 @@
   17     17   
    "aws.protocoltests.restxml.synthetic",
   18     18   
    "RequiredMemberInput",
   19     19   
);
   20     20   
static REQUIREDMEMBERINPUT_MEMBER_REQUIRED_STRING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "aws.protocoltests.restxml.synthetic#RequiredMemberInput$requiredString",
   23     23   
        "aws.protocoltests.restxml.synthetic",
   24     24   
        "RequiredMemberInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "required_string",
          27  +
    "requiredString",
   28     28   
    0,
   29     29   
);
   30     30   
static REQUIREDMEMBERINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    REQUIREDMEMBERINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&REQUIREDMEMBERINPUT_MEMBER_REQUIRED_STRING],
   34         -
);
          34  +
)
          35  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/required-member", None));
   35     36   
impl RequiredMemberInput {
   36     37   
    /// The schema for this shape.
   37     38   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &REQUIREDMEMBERINPUT_SCHEMA;
   38     39   
}
   39     40   
impl ::aws_smithy_schema::serde::SerializableStruct for RequiredMemberInput {
   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.required_string {
   46     47   
            ser.write_string(&REQUIREDMEMBERINPUT_MEMBER_REQUIRED_STRING, val)?;
   47     48   
        }
   48     49   
        Ok(())
   49     50   
    }
   50     51   
}
   51     52   
impl RequiredMemberInput {
   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(&REQUIREDMEMBERINPUT_SCHEMA, (), |_, member, deser| {
          66  +
        deserializer.read_struct(&REQUIREDMEMBERINPUT_SCHEMA, &mut |member, deser| {
   66     67   
            match member.member_index() {
   67     68   
                Some(0) => {
   68     69   
                    builder.required_string = Some(deser.read_string(member)?);
   69     70   
                }
   70     71   
                _ => {}
   71     72   
            }
   72     73   
            Ok(())
   73     74   
        })?;
          75  +
        builder.required_string = builder.required_string.or(Some(String::new()));
   74     76   
        builder
   75     77   
            .build()
   76     78   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     79   
    }
   78     80   
}
          81  +
impl RequiredMemberInput {
          82  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          83  +
    pub fn deserialize_with_response(
          84  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          85  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          86  +
        _status: u16,
          87  +
        _body: &[u8],
          88  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          89  +
        Self::deserialize(deserializer)
          90  +
    }
          91  +
}
   79     92   
impl RequiredMemberInput {
   80     93   
    /// Creates a new builder-style object to manufacture [`RequiredMemberInput`](crate::operation::required_member::RequiredMemberInput).
   81     94   
    pub fn builder() -> crate::operation::required_member::builders::RequiredMemberInputBuilder {
   82     95   
        crate::operation::required_member::builders::RequiredMemberInputBuilder::default()
   83     96   
    }
   84     97   
}
   85     98   
   86     99   
/// A builder for [`RequiredMemberInput`](crate::operation::required_member::RequiredMemberInput).
   87    100   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   88    101   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/required_member/_required_member_output.rs

@@ -1,1 +110,122 @@
   18     18   
    "aws.protocoltests.restxml.synthetic",
   19     19   
    "RequiredMemberOutput",
   20     20   
);
   21     21   
static REQUIREDMEMBEROUTPUT_MEMBER_REQUIRED_STRING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "aws.protocoltests.restxml.synthetic#RequiredMemberOutput$requiredString",
   24     24   
        "aws.protocoltests.restxml.synthetic",
   25     25   
        "RequiredMemberOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::String,
   28         -
    "required_string",
          28  +
    "requiredString",
   29     29   
    0,
   30     30   
);
   31     31   
static REQUIREDMEMBEROUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     32   
    REQUIREDMEMBEROUTPUT_SCHEMA_ID,
   33     33   
    ::aws_smithy_schema::ShapeType::Structure,
   34     34   
    &[&REQUIREDMEMBEROUTPUT_MEMBER_REQUIRED_STRING],
   35     35   
);
   36     36   
impl RequiredMemberOutput {
   37     37   
    /// The schema for this shape.
   38     38   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &REQUIREDMEMBEROUTPUT_SCHEMA;
   39     39   
}
   40     40   
impl ::aws_smithy_schema::serde::SerializableStruct for RequiredMemberOutput {
   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   
        {
   47     47   
            let val = &self.required_string;
   48     48   
            ser.write_string(&REQUIREDMEMBEROUTPUT_MEMBER_REQUIRED_STRING, val)?;
   49     49   
        }
   50     50   
        Ok(())
   51     51   
    }
   52     52   
}
   53     53   
impl RequiredMemberOutput {
   54     54   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   55         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   56         -
        deserializer: &mut D,
          55  +
    pub fn deserialize(
          56  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   57     57   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   58     58   
        #[allow(unused_variables, unused_mut)]
   59     59   
        let mut builder = Self::builder();
   60     60   
        #[allow(
   61     61   
            unused_variables,
   62     62   
            unreachable_code,
   63     63   
            clippy::single_match,
   64     64   
            clippy::match_single_binding,
   65     65   
            clippy::diverging_sub_expression
   66     66   
        )]
   67         -
        deserializer.read_struct(&REQUIREDMEMBEROUTPUT_SCHEMA, (), |_, member, deser| {
          67  +
        deserializer.read_struct(&REQUIREDMEMBEROUTPUT_SCHEMA, &mut |member, deser| {
   68     68   
            match member.member_index() {
   69     69   
                Some(0) => {
   70     70   
                    builder.required_string = Some(deser.read_string(member)?);
   71     71   
                }
   72     72   
                _ => {}
   73     73   
            }
   74     74   
            Ok(())
   75     75   
        })?;
          76  +
        builder.required_string = builder.required_string.or(Some(String::new()));
   76     77   
        builder
   77     78   
            .build()
   78     79   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   79     80   
    }
   80     81   
}
          82  +
impl RequiredMemberOutput {
          83  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          84  +
    pub fn deserialize_with_response(
          85  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          86  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          87  +
        _status: u16,
          88  +
        _body: &[u8],
          89  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          90  +
        Self::deserialize(deserializer)
          91  +
    }
          92  +
}
   81     93   
impl RequiredMemberOutput {
   82     94   
    /// Creates a new builder-style object to manufacture [`RequiredMemberOutput`](crate::operation::required_member::RequiredMemberOutput).
   83     95   
    pub fn builder() -> crate::operation::required_member::builders::RequiredMemberOutputBuilder {
   84     96   
        crate::operation::required_member::builders::RequiredMemberOutputBuilder::default()
   85     97   
    }
   86     98   
}
   87     99   
   88    100   
/// A builder for [`RequiredMemberOutput`](crate::operation::required_member::RequiredMemberOutput).
   89    101   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   90    102   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/string_header.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 `StringHeader`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct StringHeader;
    6      6   
impl StringHeader {
    7      7   
    /// Creates a new `StringHeader`
    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::string_header::StringHeaderInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::string_header::StringHeaderOutput::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::string_header::StringHeaderInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::string_header::StringHeaderOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::string_header::StringHeaderError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +166,171 @@
  124    128   
                crate::operation::string_header::StringHeaderError,
  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 StringHeaderResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for StringHeaderResponseDeserializer {
  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_string_header::de_string_header_http_error(status, headers, body)
  146    151   
        } else {
@@ -240,245 +300,309 @@
  260    265   
            .expect("the config must have a deserializer");
  261    266   
  262    267   
        let parsed = de.deserialize_streaming(&mut http_response);
  263    268   
        let parsed = parsed.unwrap_or_else(|| {
  264    269   
            let http_response = http_response.map(|body| {
  265    270   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  266    271   
                    body.bytes().unwrap(),
  267    272   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
  268    273   
                )))
  269    274   
            });
  270         -
            de.deserialize_nonstreaming(&http_response)
         275  +
            // Build a config bag with the protocol for schema-based deserialization
         276  +
            #[allow(unused_mut)]
         277  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         278  +
         279  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  271    280   
        });
  272    281   
        let parsed = parsed
  273    282   
            .expect("should be successful response")
  274    283   
            .downcast::<crate::operation::string_header::StringHeaderOutput>()
  275    284   
            .unwrap();
  276    285   
        ::pretty_assertions::assert_eq!(parsed.field, expected_output.field, "Unexpected value for `field`");
  277    286   
        ::pretty_assertions::assert_eq!(parsed.enum_header, expected_output.enum_header, "Unexpected value for `enum_header`");
  278    287   
    }
  279    288   
}
  280    289   

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/string_header/_string_header_input.rs

@@ -1,1 +69,83 @@
    2      2   
#[allow(missing_docs)] // documentation missing in model
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct StringHeaderInput {}
    6      6   
static STRINGHEADERINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    7      7   
    "aws.protocoltests.restxml.synthetic#StringHeaderInput",
    8      8   
    "aws.protocoltests.restxml.synthetic",
    9      9   
    "StringHeaderInput",
   10     10   
);
   11     11   
static STRINGHEADERINPUT_SCHEMA: ::aws_smithy_schema::Schema =
   12         -
    ::aws_smithy_schema::Schema::new_struct(STRINGHEADERINPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          12  +
    ::aws_smithy_schema::Schema::new_struct(STRINGHEADERINPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[])
          13  +
        .with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/StringHeader", None));
   13     14   
impl StringHeaderInput {
   14     15   
    /// The schema for this shape.
   15     16   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STRINGHEADERINPUT_SCHEMA;
   16     17   
}
   17     18   
impl ::aws_smithy_schema::serde::SerializableStruct for StringHeaderInput {
   18     19   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   19     20   
    fn serialize_members(
   20     21   
        &self,
   21     22   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   22     23   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   23     24   
        Ok(())
   24     25   
    }
   25     26   
}
   26     27   
impl StringHeaderInput {
   27     28   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   28         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   29         -
        deserializer: &mut D,
          29  +
    pub fn deserialize(
          30  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   30     31   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   31     32   
        #[allow(unused_variables, unused_mut)]
   32     33   
        let mut builder = Self::builder();
   33     34   
        #[allow(
   34     35   
            unused_variables,
   35     36   
            unreachable_code,
   36     37   
            clippy::single_match,
   37     38   
            clippy::match_single_binding,
   38     39   
            clippy::diverging_sub_expression
   39     40   
        )]
   40         -
        deserializer.read_struct(&STRINGHEADERINPUT_SCHEMA, (), |_, member, deser| {
          41  +
        deserializer.read_struct(&STRINGHEADERINPUT_SCHEMA, &mut |member, deser| {
   41     42   
            match member.member_index() {
   42     43   
                _ => {}
   43     44   
            }
   44     45   
            Ok(())
   45     46   
        })?;
   46     47   
        builder
   47     48   
            .build()
   48     49   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   49     50   
    }
   50     51   
}
          52  +
impl StringHeaderInput {
          53  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          54  +
    pub fn deserialize_with_response(
          55  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          56  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          57  +
        _status: u16,
          58  +
        _body: &[u8],
          59  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          60  +
        Self::builder()
          61  +
            .build()
          62  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
          63  +
    }
          64  +
}
   51     65   
impl StringHeaderInput {
   52     66   
    /// Creates a new builder-style object to manufacture [`StringHeaderInput`](crate::operation::string_header::StringHeaderInput).
   53     67   
    pub fn builder() -> crate::operation::string_header::builders::StringHeaderInputBuilder {
   54     68   
        crate::operation::string_header::builders::StringHeaderInputBuilder::default()
   55     69   
    }
   56     70   
}
   57     71   
   58     72   
/// A builder for [`StringHeaderInput`](crate::operation::string_header::StringHeaderInput).
   59     73   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   60     74   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/string_header/_string_header_output.rs

@@ -14,14 +130,151 @@
   34     34   
    0,
   35     35   
)
   36     36   
.with_http_header("x-field");
   37     37   
static STRINGHEADEROUTPUT_MEMBER_ENUM_HEADER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   38     38   
    ::aws_smithy_schema::ShapeId::from_static(
   39     39   
        "aws.protocoltests.restxml.synthetic#StringHeaderOutput$enumHeader",
   40     40   
        "aws.protocoltests.restxml.synthetic",
   41     41   
        "StringHeaderOutput",
   42     42   
    ),
   43     43   
    ::aws_smithy_schema::ShapeType::String,
   44         -
    "enum_header",
          44  +
    "enumHeader",
   45     45   
    1,
   46     46   
)
   47     47   
.with_http_header("x-enum");
   48     48   
static STRINGHEADEROUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   49     49   
    STRINGHEADEROUTPUT_SCHEMA_ID,
   50     50   
    ::aws_smithy_schema::ShapeType::Structure,
   51     51   
    &[&STRINGHEADEROUTPUT_MEMBER_FIELD, &STRINGHEADEROUTPUT_MEMBER_ENUM_HEADER],
   52     52   
);
   53     53   
impl StringHeaderOutput {
   54     54   
    /// The schema for this shape.
   55     55   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STRINGHEADEROUTPUT_SCHEMA;
   56     56   
}
   57     57   
impl ::aws_smithy_schema::serde::SerializableStruct for StringHeaderOutput {
   58     58   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   59     59   
    fn serialize_members(
   60     60   
        &self,
   61     61   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   62     62   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   63     63   
        if let Some(ref val) = self.field {
   64     64   
            ser.write_string(&STRINGHEADEROUTPUT_MEMBER_FIELD, val)?;
   65     65   
        }
   66     66   
        if let Some(ref val) = self.enum_header {
   67     67   
            ser.write_string(&STRINGHEADEROUTPUT_MEMBER_ENUM_HEADER, val.as_str())?;
   68     68   
        }
   69     69   
        Ok(())
   70     70   
    }
   71     71   
}
   72     72   
impl StringHeaderOutput {
   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(&STRINGHEADEROUTPUT_SCHEMA, (), |_, member, deser| {
          86  +
        deserializer.read_struct(&STRINGHEADEROUTPUT_SCHEMA, &mut |member, deser| {
   87     87   
            match member.member_index() {
   88     88   
                Some(0) => {
   89     89   
                    builder.field = Some(deser.read_string(member)?);
   90     90   
                }
   91     91   
                Some(1) => {
   92     92   
                    builder.enum_header = Some(crate::types::StringEnum::from(deser.read_string(member)?.as_str()));
   93     93   
                }
   94     94   
                _ => {}
   95     95   
            }
   96     96   
            Ok(())
   97     97   
        })?;
   98     98   
        Ok(builder.build())
   99     99   
    }
  100    100   
}
         101  +
impl StringHeaderOutput {
         102  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         103  +
    /// Header-bound members are read directly from headers, avoiding runtime
         104  +
    /// member iteration overhead. Body members are read via the deserializer.
         105  +
    pub fn deserialize_with_response(
         106  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         107  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         108  +
        _status: u16,
         109  +
        _body: &[u8],
         110  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         111  +
        #[allow(unused_variables, unused_mut)]
         112  +
        let mut builder = Self::builder();
         113  +
        if let Some(val) = headers.get("x-field") {
         114  +
            builder.field = Some(val.to_string());
         115  +
        }
         116  +
        if let Some(val) = headers.get("x-enum") {
         117  +
            builder.enum_header = Some(crate::types::StringEnum::from(val));
         118  +
        }
         119  +
        Ok(builder.build())
         120  +
    }
         121  +
}
  101    122   
impl StringHeaderOutput {
  102    123   
    /// Creates a new builder-style object to manufacture [`StringHeaderOutput`](crate::operation::string_header::StringHeaderOutput).
  103    124   
    pub fn builder() -> crate::operation::string_header::builders::StringHeaderOutputBuilder {
  104    125   
        crate::operation::string_header::builders::StringHeaderOutputBuilder::default()
  105    126   
    }
  106    127   
}
  107    128   
  108    129   
/// A builder for [`StringHeaderOutput`](crate::operation::string_header::StringHeaderOutput).
  109    130   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  110    131   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/xml_maps_flattened_nested_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 `XmlMapsFlattenedNestedXmlNamespace`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct XmlMapsFlattenedNestedXmlNamespace;
    6      6   
impl XmlMapsFlattenedNestedXmlNamespace {
    7      7   
    /// Creates a new `XmlMapsFlattenedNestedXmlNamespace`
    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::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceOutput::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::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +172,179 @@
  130    136   
                crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceError,
  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 XmlMapsFlattenedNestedXmlNamespaceResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlMapsFlattenedNestedXmlNamespaceResponseDeserializer {
  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_xml_maps_flattened_nested_xml_namespace::de_xml_maps_flattened_nested_xml_namespace_http_error(
  152    159   
                status, headers, body,
@@ -264,271 +324,335 @@
  284    291   
            .expect("the config must have a deserializer");
  285    292   
  286    293   
        let parsed = de.deserialize_streaming(&mut http_response);
  287    294   
        let parsed = parsed.unwrap_or_else(|| {
  288    295   
            let http_response = http_response.map(|body| {
  289    296   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  290    297   
                    body.bytes().unwrap(),
  291    298   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
  292    299   
                )))
  293    300   
            });
  294         -
            de.deserialize_nonstreaming(&http_response)
         301  +
            // Build a config bag with the protocol for schema-based deserialization
         302  +
            #[allow(unused_mut)]
         303  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         304  +
         305  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  295    306   
        });
  296    307   
        let parsed = parsed
  297    308   
            .expect("should be successful response")
  298    309   
            .downcast::<crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceOutput>()
  299    310   
            .unwrap();
  300    311   
        ::pretty_assertions::assert_eq!(parsed.my_map, expected_output.my_map, "Unexpected value for `my_map`");
  301    312   
    }
  302    313   
}
  303    314   
  304    315   
/// Error type for the `XmlMapsFlattenedNestedXmlNamespaceError` operation.