Client Test

Client Test

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

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

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/query_lists/_query_lists_input.rs

@@ -29,29 +130,130 @@
   49     49   
    "aws.protocoltests.ec2.synthetic",
   50     50   
    "QueryListsInput",
   51     51   
);
   52     52   
static QUERYLISTSINPUT_MEMBER_LIST_ARG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "aws.protocoltests.ec2.synthetic#QueryListsInput$ListArg",
   55     55   
        "aws.protocoltests.ec2.synthetic",
   56     56   
        "QueryListsInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::List,
   59         -
    "list_arg",
          59  +
    "ListArg",
   60     60   
    0,
   61     61   
);
   62     62   
static QUERYLISTSINPUT_MEMBER_COMPLEX_LIST_ARG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   63     63   
    ::aws_smithy_schema::ShapeId::from_static(
   64     64   
        "aws.protocoltests.ec2.synthetic#QueryListsInput$ComplexListArg",
   65     65   
        "aws.protocoltests.ec2.synthetic",
   66     66   
        "QueryListsInput",
   67     67   
    ),
   68     68   
    ::aws_smithy_schema::ShapeType::List,
   69         -
    "complex_list_arg",
          69  +
    "ComplexListArg",
   70     70   
    1,
   71     71   
);
   72     72   
static QUERYLISTSINPUT_MEMBER_LIST_ARG_WITH_XML_NAME_MEMBER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "aws.protocoltests.ec2.synthetic#QueryListsInput$ListArgWithXmlNameMember",
   75     75   
        "aws.protocoltests.ec2.synthetic",
   76     76   
        "QueryListsInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::List,
   79         -
    "list_arg_with_xml_name_member",
          79  +
    "ListArgWithXmlNameMember",
   80     80   
    2,
   81     81   
);
   82     82   
static QUERYLISTSINPUT_MEMBER_LIST_ARG_WITH_XML_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   83     83   
    ::aws_smithy_schema::ShapeId::from_static(
   84     84   
        "aws.protocoltests.ec2.synthetic#QueryListsInput$ListArgWithXmlName",
   85     85   
        "aws.protocoltests.ec2.synthetic",
   86     86   
        "QueryListsInput",
   87     87   
    ),
   88     88   
    ::aws_smithy_schema::ShapeType::List,
   89         -
    "list_arg_with_xml_name",
          89  +
    "ListArgWithXmlName",
   90     90   
    3,
   91     91   
)
   92     92   
.with_xml_name("Hi");
   93     93   
static QUERYLISTSINPUT_MEMBER_NESTED_WITH_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   94     94   
    ::aws_smithy_schema::ShapeId::from_static(
   95     95   
        "aws.protocoltests.ec2.synthetic#QueryListsInput$NestedWithList",
   96     96   
        "aws.protocoltests.ec2.synthetic",
   97     97   
        "QueryListsInput",
   98     98   
    ),
   99     99   
    ::aws_smithy_schema::ShapeType::Structure,
  100         -
    "nested_with_list",
         100  +
    "NestedWithList",
  101    101   
    4,
  102    102   
);
  103    103   
static QUERYLISTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  104    104   
    QUERYLISTSINPUT_SCHEMA_ID,
  105    105   
    ::aws_smithy_schema::ShapeType::Structure,
  106    106   
    &[
  107    107   
        &QUERYLISTSINPUT_MEMBER_LIST_ARG,
  108    108   
        &QUERYLISTSINPUT_MEMBER_COMPLEX_LIST_ARG,
  109    109   
        &QUERYLISTSINPUT_MEMBER_LIST_ARG_WITH_XML_NAME_MEMBER,
  110    110   
        &QUERYLISTSINPUT_MEMBER_LIST_ARG_WITH_XML_NAME,
@@ -146,146 +283,261 @@
  166    166   
            )?;
  167    167   
        }
  168    168   
        if let Some(ref val) = self.nested_with_list {
  169    169   
            ser.write_struct(&QUERYLISTSINPUT_MEMBER_NESTED_WITH_LIST, val)?;
  170    170   
        }
  171    171   
        Ok(())
  172    172   
    }
  173    173   
}
  174    174   
impl QueryListsInput {
  175    175   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  176         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  177         -
        deserializer: &mut D,
         176  +
    pub fn deserialize(
         177  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  178    178   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  179    179   
        #[allow(unused_variables, unused_mut)]
  180    180   
        let mut builder = Self::builder();
  181    181   
        #[allow(
  182    182   
            unused_variables,
  183    183   
            unreachable_code,
  184    184   
            clippy::single_match,
  185    185   
            clippy::match_single_binding,
  186    186   
            clippy::diverging_sub_expression
  187    187   
        )]
  188         -
        deserializer.read_struct(&QUERYLISTSINPUT_SCHEMA, (), |_, member, deser| {
         188  +
        deserializer.read_struct(&QUERYLISTSINPUT_SCHEMA, &mut |member, deser| {
  189    189   
            match member.member_index() {
  190    190   
                Some(0) => {
  191         -
                    builder.list_arg = Some({
  192         -
                        let container = if let Some(cap) = deser.container_size() {
  193         -
                            Vec::with_capacity(cap)
  194         -
                        } else {
  195         -
                            Vec::new()
  196         -
                        };
  197         -
                        deser.read_list(member, container, |mut list, deser| {
  198         -
                            list.push(deser.read_string(member)?);
  199         -
                            Ok(list)
  200         -
                        })?
  201         -
                    });
         191  +
                    builder.list_arg = Some(deser.read_string_list(member)?);
  202    192   
                }
  203    193   
                Some(1) => {
  204    194   
                    builder.complex_list_arg = Some({
  205         -
                        let container = if let Some(cap) = deser.container_size() {
  206         -
                            Vec::with_capacity(cap)
  207         -
                        } else {
  208         -
                            Vec::new()
  209         -
                        };
  210         -
                        deser.read_list(member, container, |mut list, deser| {
  211         -
                            list.push(crate::types::GreetingStruct::deserialize(deser)?);
  212         -
                            Ok(list)
  213         -
                        })?
         195  +
                        let mut container = Vec::new();
         196  +
                        deser.read_list(member, &mut |deser| {
         197  +
                            container.push(crate::types::GreetingStruct::deserialize(deser)?);
         198  +
                            Ok(())
         199  +
                        })?;
         200  +
                        container
  214    201   
                    });
  215    202   
                }
  216    203   
                Some(2) => {
  217         -
                    builder.list_arg_with_xml_name_member = Some({
  218         -
                        let container = if let Some(cap) = deser.container_size() {
  219         -
                            Vec::with_capacity(cap)
  220         -
                        } else {
  221         -
                            Vec::new()
  222         -
                        };
  223         -
                        deser.read_list(member, container, |mut list, deser| {
  224         -
                            list.push(deser.read_string(member)?);
  225         -
                            Ok(list)
  226         -
                        })?
  227         -
                    });
         204  +
                    builder.list_arg_with_xml_name_member = Some(deser.read_string_list(member)?);
  228    205   
                }
  229    206   
                Some(3) => {
  230         -
                    builder.list_arg_with_xml_name = Some({
  231         -
                        let container = if let Some(cap) = deser.container_size() {
  232         -
                            Vec::with_capacity(cap)
  233         -
                        } else {
  234         -
                            Vec::new()
  235         -
                        };
  236         -
                        deser.read_list(member, container, |mut list, deser| {
  237         -
                            list.push(deser.read_string(member)?);
  238         -
                            Ok(list)
  239         -
                        })?
  240         -
                    });
         207  +
                    builder.list_arg_with_xml_name = Some(deser.read_string_list(member)?);
  241    208   
                }
  242    209   
                Some(4) => {
  243    210   
                    builder.nested_with_list = Some(crate::types::NestedStructWithList::deserialize(deser)?);
  244    211   
                }
  245    212   
                _ => {}
  246    213   
            }
  247    214   
            Ok(())
  248    215   
        })?;
  249    216   
        builder
  250    217   
            .build()
  251    218   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  252    219   
    }
  253    220   
}
         221  +
