Client Test

Client Test

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

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

@@ -23,23 +108,119 @@
   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.token {
   46     46   
            ser.write_string(&QUERYIDEMPOTENCYTOKENAUTOFILLINPUT_MEMBER_TOKEN, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl QueryIdempotencyTokenAutoFillInput {
   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(&QUERYIDEMPOTENCYTOKENAUTOFILLINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&QUERYIDEMPOTENCYTOKENAUTOFILLINPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.token = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        builder
   75     75   
            .build()
   76     76   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     77   
    }
   78     78   
}
          79  +
impl QueryIdempotencyTokenAutoFillInput {
          80  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          81  +
    pub fn deserialize_with_response(
          82  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          83  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          84  +
        _status: u16,
          85  +
        _body: &[u8],
          86  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          87  +
        Self::deserialize(deserializer)
          88  +
    }
          89  +
}
   79     90   
impl QueryIdempotencyTokenAutoFillInput {
   80     91   
    /// Creates a new builder-style object to manufacture [`QueryIdempotencyTokenAutoFillInput`](crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput).
   81     92   
    pub fn builder() -> crate::operation::query_idempotency_token_auto_fill::builders::QueryIdempotencyTokenAutoFillInputBuilder {
   82     93   
        crate::operation::query_idempotency_token_auto_fill::builders::QueryIdempotencyTokenAutoFillInputBuilder::default()
   83     94   
    }
   84     95   
}
   85     96   
   86     97   
/// A builder for [`QueryIdempotencyTokenAutoFillInput`](crate::operation::query_idempotency_token_auto_fill::QueryIdempotencyTokenAutoFillInput).
   87     98   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   88     99   
#[non_exhaustive]

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

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

tmp-codegen-diff/codegen-client-test/aws_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   
    > {
@@ -107,111 +166,171 @@
  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    138   
    fn deserialize_nonstreaming(
  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/aws_query/rust-client-codegen/src/operation/query_lists/_query_lists_input.rs

@@ -37,37 +150,150 @@
   57     57   
    "aws.protocoltests.query.synthetic",
   58     58   
    "QueryListsInput",
   59     59   
);
   60     60   
static QUERYLISTSINPUT_MEMBER_LIST_ARG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   61     61   
    ::aws_smithy_schema::ShapeId::from_static(
   62     62   
        "aws.protocoltests.query.synthetic#QueryListsInput$ListArg",
   63     63   
        "aws.protocoltests.query.synthetic",
   64     64   
        "QueryListsInput",
   65     65   
    ),
   66     66   
    ::aws_smithy_schema::ShapeType::List,
   67         -
    "list_arg",
          67  +
    "ListArg",
   68     68   
    0,
   69     69   
);
   70     70   
static QUERYLISTSINPUT_MEMBER_COMPLEX_LIST_ARG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "aws.protocoltests.query.synthetic#QueryListsInput$ComplexListArg",
   73     73   
        "aws.protocoltests.query.synthetic",
   74     74   
        "QueryListsInput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::List,
   77         -
    "complex_list_arg",
          77  +
    "ComplexListArg",
   78     78   
    1,
   79     79   
);
   80     80   
static QUERYLISTSINPUT_MEMBER_FLATTENED_LIST_ARG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   81     81   
    ::aws_smithy_schema::ShapeId::from_static(
   82     82   
        "aws.protocoltests.query.synthetic#QueryListsInput$FlattenedListArg",
   83     83   
        "aws.protocoltests.query.synthetic",
   84     84   
        "QueryListsInput",
   85     85   
    ),
   86     86   
    ::aws_smithy_schema::ShapeType::List,
   87         -
    "flattened_list_arg",
          87  +
    "FlattenedListArg",
   88     88   
    2,
   89     89   
)
   90     90   
.with_xml_flattened();
   91     91   
static QUERYLISTSINPUT_MEMBER_LIST_ARG_WITH_XML_NAME_MEMBER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   92     92   
    ::aws_smithy_schema::ShapeId::from_static(
   93     93   
        "aws.protocoltests.query.synthetic#QueryListsInput$ListArgWithXmlNameMember",
   94     94   
        "aws.protocoltests.query.synthetic",
   95     95   
        "QueryListsInput",
   96     96   
    ),
   97     97   
    ::aws_smithy_schema::ShapeType::List,
   98         -
    "list_arg_with_xml_name_member",
          98  +
    "ListArgWithXmlNameMember",
   99     99   
    3,
  100    100   
);
  101    101   
static QUERYLISTSINPUT_MEMBER_FLATTENED_LIST_ARG_WITH_XML_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  102    102   
    ::aws_smithy_schema::ShapeId::from_static(
  103    103   
        "aws.protocoltests.query.synthetic#QueryListsInput$FlattenedListArgWithXmlName",
  104    104   
        "aws.protocoltests.query.synthetic",
  105    105   
        "QueryListsInput",
  106    106   
    ),
  107    107   
    ::aws_smithy_schema::ShapeType::List,
  108         -
    "flattened_list_arg_with_xml_name",
         108  +
    "FlattenedListArgWithXmlName",
  109    109   
    4,
  110    110   
)
  111    111   
.with_xml_name("Hi")
  112    112   
.with_xml_flattened();
  113    113   
