Client Test

Client Test

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/types/error/_extra_error.rs

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

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/types/error/_validation_exception.rs

@@ -6,6 +142,151 @@
   26     26   
    "message",
   27     27   
    0,
   28     28   
);
   29     29   
static VALIDATIONERROR_MEMBER_FIELD_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   30     30   
    ::aws_smithy_schema::ShapeId::from_static(
   31     31   
        "smithy.framework#ValidationException$fieldList",
   32     32   
        "smithy.framework",
   33     33   
        "ValidationException",
   34     34   
    ),
   35     35   
    ::aws_smithy_schema::ShapeType::List,
   36         -
    "field_list",
          36  +
    "fieldList",
   37     37   
    1,
   38     38   
);
   39     39   
static VALIDATIONERROR_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   40     40   
    VALIDATIONERROR_SCHEMA_ID,
   41     41   
    ::aws_smithy_schema::ShapeType::Structure,
   42     42   
    &[&VALIDATIONERROR_MEMBER_MESSAGE, &VALIDATIONERROR_MEMBER_FIELD_LIST],
   43     43   
);
   44     44   
impl ValidationError {
   45     45   
    /// The schema for this shape.
   46     46   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &VALIDATIONERROR_SCHEMA;
   47     47   
}
   48     48   
impl ::aws_smithy_schema::serde::SerializableStruct for ValidationError {
   49     49   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   50     50   
    fn serialize_members(
   51     51   
        &self,
   52     52   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   53     53   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   54     54   
        {
   55     55   
            let val = &self.message;
   56     56   
            ser.write_string(&VALIDATIONERROR_MEMBER_MESSAGE, val)?;
   57     57   
        }
   58     58   
        if let Some(ref val) = self.field_list {
   59     59   
            ser.write_list(
   60     60   
                &VALIDATIONERROR_MEMBER_FIELD_LIST,
   61     61   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   62     62   
                    for item in val {
   63     63   
                        ser.write_struct(crate::types::ValidationExceptionField::SCHEMA, item)?;
   64     64   
                    }
   65     65   
                    Ok(())
   66     66   
                },
   67     67   
            )?;
   68     68   
        }
   69     69   
        Ok(())
   70     70   
    }
   71     71   
}
   72     72   
impl ValidationError {
   73     73   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   74         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   75         -
        deserializer: &mut D,
          74  +
    pub fn deserialize(
          75  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   76     76   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   77     77   
        #[allow(unused_variables, unused_mut)]
   78     78   
        let mut builder = Self::builder();
   79     79   
        #[allow(
   80     80   
            unused_variables,
   81     81   
            unreachable_code,
   82     82   
            clippy::single_match,
   83     83   
            clippy::match_single_binding,
   84     84   
            clippy::diverging_sub_expression
   85     85   
        )]
   86         -
        deserializer.read_struct(&VALIDATIONERROR_SCHEMA, (), |_, member, deser| {
          86  +
        deserializer.read_struct(&VALIDATIONERROR_SCHEMA, &mut |member, deser| {
   87     87   
            match member.member_index() {
   88     88   
                Some(0) => {
   89     89   
                    builder.message = Some(deser.read_string(member)?);
   90     90   
                }
   91     91   
                Some(1) => {
   92     92   
                    builder.field_list = Some({
   93         -
                        let container = if let Some(cap) = deser.container_size() {
   94         -
                            Vec::with_capacity(cap)
   95         -
                        } else {
   96         -
                            Vec::new()
   97         -
                        };
   98         -
                        deser.read_list(member, container, |mut list, deser| {
   99         -
                            list.push(crate::types::ValidationExceptionField::deserialize(deser)?);
  100         -
                            Ok(list)
  101         -
                        })?
          93  +
                        let mut container = Vec::new();
          94  +
                        deser.read_list(member, &mut |deser| {
          95  +
                            container.push(crate::types::ValidationExceptionField::deserialize(deser)?);
          96  +
                            Ok(())
          97  +
                        })?;
          98  +
                        container
  102     99   
                    });
  103    100   
                }
  104    101   
                _ => {}
  105    102   
            }
  106    103   
            Ok(())
  107    104   
        })?;
         105  +
        builder.message = builder.message.or(Some(String::new()));
  108    106   
        builder
  109    107   
            .build()
  110    108   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  111    109   
    }
  112    110   
}
         111  +
impl ValidationError {
         112  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         113  +
    pub fn deserialize_with_response(
         114  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         115  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         116  +
        _status: u16,
         117  +
        _body: &[u8],
         118  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         119  +
        Self::deserialize(deserializer)
         120  +
    }
         121  +
}
  113    122   
impl ValidationError {
  114    123   
    /// Returns the error message.
  115    124   
    pub fn message(&self) -> &str {
  116    125   
        &self.message
  117    126   
    }
  118    127   
}
  119    128   
impl ::std::fmt::Display for ValidationError {
  120    129   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  121    130   
        ::std::write!(f, "ValidationError [ValidationException]")?;
  122    131   
        {

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/all_query_string_types.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 `AllQueryStringTypes`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct AllQueryStringTypes;
    6      6   
impl AllQueryStringTypes {
    7      7   
    /// Creates a new `AllQueryStringTypes`
    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::all_query_string_types::AllQueryStringTypesInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::all_query_string_types::AllQueryStringTypesOutput::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::all_query_string_types::AllQueryStringTypesInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::all_query_string_types::AllQueryStringTypesOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::all_query_string_types::AllQueryStringTypesError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -110,114 +172,177 @@
  130    134   
                crate::operation::all_query_string_types::AllQueryStringTypesError,
  131    135   
            >::new());
  132    136   
  133    137   
        ::std::borrow::Cow::Owned(rcb)
  134    138   
    }
  135    139   
}
  136    140   
  137    141   
#[derive(Debug)]
  138    142   