impl QueryListsInput {
         222  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         223  +
    pub fn deserialize_with_response(
         224  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         225  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         226  +
        _status: u16,
         227  +
        _body: &[u8],
         228  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         229  +
        Self::deserialize(deserializer)
         230  +
    }
         231  +
}
  254    232   
impl QueryListsInput {
  255    233   
    /// Creates a new builder-style object to manufacture [`QueryListsInput`](crate::operation::query_lists::QueryListsInput).
  256    234   
    pub fn builder() -> crate::operation::query_lists::builders::QueryListsInputBuilder {
  257    235   
        crate::operation::query_lists::builders::QueryListsInputBuilder::default()
  258    236   
    }
  259    237   
}
  260    238   
  261    239   
/// A builder for [`QueryListsInput`](crate::operation::query_lists::QueryListsInput).
  262    240   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  263    241   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/query_lists/_query_lists_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 QueryListsOutput {
   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(&QUERYLISTSOUTPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&QUERYLISTSOUTPUT_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 QueryListsOutput {
          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 QueryListsOutput {
   50     61   
    /// Creates a new builder-style object to manufacture [`QueryListsOutput`](crate::operation::query_lists::QueryListsOutput).
   51     62   
    pub fn builder() -> crate::operation::query_lists::builders::QueryListsOutputBuilder {
   52     63   
        crate::operation::query_lists::builders::QueryListsOutputBuilder::default()
   53     64   
    }
   54     65   
}
   55     66   
   56     67   
/// A builder for [`QueryListsOutput`](crate::operation::query_lists::QueryListsOutput).
   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/ec2_query/rust-client-codegen/src/operation/query_timestamps.rs

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `QueryTimestamps`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct QueryTimestamps;
    6      6   
impl QueryTimestamps {
    7      7   
    /// Creates a new `QueryTimestamps`
    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::query_timestamps::QueryTimestampsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::query_timestamps::QueryTimestampsOutput::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::query_timestamps::QueryTimestampsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::query_timestamps::QueryTimestampsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::query_timestamps::QueryTimestampsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +166,171 @@
  124    128   
                crate::operation::query_timestamps::QueryTimestampsError,
  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 QueryTimestampsResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for QueryTimestampsResponseDeserializer {
  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_query_timestamps::de_query_timestamps_http_error(status, headers, body)
  146    151   
        } else {

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/query_timestamps/_query_timestamps_input.rs

@@ -9,9 +157,169 @@
   29     29   
    "aws.protocoltests.ec2.synthetic",
   30     30   
    "QueryTimestampsInput",
   31     31   
);
   32     32   
static QUERYTIMESTAMPSINPUT_MEMBER_NORMAL_FORMAT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   33     33   
    ::aws_smithy_schema::ShapeId::from_static(
   34     34   
        "aws.protocoltests.ec2.synthetic#QueryTimestampsInput$normalFormat",
   35     35   
        "aws.protocoltests.ec2.synthetic",
   36     36   
        "QueryTimestampsInput",
   37     37   
    ),
   38     38   
    ::aws_smithy_schema::ShapeType::Timestamp,
   39         -
    "normal_format",
          39  +
    "normalFormat",
   40     40   
    0,
   41     41   
);
   42     42   
static QUERYTIMESTAMPSINPUT_MEMBER_EPOCH_MEMBER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   43     43   
    ::aws_smithy_schema::ShapeId::from_static(
   44     44   
        "aws.protocoltests.ec2.synthetic#QueryTimestampsInput$epochMember",
   45     45   
        "aws.protocoltests.ec2.synthetic",
   46     46   
        "QueryTimestampsInput",
   47     47   
    ),
   48     48   
    ::aws_smithy_schema::ShapeType::Timestamp,
   49         -
    "epoch_member",
          49  +
    "epochMember",
   50     50   
    1,
   51     51   
)
   52     52   
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::EpochSeconds);
   53     53   
static QUERYTIMESTAMPSINPUT_MEMBER_EPOCH_TARGET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   54     54   
    ::aws_smithy_schema::ShapeId::from_static(
   55     55   
        "aws.protocoltests.ec2.synthetic#QueryTimestampsInput$epochTarget",
   56     56   
        "aws.protocoltests.ec2.synthetic",
   57     57   
        "QueryTimestampsInput",
   58     58   
    ),
   59     59   
    ::aws_smithy_schema::ShapeType::Timestamp,
   60         -
    "epoch_target",
          60  +
    "epochTarget",
   61     61   
    2,
   62         -
);
          62  +
)
          63  +
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::EpochSeconds);
   63     64   
static QUERYTIMESTAMPSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   64     65   
    QUERYTIMESTAMPSINPUT_SCHEMA_ID,
   65     66   
    ::aws_smithy_schema::ShapeType::Structure,
   66     67   
    &[
   67     68   
        &QUERYTIMESTAMPSINPUT_MEMBER_NORMAL_FORMAT,
   68     69   
        &QUERYTIMESTAMPSINPUT_MEMBER_EPOCH_MEMBER,
   69     70   
        &QUERYTIMESTAMPSINPUT_MEMBER_EPOCH_TARGET,
   70     71   
    ],
   71     72   
);
   72     73   
impl QueryTimestampsInput {
   73     74   
    /// The schema for this shape.
   74     75   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &QUERYTIMESTAMPSINPUT_SCHEMA;
   75     76   
}
   76     77   