static QUERYLISTSINPUT_MEMBER_NESTED_WITH_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  114    114   
    ::aws_smithy_schema::ShapeId::from_static(
  115    115   
        "aws.protocoltests.query.synthetic#QueryListsInput$NestedWithList",
  116    116   
        "aws.protocoltests.query.synthetic",
  117    117   
        "QueryListsInput",
  118    118   
    ),
  119    119   
    ::aws_smithy_schema::ShapeType::Structure,
  120         -
    "nested_with_list",
         120  +
    "NestedWithList",
  121    121   
    5,
  122    122   
);
  123    123   
static QUERYLISTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  124    124   
    QUERYLISTSINPUT_SCHEMA_ID,
  125    125   
    ::aws_smithy_schema::ShapeType::Structure,
  126    126   
    &[
  127    127   
        &QUERYLISTSINPUT_MEMBER_LIST_ARG,
  128    128   
        &QUERYLISTSINPUT_MEMBER_COMPLEX_LIST_ARG,
  129    129   
        &QUERYLISTSINPUT_MEMBER_FLATTENED_LIST_ARG,
  130    130   
        &QUERYLISTSINPUT_MEMBER_LIST_ARG_WITH_XML_NAME_MEMBER,
@@ -178,178 +328,296 @@
  198    198   
            )?;
  199    199   
        }
  200    200   
        if let Some(ref val) = self.nested_with_list {
  201    201   
            ser.write_struct(&QUERYLISTSINPUT_MEMBER_NESTED_WITH_LIST, val)?;
  202    202   
        }
  203    203   
        Ok(())
  204    204   
    }
  205    205   
}
  206    206   
impl QueryListsInput {
  207    207   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  208         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  209         -
        deserializer: &mut D,
         208  +
    pub fn deserialize(
         209  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  210    210   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  211    211   
        #[allow(unused_variables, unused_mut)]
  212    212   
        let mut builder = Self::builder();
  213    213   
        #[allow(
  214    214   
            unused_variables,
  215    215   
            unreachable_code,
  216    216   
            clippy::single_match,
  217    217   
            clippy::match_single_binding,
  218    218   
            clippy::diverging_sub_expression
  219    219   
        )]
  220         -
        deserializer.read_struct(&QUERYLISTSINPUT_SCHEMA, (), |_, member, deser| {
         220  +
        deserializer.read_struct(&QUERYLISTSINPUT_SCHEMA, &mut |member, deser| {
  221    221   
            match member.member_index() {
  222    222   
                Some(0) => {
  223         -
                    builder.list_arg = Some({
  224         -
                        let container = if let Some(cap) = deser.container_size() {
  225         -
                            Vec::with_capacity(cap)
  226         -
                        } else {
  227         -
                            Vec::new()
  228         -
                        };
  229         -
                        deser.read_list(member, container, |mut list, deser| {
  230         -
                            list.push(deser.read_string(member)?);
  231         -
                            Ok(list)
  232         -
                        })?
  233         -
                    });
         223  +
                    builder.list_arg = Some(deser.read_string_list(member)?);
  234    224   
                }
  235    225   
                Some(1) => {
  236    226   
                    builder.complex_list_arg = Some({
  237         -
                        let container = if let Some(cap) = deser.container_size() {
  238         -
                            Vec::with_capacity(cap)
  239         -
                        } else {
  240         -
                            Vec::new()
  241         -
                        };
  242         -
                        deser.read_list(member, container, |mut list, deser| {
  243         -
                            list.push(crate::types::GreetingStruct::deserialize(deser)?);
  244         -
                            Ok(list)
  245         -
                        })?
         227  +
                        let mut container = Vec::new();
         228  +
                        deser.read_list(member, &mut |deser| {
         229  +
                            container.push(crate::types::GreetingStruct::deserialize(deser)?);
         230  +
                            Ok(())
         231  +
                        })?;
         232  +
                        container
  246    233   
                    });
  247    234   
                }
  248    235   
                Some(2) => {
  249         -
                    builder.flattened_list_arg = Some({
  250         -
                        let container = if let Some(cap) = deser.container_size() {
  251         -
                            Vec::with_capacity(cap)
  252         -
                        } else {
  253         -
                            Vec::new()
  254         -
                        };
  255         -
                        deser.read_list(member, container, |mut list, deser| {
  256         -
                            list.push(deser.read_string(member)?);
  257         -
                            Ok(list)
  258         -
                        })?
  259         -
                    });
         236  +
                    builder.flattened_list_arg = Some(deser.read_string_list(member)?);
  260    237   
                }
  261    238   
                Some(3) => {
  262         -
                    builder.list_arg_with_xml_name_member = Some({
  263         -
                        let container = if let Some(cap) = deser.container_size() {
  264         -
                            Vec::with_capacity(cap)
  265         -
                        } else {
  266         -
                            Vec::new()
  267         -
                        };
  268         -
                        deser.read_list(member, container, |mut list, deser| {
  269         -
                            list.push(deser.read_string(member)?);
  270         -
                            Ok(list)
  271         -
                        })?
  272         -
                    });
         239  +
                    builder.list_arg_with_xml_name_member = Some(deser.read_string_list(member)?);
  273    240   
                }
  274    241   
                Some(4) => {
  275         -
                    builder.flattened_list_arg_with_xml_name = Some({
  276         -
                        let container = if let Some(cap) = deser.container_size() {
  277         -
                            Vec::with_capacity(cap)
  278         -
                        } else {
  279         -
                            Vec::new()
  280         -
                        };
  281         -
                        deser.read_list(member, container, |mut list, deser| {
  282         -
                            list.push(deser.read_string(member)?);
  283         -
                            Ok(list)
  284         -
                        })?
  285         -
                    });
         242  +
                    builder.flattened_list_arg_with_xml_name = Some(deser.read_string_list(member)?);
  286    243   
                }
  287    244   
                Some(5) => {
  288    245   
                    builder.nested_with_list = Some(crate::types::NestedStructWithList::deserialize(deser)?);
  289    246   
                }
  290    247   
                _ => {}
  291    248   
            }
  292    249   
            Ok(())
  293    250   
        })?;
  294    251   
        builder
  295    252   
            .build()
  296    253   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  297    254   
    }
  298    255   
}
         256  +