struct AllQueryStringTypesResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for AllQueryStringTypesResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         144  +
    fn deserialize_nonstreaming_with_config(
  141    145   
        &self,
  142    146   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         147  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  145    150   
        let headers = response.headers();
  146    151   
        let body = response.body().bytes().expect("body loaded");
  147    152   
        #[allow(unused_mut)]
  148    153   
        let mut force_error = false;
  149    154   
  150    155   
        let parse_result = if !success && status != 200 || force_error {
  151    156   
            crate::protocol_serde::shape_all_query_string_types::de_all_query_string_types_http_error(status, headers, body)
  152    157   
        } else {

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/all_query_string_types/_all_query_string_types_input.rs

@@ -135,135 +445,446 @@
  155    155   
    "aws.protocoltests.restxml.synthetic",
  156    156   
    "AllQueryStringTypesInput",
  157    157   
);
  158    158   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_STRING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  159    159   
    ::aws_smithy_schema::ShapeId::from_static(
  160    160   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryString",
  161    161   
        "aws.protocoltests.restxml.synthetic",
  162    162   
        "AllQueryStringTypesInput",
  163    163   
    ),
  164    164   
    ::aws_smithy_schema::ShapeType::String,
  165         -
    "query_string",
         165  +
    "queryString",
  166    166   
    0,
  167    167   
)
  168    168   
.with_http_query("String");
  169    169   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_STRING_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  170    170   
    ::aws_smithy_schema::ShapeId::from_static(
  171    171   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryStringList",
  172    172   
        "aws.protocoltests.restxml.synthetic",
  173    173   
        "AllQueryStringTypesInput",
  174    174   
    ),
  175    175   
    ::aws_smithy_schema::ShapeType::List,
  176         -
    "query_string_list",
         176  +
    "queryStringList",
  177    177   
    1,
  178    178   
)
  179    179   
.with_http_query("StringList");
  180    180   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_STRING_SET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  181    181   
    ::aws_smithy_schema::ShapeId::from_static(
  182    182   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryStringSet",
  183    183   
        "aws.protocoltests.restxml.synthetic",
  184    184   
        "AllQueryStringTypesInput",
  185    185   
    ),
  186    186   
    ::aws_smithy_schema::ShapeType::List,
  187         -
    "query_string_set",
         187  +
    "queryStringSet",
  188    188   
    2,
  189    189   
)
  190    190   
.with_http_query("StringSet");
  191    191   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_BYTE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  192    192   
    ::aws_smithy_schema::ShapeId::from_static(
  193    193   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryByte",
  194    194   
        "aws.protocoltests.restxml.synthetic",
  195    195   
        "AllQueryStringTypesInput",
  196    196   
    ),
  197    197   
    ::aws_smithy_schema::ShapeType::Byte,
  198         -
    "query_byte",
         198  +
    "queryByte",
  199    199   
    3,
  200    200   
)
  201    201   
.with_http_query("Byte");
  202    202   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_SHORT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  203    203   
    ::aws_smithy_schema::ShapeId::from_static(
  204    204   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryShort",
  205    205   
        "aws.protocoltests.restxml.synthetic",
  206    206   
        "AllQueryStringTypesInput",
  207    207   
    ),
  208    208   
    ::aws_smithy_schema::ShapeType::Short,
  209         -
    "query_short",
         209  +
    "queryShort",
  210    210   
    4,
  211    211   
)
  212    212   
.with_http_query("Short");
  213    213   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_INTEGER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  214    214   
    ::aws_smithy_schema::ShapeId::from_static(
  215    215   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryInteger",
  216    216   
        "aws.protocoltests.restxml.synthetic",
  217    217   
        "AllQueryStringTypesInput",
  218    218   
    ),
  219    219   
    ::aws_smithy_schema::ShapeType::Integer,
  220         -
    "query_integer",
         220  +
    "queryInteger",
  221    221   
    5,
  222    222   
)
  223    223   
.with_http_query("Integer");
  224    224   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_INTEGER_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  225    225   
    ::aws_smithy_schema::ShapeId::from_static(
  226    226   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryIntegerList",
  227    227   
        "aws.protocoltests.restxml.synthetic",
  228    228   
        "AllQueryStringTypesInput",
  229    229   
    ),
  230    230   
    ::aws_smithy_schema::ShapeType::List,
  231         -
    "query_integer_list",
         231  +
    "queryIntegerList",
  232    232   
    6,
  233    233   
)
  234    234   
.with_http_query("IntegerList");
  235    235   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_INTEGER_SET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  236    236   
    ::aws_smithy_schema::ShapeId::from_static(
  237    237   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryIntegerSet",
  238    238   
        "aws.protocoltests.restxml.synthetic",
  239    239   
        "AllQueryStringTypesInput",
  240    240   
    ),
  241    241   
    ::aws_smithy_schema::ShapeType::List,
  242         -
    "query_integer_set",
         242  +
    "queryIntegerSet",
  243    243   
    7,
  244    244   
)
  245    245   
.with_http_query("IntegerSet");
  246    246   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_LONG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  247    247   
    ::aws_smithy_schema::ShapeId::from_static(
  248    248   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryLong",
  249    249   
        "aws.protocoltests.restxml.synthetic",
  250    250   
        "AllQueryStringTypesInput",
  251    251   
    ),
  252    252   
    ::aws_smithy_schema::ShapeType::Long,
  253         -
    "query_long",
         253  +
    "queryLong",
  254    254   
    8,
  255    255   
)
  256    256   
.with_http_query("Long");
  257    257   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_FLOAT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  258    258   
    ::aws_smithy_schema::ShapeId::from_static(
  259    259   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryFloat",
  260    260   
        "aws.protocoltests.restxml.synthetic",
  261    261   
        "AllQueryStringTypesInput",
  262    262   
    ),
  263    263   
    ::aws_smithy_schema::ShapeType::Float,
  264         -
    "query_float",
         264  +
    "queryFloat",
  265    265   
    9,
  266    266   
)
  267    267   
.with_http_query("Float");
  268    268   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_DOUBLE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  269    269   
    ::aws_smithy_schema::ShapeId::from_static(
  270    270   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryDouble",
  271    271   
        "aws.protocoltests.restxml.synthetic",
  272    272   
        "AllQueryStringTypesInput",
  273    273   
    ),
  274    274   
    ::aws_smithy_schema::ShapeType::Double,
  275         -
    "query_double",
         275  +
    "queryDouble",
  276    276   
    10,
  277    277   
)
  278    278   