impl ::aws_smithy_schema::serde::SerializableStruct for QueryTimestampsInput {
   77     78   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   78     79   
    fn serialize_members(
   79     80   
        &self,
   80     81   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   81     82   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   82     83   
        if let Some(ref val) = self.normal_format {
   83     84   
            ser.write_timestamp(&QUERYTIMESTAMPSINPUT_MEMBER_NORMAL_FORMAT, val)?;
   84     85   
        }
   85     86   
        if let Some(ref val) = self.epoch_member {
   86     87   
            ser.write_timestamp(&QUERYTIMESTAMPSINPUT_MEMBER_EPOCH_MEMBER, val)?;
   87     88   
        }
   88     89   
        if let Some(ref val) = self.epoch_target {
   89     90   
            ser.write_timestamp(&QUERYTIMESTAMPSINPUT_MEMBER_EPOCH_TARGET, val)?;
   90     91   
        }
   91     92   
        Ok(())
   92     93   
    }
   93     94   
}
   94     95   
impl QueryTimestampsInput {
   95     96   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   96         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   97         -
        deserializer: &mut D,
          97  +
    pub fn deserialize(
          98  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   98     99   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   99    100   
        #[allow(unused_variables, unused_mut)]
  100    101   
        let mut builder = Self::builder();
  101    102   
        #[allow(
  102    103   
            unused_variables,
  103    104   
            unreachable_code,
  104    105   
            clippy::single_match,
  105    106   
            clippy::match_single_binding,
  106    107   
            clippy::diverging_sub_expression
  107    108   
        )]
  108         -
        deserializer.read_struct(&QUERYTIMESTAMPSINPUT_SCHEMA, (), |_, member, deser| {
         109  +
        deserializer.read_struct(&QUERYTIMESTAMPSINPUT_SCHEMA, &mut |member, deser| {
  109    110   
            match member.member_index() {
  110    111   
                Some(0) => {
  111    112   
                    builder.normal_format = Some(deser.read_timestamp(member)?);
  112    113   
                }
  113    114   
                Some(1) => {
  114    115   
                    builder.epoch_member = Some(deser.read_timestamp(member)?);
  115    116   
                }
  116    117   
                Some(2) => {
  117    118   
                    builder.epoch_target = Some(deser.read_timestamp(member)?);
  118    119   
                }
  119    120   
                _ => {}
  120    121   
            }
  121    122   
            Ok(())
  122    123   
        })?;
  123    124   
        builder
  124    125   
            .build()
  125    126   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  126    127   
    }
  127    128   
}
         129  +
impl QueryTimestampsInput {
         130  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         131  +
    pub fn deserialize_with_response(
         132  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         133  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         134  +
        _status: u16,
         135  +
        _body: &[u8],
         136  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         137  +
        Self::deserialize(deserializer)
         138  +
    }
         139  +
}
  128    140   
impl QueryTimestampsInput {
  129    141   
    /// Creates a new builder-style object to manufacture [`QueryTimestampsInput`](crate::operation::query_timestamps::QueryTimestampsInput).
  130    142   
    pub fn builder() -> crate::operation::query_timestamps::builders::QueryTimestampsInputBuilder {
  131    143   
        crate::operation::query_timestamps::builders::QueryTimestampsInputBuilder::default()
  132    144   
    }
  133    145   
}
  134    146   
  135    147   
/// A builder for [`QueryTimestampsInput`](crate::operation::query_timestamps::QueryTimestampsInput).
  136    148   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  137    149   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/query_timestamps/_query_timestamps_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 QueryTimestampsOutput {
   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(&QUERYTIMESTAMPSOUTPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&QUERYTIMESTAMPSOUTPUT_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 QueryTimestampsOutput {
          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 QueryTimestampsOutput {
   50     61   
    /// Creates a new builder-style object to manufacture [`QueryTimestampsOutput`](crate::operation::query_timestamps::QueryTimestampsOutput).
   51     62   
    pub fn builder() -> crate::operation::query_timestamps::builders::QueryTimestampsOutputBuilder {
   52     63   
        crate::operation::query_timestamps::builders::QueryTimestampsOutputBuilder::default()
   53     64   
    }
   54     65   
}
   55     66   
   56     67   
/// A builder for [`QueryTimestampsOutput`](crate::operation::query_timestamps::QueryTimestampsOutput).
   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/ec2_query/rust-client-codegen/src/operation/recursive_xml_shapes.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 `RecursiveXmlShapes`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct RecursiveXmlShapes;
    6      6   
impl RecursiveXmlShapes {
    7      7   
    /// Creates a new `RecursiveXmlShapes`
    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::recursive_xml_shapes::RecursiveXmlShapesInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::recursive_xml_shapes::RecursiveXmlShapesOutput::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::recursive_xml_shapes::RecursiveXmlShapesInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::recursive_xml_shapes::RecursiveXmlShapesOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::recursive_xml_shapes::RecursiveXmlShapesError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +166,171 @@
  124    128   
                crate::operation::recursive_xml_shapes::RecursiveXmlShapesError,
  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 RecursiveXmlShapesResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for RecursiveXmlShapesResponseDeserializer {
  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_recursive_xml_shapes::de_recursive_xml_shapes_http_error(status, headers, body)
  146    151   
        } else {
@@ -258,263 +318,327 @@
  278    283   
            .expect("the config must have a deserializer");
  279    284   
  280    285   
        let parsed = de.deserialize_streaming(&mut http_response);
  281    286   
        let parsed = parsed.unwrap_or_else(|| {
  282    287   
            let http_response = http_response.map(|body| {
  283    288   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  284    289   
                    body.bytes().unwrap(),
  285    290   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  286    291   
                )))
  287    292   
            });
  288         -
            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)
  289    298   
        });
  290    299   
        let parsed = parsed
  291    300   
            .expect("should be successful response")
  292    301   
            .downcast::<crate::operation::recursive_xml_shapes::RecursiveXmlShapesOutput>()
  293    302   
            .unwrap();
  294    303   
        ::pretty_assertions::assert_eq!(parsed.nested, expected_output.nested, "Unexpected value for `nested`");
  295    304   
    }
  296    305   
}
  297    306   
  298    307   