impl QueryListsInput {
         257  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         258  +
    pub fn deserialize_with_response(
         259  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         260  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         261  +
        _status: u16,
         262  +
        _body: &[u8],
         263  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         264  +
        Self::deserialize(deserializer)
         265  +
    }
         266  +
}
  299    267   
impl QueryListsInput {
  300    268   
    /// Creates a new builder-style object to manufacture [`QueryListsInput`](crate::operation::query_lists::QueryListsInput).
  301    269   
    pub fn builder() -> crate::operation::query_lists::builders::QueryListsInputBuilder {
  302    270   
        crate::operation::query_lists::builders::QueryListsInputBuilder::default()
  303    271   
    }
  304    272   
}
  305    273   
  306    274   
/// A builder for [`QueryListsInput`](crate::operation::query_lists::QueryListsInput).
  307    275   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  308    276   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_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/aws_query/rust-client-codegen/src/operation/query_maps.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 `QueryMaps`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct QueryMaps;
    6      6   
impl QueryMaps {
    7      7   
    /// Creates a new `QueryMaps`
    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_maps::QueryMapsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::query_maps::QueryMapsOutput::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_maps::QueryMapsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::query_maps::QueryMapsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::query_maps::QueryMapsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -107,111 +166,171 @@
  127    131   
        ::std::borrow::Cow::Owned(rcb)
  128    132   
    }
  129    133   
}
  130    134   
  131    135   
#[derive(Debug)]
  132    136   
struct QueryMapsResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for QueryMapsResponseDeserializer {
  134    138   
    fn deserialize_nonstreaming(
  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_maps::de_query_maps_http_error(status, headers, body)
  146    151   
        } else {

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

@@ -39,39 +173,173 @@
   59     59   
    "aws.protocoltests.query.synthetic",
   60     60   
    "QueryMapsInput",
   61     61   
);
   62     62   
static QUERYMAPSINPUT_MEMBER_MAP_ARG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   63     63   
    ::aws_smithy_schema::ShapeId::from_static(
   64     64   
        "aws.protocoltests.query.synthetic#QueryMapsInput$MapArg",
   65     65   
        "aws.protocoltests.query.synthetic",
   66     66   
        "QueryMapsInput",
   67     67   
    ),
   68     68   
    ::aws_smithy_schema::ShapeType::Map,
   69         -
    "map_arg",
          69  +
    "MapArg",
   70     70   
    0,
   71     71   
);
   72     72   
static QUERYMAPSINPUT_MEMBER_RENAMED_MAP_ARG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "aws.protocoltests.query.synthetic#QueryMapsInput$RenamedMapArg",
   75     75   
        "aws.protocoltests.query.synthetic",
   76     76   
        "QueryMapsInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::Map,
   79         -
    "renamed_map_arg",
          79  +
    "RenamedMapArg",
   80     80   
    1,
   81     81   
)
   82     82   
.with_xml_name("Foo");
   83     83   
static QUERYMAPSINPUT_MEMBER_COMPLEX_MAP_ARG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   84     84   
    ::aws_smithy_schema::ShapeId::from_static(
   85     85   
        "aws.protocoltests.query.synthetic#QueryMapsInput$ComplexMapArg",
   86     86   
        "aws.protocoltests.query.synthetic",
   87     87   
        "QueryMapsInput",
   88     88   
    ),
   89     89   
    ::aws_smithy_schema::ShapeType::Map,
   90         -
    "complex_map_arg",
          90  +
    "ComplexMapArg",
   91     91   
    2,
   92     92   
);
   93     93   
static QUERYMAPSINPUT_MEMBER_MAP_WITH_XML_MEMBER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   94     94   
    ::aws_smithy_schema::ShapeId::from_static(
   95     95   
        "aws.protocoltests.query.synthetic#QueryMapsInput$MapWithXmlMemberName",
   96     96   
        "aws.protocoltests.query.synthetic",
   97     97   
        "QueryMapsInput",
   98     98   
    ),
   99     99   
    ::aws_smithy_schema::ShapeType::Map,
  100         -
    "map_with_xml_member_name",
         100  +
    "MapWithXmlMemberName",
  101    101   
    3,
  102    102   
);
  103    103   