.with_http_query("Double");
  279    279   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_DOUBLE_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  280    280   
    ::aws_smithy_schema::ShapeId::from_static(
  281    281   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryDoubleList",
  282    282   
        "aws.protocoltests.restxml.synthetic",
  283    283   
        "AllQueryStringTypesInput",
  284    284   
    ),
  285    285   
    ::aws_smithy_schema::ShapeType::List,
  286         -
    "query_double_list",
         286  +
    "queryDoubleList",
  287    287   
    11,
  288    288   
)
  289    289   
.with_http_query("DoubleList");
  290    290   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_BOOLEAN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  291    291   
    ::aws_smithy_schema::ShapeId::from_static(
  292    292   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryBoolean",
  293    293   
        "aws.protocoltests.restxml.synthetic",
  294    294   
        "AllQueryStringTypesInput",
  295    295   
    ),
  296    296   
    ::aws_smithy_schema::ShapeType::Boolean,
  297         -
    "query_boolean",
         297  +
    "queryBoolean",
  298    298   
    12,
  299    299   
)
  300    300   
.with_http_query("Boolean");
  301    301   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_BOOLEAN_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  302    302   
    ::aws_smithy_schema::ShapeId::from_static(
  303    303   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryBooleanList",
  304    304   
        "aws.protocoltests.restxml.synthetic",
  305    305   
        "AllQueryStringTypesInput",
  306    306   
    ),
  307    307   
    ::aws_smithy_schema::ShapeType::List,
  308         -
    "query_boolean_list",
         308  +
    "queryBooleanList",
  309    309   
    13,
  310    310   
)
  311    311   
.with_http_query("BooleanList");
  312    312   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_TIMESTAMP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  313    313   
    ::aws_smithy_schema::ShapeId::from_static(
  314    314   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryTimestamp",
  315    315   
        "aws.protocoltests.restxml.synthetic",
  316    316   
        "AllQueryStringTypesInput",
  317    317   
    ),
  318    318   
    ::aws_smithy_schema::ShapeType::Timestamp,
  319         -
    "query_timestamp",
         319  +
    "queryTimestamp",
  320    320   
    14,
  321    321   
)
  322    322   
.with_http_query("Timestamp");
  323    323   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_TIMESTAMP_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  324    324   
    ::aws_smithy_schema::ShapeId::from_static(
  325    325   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryTimestampList",
  326    326   
        "aws.protocoltests.restxml.synthetic",
  327    327   
        "AllQueryStringTypesInput",
  328    328   
    ),
  329    329   
    ::aws_smithy_schema::ShapeType::List,
  330         -
    "query_timestamp_list",
         330  +
    "queryTimestampList",
  331    331   
    15,
  332    332   
)
  333    333   
.with_http_query("TimestampList");
  334    334   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_ENUM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  335    335   
    ::aws_smithy_schema::ShapeId::from_static(
  336    336   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryEnum",
  337    337   
        "aws.protocoltests.restxml.synthetic",
  338    338   
        "AllQueryStringTypesInput",
  339    339   
    ),
  340    340   
    ::aws_smithy_schema::ShapeType::String,
  341         -
    "query_enum",
         341  +
    "queryEnum",
  342    342   
    16,
  343    343   
)
  344    344   
.with_http_query("Enum");
  345    345   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_ENUM_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  346    346   
    ::aws_smithy_schema::ShapeId::from_static(
  347    347   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryEnumList",
  348    348   
        "aws.protocoltests.restxml.synthetic",
  349    349   
        "AllQueryStringTypesInput",
  350    350   
    ),
  351    351   
    ::aws_smithy_schema::ShapeType::List,
  352         -
    "query_enum_list",
         352  +
    "queryEnumList",
  353    353   
    17,
  354    354   
)
  355    355   
.with_http_query("EnumList");
  356    356   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_INTEGER_ENUM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  357    357   
    ::aws_smithy_schema::ShapeId::from_static(
  358    358   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryIntegerEnum",
  359    359   
        "aws.protocoltests.restxml.synthetic",
  360    360   
        "AllQueryStringTypesInput",
  361    361   
    ),
  362    362   
    ::aws_smithy_schema::ShapeType::Integer,
  363         -
    "query_integer_enum",
         363  +
    "queryIntegerEnum",
  364    364   
    18,
  365    365   
)
  366    366   
.with_http_query("IntegerEnum");
  367    367   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_INTEGER_ENUM_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  368    368   
    ::aws_smithy_schema::ShapeId::from_static(
  369    369   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryIntegerEnumList",
  370    370   
        "aws.protocoltests.restxml.synthetic",
  371    371   
        "AllQueryStringTypesInput",
  372    372   
    ),
  373    373   
    ::aws_smithy_schema::ShapeType::List,
  374         -
    "query_integer_enum_list",
         374  +
    "queryIntegerEnumList",
  375    375   
    19,
  376    376   
)
  377    377   
.with_http_query("IntegerEnumList");
  378    378   
static ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_PARAMS_MAP_OF_STRINGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  379    379   
    ::aws_smithy_schema::ShapeId::from_static(
  380    380   
        "aws.protocoltests.restxml.synthetic#AllQueryStringTypesInput$queryParamsMapOfStrings",
  381    381   
        "aws.protocoltests.restxml.synthetic",
  382    382   
        "AllQueryStringTypesInput",
  383    383   
    ),
  384    384   
    ::aws_smithy_schema::ShapeType::Map,
  385         -
    "query_params_map_of_strings",
         385  +
    "queryParamsMapOfStrings",
  386    386   
    20,
  387    387   
)
  388    388   
.with_http_query_params();
  389    389   
static ALLQUERYSTRINGTYPESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  390    390   
    ALLQUERYSTRINGTYPESINPUT_SCHEMA_ID,
  391    391   
    ::aws_smithy_schema::ShapeType::Structure,
  392    392   
    &[
  393    393   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_STRING,
  394    394   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_STRING_LIST,
  395    395   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_STRING_SET,
  396    396   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_BYTE,
  397    397   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_SHORT,
  398    398   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_INTEGER,
  399    399   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_INTEGER_LIST,
  400    400   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_INTEGER_SET,
  401    401   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_LONG,
  402    402   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_FLOAT,
  403    403   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_DOUBLE,
  404    404   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_DOUBLE_LIST,
  405    405   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_BOOLEAN,
  406    406   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_BOOLEAN_LIST,
  407    407   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_TIMESTAMP,
  408    408   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_TIMESTAMP_LIST,
  409    409   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_ENUM,
  410    410   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_ENUM_LIST,
  411    411   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_INTEGER_ENUM,
  412    412   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_INTEGER_ENUM_LIST,
  413    413   
        &ALLQUERYSTRINGTYPESINPUT_MEMBER_QUERY_PARAMS_MAP_OF_STRINGS,
  414    414   
    ],
  415         -
);
         415  +
)
         416  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/AllQueryStringTypesInput", None));
  416    417   
impl AllQueryStringTypesInput {
  417    418   
    /// The schema for this shape.
  418    419   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ALLQUERYSTRINGTYPESINPUT_SCHEMA;
  419    420   
}
  420    421   
impl ::aws_smithy_schema::serde::SerializableStruct for AllQueryStringTypesInput {
  421    422   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  422    423   
    fn serialize_members(
  423    424   
        &self,
  424    425   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  425    426   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
@@ -545,546 +790,730 @@
  565    566   
                    }
  566    567   
                    Ok(())
  567    568   
                },
  568    569   
            )?;
  569    570   
        }
  570    571   
        Ok(())
  571    572   
    }
  572    573   
}
  573    574   