/// Error type for the `RecursiveXmlShapesError` operation.

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/recursive_xml_shapes/_recursive_xml_shapes_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 RecursiveXmlShapesInput {
   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(&RECURSIVEXMLSHAPESINPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&RECURSIVEXMLSHAPESINPUT_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 RecursiveXmlShapesInput {
          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 RecursiveXmlShapesInput {
   52     65   
    /// Creates a new builder-style object to manufacture [`RecursiveXmlShapesInput`](crate::operation::recursive_xml_shapes::RecursiveXmlShapesInput).
   53     66   
    pub fn builder() -> crate::operation::recursive_xml_shapes::builders::RecursiveXmlShapesInputBuilder {
   54     67   
        crate::operation::recursive_xml_shapes::builders::RecursiveXmlShapesInputBuilder::default()
   55     68   
    }
   56     69   
}
   57     70   
   58     71   
/// A builder for [`RecursiveXmlShapesInput`](crate::operation::recursive_xml_shapes::RecursiveXmlShapesInput).
   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/ec2_query/rust-client-codegen/src/operation/recursive_xml_shapes/_recursive_xml_shapes_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.nested {
   46     46   
            ser.write_struct(&RECURSIVEXMLSHAPESOUTPUT_MEMBER_NESTED, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl RecursiveXmlShapesOutput {
   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(&RECURSIVEXMLSHAPESOUTPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&RECURSIVEXMLSHAPESOUTPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.nested = Some(crate::types::RecursiveXmlShapesOutputNested1::deserialize(deser)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        Ok(builder.build())
   75     75   
    }
   76     76   
}
          77  +
impl RecursiveXmlShapesOutput {
          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 RecursiveXmlShapesOutput {
   78     89   
    /// Creates a new builder-style object to manufacture [`RecursiveXmlShapesOutput`](crate::operation::recursive_xml_shapes::RecursiveXmlShapesOutput).
   79     90   
    pub fn builder() -> crate::operation::recursive_xml_shapes::builders::RecursiveXmlShapesOutputBuilder {
   80     91   
        crate::operation::recursive_xml_shapes::builders::RecursiveXmlShapesOutputBuilder::default()
   81     92   
    }
   82     93   
}
   83     94   
   84     95   
/// A builder for [`RecursiveXmlShapesOutput`](crate::operation::recursive_xml_shapes::RecursiveXmlShapesOutput).
   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/ec2_query/rust-client-codegen/src/operation/simple_input_params.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 `SimpleInputParams`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct SimpleInputParams;
    6      6   
impl SimpleInputParams {
    7      7   
    /// Creates a new `SimpleInputParams`
    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::simple_input_params::SimpleInputParamsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::simple_input_params::SimpleInputParamsOutput::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::simple_input_params::SimpleInputParamsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::simple_input_params::SimpleInputParamsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::simple_input_params::SimpleInputParamsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +166,171 @@
  124    128   
                crate::operation::simple_input_params::SimpleInputParamsError,
  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 SimpleInputParamsResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for SimpleInputParamsResponseDeserializer {
  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_simple_input_params::de_simple_input_params_http_error(status, headers, body)
  146    151   
        } else {

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/simple_input_params/_simple_input_params_input.rs

@@ -57,57 +218,218 @@
   77     77   
    "aws.protocoltests.ec2.synthetic",
   78     78   
    "SimpleInputParamsInput",
   79     79   
);
   80     80   
static SIMPLEINPUTPARAMSINPUT_MEMBER_FOO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   81     81   
    ::aws_smithy_schema::ShapeId::from_static(
   82     82   
        "aws.protocoltests.ec2.synthetic#SimpleInputParamsInput$Foo",
   83     83   
        "aws.protocoltests.ec2.synthetic",
   84     84   
        "SimpleInputParamsInput",
   85     85   
    ),
   86     86   
    ::aws_smithy_schema::ShapeType::String,
   87         -
    "foo",
          87  +
    "Foo",
   88     88   
    0,
   89     89   
);
   90     90   
static SIMPLEINPUTPARAMSINPUT_MEMBER_BAR: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   91     91   
    ::aws_smithy_schema::ShapeId::from_static(
   92     92   
        "aws.protocoltests.ec2.synthetic#SimpleInputParamsInput$Bar",
   93     93   
        "aws.protocoltests.ec2.synthetic",
   94     94   
        "SimpleInputParamsInput",
   95     95   
    ),
   96     96   
    ::aws_smithy_schema::ShapeType::String,
   97         -
    "bar",
          97  +
    "Bar",
   98     98   
    1,
   99     99   
);
  100    100   
static SIMPLEINPUTPARAMSINPUT_MEMBER_BAZ: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  101    101   
    ::aws_smithy_schema::ShapeId::from_static(
  102    102   
        "aws.protocoltests.ec2.synthetic#SimpleInputParamsInput$Baz",
  103    103   
        "aws.protocoltests.ec2.synthetic",
  104    104   
        "SimpleInputParamsInput",
  105    105   
    ),
  106    106   
    ::aws_smithy_schema::ShapeType::Boolean,
  107         -
    "baz",
         107  +
    "Baz",
  108    108   
    2,
  109    109   
);
  110    110   
static SIMPLEINPUTPARAMSINPUT_MEMBER_BAM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  111    111   
    ::aws_smithy_schema::ShapeId::from_static(
  112    112   
        "aws.protocoltests.ec2.synthetic#SimpleInputParamsInput$Bam",
  113    113   
        "aws.protocoltests.ec2.synthetic",
  114    114   
        "SimpleInputParamsInput",
  115    115   
    ),
  116    116   
    ::aws_smithy_schema::ShapeType::Integer,
  117         -
    "bam",
         117  +
    "Bam",
  118    118   
    3,
  119    119   
);
  120    120   
static SIMPLEINPUTPARAMSINPUT_MEMBER_FLOAT_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  121    121   
    ::aws_smithy_schema::ShapeId::from_static(
  122    122   
        "aws.protocoltests.ec2.synthetic#SimpleInputParamsInput$FloatValue",
  123    123   
        "aws.protocoltests.ec2.synthetic",
  124    124   
        "SimpleInputParamsInput",
  125    125   
    ),
  126    126   
    ::aws_smithy_schema::ShapeType::Float,
  127         -
    "float_value",
         127  +
    "FloatValue",
  128    128   
    4,
  129    129   
);
  130    130   
static SIMPLEINPUTPARAMSINPUT_MEMBER_BOO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  131    131   
    ::aws_smithy_schema::ShapeId::from_static(
  132    132   
        "aws.protocoltests.ec2.synthetic#SimpleInputParamsInput$Boo",
  133    133   
        "aws.protocoltests.ec2.synthetic",
  134    134   
        "SimpleInputParamsInput",
  135    135   
    ),
  136    136   
    ::aws_smithy_schema::ShapeType::Double,
  137         -
    "boo",
         137  +
    "Boo",
  138    138   
    5,
  139    139   
);
  140    140   
static SIMPLEINPUTPARAMSINPUT_MEMBER_QUX: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  141    141   
    ::aws_smithy_schema::ShapeId::from_static(
  142    142   
        "aws.protocoltests.ec2.synthetic#SimpleInputParamsInput$Qux",
  143    143   
        "aws.protocoltests.ec2.synthetic",
  144    144   
        "SimpleInputParamsInput",
  145    145   
    ),
  146    146   
    ::aws_smithy_schema::ShapeType::Blob,
  147         -
    "qux",
         147  +
    "Qux",
  148    148   
    6,
  149    149   
);
  150    150   
static SIMPLEINPUTPARAMSINPUT_MEMBER_FOO_ENUM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  151    151   
    ::aws_smithy_schema::ShapeId::from_static(
  152    152   
        "aws.protocoltests.ec2.synthetic#SimpleInputParamsInput$FooEnum",
  153    153   
        "aws.protocoltests.ec2.synthetic",
  154    154   
        "SimpleInputParamsInput",
  155    155   
    ),
  156    156   
    ::aws_smithy_schema::ShapeType::String,
  157         -
    "foo_enum",
         157  +
    "FooEnum",
  158    158   
    7,
  159    159   
);
  160    160   