static QUERYMAPSINPUT_MEMBER_FLATTENED_MAP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  104    104   
    ::aws_smithy_schema::ShapeId::from_static(
  105    105   
        "aws.protocoltests.query.synthetic#QueryMapsInput$FlattenedMap",
  106    106   
        "aws.protocoltests.query.synthetic",
  107    107   
        "QueryMapsInput",
  108    108   
    ),
  109    109   
    ::aws_smithy_schema::ShapeType::Map,
  110         -
    "flattened_map",
         110  +
    "FlattenedMap",
  111    111   
    4,
  112    112   
)
  113    113   
.with_xml_flattened();
  114    114   
static QUERYMAPSINPUT_MEMBER_FLATTENED_MAP_WITH_XML_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  115    115   
    ::aws_smithy_schema::ShapeId::from_static(
  116    116   
        "aws.protocoltests.query.synthetic#QueryMapsInput$FlattenedMapWithXmlName",
  117    117   
        "aws.protocoltests.query.synthetic",
  118    118   
        "QueryMapsInput",
  119    119   
    ),
  120    120   
    ::aws_smithy_schema::ShapeType::Map,
  121         -
    "flattened_map_with_xml_name",
         121  +
    "FlattenedMapWithXmlName",
  122    122   
    5,
  123    123   
)
  124    124   
.with_xml_name("Hi")
  125    125   
.with_xml_flattened();
  126    126   
static QUERYMAPSINPUT_MEMBER_MAP_OF_LISTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  127    127   
    ::aws_smithy_schema::ShapeId::from_static(
  128    128   
        "aws.protocoltests.query.synthetic#QueryMapsInput$MapOfLists",
  129    129   
        "aws.protocoltests.query.synthetic",
  130    130   
        "QueryMapsInput",
  131    131   
    ),
  132    132   
    ::aws_smithy_schema::ShapeType::Map,
  133         -
    "map_of_lists",
         133  +
    "MapOfLists",
  134    134   
    6,
  135    135   
);
  136    136   
static QUERYMAPSINPUT_MEMBER_NESTED_STRUCT_WITH_MAP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  137    137   
    ::aws_smithy_schema::ShapeId::from_static(
  138    138   
        "aws.protocoltests.query.synthetic#QueryMapsInput$NestedStructWithMap",
  139    139   
        "aws.protocoltests.query.synthetic",
  140    140   
        "QueryMapsInput",
  141    141   
    ),
  142    142   
    ::aws_smithy_schema::ShapeType::Structure,
  143         -
    "nested_struct_with_map",
         143  +
    "NestedStructWithMap",
  144    144   
    7,
  145    145   
);
  146    146   
static QUERYMAPSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  147    147   
    QUERYMAPSINPUT_SCHEMA_ID,
  148    148   
    ::aws_smithy_schema::ShapeType::Structure,
  149    149   
    &[
  150    150   
        &QUERYMAPSINPUT_MEMBER_MAP_ARG,
  151    151   
        &QUERYMAPSINPUT_MEMBER_RENAMED_MAP_ARG,
  152    152   
        &QUERYMAPSINPUT_MEMBER_COMPLEX_MAP_ARG,
  153    153   
        &QUERYMAPSINPUT_MEMBER_MAP_WITH_XML_MEMBER_NAME,
@@ -218,218 +408,379 @@
  238    238   
                    Ok(())
  239    239   
                },
  240    240   
            )?;
  241    241   
        }
  242    242   
        if let Some(ref val) = self.map_of_lists {
  243    243   
            ser.write_map(
  244    244   
                &QUERYMAPSINPUT_MEMBER_MAP_OF_LISTS,
  245    245   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  246    246   
                    for (key, value) in val {
  247    247   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  248         -
                        todo!("schema: unsupported map value type");
         248  +
         249  +
                        ser.write_list(
         250  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         251  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         252  +
                                for item in value {
         253  +
                                    ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         254  +
                                }
         255  +
                                Ok(())
         256  +
                            },
         257  +
                        )?;
  249    258   
                    }
  250    259   
                    Ok(())
  251    260   
                },
  252    261   
            )?;
  253    262   
        }
  254    263   
        if let Some(ref val) = self.nested_struct_with_map {
  255    264   
            ser.write_struct(&QUERYMAPSINPUT_MEMBER_NESTED_STRUCT_WITH_MAP, val)?;
  256    265   
        }
  257    266   
        Ok(())
  258    267   
    }
  259    268   
}
  260    269   