impl AllQueryStringTypesInput {
  574    575   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  575         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  576         -
        deserializer: &mut D,
         576  +
    pub fn deserialize(
         577  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  577    578   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  578    579   
        #[allow(unused_variables, unused_mut)]
  579    580   
        let mut builder = Self::builder();
  580    581   
        #[allow(
  581    582   
            unused_variables,
  582    583   
            unreachable_code,
  583    584   
            clippy::single_match,
  584    585   
            clippy::match_single_binding,
  585    586   
            clippy::diverging_sub_expression
  586    587   
        )]
  587         -
        deserializer.read_struct(&ALLQUERYSTRINGTYPESINPUT_SCHEMA, (), |_, member, deser| {
         588  +
        deserializer.read_struct(&ALLQUERYSTRINGTYPESINPUT_SCHEMA, &mut |member, deser| {
  588    589   
            match member.member_index() {
  589    590   
                Some(0) => {
  590    591   
                    builder.query_string = Some(deser.read_string(member)?);
  591    592   
                }
  592    593   
                Some(1) => {
  593         -
                    builder.query_string_list = Some({
  594         -
                        let container = if let Some(cap) = deser.container_size() {
  595         -
                            Vec::with_capacity(cap)
  596         -
                        } else {
  597         -
                            Vec::new()
  598         -
                        };
  599         -
                        deser.read_list(member, container, |mut list, deser| {
  600         -
                            list.push(deser.read_string(member)?);
  601         -
                            Ok(list)
  602         -
                        })?
  603         -
                    });
         594  +
                    builder.query_string_list = Some(deser.read_string_list(member)?);
  604    595   
                }
  605    596   
                Some(2) => {
  606         -
                    builder.query_string_set = Some({
  607         -
                        let container = if let Some(cap) = deser.container_size() {
  608         -
                            Vec::with_capacity(cap)
  609         -
                        } else {
  610         -
                            Vec::new()
  611         -
                        };
  612         -
                        deser.read_list(member, container, |mut list, deser| {
  613         -
                            list.push(deser.read_string(member)?);
  614         -
                            Ok(list)
  615         -
                        })?
  616         -
                    });
         597  +
                    builder.query_string_set = Some(deser.read_string_list(member)?);
  617    598   
                }
  618    599   
                Some(3) => {
  619    600   
                    builder.query_byte = Some(deser.read_byte(member)?);
  620    601   
                }
  621    602   
                Some(4) => {
  622    603   
                    builder.query_short = Some(deser.read_short(member)?);
  623    604   
                }
  624    605   
                Some(5) => {
  625    606   
                    builder.query_integer = Some(deser.read_integer(member)?);
  626    607   
                }
  627    608   
                Some(6) => {
  628         -
                    builder.query_integer_list = Some({
  629         -
                        let container = if let Some(cap) = deser.container_size() {
  630         -
                            Vec::with_capacity(cap)
  631         -
                        } else {
  632         -
                            Vec::new()
  633         -
                        };
  634         -
                        deser.read_list(member, container, |mut list, deser| {
  635         -
                            list.push(deser.read_integer(member)?);
  636         -
                            Ok(list)
  637         -
                        })?
  638         -
                    });
         609  +
                    builder.query_integer_list = Some(deser.read_integer_list(member)?);
  639    610   
                }
  640    611   
                Some(7) => {
  641         -
                    builder.query_integer_set = Some({
  642         -
                        let container = if let Some(cap) = deser.container_size() {
  643         -
                            Vec::with_capacity(cap)
  644         -
                        } else {
  645         -
                            Vec::new()
  646         -
                        };
  647         -
                        deser.read_list(member, container, |mut list, deser| {
  648         -
                            list.push(deser.read_integer(member)?);
  649         -
                            Ok(list)
  650         -
                        })?
  651         -
                    });
         612  +
                    builder.query_integer_set = Some(deser.read_integer_list(member)?);
  652    613   
                }
  653    614   
                Some(8) => {
  654    615   
                    builder.query_long = Some(deser.read_long(member)?);
  655    616   
                }
  656    617   
                Some(9) => {
  657    618   
                    builder.query_float = Some(deser.read_float(member)?);
  658    619   
                }
  659    620   
                Some(10) => {
  660    621   
                    builder.query_double = Some(deser.read_double(member)?);
  661    622   
                }
  662    623   
                Some(11) => {
  663    624   
                    builder.query_double_list = Some({
  664         -
                        let container = if let Some(cap) = deser.container_size() {
  665         -
                            Vec::with_capacity(cap)
  666         -
                        } else {
  667         -
                            Vec::new()
  668         -
                        };
  669         -
                        deser.read_list(member, container, |mut list, deser| {
  670         -
                            list.push(deser.read_double(member)?);
  671         -
                            Ok(list)
  672         -
                        })?
         625  +
                        let mut container = Vec::new();
         626  +
                        deser.read_list(member, &mut |deser| {
         627  +
                            container.push(deser.read_double(member)?);
         628  +
                            Ok(())
         629  +
                        })?;
         630  +
                        container
  673    631   
                    });
  674    632   
                }
  675    633   
                Some(12) => {
  676    634   
                    builder.query_boolean = Some(deser.read_boolean(member)?);
  677    635   
                }
  678    636   
                Some(13) => {
  679    637   
                    builder.query_boolean_list = Some({
  680         -
                        let container = if let Some(cap) = deser.container_size() {
  681         -
                            Vec::with_capacity(cap)
  682         -
                        } else {
  683         -
                            Vec::new()
  684         -
                        };
  685         -
                        deser.read_list(member, container, |mut list, deser| {
  686         -
                            list.push(deser.read_boolean(member)?);
  687         -
                            Ok(list)
  688         -
                        })?
         638  +
                        let mut container = Vec::new();
         639  +
                        deser.read_list(member, &mut |deser| {
         640  +
                            container.push(deser.read_boolean(member)?);
         641  +
                            Ok(())
         642  +
                        })?;
         643  +
                        container
  689    644   
                    });
  690    645   
                }
  691    646   
                Some(14) => {
  692    647   
                    builder.query_timestamp = Some(deser.read_timestamp(member)?);
  693    648   
                }
  694    649   
                Some(15) => {
  695    650   
                    builder.query_timestamp_list = Some({
  696         -
                        let container = if let Some(cap) = deser.container_size() {
  697         -
                            Vec::with_capacity(cap)
  698         -
                        } else {
  699         -
                            Vec::new()
  700         -
                        };
  701         -
                        deser.read_list(member, container, |mut list, deser| {
  702         -
                            list.push(deser.read_timestamp(member)?);
  703         -
                            Ok(list)
  704         -
                        })?
         651  +
                        let mut container = Vec::new();
         652  +
                        deser.read_list(member, &mut |deser| {
         653  +
                            container.push(deser.read_timestamp(member)?);
         654  +
                            Ok(())
         655  +
                        })?;
         656  +
                        container
  705    657   
                    });
  706    658   
                }
  707    659   
                Some(16) => {
  708    660   
                    builder.query_enum = Some(crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
  709    661   
                }
  710    662   
                Some(17) => {
  711    663   
                    builder.query_enum_list = Some({
  712         -
                        let container = if let Some(cap) = deser.container_size() {
  713         -
                            Vec::with_capacity(cap)
  714         -
                        } else {
  715         -
                            Vec::new()
  716         -
                        };
  717         -
                        deser.read_list(member, container, |mut list, deser| {
  718         -
                            list.push(crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
  719         -
                            Ok(list)
  720         -
                        })?
         664  +
                        let mut container = Vec::new();
         665  +
                        deser.read_list(member, &mut |deser| {
         666  +
                            container.push(crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
         667  +
                            Ok(())
         668  +
                        })?;
         669  +
                        container
  721    670   
                    });
  722    671   
                }
  723    672   
                Some(18) => {
  724    673   
                    builder.query_integer_enum = Some(deser.read_integer(member)?);
  725    674   
                }
  726    675   
                Some(19) => {
  727         -
                    builder.query_integer_enum_list = Some({
  728         -
                        let container = if let Some(cap) = deser.container_size() {
  729         -
                            Vec::with_capacity(cap)
  730         -
                        } else {
  731         -
                            Vec::new()
  732         -
                        };
  733         -
                        deser.read_list(member, container, |mut list, deser| {
  734         -
                            list.push(deser.read_integer(member)?);
  735         -
                            Ok(list)
  736         -
                        })?
  737         -
                    });
         676  +
                    builder.query_integer_enum_list = Some(deser.read_integer_list(member)?);
  738    677   
                }
  739    678   
                Some(20) => {
  740         -
                    builder.query_params_map_of_strings = Some({
  741         -
                        let container = if let Some(cap) = deser.container_size() {
  742         -
                            std::collections::HashMap::with_capacity(cap)
  743         -
                        } else {
  744         -
                            std::collections::HashMap::new()
  745         -
                        };
  746         -
                        deser.read_map(member, container, |mut map, key, deser| {
  747         -
                            map.insert(key, deser.read_string(member)?);
  748         -
                            Ok(map)
  749         -
                        })?
  750         -
                    });
         679  +
                    builder.query_params_map_of_strings = Some(deser.read_string_string_map(member)?);
  751    680   
                }
  752    681   
                _ => {}
  753    682   
            }
  754    683   
            Ok(())
  755    684   
        })?;
  756    685   
        builder
  757    686   
            .build()
  758    687   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  759    688   
    }
  760    689   
}
         690  +
impl AllQueryStringTypesInput {
         691  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         692  +
    pub fn deserialize_with_response(
         693  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         694  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         695  +
        _status: u16,
         696  +
        _body: &[u8],
         697  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         698  +
        Self::deserialize(deserializer)
         699  +
    }
         700  +
}
  761    701   
impl AllQueryStringTypesInput {
  762    702   
    /// Creates a new builder-style object to manufacture [`AllQueryStringTypesInput`](crate::operation::all_query_string_types::AllQueryStringTypesInput).
  763    703   
    pub fn builder() -> crate::operation::all_query_string_types::builders::AllQueryStringTypesInputBuilder {
  764    704   
        crate::operation::all_query_string_types::builders::AllQueryStringTypesInputBuilder::default()
  765    705   
    }
  766    706   
}
  767    707   
  768    708   
/// A builder for [`AllQueryStringTypesInput`](crate::operation::all_query_string_types::AllQueryStringTypesInput).
  769    709   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  770    710   
#[non_exhaustive]

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/body_with_xml_name.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 `BodyWithXmlName`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct BodyWithXmlName;
    6      6   
impl BodyWithXmlName {
    7      7   
    /// Creates a new `BodyWithXmlName`
    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::body_with_xml_name::BodyWithXmlNameInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::body_with_xml_name::BodyWithXmlNameOutput::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::body_with_xml_name::BodyWithXmlNameInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::body_with_xml_name::BodyWithXmlNameOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::body_with_xml_name::BodyWithXmlNameError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +166,171 @@
  124    128   
                crate::operation::body_with_xml_name::BodyWithXmlNameError,
  125    129   
            >::new());
  126    130   
  127    131   
        ::std::borrow::Cow::Owned(rcb)
  128    132   
    }
  129    133   
}
  130    134   
  131    135   
#[derive(Debug)]
  132    136   
struct BodyWithXmlNameResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for BodyWithXmlNameResponseDeserializer {
  134         -
    fn deserialize_nonstreaming(
         138  +
    fn deserialize_nonstreaming_with_config(
  135    139   
        &self,
  136    140   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         141  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  137    142   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  138    143   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  139    144   
        let headers = response.headers();
  140    145   
        let body = response.body().bytes().expect("body loaded");
  141    146   
        #[allow(unused_mut)]
  142    147   
        let mut force_error = false;
  143    148   
  144    149   
        let parse_result = if !success && status != 200 || force_error {
  145    150   
            crate::protocol_serde::shape_body_with_xml_name::de_body_with_xml_name_http_error(status, headers, body)
  146    151   
        } else {
@@ -287,292 +347,356 @@
  307    312   
            .expect("the config must have a deserializer");
  308    313   
  309    314   
        let parsed = de.deserialize_streaming(&mut http_response);
  310    315   
        let parsed = parsed.unwrap_or_else(|| {
  311    316   
            let http_response = http_response.map(|body| {
  312    317   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  313    318   
                    body.bytes().unwrap(),
  314    319   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  315    320   
                )))
  316    321   
            });
  317         -
            de.deserialize_nonstreaming(&http_response)
         322  +
            // Build a config bag with the protocol for schema-based deserialization
         323  +
            #[allow(unused_mut)]
         324  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         325  +
         326  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  318    327   
        });
  319    328   
        let parsed = parsed
  320    329   
            .expect("should be successful response")
  321    330   
            .downcast::<crate::operation::body_with_xml_name::BodyWithXmlNameOutput>()
  322    331   
            .unwrap();
  323    332   
        ::pretty_assertions::assert_eq!(parsed.nested, expected_output.nested, "Unexpected value for `nested`");
  324    333   
    }
  325    334   
}
  326    335   
  327    336   