static SIMPLEINPUTPARAMSINPUT_MEMBER_HAS_QUERY_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  161    161   
    ::aws_smithy_schema::ShapeId::from_static(
  162    162   
        "aws.protocoltests.ec2.synthetic#SimpleInputParamsInput$HasQueryName",
  163    163   
        "aws.protocoltests.ec2.synthetic",
  164    164   
        "SimpleInputParamsInput",
  165    165   
    ),
  166    166   
    ::aws_smithy_schema::ShapeType::String,
  167         -
    "has_query_name",
         167  +
    "HasQueryName",
  168    168   
    8,
  169    169   
);
  170    170   
static SIMPLEINPUTPARAMSINPUT_MEMBER_HAS_QUERY_AND_XML_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  171    171   
    ::aws_smithy_schema::ShapeId::from_static(
  172    172   
        "aws.protocoltests.ec2.synthetic#SimpleInputParamsInput$HasQueryAndXmlName",
  173    173   
        "aws.protocoltests.ec2.synthetic",
  174    174   
        "SimpleInputParamsInput",
  175    175   
    ),
  176    176   
    ::aws_smithy_schema::ShapeType::String,
  177         -
    "has_query_and_xml_name",
         177  +
    "HasQueryAndXmlName",
  178    178   
    9,
  179    179   
)
  180    180   
.with_xml_name("hasQueryAndXmlName");
  181    181   
static SIMPLEINPUTPARAMSINPUT_MEMBER_USES_XML_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  182    182   
    ::aws_smithy_schema::ShapeId::from_static(
  183    183   
        "aws.protocoltests.ec2.synthetic#SimpleInputParamsInput$UsesXmlName",
  184    184   
        "aws.protocoltests.ec2.synthetic",
  185    185   
        "SimpleInputParamsInput",
  186    186   
    ),
  187    187   
    ::aws_smithy_schema::ShapeType::String,
  188         -
    "uses_xml_name",
         188  +
    "UsesXmlName",
  189    189   
    10,
  190    190   
)
  191    191   
.with_xml_name("usesXmlName");
  192    192   
static SIMPLEINPUTPARAMSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  193    193   
    SIMPLEINPUTPARAMSINPUT_SCHEMA_ID,
  194    194   
    ::aws_smithy_schema::ShapeType::Structure,
  195    195   
    &[
  196    196   
        &SIMPLEINPUTPARAMSINPUT_MEMBER_FOO,
  197    197   
        &SIMPLEINPUTPARAMSINPUT_MEMBER_BAR,
  198    198   
        &SIMPLEINPUTPARAMSINPUT_MEMBER_BAZ,
@@ -227,227 +342,353 @@
  247    247   
            ser.write_string(&SIMPLEINPUTPARAMSINPUT_MEMBER_HAS_QUERY_AND_XML_NAME, val)?;
  248    248   
        }
  249    249   
        if let Some(ref val) = self.uses_xml_name {
  250    250   
            ser.write_string(&SIMPLEINPUTPARAMSINPUT_MEMBER_USES_XML_NAME, val)?;
  251    251   
        }
  252    252   
        Ok(())
  253    253   
    }
  254    254   
}
  255    255   