impl QueryMapsInput {
  261    270   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  262         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  263         -
        deserializer: &mut D,
         271  +
    pub fn deserialize(
         272  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  264    273   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  265    274   
        #[allow(unused_variables, unused_mut)]
  266    275   
        let mut builder = Self::builder();
  267    276   
        #[allow(
  268    277   
            unused_variables,
  269    278   
            unreachable_code,
  270    279   
            clippy::single_match,
  271    280   
            clippy::match_single_binding,
  272    281   
            clippy::diverging_sub_expression
  273    282   
        )]
  274         -
        deserializer.read_struct(&QUERYMAPSINPUT_SCHEMA, (), |_, member, deser| {
         283  +
        deserializer.read_struct(&QUERYMAPSINPUT_SCHEMA, &mut |member, deser| {
  275    284   
            match member.member_index() {
  276    285   
                Some(0) => {
  277         -
                    builder.map_arg = Some({
  278         -
                        let container = if let Some(cap) = deser.container_size() {
  279         -
                            std::collections::HashMap::with_capacity(cap)
  280         -
                        } else {
  281         -
                            std::collections::HashMap::new()
  282         -
                        };
  283         -
                        deser.read_map(member, container, |mut map, key, deser| {
  284         -
                            map.insert(key, deser.read_string(member)?);
  285         -
                            Ok(map)
  286         -
                        })?
  287         -
                    });
         286  +
                    builder.map_arg = Some(deser.read_string_string_map(member)?);
  288    287   
                }
  289    288   
                Some(1) => {
  290         -
                    builder.renamed_map_arg = Some({
  291         -
                        let container = if let Some(cap) = deser.container_size() {
  292         -
                            std::collections::HashMap::with_capacity(cap)
  293         -
                        } else {
  294         -
                            std::collections::HashMap::new()
  295         -
                        };
  296         -
                        deser.read_map(member, container, |mut map, key, deser| {
  297         -
                            map.insert(key, deser.read_string(member)?);
  298         -
                            Ok(map)
  299         -
                        })?
  300         -
                    });
         289  +
                    builder.renamed_map_arg = Some(deser.read_string_string_map(member)?);
  301    290   
                }
  302    291   
                Some(2) => {
  303    292   
                    builder.complex_map_arg = Some({
  304         -
                        let container = if let Some(cap) = deser.container_size() {
  305         -
                            std::collections::HashMap::with_capacity(cap)
  306         -
                        } else {
  307         -
                            std::collections::HashMap::new()
  308         -
                        };
  309         -
                        deser.read_map(member, container, |mut map, key, deser| {
  310         -
                            map.insert(key, crate::types::GreetingStruct::deserialize(deser)?);
  311         -
                            Ok(map)
  312         -
                        })?
         293  +
                        let mut container = std::collections::HashMap::new();
         294  +
                        deser.read_map(member, &mut |key, deser| {
         295  +
                            container.insert(key, crate::types::GreetingStruct::deserialize(deser)?);
         296  +
                            Ok(())
         297  +
                        })?;
         298  +
                        container
  313    299   
                    });
  314    300   
                }
  315    301   
                Some(3) => {
  316         -
                    builder.map_with_xml_member_name = Some({
  317         -
                        let container = if let Some(cap) = deser.container_size() {
  318         -
                            std::collections::HashMap::with_capacity(cap)
  319         -
                        } else {
  320         -
                            std::collections::HashMap::new()
  321         -
                        };
  322         -
                        deser.read_map(member, container, |mut map, key, deser| {
  323         -
                            map.insert(key, deser.read_string(member)?);
  324         -
                            Ok(map)
  325         -
                        })?
  326         -
                    });
         302  +
                    builder.map_with_xml_member_name = Some(deser.read_string_string_map(member)?);
  327    303   
                }
  328    304   
                Some(4) => {
  329         -
                    builder.flattened_map = Some({
  330         -
                        let container = if let Some(cap) = deser.container_size() {
  331         -
                            std::collections::HashMap::with_capacity(cap)
  332         -
                        } else {
  333         -
                            std::collections::HashMap::new()
  334         -
                        };
  335         -
                        deser.read_map(member, container, |mut map, key, deser| {
  336         -
                            map.insert(key, deser.read_string(member)?);
  337         -
                            Ok(map)
  338         -
                        })?
  339         -
                    });
         305  +
                    builder.flattened_map = Some(deser.read_string_string_map(member)?);
  340    306   
                }
  341    307   
                Some(5) => {
  342         -
                    builder.flattened_map_with_xml_name = Some({
  343         -
                        let container = if let Some(cap) = deser.container_size() {
  344         -
                            std::collections::HashMap::with_capacity(cap)
  345         -
                        } else {
  346         -
                            std::collections::HashMap::new()
  347         -
                        };
  348         -
                        deser.read_map(member, container, |mut map, key, deser| {
  349         -
                            map.insert(key, deser.read_string(member)?);
  350         -
                            Ok(map)
  351         -
                        })?
  352         -
                    });
         308  +
                    builder.flattened_map_with_xml_name = Some(deser.read_string_string_map(member)?);
  353    309   
                }
  354    310   
                Some(6) => {
  355    311   
                    builder.map_of_lists = Some({
  356         -
                        let container = if let Some(cap) = deser.container_size() {
  357         -
                            std::collections::HashMap::with_capacity(cap)
  358         -
                        } else {
  359         -
                            std::collections::HashMap::new()
  360         -
                        };
  361         -
                        deser.read_map(member, container, |mut map, key, deser| {
  362         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  363         -
                            Ok(map)
  364         -
                        })?
         312  +
                        let mut container = std::collections::HashMap::new();
         313  +
                        deser.read_map(member, &mut |key, deser| {
         314  +
                            container.insert(key, {
         315  +
                                let mut list = Vec::new();
         316  +
                                deser.read_list(member, &mut |deser| {
         317  +
                                    list.push(deser.read_string(&::aws_smithy_schema::prelude::DOCUMENT)?);
         318  +
                                    Ok(())
         319  +
                                })?;
         320  +
                                list
         321  +
                            });
         322  +
                            Ok(())
         323  +
                        })?;
         324  +
                        container
  365    325   
                    });
  366    326   
                }
  367    327   
                Some(7) => {
  368    328   
                    builder.nested_struct_with_map = Some(crate::types::NestedStructWithMap::deserialize(deser)?);
  369    329   
                }
  370    330   
                _ => {}
  371    331   
            }
  372    332   
            Ok(())
  373    333   
        })?;
  374    334   
        builder
  375    335   
            .build()
  376    336   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  377    337   
    }
  378    338   
}
         339  +