/// Error type for the `BodyWithXmlNameError` operation.

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/body_with_xml_name/_body_with_xml_name_input.rs

@@ -5,5 +109,121 @@
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Structure,
   27     27   
    "nested",
   28     28   
    0,
   29     29   
);
   30     30   
static BODYWITHXMLNAMEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    BODYWITHXMLNAMEINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&BODYWITHXMLNAMEINPUT_MEMBER_NESTED],
   34     34   
)
   35         -
.with_xml_name("Ahoy");
          35  +
.with_xml_name("Ahoy")
          36  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("PUT", "/BodyWithXmlName", None));
   36     37   
impl BodyWithXmlNameInput {
   37     38   
    /// The schema for this shape.
   38     39   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &BODYWITHXMLNAMEINPUT_SCHEMA;
   39     40   
}
   40     41   
impl ::aws_smithy_schema::serde::SerializableStruct for BodyWithXmlNameInput {
   41     42   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   42     43   
    fn serialize_members(
   43     44   
        &self,
   44     45   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     46   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     47   
        if let Some(ref val) = self.nested {
   47     48   
            ser.write_struct(&BODYWITHXMLNAMEINPUT_MEMBER_NESTED, val)?;
   48     49   
        }
   49     50   
        Ok(())
   50     51   
    }
   51     52   
}
   52     53   
impl BodyWithXmlNameInput {
   53     54   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          55  +
    pub fn deserialize(
          56  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     57   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     58   
        #[allow(unused_variables, unused_mut)]
   58     59   
        let mut builder = Self::builder();
   59     60   
        #[allow(
   60     61   
            unused_variables,
   61     62   
            unreachable_code,
   62     63   
            clippy::single_match,
   63     64   
            clippy::match_single_binding,
   64     65   
            clippy::diverging_sub_expression
   65     66   
        )]
   66         -
        deserializer.read_struct(&BODYWITHXMLNAMEINPUT_SCHEMA, (), |_, member, deser| {
          67  +
        deserializer.read_struct(&BODYWITHXMLNAMEINPUT_SCHEMA, &mut |member, deser| {
   67     68   
            match member.member_index() {
   68     69   
                Some(0) => {
   69     70   
                    builder.nested = Some(crate::types::PayloadWithXmlName::deserialize(deser)?);
   70     71   
                }
   71     72   
                _ => {}
   72     73   
            }
   73     74   
            Ok(())
   74     75   
        })?;
   75     76   
        builder
   76     77   
            .build()
   77     78   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   78     79   
    }
   79     80   
}
          81  +
impl BodyWithXmlNameInput {
          82  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          83  +
    pub fn deserialize_with_response(
          84  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          85  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          86  +
        _status: u16,
          87  +
        _body: &[u8],
          88  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          89  +
        Self::deserialize(deserializer)
          90  +
    }
          91  +
}
   80     92   
impl BodyWithXmlNameInput {
   81     93   
    /// Creates a new builder-style object to manufacture [`BodyWithXmlNameInput`](crate::operation::body_with_xml_name::BodyWithXmlNameInput).
   82     94   
    pub fn builder() -> crate::operation::body_with_xml_name::builders::BodyWithXmlNameInputBuilder {
   83     95   
        crate::operation::body_with_xml_name::builders::BodyWithXmlNameInputBuilder::default()
   84     96   
    }
   85     97   
}
   86     98   
   87     99   