impl SimpleInputParamsInput {
  256    256   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  257         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  258         -
        deserializer: &mut D,
         257  +
    pub fn deserialize(
         258  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  259    259   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  260    260   
        #[allow(unused_variables, unused_mut)]
  261    261   
        let mut builder = Self::builder();
  262    262   
        #[allow(
  263    263   
            unused_variables,
  264    264   
            unreachable_code,
  265    265   
            clippy::single_match,
  266    266   
            clippy::match_single_binding,
  267    267   
            clippy::diverging_sub_expression
  268    268   
        )]
  269         -
        deserializer.read_struct(&SIMPLEINPUTPARAMSINPUT_SCHEMA, (), |_, member, deser| {
         269  +
        deserializer.read_struct(&SIMPLEINPUTPARAMSINPUT_SCHEMA, &mut |member, deser| {
  270    270   
            match member.member_index() {
  271    271   
                Some(0) => {
  272    272   
                    builder.foo = Some(deser.read_string(member)?);
  273    273   
                }
  274    274   
                Some(1) => {
  275    275   
                    builder.bar = Some(deser.read_string(member)?);
  276    276   
                }
  277    277   
                Some(2) => {
  278    278   
                    builder.baz = Some(deser.read_boolean(member)?);
  279    279   
                }
  280    280   
                Some(3) => {
  281    281   
                    builder.bam = Some(deser.read_integer(member)?);
  282    282   
                }
  283    283   
                Some(4) => {
  284    284   
                    builder.float_value = Some(deser.read_float(member)?);
  285    285   
                }
  286    286   
                Some(5) => {
  287    287   
                    builder.boo = Some(deser.read_double(member)?);
  288    288   
                }
  289    289   
                Some(6) => {
  290    290   
                    builder.qux = Some(deser.read_blob(member)?);
  291    291   
                }
  292    292   
                Some(7) => {
  293    293   
                    builder.foo_enum = Some(crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
  294    294   
                }
  295    295   
                Some(8) => {
  296    296   
                    builder.has_query_name = Some(deser.read_string(member)?);
  297    297   
                }
  298    298   
                Some(9) => {
  299    299   
                    builder.has_query_and_xml_name = Some(deser.read_string(member)?);
  300    300   
                }
  301    301   
                Some(10) => {
  302    302   
                    builder.uses_xml_name = Some(deser.read_string(member)?);
  303    303   
                }
  304    304   
                _ => {}
  305    305   
            }
  306    306   
            Ok(())
  307    307   
        })?;
  308    308   
        builder
  309    309   
            .build()
  310    310   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  311    311   
    }
  312    312   
}
         313  +
impl SimpleInputParamsInput {
         314  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         315  +
    pub fn deserialize_with_response(
         316  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         317  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         318  +
        _status: u16,
         319  +
        _body: &[u8],
         320  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         321  +
        Self::deserialize(deserializer)
         322  +
    }
         323  +
}
  313    324   
impl SimpleInputParamsInput {
  314    325   
    /// Creates a new builder-style object to manufacture [`SimpleInputParamsInput`](crate::operation::simple_input_params::SimpleInputParamsInput).
  315    326   
    pub fn builder() -> crate::operation::simple_input_params::builders::SimpleInputParamsInputBuilder {
  316    327   
        crate::operation::simple_input_params::builders::SimpleInputParamsInputBuilder::default()
  317    328   
    }
  318    329   
}
  319    330   
  320    331   
/// A builder for [`SimpleInputParamsInput`](crate::operation::simple_input_params::SimpleInputParamsInput).
  321    332   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  322    333   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/simple_input_params/_simple_input_params_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 SimpleInputParamsOutput {
   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(&SIMPLEINPUTPARAMSOUTPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&SIMPLEINPUTPARAMSOUTPUT_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 SimpleInputParamsOutput {
          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 SimpleInputParamsOutput {
   50     61   
    /// Creates a new builder-style object to manufacture [`SimpleInputParamsOutput`](crate::operation::simple_input_params::SimpleInputParamsOutput).
   51     62   
    pub fn builder() -> crate::operation::simple_input_params::builders::SimpleInputParamsOutputBuilder {
   52     63   
        crate::operation::simple_input_params::builders::SimpleInputParamsOutputBuilder::default()
   53     64   
    }
   54     65   
}
   55     66   
   56     67   
/// A builder for [`SimpleInputParamsOutput`](crate::operation::simple_input_params::SimpleInputParamsOutput).
   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/ec2_query/rust-client-codegen/src/operation/simple_scalar_xml_properties.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 `SimpleScalarXmlProperties`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct SimpleScalarXmlProperties;
    6      6   
impl SimpleScalarXmlProperties {
    7      7   
    /// Creates a new `SimpleScalarXmlProperties`
    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::simple_scalar_xml_properties::SimpleScalarXmlPropertiesInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesOutput::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::simple_scalar_xml_properties::SimpleScalarXmlPropertiesInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +172,179 @@
  130    136   
                crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesError,
  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 SimpleScalarXmlPropertiesResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for SimpleScalarXmlPropertiesResponseDeserializer {
  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_simple_scalar_xml_properties::de_simple_scalar_xml_properties_http_error(status, headers, body)
  152    159   
        } else {
@@ -255,262 +315,326 @@
  275    282   
            .expect("the config must have a deserializer");
  276    283   
  277    284   
        let parsed = de.deserialize_streaming(&mut http_response);
  278    285   
        let parsed = parsed.unwrap_or_else(|| {
  279    286   
            let http_response = http_response.map(|body| {
  280    287   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  281    288   
                    body.bytes().unwrap(),
  282    289   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  283    290   
                )))
  284    291   
            });
  285         -
            de.deserialize_nonstreaming(&http_response)
         292  +
            // Build a config bag with the protocol for schema-based deserialization
         293  +
            #[allow(unused_mut)]
         294  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         295  +
         296  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  286    297   
        });
  287    298   
        let parsed = parsed
  288    299   
            .expect("should be successful response")
  289    300   
            .downcast::<crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesOutput>()
  290    301   
            .unwrap();
  291    302   
        ::pretty_assertions::assert_eq!(parsed.string_value, expected_output.string_value, "Unexpected value for `string_value`");
  292    303   
        ::pretty_assertions::assert_eq!(
  293    304   
            parsed.empty_string_value,
  294    305   
            expected_output.empty_string_value,
  295    306   
            "Unexpected value for `empty_string_value`"
@@ -335,346 +395,410 @@
  355    366   
            .expect("the config must have a deserializer");
  356    367   
  357    368   
        let parsed = de.deserialize_streaming(&mut http_response);
  358    369   
        let parsed = parsed.unwrap_or_else(|| {
  359    370   
            let http_response = http_response.map(|body| {
  360    371   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  361    372   
                    body.bytes().unwrap(),
  362    373   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  363    374   
                )))
  364    375   
            });
  365         -
            de.deserialize_nonstreaming(&http_response)
         376  +
            // Build a config bag with the protocol for schema-based deserialization
         377  +
            #[allow(unused_mut)]
         378  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         379  +
         380  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  366    381   
        });
  367    382   
        let parsed = parsed
  368    383   
            .expect("should be successful response")
  369    384   
            .downcast::<crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesOutput>()
  370    385   
            .unwrap();
  371    386   
        ::pretty_assertions::assert_eq!(parsed.string_value, expected_output.string_value, "Unexpected value for `string_value`");
  372    387   
        ::pretty_assertions::assert_eq!(
  373    388   
            parsed.empty_string_value,
  374    389   
            expected_output.empty_string_value,
  375    390   
            "Unexpected value for `empty_string_value`"
@@ -415,430 +475,494 @@
  435    450   
            .expect("the config must have a deserializer");
  436    451   
  437    452   
        let parsed = de.deserialize_streaming(&mut http_response);
  438    453   
        let parsed = parsed.unwrap_or_else(|| {
  439    454   
            let http_response = http_response.map(|body| {
  440    455   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  441    456   
                    body.bytes().unwrap(),
  442    457   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  443    458   
                )))
  444    459   
            });
  445         -
            de.deserialize_nonstreaming(&http_response)
         460  +
            // Build a config bag with the protocol for schema-based deserialization
         461  +
            #[allow(unused_mut)]
         462  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         463  +
         464  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  446    465   
        });
  447    466   
        let parsed = parsed
  448    467   
            .expect("should be successful response")
  449    468   
            .downcast::<crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesOutput>()
  450    469   
            .unwrap();
  451    470   
        ::pretty_assertions::assert_eq!(parsed.string_value, expected_output.string_value, "Unexpected value for `string_value`");
  452    471   
        ::pretty_assertions::assert_eq!(
  453    472   
            parsed.empty_string_value,
  454    473   
            expected_output.empty_string_value,
  455    474   
            "Unexpected value for `empty_string_value`"
@@ -495,514 +555,578 @@
  515    534   
            .expect("the config must have a deserializer");
  516    535   
  517    536   
        let parsed = de.deserialize_streaming(&mut http_response);
  518    537   
        let parsed = parsed.unwrap_or_else(|| {
  519    538   
            let http_response = http_response.map(|body| {
  520    539   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  521    540   
                    body.bytes().unwrap(),
  522    541   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  523    542   
                )))
  524    543   
            });
  525         -
            de.deserialize_nonstreaming(&http_response)
         544  +
            // Build a config bag with the protocol for schema-based deserialization
         545  +
            #[allow(unused_mut)]
         546  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         547  +
         548  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  526    549   
        });
  527    550   
        let parsed = parsed
  528    551   
            .expect("should be successful response")
  529    552   
            .downcast::<crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesOutput>()
  530    553   
            .unwrap();
  531    554   
        ::pretty_assertions::assert_eq!(parsed.string_value, expected_output.string_value, "Unexpected value for `string_value`");
  532    555   
        ::pretty_assertions::assert_eq!(
  533    556   
            parsed.empty_string_value,
  534    557   
            expected_output.empty_string_value,
  535    558   
            "Unexpected value for `empty_string_value`"

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

@@ -51,51 +201,201 @@
   71     71   
    "aws.protocoltests.ec2.synthetic",
   72     72   
    "SimpleScalarXmlPropertiesOutput",
   73     73   
);
   74     74   
static SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_STRING_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   75     75   
    ::aws_smithy_schema::ShapeId::from_static(
   76     76   
        "aws.protocoltests.ec2.synthetic#SimpleScalarXmlPropertiesOutput$stringValue",
   77     77   
        "aws.protocoltests.ec2.synthetic",
   78     78   
        "SimpleScalarXmlPropertiesOutput",
   79     79   
    ),
   80     80   
    ::aws_smithy_schema::ShapeType::String,
   81         -
    "string_value",
          81  +
    "stringValue",
   82     82   
    0,
   83     83   
);
   84     84   
static SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_EMPTY_STRING_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   85     85   
    ::aws_smithy_schema::ShapeId::from_static(
   86     86   
        "aws.protocoltests.ec2.synthetic#SimpleScalarXmlPropertiesOutput$emptyStringValue",
   87     87   
        "aws.protocoltests.ec2.synthetic",
   88     88   
        "SimpleScalarXmlPropertiesOutput",
   89     89   
    ),
   90     90   
    ::aws_smithy_schema::ShapeType::String,
   91         -
    "empty_string_value",
          91  +
    "emptyStringValue",
   92     92   
    1,
   93     93   
);
   94     94   
static SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_TRUE_BOOLEAN_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   95     95   
    ::aws_smithy_schema::ShapeId::from_static(
   96     96   
        "aws.protocoltests.ec2.synthetic#SimpleScalarXmlPropertiesOutput$trueBooleanValue",
   97     97   
        "aws.protocoltests.ec2.synthetic",
   98     98   
        "SimpleScalarXmlPropertiesOutput",
   99     99   
    ),
  100    100   
    ::aws_smithy_schema::ShapeType::Boolean,
  101         -
    "true_boolean_value",
         101  +
    "trueBooleanValue",
  102    102   
    2,
  103    103   
);
  104    104   
static SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_FALSE_BOOLEAN_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  105    105   
    ::aws_smithy_schema::ShapeId::from_static(
  106    106   
        "aws.protocoltests.ec2.synthetic#SimpleScalarXmlPropertiesOutput$falseBooleanValue",
  107    107   
        "aws.protocoltests.ec2.synthetic",
  108    108   
        "SimpleScalarXmlPropertiesOutput",
  109    109   
    ),
  110    110   
    ::aws_smithy_schema::ShapeType::Boolean,
  111         -
    "false_boolean_value",
         111  +
    "falseBooleanValue",
  112    112   
    3,
  113    113   
);
  114    114   
static SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_BYTE_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  115    115   
    ::aws_smithy_schema::ShapeId::from_static(
  116    116   
        "aws.protocoltests.ec2.synthetic#SimpleScalarXmlPropertiesOutput$byteValue",
  117    117   
        "aws.protocoltests.ec2.synthetic",
  118    118   
        "SimpleScalarXmlPropertiesOutput",
  119    119   
    ),
  120    120   
    ::aws_smithy_schema::ShapeType::Byte,
  121         -
    "byte_value",
         121  +
    "byteValue",
  122    122   
    4,
  123    123   
);
  124    124   
static SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_SHORT_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  125    125   
    ::aws_smithy_schema::ShapeId::from_static(
  126    126   
        "aws.protocoltests.ec2.synthetic#SimpleScalarXmlPropertiesOutput$shortValue",
  127    127   
        "aws.protocoltests.ec2.synthetic",
  128    128   
        "SimpleScalarXmlPropertiesOutput",
  129    129   
    ),
  130    130   
    ::aws_smithy_schema::ShapeType::Short,
  131         -
    "short_value",
         131  +
    "shortValue",
  132    132   
    5,
  133    133   
);
  134    134   
static SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_INTEGER_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  135    135   
    ::aws_smithy_schema::ShapeId::from_static(
  136    136   
        "aws.protocoltests.ec2.synthetic#SimpleScalarXmlPropertiesOutput$integerValue",
  137    137   
        "aws.protocoltests.ec2.synthetic",
  138    138   
        "SimpleScalarXmlPropertiesOutput",
  139    139   
    ),
  140    140   
    ::aws_smithy_schema::ShapeType::Integer,
  141         -
    "integer_value",
         141  +
    "integerValue",
  142    142   
    6,
  143    143   
);
  144    144   
static SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_LONG_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  145    145   
    ::aws_smithy_schema::ShapeId::from_static(
  146    146   
        "aws.protocoltests.ec2.synthetic#SimpleScalarXmlPropertiesOutput$longValue",
  147    147   
        "aws.protocoltests.ec2.synthetic",
  148    148   
        "SimpleScalarXmlPropertiesOutput",
  149    149   
    ),
  150    150   
    ::aws_smithy_schema::ShapeType::Long,
  151         -
    "long_value",
         151  +
    "longValue",
  152    152   
    7,
  153    153   
);
  154    154   
static SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_FLOAT_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  155    155   
    ::aws_smithy_schema::ShapeId::from_static(
  156    156   
        "aws.protocoltests.ec2.synthetic#SimpleScalarXmlPropertiesOutput$floatValue",
  157    157   
        "aws.protocoltests.ec2.synthetic",
  158    158   
        "SimpleScalarXmlPropertiesOutput",
  159    159   
    ),
  160    160   
    ::aws_smithy_schema::ShapeType::Float,
  161         -
    "float_value",
         161  +
    "floatValue",
  162    162   
    8,
  163    163   
);
  164    164   
static SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_DOUBLE_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  165    165   
    ::aws_smithy_schema::ShapeId::from_static(
  166    166   
        "aws.protocoltests.ec2.synthetic#SimpleScalarXmlPropertiesOutput$doubleValue",
  167    167   
        "aws.protocoltests.ec2.synthetic",
  168    168   
        "SimpleScalarXmlPropertiesOutput",
  169    169   
    ),
  170    170   
    ::aws_smithy_schema::ShapeType::Double,
  171         -
    "double_value",
         171  +
    "doubleValue",
  172    172   
    9,
  173    173   
)
  174    174   
.with_xml_name("DoubleDribble");
  175    175   
static SIMPLESCALARXMLPROPERTIESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  176    176   
    SIMPLESCALARXMLPROPERTIESOUTPUT_SCHEMA_ID,
  177    177   
    ::aws_smithy_schema::ShapeType::Structure,
  178    178   
    &[
  179    179   
        &SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_STRING_VALUE,
  180    180   
        &SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_EMPTY_STRING_VALUE,
  181    181   
        &SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_TRUE_BOOLEAN_VALUE,
@@ -206,206 +316,327 @@
  226    226   
            ser.write_float(&SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_FLOAT_VALUE, *val)?;
  227    227   
        }
  228    228   
        if let Some(ref val) = self.double_value {
  229    229   
            ser.write_double(&SIMPLESCALARXMLPROPERTIESOUTPUT_MEMBER_DOUBLE_VALUE, *val)?;
  230    230   
        }
  231    231   
        Ok(())
  232    232   
    }
  233    233   
}
  234    234   
impl SimpleScalarXmlPropertiesOutput {
  235    235   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  236         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  237         -
        deserializer: &mut D,
         236  +
    pub fn deserialize(
         237  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  238    238   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  239    239   
        #[allow(unused_variables, unused_mut)]
  240    240   
        let mut builder = Self::builder();
  241    241   
        #[allow(
  242    242   
            unused_variables,
  243    243   
            unreachable_code,
  244    244   
            clippy::single_match,
  245    245   
            clippy::match_single_binding,
  246    246   
            clippy::diverging_sub_expression
  247    247   
        )]
  248         -
        deserializer.read_struct(&SIMPLESCALARXMLPROPERTIESOUTPUT_SCHEMA, (), |_, member, deser| {
         248  +
        deserializer.read_struct(&SIMPLESCALARXMLPROPERTIESOUTPUT_SCHEMA, &mut |member, deser| {
  249    249   
            match member.member_index() {
  250    250   
                Some(0) => {
  251    251   
                    builder.string_value = Some(deser.read_string(member)?);
  252    252   
                }
  253    253   
                Some(1) => {
  254    254   
                    builder.empty_string_value = Some(deser.read_string(member)?);
  255    255   
                }
  256    256   
                Some(2) => {
  257    257   
                    builder.true_boolean_value = Some(deser.read_boolean(member)?);
  258    258   
                }
  259    259   
                Some(3) => {
  260    260   
                    builder.false_boolean_value = Some(deser.read_boolean(member)?);
  261    261   
                }
  262    262   
                Some(4) => {
  263    263   
                    builder.byte_value = Some(deser.read_byte(member)?);
  264    264   
                }
  265    265   
                Some(5) => {
  266    266   
                    builder.short_value = Some(deser.read_short(member)?);
  267    267   
                }
  268    268   
                Some(6) => {
  269    269   
                    builder.integer_value = Some(deser.read_integer(member)?);
  270    270   
                }
  271    271   
                Some(7) => {
  272    272   
                    builder.long_value = Some(deser.read_long(member)?);
  273    273   
                }
  274    274   
                Some(8) => {
  275    275   
                    builder.float_value = Some(deser.read_float(member)?);
  276    276   
                }
  277    277   
                Some(9) => {
  278    278   
                    builder.double_value = Some(deser.read_double(member)?);
  279    279   
                }
  280    280   
                _ => {}
  281    281   
            }
  282    282   
            Ok(())
  283    283   
        })?;
  284    284   
        Ok(builder.build())
  285    285   
    }
  286    286   
}
         287  +
impl SimpleScalarXmlPropertiesOutput {
         288  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         289  +
    pub fn deserialize_with_response(
         290  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         291  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         292  +
        _status: u16,
         293  +
        _body: &[u8],
         294  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         295  +
        Self::deserialize(deserializer)
         296  +
    }
         297  +
}
  287    298   
impl SimpleScalarXmlPropertiesOutput {
  288    299   
    /// Creates a new builder-style object to manufacture [`SimpleScalarXmlPropertiesOutput`](crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesOutput).
  289    300   
    pub fn builder() -> crate::operation::simple_scalar_xml_properties::builders::SimpleScalarXmlPropertiesOutputBuilder {
  290    301   
        crate::operation::simple_scalar_xml_properties::builders::SimpleScalarXmlPropertiesOutputBuilder::default()
  291    302   
    }
  292    303   
}
  293    304   
  294    305   
/// A builder for [`SimpleScalarXmlPropertiesOutput`](crate::operation::simple_scalar_xml_properties::SimpleScalarXmlPropertiesOutput).
  295    306   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  296    307   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/xml_blobs.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 `XmlBlobs`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct XmlBlobs;
    6      6   
impl XmlBlobs {
    7      7   
    /// Creates a new `XmlBlobs`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::xml_blobs::XmlBlobsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::xml_blobs::XmlBlobsOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::xml_blobs::XmlBlobsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::xml_blobs::XmlBlobsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::xml_blobs::XmlBlobsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -97,101 +159,164 @@
  117    121   
                crate::operation::xml_blobs::XmlBlobsError,
  118    122   
            >::new());
  119    123   
  120    124   
        ::std::borrow::Cow::Owned(rcb)
  121    125   
    }
  122    126   
}
  123    127   
  124    128   
#[derive(Debug)]
  125    129   
struct XmlBlobsResponseDeserializer;
  126    130   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlBlobsResponseDeserializer {
  127         -
    fn deserialize_nonstreaming(
         131  +
    fn deserialize_nonstreaming_with_config(
  128    132   
        &self,
  129    133   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         134  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  130    135   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  131    136   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  132    137   
        let headers = response.headers();
  133    138   
        let body = response.body().bytes().expect("body loaded");
  134    139   
        #[allow(unused_mut)]
  135    140   
        let mut force_error = false;
  136    141   
  137    142   
        let parse_result = if !success && status != 200 || force_error {
  138    143   
            crate::protocol_serde::shape_xml_blobs::de_xml_blobs_http_error(status, headers, body)
  139    144   
        } else {
@@ -228,233 +288,297 @@
  248    253   
            .expect("the config must have a deserializer");
  249    254   
  250    255   
        let parsed = de.deserialize_streaming(&mut http_response);
  251    256   
        let parsed = parsed.unwrap_or_else(|| {
  252    257   
            let http_response = http_response.map(|body| {
  253    258   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  254    259   
                    body.bytes().unwrap(),
  255    260   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  256    261   
                )))
  257    262   
            });
  258         -
            de.deserialize_nonstreaming(&http_response)
         263  +
            // Build a config bag with the protocol for schema-based deserialization
         264  +
            #[allow(unused_mut)]
         265  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         266  +
         267  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  259    268   
        });
  260    269   
        let parsed = parsed
  261    270   
            .expect("should be successful response")
  262    271   
            .downcast::<crate::operation::xml_blobs::XmlBlobsOutput>()
  263    272   
            .unwrap();
  264    273   
        ::pretty_assertions::assert_eq!(parsed.data, expected_output.data, "Unexpected value for `data`");
  265    274   
    }
  266    275   
}
  267    276   
  268    277   
/// Error type for the `XmlBlobsError` operation.