impl QueryMapsInput {
         340  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         341  +
    pub fn deserialize_with_response(
         342  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         343  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         344  +
        _status: u16,
         345  +
        _body: &[u8],
         346  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         347  +
        Self::deserialize(deserializer)
         348  +
    }
         349  +
}
  379    350   
impl QueryMapsInput {
  380    351   
    /// Creates a new builder-style object to manufacture [`QueryMapsInput`](crate::operation::query_maps::QueryMapsInput).
  381    352   
    pub fn builder() -> crate::operation::query_maps::builders::QueryMapsInputBuilder {
  382    353   
        crate::operation::query_maps::builders::QueryMapsInputBuilder::default()
  383    354   
    }
  384    355   
}
  385    356   
  386    357   
/// A builder for [`QueryMapsInput`](crate::operation::query_maps::QueryMapsInput).
  387    358   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  388    359   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/query_maps/_query_maps_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 QueryMapsOutput {
   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(&QUERYMAPSOUTPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&QUERYMAPSOUTPUT_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 QueryMapsOutput {
          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 QueryMapsOutput {
   50     61   
    /// Creates a new builder-style object to manufacture [`QueryMapsOutput`](crate::operation::query_maps::QueryMapsOutput).
   51     62   
    pub fn builder() -> crate::operation::query_maps::builders::QueryMapsOutputBuilder {
   52     63   
        crate::operation::query_maps::builders::QueryMapsOutputBuilder::default()
   53     64   
    }
   54     65   
}
   55     66   
   56     67   
/// A builder for [`QueryMapsOutput`](crate::operation::query_maps::QueryMapsOutput).
   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/aws_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   
    > {
@@ -107,111 +166,171 @@
  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    138   
    fn deserialize_nonstreaming(
  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/aws_query/rust-client-codegen/src/operation/query_timestamps/_query_timestamps_input.rs

@@ -9,9 +157,169 @@
   29     29   
    "aws.protocoltests.query.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.query.synthetic#QueryTimestampsInput$normalFormat",
   35     35   
        "aws.protocoltests.query.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.query.synthetic#QueryTimestampsInput$epochMember",
   45     45   
        "aws.protocoltests.query.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.query.synthetic#QueryTimestampsInput$epochTarget",
   56     56   
        "aws.protocoltests.query.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/aws_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/aws_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   
    > {
@@ -107,111 +166,171 @@
  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    138   
    fn deserialize_nonstreaming(
  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(&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/aws_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/aws_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/aws_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   
    > {
@@ -107,111 +166,171 @@
  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    138   
    fn deserialize_nonstreaming(
  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/aws_query/rust-client-codegen/src/operation/simple_input_params/_simple_input_params_input.rs

@@ -45,45 +294,305 @@
   65     65   
    "aws.protocoltests.query.synthetic",
   66     66   
    "SimpleInputParamsInput",
   67     67   
);
   68     68   
static SIMPLEINPUTPARAMSINPUT_MEMBER_FOO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   69     69   
    ::aws_smithy_schema::ShapeId::from_static(
   70     70   
        "aws.protocoltests.query.synthetic#SimpleInputParamsInput$Foo",
   71     71   
        "aws.protocoltests.query.synthetic",
   72     72   
        "SimpleInputParamsInput",
   73     73   
    ),
   74     74   
    ::aws_smithy_schema::ShapeType::String,
   75         -
    "foo",
          75  +
    "Foo",
   76     76   
    0,
   77     77   
);
   78     78   
static SIMPLEINPUTPARAMSINPUT_MEMBER_BAR: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   79     79   
    ::aws_smithy_schema::ShapeId::from_static(
   80     80   
        "aws.protocoltests.query.synthetic#SimpleInputParamsInput$Bar",
   81     81   
        "aws.protocoltests.query.synthetic",
   82     82   
        "SimpleInputParamsInput",
   83     83   
    ),
   84     84   
    ::aws_smithy_schema::ShapeType::String,
   85         -
    "bar",
          85  +
    "Bar",
   86     86   
    1,
   87     87   
);
   88     88   
static SIMPLEINPUTPARAMSINPUT_MEMBER_BAZ: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   89     89   
    ::aws_smithy_schema::ShapeId::from_static(
   90     90   
        "aws.protocoltests.query.synthetic#SimpleInputParamsInput$Baz",
   91     91   
        "aws.protocoltests.query.synthetic",
   92     92   
        "SimpleInputParamsInput",
   93     93   
    ),
   94     94   
    ::aws_smithy_schema::ShapeType::Boolean,
   95         -
    "baz",
          95  +
    "Baz",
   96     96   
    2,
   97     97   
);
   98     98   
static SIMPLEINPUTPARAMSINPUT_MEMBER_BAM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   99     99   
    ::aws_smithy_schema::ShapeId::from_static(
  100    100   
        "aws.protocoltests.query.synthetic#SimpleInputParamsInput$Bam",
  101    101   
        "aws.protocoltests.query.synthetic",
  102    102   
        "SimpleInputParamsInput",
  103    103   
    ),
  104    104   
    ::aws_smithy_schema::ShapeType::Integer,
  105         -
    "bam",
         105  +
    "Bam",
  106    106   
    3,
  107    107   
);
  108    108   
static SIMPLEINPUTPARAMSINPUT_MEMBER_FLOAT_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  109    109   
    ::aws_smithy_schema::ShapeId::from_static(
  110    110   
        "aws.protocoltests.query.synthetic#SimpleInputParamsInput$FloatValue",
  111    111   
        "aws.protocoltests.query.synthetic",
  112    112   
        "SimpleInputParamsInput",
  113    113   
    ),
  114    114   
    ::aws_smithy_schema::ShapeType::Float,
  115         -
    "float_value",
         115  +
    "FloatValue",
  116    116   
    4,
  117    117   
);
  118    118   
static SIMPLEINPUTPARAMSINPUT_MEMBER_BOO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  119    119   
    ::aws_smithy_schema::ShapeId::from_static(
  120    120   
        "aws.protocoltests.query.synthetic#SimpleInputParamsInput$Boo",
  121    121   
        "aws.protocoltests.query.synthetic",
  122    122   
        "SimpleInputParamsInput",
  123    123   
    ),
  124    124   
    ::aws_smithy_schema::ShapeType::Double,
  125         -
    "boo",
         125  +
    "Boo",
  126    126   
    5,
  127    127   
);
  128    128   
static SIMPLEINPUTPARAMSINPUT_MEMBER_QUX: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  129    129   
    ::aws_smithy_schema::ShapeId::from_static(
  130    130   
        "aws.protocoltests.query.synthetic#SimpleInputParamsInput$Qux",
  131    131   
        "aws.protocoltests.query.synthetic",
  132    132   
        "SimpleInputParamsInput",
  133    133   
    ),
  134    134   
    ::aws_smithy_schema::ShapeType::Blob,
  135         -
    "qux",
         135  +
    "Qux",
  136    136   
    6,
  137    137   
);
  138    138   
static SIMPLEINPUTPARAMSINPUT_MEMBER_FOO_ENUM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  139    139   
    ::aws_smithy_schema::ShapeId::from_static(
  140    140   
        "aws.protocoltests.query.synthetic#SimpleInputParamsInput$FooEnum",
  141    141   
        "aws.protocoltests.query.synthetic",
  142    142   
        "SimpleInputParamsInput",
  143    143   
    ),
  144    144   
    ::aws_smithy_schema::ShapeType::String,
  145         -
    "foo_enum",
         145  +
    "FooEnum",
  146    146   
    7,
  147    147   
);
  148    148   
static SIMPLEINPUTPARAMSINPUT_MEMBER_INTEGER_ENUM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  149    149   
    ::aws_smithy_schema::ShapeId::from_static(
  150    150   
        "aws.protocoltests.query.synthetic#SimpleInputParamsInput$IntegerEnum",
  151    151   
        "aws.protocoltests.query.synthetic",
  152    152   
        "SimpleInputParamsInput",
  153    153   
    ),
  154    154   
    ::aws_smithy_schema::ShapeType::Integer,
  155         -
    "integer_enum",
         155  +
    "IntegerEnum",
  156    156   
    8,
  157    157   
);
  158    158   
static SIMPLEINPUTPARAMSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  159    159   
    SIMPLEINPUTPARAMSINPUT_SCHEMA_ID,
  160    160   
    ::aws_smithy_schema::ShapeType::Structure,
  161    161   
    &[
  162    162   
        &SIMPLEINPUTPARAMSINPUT_MEMBER_FOO,
  163    163   
        &SIMPLEINPUTPARAMSINPUT_MEMBER_BAR,
  164    164   
        &SIMPLEINPUTPARAMSINPUT_MEMBER_BAZ,
  165    165   
        &SIMPLEINPUTPARAMSINPUT_MEMBER_BAM,
  166    166   
        &SIMPLEINPUTPARAMSINPUT_MEMBER_FLOAT_VALUE,
  167    167   
        &SIMPLEINPUTPARAMSINPUT_MEMBER_BOO,
  168    168   
        &SIMPLEINPUTPARAMSINPUT_MEMBER_QUX,
  169    169   
        &SIMPLEINPUTPARAMSINPUT_MEMBER_FOO_ENUM,
  170    170   
        &SIMPLEINPUTPARAMSINPUT_MEMBER_INTEGER_ENUM,
  171    171   
    ],
  172    172   
);
  173    173   
impl SimpleInputParamsInput {
  174    174   
    /// The schema for this shape.
  175    175   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &SIMPLEINPUTPARAMSINPUT_SCHEMA;
  176    176   
}
  177    177   