/// A builder for [`BodyWithXmlNameInput`](crate::operation::body_with_xml_name::BodyWithXmlNameInput).
   88    100   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   89    101   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/body_with_xml_name/_body_with_xml_name_output.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/constant_and_variable_query_string.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `ConstantAndVariableQueryString`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ConstantAndVariableQueryString;
    6      6   
impl ConstantAndVariableQueryString {
    7      7   
    /// Creates a new `ConstantAndVariableQueryString`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +172,179 @@
  130    136   
                crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
  131    137   
            >::new());
  132    138   
  133    139   
        ::std::borrow::Cow::Owned(rcb)
  134    140   
    }
  135    141   
}
  136    142   
  137    143   
#[derive(Debug)]
  138    144   
struct ConstantAndVariableQueryStringResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ConstantAndVariableQueryStringResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         146  +
    fn deserialize_nonstreaming_with_config(
  141    147   
        &self,
  142    148   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         149  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    150   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    151   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  145    152   
        let headers = response.headers();
  146    153   
        let body = response.body().bytes().expect("body loaded");
  147    154   
        #[allow(unused_mut)]
  148    155   
        let mut force_error = false;
  149    156   
  150    157   
        let parse_result = if !success && status != 200 || force_error {
  151    158   
            crate::protocol_serde::shape_constant_and_variable_query_string::de_constant_and_variable_query_string_http_error(status, headers, body)
  152    159   
        } else {

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/constant_and_variable_query_string/_constant_and_variable_query_string_input.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/constant_and_variable_query_string/_constant_and_variable_query_string_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 ConstantAndVariableQueryStringOutput {
   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(&CONSTANTANDVARIABLEQUERYSTRINGOUTPUT_SCHEMA, (), |_, member, deser| {
          43  +
        deserializer.read_struct(&CONSTANTANDVARIABLEQUERYSTRINGOUTPUT_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 ConstantAndVariableQueryStringOutput {
          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 ConstantAndVariableQueryStringOutput {
   53     64   
    /// Creates a new builder-style object to manufacture [`ConstantAndVariableQueryStringOutput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput).
   54     65   
    pub fn builder() -> crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringOutputBuilder {
   55     66   
        crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringOutputBuilder::default()
   56     67   
    }
   57     68   
}
   58     69   
   59     70   
/// A builder for [`ConstantAndVariableQueryStringOutput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput).
   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/rest_xml/rust-client-codegen/src/operation/constant_query_string.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 `ConstantQueryString`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ConstantQueryString;
    6      6   
impl ConstantQueryString {
    7      7   
    /// Creates a new `ConstantQueryString`
    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::constant_query_string::ConstantQueryStringInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::constant_query_string::ConstantQueryStringOutput::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::constant_query_string::ConstantQueryStringInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::constant_query_string::ConstantQueryStringOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::constant_query_string::ConstantQueryStringError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -110,114 +172,177 @@
  130    134   
                crate::operation::constant_query_string::ConstantQueryStringError,
  131    135   
            >::new());
  132    136   
  133    137   
        ::std::borrow::Cow::Owned(rcb)
  134    138   
    }
  135    139   
}
  136    140   
  137    141   
#[derive(Debug)]
  138    142   
struct ConstantQueryStringResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ConstantQueryStringResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         144  +
    fn deserialize_nonstreaming_with_config(
  141    145   
        &self,
  142    146   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         147  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  145    150   
        let headers = response.headers();
  146    151   
        let body = response.body().bytes().expect("body loaded");
  147    152   
        #[allow(unused_mut)]
  148    153   
        let mut force_error = false;
  149    154   
  150    155   
        let parse_result = if !success && status != 200 || force_error {
  151    156   
            crate::protocol_serde::shape_constant_query_string::de_constant_query_string_http_error(status, headers, body)
  152    157   
        } else {

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/constant_query_string/_constant_query_string_input.rs

@@ -5,5 +109,126 @@
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27     27   
    "hello",
   28     28   
    0,
   29     29   
)
   30     30   
.with_http_label();
   31     31   
static CONSTANTQUERYSTRINGINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     32   
    CONSTANTQUERYSTRINGINPUT_SCHEMA_ID,
   33     33   
    ::aws_smithy_schema::ShapeType::Structure,
   34     34   
    &[&CONSTANTQUERYSTRINGINPUT_MEMBER_HELLO],
   35         -
);
          35  +
)
          36  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          37  +
    "GET",
          38  +
    "/ConstantQueryString/{hello}?foo=bar&hello",
          39  +
    None,
          40  +
));
   36     41   
impl ConstantQueryStringInput {
   37     42   
    /// The schema for this shape.
   38     43   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CONSTANTQUERYSTRINGINPUT_SCHEMA;
   39     44   
}
   40     45   
impl ::aws_smithy_schema::serde::SerializableStruct for ConstantQueryStringInput {
   41     46   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   42     47   
    fn serialize_members(
   43     48   
        &self,
   44     49   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     50   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     51   
        if let Some(ref val) = self.hello {
   47     52   
            ser.write_string(&CONSTANTQUERYSTRINGINPUT_MEMBER_HELLO, val)?;
   48     53   
        }
   49     54   
        Ok(())
   50     55   
    }
   51     56   
}
   52     57   
impl ConstantQueryStringInput {
   53     58   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          59  +
    pub fn deserialize(
          60  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     61   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     62   
        #[allow(unused_variables, unused_mut)]
   58     63   
        let mut builder = Self::builder();
   59     64   
        #[allow(
   60     65   
            unused_variables,
   61     66   
            unreachable_code,
   62     67   
            clippy::single_match,
   63     68   
            clippy::match_single_binding,
   64     69   
            clippy::diverging_sub_expression
   65     70   
        )]
   66         -
        deserializer.read_struct(&CONSTANTQUERYSTRINGINPUT_SCHEMA, (), |_, member, deser| {
          71  +
        deserializer.read_struct(&CONSTANTQUERYSTRINGINPUT_SCHEMA, &mut |member, deser| {
   67     72   
            match member.member_index() {
   68     73   
                Some(0) => {
   69     74   
                    builder.hello = Some(deser.read_string(member)?);
   70     75   
                }
   71     76   
                _ => {}
   72     77   
            }
   73     78   
            Ok(())
   74     79   
        })?;
          80  +
        builder.hello = builder.hello.or(Some(String::new()));
   75     81   
        builder
   76     82   
            .build()
   77     83   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   78     84   
    }
   79     85   
}
          86  +
impl ConstantQueryStringInput {
          87  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          88  +
    pub fn deserialize_with_response(
          89  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          90  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          91  +
        _status: u16,
          92  +
        _body: &[u8],
          93  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          94  +
        Self::deserialize(deserializer)
          95  +
    }
          96  +
}
   80     97   
impl ConstantQueryStringInput {
   81     98   
    /// Creates a new builder-style object to manufacture [`ConstantQueryStringInput`](crate::operation::constant_query_string::ConstantQueryStringInput).
   82     99   
    pub fn builder() -> crate::operation::constant_query_string::builders::ConstantQueryStringInputBuilder {
   83    100   
        crate::operation::constant_query_string::builders::ConstantQueryStringInputBuilder::default()
   84    101   
    }
   85    102   
}
   86    103   
   87    104   
/// A builder for [`ConstantQueryStringInput`](crate::operation::constant_query_string::ConstantQueryStringInput).
   88    105   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   89    106   
#[non_exhaustive]

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/content_type_parameters.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 `ContentTypeParameters`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ContentTypeParameters;
    6      6   
impl ContentTypeParameters {
    7      7   
    /// Creates a new `ContentTypeParameters`
    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::content_type_parameters::ContentTypeParametersInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::content_type_parameters::ContentTypeParametersOutput::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::content_type_parameters::ContentTypeParametersInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::content_type_parameters::ContentTypeParametersError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -110,114 +172,177 @@
  130    134   
                crate::operation::content_type_parameters::ContentTypeParametersError,
  131    135   
            >::new());
  132    136   
  133    137   
        ::std::borrow::Cow::Owned(rcb)
  134    138   
    }
  135    139   
}
  136    140   
  137    141   
#[derive(Debug)]
  138    142   
struct ContentTypeParametersResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ContentTypeParametersResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         144  +
    fn deserialize_nonstreaming_with_config(
  141    145   
        &self,
  142    146   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         147  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  145    150   
        let headers = response.headers();
  146    151   
        let body = response.body().bytes().expect("body loaded");
  147    152   
        #[allow(unused_mut)]
  148    153   
        let mut force_error = false;
  149    154   
  150    155   
        let parse_result = if !success && status != 200 || force_error {
  151    156   
            crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters_http_error(status, headers, body)
  152    157   
        } else {

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/content_type_parameters/_content_type_parameters_input.rs

@@ -4,4 +108,120 @@
   24     24   
        "ContentTypeParametersInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Integer,
   27     27   
    "value",
   28     28   
    0,
   29     29   
);
   30     30   
static CONTENTTYPEPARAMETERSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     31   
    CONTENTTYPEPARAMETERSINPUT_SCHEMA_ID,
   32     32   
    ::aws_smithy_schema::ShapeType::Structure,
   33     33   
    &[&CONTENTTYPEPARAMETERSINPUT_MEMBER_VALUE],
   34         -
);
          34  +
)
          35  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("PUT", "/ContentTypeParameters", None));
   35     36   
impl ContentTypeParametersInput {
   36     37   
    /// The schema for this shape.
   37     38   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CONTENTTYPEPARAMETERSINPUT_SCHEMA;
   38     39   
}
   39     40   
impl ::aws_smithy_schema::serde::SerializableStruct for ContentTypeParametersInput {
   40     41   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     42   
    fn serialize_members(
   42     43   
        &self,
   43     44   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     45   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     46   
        if let Some(ref val) = self.value {
   46     47   
            ser.write_integer(&CONTENTTYPEPARAMETERSINPUT_MEMBER_VALUE, *val)?;
   47     48   
        }
   48     49   
        Ok(())
   49     50   
    }
   50     51   
}
   51     52   
impl ContentTypeParametersInput {
   52     53   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          54  +
    pub fn deserialize(
          55  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     56   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     57   
        #[allow(unused_variables, unused_mut)]
   57     58   
        let mut builder = Self::builder();
   58     59   
        #[allow(
   59     60   
            unused_variables,
   60     61   
            unreachable_code,
   61     62   
            clippy::single_match,
   62     63   
            clippy::match_single_binding,
   63     64   
            clippy::diverging_sub_expression
   64     65   
        )]
   65         -
        deserializer.read_struct(&CONTENTTYPEPARAMETERSINPUT_SCHEMA, (), |_, member, deser| {
          66  +
        deserializer.read_struct(&CONTENTTYPEPARAMETERSINPUT_SCHEMA, &mut |member, deser| {
   66     67   
            match member.member_index() {
   67     68   
                Some(0) => {
   68     69   
                    builder.value = Some(deser.read_integer(member)?);
   69     70   
                }
   70     71   
                _ => {}
   71     72   
            }
   72     73   
            Ok(())
   73     74   
        })?;
   74     75   
        builder
   75     76   
            .build()
   76     77   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     78   
    }
   78     79   
}
          80  +
impl ContentTypeParametersInput {
          81  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          82  +
    pub fn deserialize_with_response(
          83  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          84  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          85  +
        _status: u16,
          86  +
        _body: &[u8],
          87  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          88  +
        Self::deserialize(deserializer)
          89  +
    }
          90  +
}
   79     91   
impl ContentTypeParametersInput {
   80     92   
    /// Creates a new builder-style object to manufacture [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
   81     93   
    pub fn builder() -> crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
   82     94   
        crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder::default()
   83     95   
    }
   84     96   
}
   85     97   
   86     98   
/// A builder for [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
   87     99   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   88    100   
#[non_exhaustive]