impl ::aws_smithy_schema::serde::SerializableStruct for SimpleInputParamsInput {
  178    178   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  179    179   
    fn serialize_members(
  180    180   
        &self,
  181    181   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  182    182   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  183    183   
        if let Some(ref val) = self.foo {
  184    184   
            ser.write_string(&SIMPLEINPUTPARAMSINPUT_MEMBER_FOO, val)?;
  185    185   
        }
  186    186   
        if let Some(ref val) = self.bar {
  187    187   
            ser.write_string(&SIMPLEINPUTPARAMSINPUT_MEMBER_BAR, val)?;
  188    188   
        }
  189    189   
        if let Some(ref val) = self.baz {
  190    190   
            ser.write_boolean(&SIMPLEINPUTPARAMSINPUT_MEMBER_BAZ, *val)?;
  191    191   
        }
  192    192   
        if let Some(ref val) = self.bam {
  193    193   
            ser.write_integer(&SIMPLEINPUTPARAMSINPUT_MEMBER_BAM, *val)?;
  194    194   
        }
  195    195   
        if let Some(ref val) = self.float_value {
  196    196   
            ser.write_float(&SIMPLEINPUTPARAMSINPUT_MEMBER_FLOAT_VALUE, *val)?;
  197    197   
        }
  198    198   
        if let Some(ref val) = self.boo {
  199    199   
            ser.write_double(&SIMPLEINPUTPARAMSINPUT_MEMBER_BOO, *val)?;
  200    200   
        }
  201    201   
        if let Some(ref val) = self.qux {
  202    202   
            ser.write_blob(&SIMPLEINPUTPARAMSINPUT_MEMBER_QUX, val)?;
  203    203   
        }
  204    204   
        if let Some(ref val) = self.foo_enum {
  205    205   
            ser.write_string(&SIMPLEINPUTPARAMSINPUT_MEMBER_FOO_ENUM, val.as_str())?;
  206    206   
        }
  207    207   
        if let Some(ref val) = self.integer_enum {
  208    208   
            ser.write_integer(&SIMPLEINPUTPARAMSINPUT_MEMBER_INTEGER_ENUM, *val)?;
  209    209   
        }
  210    210   
        Ok(())
  211    211   
    }
  212    212   
}
  213    213   
impl SimpleInputParamsInput {
  214    214   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  215         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  216         -
        deserializer: &mut D,
         215  +
    pub fn deserialize(
         216  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  217    217   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  218    218   
        #[allow(unused_variables, unused_mut)]
  219    219   
        let mut builder = Self::builder();
  220    220   
        #[allow(
  221    221   
            unused_variables,
  222    222   
            unreachable_code,
  223    223   
            clippy::single_match,
  224    224   
            clippy::match_single_binding,
  225    225   
            clippy::diverging_sub_expression
  226    226   
        )]
  227         -
        deserializer.read_struct(&SIMPLEINPUTPARAMSINPUT_SCHEMA, (), |_, member, deser| {
         227  +
        deserializer.read_struct(&SIMPLEINPUTPARAMSINPUT_SCHEMA, &mut |member, deser| {
  228    228   
            match member.member_index() {
  229    229   
                Some(0) => {
  230    230   
                    builder.foo = Some(deser.read_string(member)?);
  231    231   
                }
  232    232   
                Some(1) => {
  233    233   
                    builder.bar = Some(deser.read_string(member)?);
  234    234   
                }
  235    235   
                Some(2) => {
  236    236   
                    builder.baz = Some(deser.read_boolean(member)?);
  237    237   
                }
  238    238   
                Some(3) => {
  239    239   
                    builder.bam = Some(deser.read_integer(member)?);
  240    240   
                }
  241    241   
                Some(4) => {
  242    242   
                    builder.float_value = Some(deser.read_float(member)?);
  243    243   
                }
  244    244   
                Some(5) => {
  245    245   
                    builder.boo = Some(deser.read_double(member)?);
  246    246   
                }
  247    247   
                Some(6) => {
  248    248   
                    builder.qux = Some(deser.read_blob(member)?);
  249    249   
                }
  250    250   
                Some(7) => {
  251    251   
                    builder.foo_enum = Some(crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
  252    252   
                }
  253    253   
                Some(8) => {
  254    254   
                    builder.integer_enum = Some(deser.read_integer(member)?);
  255    255   
                }
  256    256   
                _ => {}
  257    257   
            }
  258    258   
            Ok(())
  259    259   
        })?;
  260    260   
        builder
  261    261   
            .build()
  262    262   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  263    263   
    }
  264    264   
}
         265  +
impl SimpleInputParamsInput {
         266  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         267  +
    pub fn deserialize_with_response(
         268  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         269  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         270  +
        _status: u16,
         271  +
        _body: &[u8],
         272  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         273  +
        Self::deserialize(deserializer)
         274  +
    }
         275  +
}
  265    276   
impl SimpleInputParamsInput {
  266    277   
    /// Creates a new builder-style object to manufacture [`SimpleInputParamsInput`](crate::operation::simple_input_params::SimpleInputParamsInput).
  267    278   
    pub fn builder() -> crate::operation::simple_input_params::builders::SimpleInputParamsInputBuilder {
  268    279   
        crate::operation::simple_input_params::builders::SimpleInputParamsInputBuilder::default()
  269    280   
    }
  270    281   
}
  271    282   
  272    283   
/// A builder for [`SimpleInputParamsInput`](crate::operation::simple_input_params::SimpleInputParamsInput).
  273    284   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  274    285   
#[non_exhaustive]