Client Test

Client Test

rev. 32b1b3c3761061baed26023be3219639e42d7d12

Files changed:

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_content_type_without_body.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 `MalformedContentTypeWithoutBody`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct MalformedContentTypeWithoutBody;
    6      6   
impl MalformedContentTypeWithoutBody {
    7      7   
    /// Creates a new `MalformedContentTypeWithoutBody`
    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::malformed_content_type_without_body::MalformedContentTypeWithoutBodyInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::malformed_content_type_without_body::MalformedContentTypeWithoutBodyOutput::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::malformed_content_type_without_body::MalformedContentTypeWithoutBodyInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::malformed_content_type_without_body::MalformedContentTypeWithoutBodyOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::malformed_content_type_without_body::MalformedContentTypeWithoutBodyError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +230,241 @@
  130    136   
                crate::operation::malformed_content_type_without_body::MalformedContentTypeWithoutBodyError,
  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 MalformedContentTypeWithoutBodyResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for MalformedContentTypeWithoutBodyResponseDeserializer {
  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         -
        let headers = response.headers();
  146         -
        let body = response.body().bytes().expect("body loaded");
  147    152   
        #[allow(unused_mut)]
  148    153   
        let mut force_error = false;
  149    154   
  150         -
        let parse_result = if !success && status != 200 || force_error {
  151         -
            crate::protocol_serde::shape_malformed_content_type_without_body::de_malformed_content_type_without_body_http_error(status, headers, body)
         155  +
        if !success && status != 200 || force_error {
         156  +
            let headers = response.headers();
         157  +
            let body = response.body().bytes().expect("body loaded");
         158  +
            #[allow(unused_mut)]
         159  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         160  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         161  +
            })?;
         162  +
         163  +
            let generic = generic_builder.build();
         164  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         165  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(
         166  +
                    crate::operation::malformed_content_type_without_body::MalformedContentTypeWithoutBodyError::generic(generic),
         167  +
                ),
         168  +
            ))
  152    169   
        } else {
  153         -
            crate::protocol_serde::shape_malformed_content_type_without_body::de_malformed_content_type_without_body_http_response(
  154         -
                status, headers, body,
         170  +
            let protocol = _cfg
         171  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         172  +
                .expect("a SharedClientProtocol is required");
         173  +
            let mut deser = protocol
         174  +
                .deserialize_response(response, MalformedContentTypeWithoutBody::OUTPUT_SCHEMA, _cfg)
         175  +
                .map_err(|e| {
         176  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         177  +
                })?;
         178  +
            let body = response.body().bytes().expect("body loaded");
         179  +
            let output = crate::operation::malformed_content_type_without_body::MalformedContentTypeWithoutBodyOutput::deserialize_with_response(
         180  +
                &mut *deser,
         181  +
                response.headers(),
         182  +
                response.status().into(),
         183  +
                body,
  155    184   
            )
  156         -
        };
  157         -
        crate::protocol_serde::type_erase_result(parse_result)
         185  +
            .map_err(|e| {
         186  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         187  +
            })?;
         188  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         189  +
        }
  158    190   
    }
  159    191   
}
  160    192   
#[derive(Debug)]
  161    193   
struct MalformedContentTypeWithoutBodyRequestSerializer;
  162    194   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for MalformedContentTypeWithoutBodyRequestSerializer {
  163    195   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  164    196   
    fn serialize_input(
  165    197   
        &self,
  166    198   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  167    199   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  168    200   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  169    201   
        let input = input
  170    202   
            .downcast::<crate::operation::malformed_content_type_without_body::MalformedContentTypeWithoutBodyInput>()
  171    203   
            .expect("correct type");
  172         -
        let _header_serialization_settings = _cfg
  173         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  174         -
            .cloned()
  175         -
            .unwrap_or_default();
  176         -
        let mut request_builder = {
  177         -
            #[allow(clippy::uninlined_format_args)]
  178         -
            fn uri_base(
  179         -
                _input: &crate::operation::malformed_content_type_without_body::MalformedContentTypeWithoutBodyInput,
  180         -
                output: &mut ::std::string::String,
  181         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  182         -
                use ::std::fmt::Write as _;
  183         -
                ::std::write!(output, "/MalformedContentTypeWithoutBody").expect("formatting should succeed");
  184         -
                ::std::result::Result::Ok(())
  185         -
            }
  186         -
            #[allow(clippy::unnecessary_wraps)]
  187         -
            fn update_http_builder(
  188         -
                input: &crate::operation::malformed_content_type_without_body::MalformedContentTypeWithoutBodyInput,
  189         -
                builder: ::http_1x::request::Builder,
  190         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  191         -
                let mut uri = ::std::string::String::new();
  192         -
                uri_base(input, &mut uri)?;
  193         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  194         -
            }
  195         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  196         -
            builder
  197         -
        };
  198         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
         204  +
        let protocol = _cfg
         205  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         206  +
            .expect("a SharedClientProtocol is required");
         207  +
        let mut request = protocol
         208  +
            .serialize_request(&input, MalformedContentTypeWithoutBody::INPUT_SCHEMA, "", _cfg)
         209  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
  199    210   
  200         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         211  +
        return ::std::result::Result::Ok(request);
  201    212   
    }
  202    213   
}
  203    214   
#[derive(Debug)]
  204    215   
struct MalformedContentTypeWithoutBodyEndpointParamsInterceptor;
  205    216   
  206    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MalformedContentTypeWithoutBodyEndpointParamsInterceptor {
  207    218   
    fn name(&self) -> &'static str {
  208    219   
        "MalformedContentTypeWithoutBodyEndpointParamsInterceptor"
  209    220   
    }
  210    221   

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_content_type_without_body/_malformed_content_type_without_body_input.rs

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_content_type_without_body/_malformed_content_type_without_body_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 MalformedContentTypeWithoutBodyOutput {
   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(&MALFORMEDCONTENTTYPEWITHOUTBODYOUTPUT_SCHEMA, (), |_, member, deser| {
          43  +
        deserializer.read_struct(&MALFORMEDCONTENTTYPEWITHOUTBODYOUTPUT_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 MalformedContentTypeWithoutBodyOutput {
          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 MalformedContentTypeWithoutBodyOutput {
   53     64   
    /// Creates a new builder-style object to manufacture [`MalformedContentTypeWithoutBodyOutput`](crate::operation::malformed_content_type_without_body::MalformedContentTypeWithoutBodyOutput).
   54     65   
    pub fn builder() -> crate::operation::malformed_content_type_without_body::builders::MalformedContentTypeWithoutBodyOutputBuilder {
   55     66   
        crate::operation::malformed_content_type_without_body::builders::MalformedContentTypeWithoutBodyOutputBuilder::default()
   56     67   
    }
   57     68   
}
   58     69   
   59     70   
/// A builder for [`MalformedContentTypeWithoutBodyOutput`](crate::operation::malformed_content_type_without_body::MalformedContentTypeWithoutBodyOutput).
   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_json/rust-client-codegen/src/operation/malformed_content_type_without_body_empty_input.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 `MalformedContentTypeWithoutBodyEmptyInput`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct MalformedContentTypeWithoutBodyEmptyInput;
    6      6   
impl MalformedContentTypeWithoutBodyEmptyInput {
    7      7   
    /// Creates a new `MalformedContentTypeWithoutBodyEmptyInput`
    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::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputOutput::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::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -111,117 +230,271 @@
  131    137   
                    crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputError,
  132    138   
                >::new());
  133    139   
  134    140   
        ::std::borrow::Cow::Owned(rcb)
  135    141   
    }
  136    142   
}
  137    143   
  138    144   
#[derive(Debug)]
  139    145   
struct MalformedContentTypeWithoutBodyEmptyInputResponseDeserializer;
  140    146   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for MalformedContentTypeWithoutBodyEmptyInputResponseDeserializer {
  141         -
    fn deserialize_nonstreaming(
         147  +
    fn deserialize_nonstreaming_with_config(
  142    148   
        &self,
  143    149   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         150  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  144    151   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  145    152   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  146         -
        let headers = response.headers();
  147         -
        let body = response.body().bytes().expect("body loaded");
  148    153   
        #[allow(unused_mut)]
  149    154   
        let mut force_error = false;
  150    155   
  151         -
        let parse_result = if !success && status != 200 || force_error {
  152         -
            crate::protocol_serde::shape_malformed_content_type_without_body_empty_input::de_malformed_content_type_without_body_empty_input_http_error(status, headers, body)
         156  +
        if !success && status != 200 || force_error {
         157  +
            let headers = response.headers();
         158  +
            let body = response.body().bytes().expect("body loaded");
         159  +
            #[allow(unused_mut)]
         160  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         161  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         162  +
            })?;
         163  +
         164  +
            let generic = generic_builder.build();
         165  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         166  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(
         167  +
                    crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputError::generic(
         168  +
                        generic,
         169  +
                    ),
         170  +
                ),
         171  +
            ))
  153    172   
        } else {
  154         -
            crate::protocol_serde::shape_malformed_content_type_without_body_empty_input::de_malformed_content_type_without_body_empty_input_http_response(status, headers, body)
  155         -
        };
  156         -
        crate::protocol_serde::type_erase_result(parse_result)
         173  +
            let protocol = _cfg
         174  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         175  +
                .expect("a SharedClientProtocol is required");
         176  +
            let mut deser = protocol
         177  +
                .deserialize_response(response, MalformedContentTypeWithoutBodyEmptyInput::OUTPUT_SCHEMA, _cfg)
         178  +
                .map_err(|e| {
         179  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         180  +
                })?;
         181  +
            let body = response.body().bytes().expect("body loaded");
         182  +
            let output = crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputOutput::deserialize_with_response(
         183  +
                    &mut *deser,
         184  +
                    response.headers(),
         185  +
                    response.status().into(),
         186  +
                    body,
         187  +
                ).map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
         188  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         189  +
        }
  157    190   
    }
  158    191   
}
  159    192   
#[derive(Debug)]
  160    193   
struct MalformedContentTypeWithoutBodyEmptyInputRequestSerializer;
  161    194   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for MalformedContentTypeWithoutBodyEmptyInputRequestSerializer {
  162    195   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  163    196   
    fn serialize_input(
  164    197   
        &self,
  165    198   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  166    199   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  167    200   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  168    201   
        let input = input
  169    202   
            .downcast::<crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputInput>()
  170    203   
            .expect("correct type");
  171         -
        let _header_serialization_settings = _cfg
  172         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  173         -
            .cloned()
  174         -
            .unwrap_or_default();
  175         -
        let mut request_builder = {
  176         -
            #[allow(clippy::uninlined_format_args)]
  177         -
            fn uri_base(
  178         -
                _input: &crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputInput,
  179         -
                output: &mut ::std::string::String,
  180         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  181         -
                use ::std::fmt::Write as _;
  182         -
                ::std::write!(output, "/MalformedContentTypeWithoutBodyEmptyInput").expect("formatting should succeed");
  183         -
                ::std::result::Result::Ok(())
  184         -
            }
  185         -
            #[allow(clippy::unnecessary_wraps)]
  186         -
            fn update_http_builder(
  187         -
                input: &crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputInput,
  188         -
                builder: ::http_1x::request::Builder,
  189         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  190         -
                let mut uri = ::std::string::String::new();
  191         -
                uri_base(input, &mut uri)?;
  192         -
                let builder = crate::protocol_serde::shape_malformed_content_type_without_body_empty_input::ser_malformed_content_type_without_body_empty_input_headers(input, builder)?;
  193         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
         204  +
        let protocol = _cfg
         205  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         206  +
            .expect("a SharedClientProtocol is required");
         207  +
        if protocol.supports_http_bindings() {
         208  +
            let mut request = protocol
         209  +
                .serialize_body(&input, MalformedContentTypeWithoutBodyEmptyInput::INPUT_SCHEMA, "", _cfg)
         210  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         211  +
            {
         212  +
                let mut uri = "/MalformedContentTypeWithoutBodyEmptyInput".to_string();
         213  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         214  +
                if let Some(ref val) = input.header {
         215  +
                    request.headers_mut().insert("header", val.to_string());
         216  +
                }
         217  +
                if !query_params.is_empty() {
         218  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         219  +
                    let pairs: Vec<String> = query_params
         220  +
                        .iter()
         221  +
                        .map(|(k, v)| {
         222  +
                            format!(
         223  +
                                "{}={}",
         224  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         225  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         226  +
                            )
         227  +
                        })
         228  +
                        .collect();
         229  +
                    uri.push_str(&pairs.join("&"));
         230  +
                }
         231  +
                request.set_uri(uri.as_str()).expect("valid URI");
  194    232   
            }
  195         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  196         -
            builder
  197         -
        };
  198         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  199    233   
  200         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         234  +
            return ::std::result::Result::Ok(request);
         235  +
        } else {
         236  +
            let mut request = protocol
         237  +
                .serialize_request(&input, MalformedContentTypeWithoutBodyEmptyInput::INPUT_SCHEMA, "", _cfg)
         238  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         239  +
         240  +
            return ::std::result::Result::Ok(request);
         241  +
        }
  201    242   
    }
  202    243   
}
  203    244   
#[derive(Debug)]
  204    245   
struct MalformedContentTypeWithoutBodyEmptyInputEndpointParamsInterceptor;
  205    246   
  206    247   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MalformedContentTypeWithoutBodyEmptyInputEndpointParamsInterceptor {
  207    248   
    fn name(&self) -> &'static str {
  208    249   
        "MalformedContentTypeWithoutBodyEmptyInputEndpointParamsInterceptor"
  209    250   
    }
  210    251   

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_content_type_without_body_empty_input/_malformed_content_type_without_body_empty_input_input.rs

@@ -5,5 +109,134 @@
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27     27   
    "header",
   28     28   
    0,
   29     29   
)
   30     30   
.with_http_header("header");
   31     31   
static MALFORMEDCONTENTTYPEWITHOUTBODYEMPTYINPUTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     32   
    MALFORMEDCONTENTTYPEWITHOUTBODYEMPTYINPUTINPUT_SCHEMA_ID,
   33     33   
    ::aws_smithy_schema::ShapeType::Structure,
   34     34   
    &[&MALFORMEDCONTENTTYPEWITHOUTBODYEMPTYINPUTINPUT_MEMBER_HEADER],
   35         -
);
          35  +
)
          36  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          37  +
    "POST",
          38  +
    "/MalformedContentTypeWithoutBodyEmptyInput",
          39  +
    None,
          40  +
));
   36     41   
impl MalformedContentTypeWithoutBodyEmptyInputInput {
   37     42   
    /// The schema for this shape.
   38     43   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &MALFORMEDCONTENTTYPEWITHOUTBODYEMPTYINPUTINPUT_SCHEMA;
   39     44   
}
   40     45   
impl ::aws_smithy_schema::serde::SerializableStruct for MalformedContentTypeWithoutBodyEmptyInputInput {
   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.header {
   47     52   
            ser.write_string(&MALFORMEDCONTENTTYPEWITHOUTBODYEMPTYINPUTINPUT_MEMBER_HEADER, val)?;
   48     53   
        }
   49     54   
        Ok(())
   50     55   
    }
   51     56   
}
   52     57   
impl MalformedContentTypeWithoutBodyEmptyInputInput {
   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(&MALFORMEDCONTENTTYPEWITHOUTBODYEMPTYINPUTINPUT_SCHEMA, (), |_, member, deser| {
          71  +
        deserializer.read_struct(&MALFORMEDCONTENTTYPEWITHOUTBODYEMPTYINPUTINPUT_SCHEMA, &mut |member, deser| {
   67     72   
            match member.member_index() {
   68     73   
                Some(0) => {
   69     74   
                    builder.header = Some(deser.read_string(member)?);
   70     75   
                }
   71     76   
                _ => {}
   72     77   
            }
   73     78   
            Ok(())
   74     79   
        })?;
   75     80   
        builder
   76     81   
            .build()
   77     82   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   78     83   
    }
   79     84   
}
          85  +
impl MalformedContentTypeWithoutBodyEmptyInputInput {
          86  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          87  +
    /// Header-bound members are read directly from headers, avoiding runtime
          88  +
    /// member iteration overhead. Body members are read via the deserializer.
          89  +
    pub fn deserialize_with_response(
          90  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          91  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          92  +
        _status: u16,
          93  +
        _body: &[u8],
          94  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          95  +
        #[allow(unused_variables, unused_mut)]
          96  +
        let mut builder = Self::builder();
          97  +
        if let Some(val) = headers.get("header") {
          98  +
            builder.header = Some(val.to_string());
          99  +
        }
         100  +
        builder
         101  +
            .build()
         102  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         103  +
    }
         104  +
}
   80    105   
impl MalformedContentTypeWithoutBodyEmptyInputInput {
   81    106   
    /// Creates a new builder-style object to manufacture [`MalformedContentTypeWithoutBodyEmptyInputInput`](crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputInput).
   82    107   
    pub fn builder(
   83    108   
    ) -> crate::operation::malformed_content_type_without_body_empty_input::builders::MalformedContentTypeWithoutBodyEmptyInputInputBuilder {
   84    109   
        crate::operation::malformed_content_type_without_body_empty_input::builders::MalformedContentTypeWithoutBodyEmptyInputInputBuilder::default()
   85    110   
    }
   86    111   
}
   87    112   
   88    113   
/// A builder for [`MalformedContentTypeWithoutBodyEmptyInputInput`](crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputInput).
   89    114   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_content_type_without_body_empty_input/_malformed_content_type_without_body_empty_input_output.rs

@@ -1,1 +69,80 @@
   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 MalformedContentTypeWithoutBodyEmptyInputOutput {
   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(&MALFORMEDCONTENTTYPEWITHOUTBODYEMPTYINPUTOUTPUT_SCHEMA, (), |_, member, deser| {
          43  +
        deserializer.read_struct(&MALFORMEDCONTENTTYPEWITHOUTBODYEMPTYINPUTOUTPUT_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 MalformedContentTypeWithoutBodyEmptyInputOutput {
          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 MalformedContentTypeWithoutBodyEmptyInputOutput {
   53     64   
    /// Creates a new builder-style object to manufacture [`MalformedContentTypeWithoutBodyEmptyInputOutput`](crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputOutput).
   54     65   
    pub fn builder(
   55     66   
    ) -> crate::operation::malformed_content_type_without_body_empty_input::builders::MalformedContentTypeWithoutBodyEmptyInputOutputBuilder {
   56     67   
        crate::operation::malformed_content_type_without_body_empty_input::builders::MalformedContentTypeWithoutBodyEmptyInputOutputBuilder::default()
   57     68   
    }
   58     69   
}
   59     70   
   60     71   
/// A builder for [`MalformedContentTypeWithoutBodyEmptyInputOutput`](crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputOutput).
   61     72   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_double.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 `MalformedDouble`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct MalformedDouble;
    6      6   
impl MalformedDouble {
    7      7   
    /// Creates a new `MalformedDouble`
    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::malformed_double::MalformedDoubleInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::malformed_double::MalformedDoubleOutput::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::malformed_double::MalformedDoubleInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::malformed_double::MalformedDoubleOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::malformed_double::MalformedDoubleError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -110,114 +258,299 @@
  130    134   
                crate::operation::malformed_double::MalformedDoubleError,
  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 MalformedDoubleResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for MalformedDoubleResponseDeserializer {
  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         -
        let headers = response.headers();
  146         -
        let body = response.body().bytes().expect("body loaded");
  147    150   
        #[allow(unused_mut)]
  148    151   
        let mut force_error = false;
  149    152   
  150         -
        let parse_result = if !success && status != 200 || force_error {
  151         -
            crate::protocol_serde::shape_malformed_double::de_malformed_double_http_error(status, headers, body)
         153  +
        if !success && status != 200 || force_error {
         154  +
            let headers = response.headers();
         155  +
            let body = response.body().bytes().expect("body loaded");
         156  +
            #[allow(unused_mut)]
         157  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         158  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         159  +
            })?;
         160  +
         161  +
            let generic = generic_builder.build();
         162  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         163  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(
         164  +
                    crate::operation::malformed_double::MalformedDoubleError::generic(generic),
         165  +
                ),
         166  +
            ))
  152    167   
        } else {
  153         -
            crate::protocol_serde::shape_malformed_double::de_malformed_double_http_response(status, headers, body)
  154         -
        };
  155         -
        crate::protocol_serde::type_erase_result(parse_result)
         168  +
            let protocol = _cfg
         169  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         170  +
                .expect("a SharedClientProtocol is required");
         171  +
            let mut deser = protocol
         172  +
                .deserialize_response(response, MalformedDouble::OUTPUT_SCHEMA, _cfg)
         173  +
                .map_err(|e| {
         174  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
                })?;
         176  +
            let body = response.body().bytes().expect("body loaded");
         177  +
            let output = crate::operation::malformed_double::MalformedDoubleOutput::deserialize_with_response(
         178  +
                &mut *deser,
         179  +
                response.headers(),
         180  +
                response.status().into(),
         181  +
                body,
         182  +
            )
         183  +
            .map_err(|e| {
         184  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         185  +
            })?;
         186  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         187  +
        }
  156    188   
    }
  157    189   
}
  158    190   
#[derive(Debug)]
  159    191   
struct MalformedDoubleRequestSerializer;
  160    192   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for MalformedDoubleRequestSerializer {
  161    193   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  162    194   
    fn serialize_input(
  163    195   
        &self,
  164    196   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  165    197   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  166    198   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  167    199   
        let input = input
  168    200   
            .downcast::<crate::operation::malformed_double::MalformedDoubleInput>()
  169    201   
            .expect("correct type");
  170         -
        let _header_serialization_settings = _cfg
  171         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  172         -
            .cloned()
  173         -
            .unwrap_or_default();
  174         -
        let mut request_builder = {
  175         -
            #[allow(clippy::uninlined_format_args)]
  176         -
            fn uri_base(
  177         -
                _input: &crate::operation::malformed_double::MalformedDoubleInput,
  178         -
                output: &mut ::std::string::String,
  179         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180         -
                use ::std::fmt::Write as _;
  181         -
                let input_1 = &_input.double_in_path;
  182         -
                let input_1 = input_1
  183         -
                    .as_ref()
  184         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("double_in_path", "cannot be empty or unset"))?;
  185         -
                let mut double_in_path_encoder = ::aws_smithy_types::primitive::Encoder::from(*input_1);
  186         -
                let double_in_path = double_in_path_encoder.encode();
  187         -
                if double_in_path.is_empty() {
  188         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  189         -
                        "double_in_path",
  190         -
                        "cannot be empty or unset",
  191         -
                    ));
         202  +
        let protocol = _cfg
         203  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         204  +
            .expect("a SharedClientProtocol is required");
         205  +
        if protocol.supports_http_bindings() {
         206  +
            let mut request = protocol
         207  +
                .serialize_body(&input, MalformedDouble::INPUT_SCHEMA, "", _cfg)
         208  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         209  +
            {
         210  +
                let mut uri = "/MalformedDouble/{doubleInPath}".to_string();
         211  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         212  +
                if let Some(ref val) = input.double_in_path {
         213  +
                    uri = uri.replace(
         214  +
                        "{doubleInPath}",
         215  +
                        &::aws_smithy_schema::http_protocol::percent_encode(&{
         216  +
                            let s = val.to_string();
         217  +
                            match s.as_str() {
         218  +
                                "inf" => "Infinity".to_string(),
         219  +
                                "-inf" => "-Infinity".to_string(),
         220  +
                                _ => s,
         221  +
                            }
         222  +
                        }),
         223  +
                    );
  192    224   
                }
  193         -
                ::std::write!(output, "/MalformedDouble/{doubleInPath}", doubleInPath = double_in_path).expect("formatting should succeed");
  194         -
                ::std::result::Result::Ok(())
  195         -
            }
  196         -
            fn uri_query(
  197         -
                _input: &crate::operation::malformed_double::MalformedDoubleInput,
  198         -
                mut output: &mut ::std::string::String,
  199         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  200         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  201         -
                if let ::std::option::Option::Some(inner_2) = &_input.double_in_query {
  202         -
                    {
  203         -
                        query.push_kv("doubleInQuery", ::aws_smithy_types::primitive::Encoder::from(*inner_2).encode());
  204         -
                    }
         225  +
                if let Some(ref val) = input.double_in_query {
         226  +
                    query_params.push(("doubleInQuery".to_string(), {
         227  +
                        let s = val.to_string();
         228  +
                        match s.as_str() {
         229  +
                            "inf" => "Infinity".to_string(),
         230  +
                            "-inf" => "-Infinity".to_string(),
         231  +
                            _ => s,
         232  +
                        }
         233  +
                    }));
  205    234   
                }
  206         -
                ::std::result::Result::Ok(())
  207         -
            }
  208         -
            #[allow(clippy::unnecessary_wraps)]
  209         -
            fn update_http_builder(
  210         -
                input: &crate::operation::malformed_double::MalformedDoubleInput,
  211         -
                builder: ::http_1x::request::Builder,
  212         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  213         -
                let mut uri = ::std::string::String::new();
  214         -
                uri_base(input, &mut uri)?;
  215         -
                uri_query(input, &mut uri)?;
  216         -
                let builder = crate::protocol_serde::shape_malformed_double::ser_malformed_double_headers(input, builder)?;
  217         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
         235  +
                if let Some(ref val) = input.double_in_header {
         236  +
                    request.headers_mut().insert("doubleInHeader", {
         237  +
                        let s = val.to_string();
         238  +
                        match s.as_str() {
         239  +
                            "inf" => "Infinity".to_string(),
         240  +
                            "-inf" => "-Infinity".to_string(),
         241  +
                            _ => s,
         242  +
                        }
         243  +
                    });
         244  +
                }
         245  +
                if !query_params.is_empty() {
         246  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         247  +
                    let pairs: Vec<String> = query_params
         248  +
                        .iter()
         249  +
                        .map(|(k, v)| {
         250  +
                            format!(
         251  +
                                "{}={}",
         252  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         253  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         254  +
                            )
         255  +
                        })
         256  +
                        .collect();
         257  +
                    uri.push_str(&pairs.join("&"));
         258  +
                }
         259  +
                request.set_uri(uri.as_str()).expect("valid URI");
  218    260   
            }
  219         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  220         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  221         -
            builder
  222         -
        };
  223         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_malformed_double::ser_malformed_double_input(&input)?);
  224         -
        if let Some(content_length) = body.content_length() {
  225         -
            let content_length = content_length.to_string();
  226         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
         261  +
         262  +
            return ::std::result::Result::Ok(request);
         263  +
        } else {
         264  +
            let mut request = protocol
         265  +
                .serialize_request(&input, MalformedDouble::INPUT_SCHEMA, "", _cfg)
         266  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         267  +
         268  +
            return ::std::result::Result::Ok(request);
  227    269   
        }
  228         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  229    270   
    }
  230    271   
}
  231    272   
#[derive(Debug)]
  232    273   
struct MalformedDoubleEndpointParamsInterceptor;
  233    274   
  234    275   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MalformedDoubleEndpointParamsInterceptor {
  235    276   
    fn name(&self) -> &'static str {
  236    277   
        "MalformedDoubleEndpointParamsInterceptor"
  237    278   
    }
  238    279   

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_double/_malformed_double_input.rs

@@ -15,15 +177,222 @@
   35     35   
    "aws.protocoltests.restjson.synthetic",
   36     36   
    "MalformedDoubleInput",
   37     37   
);
   38     38   
static MALFORMEDDOUBLEINPUT_MEMBER_DOUBLE_IN_BODY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "aws.protocoltests.restjson.synthetic#MalformedDoubleInput$doubleInBody",
   41     41   
        "aws.protocoltests.restjson.synthetic",
   42     42   
        "MalformedDoubleInput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::Double,
   45         -
    "double_in_body",
          45  +
    "doubleInBody",
   46     46   
    0,
   47     47   
);
   48     48   
static MALFORMEDDOUBLEINPUT_MEMBER_DOUBLE_IN_PATH: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   49     49   
    ::aws_smithy_schema::ShapeId::from_static(
   50     50   
        "aws.protocoltests.restjson.synthetic#MalformedDoubleInput$doubleInPath",
   51     51   
        "aws.protocoltests.restjson.synthetic",
   52     52   
        "MalformedDoubleInput",
   53     53   
    ),
   54     54   
    ::aws_smithy_schema::ShapeType::Double,
   55         -
    "double_in_path",
          55  +
    "doubleInPath",
   56     56   
    1,
   57     57   
)
   58     58   
.with_http_label();
   59     59   
static MALFORMEDDOUBLEINPUT_MEMBER_DOUBLE_IN_QUERY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   60     60   
    ::aws_smithy_schema::ShapeId::from_static(
   61     61   
        "aws.protocoltests.restjson.synthetic#MalformedDoubleInput$doubleInQuery",
   62     62   
        "aws.protocoltests.restjson.synthetic",
   63     63   
        "MalformedDoubleInput",
   64     64   
    ),
   65     65   
    ::aws_smithy_schema::ShapeType::Double,
   66         -
    "double_in_query",
          66  +
    "doubleInQuery",
   67     67   
    2,
   68     68   
)
   69     69   
.with_http_query("doubleInQuery");
   70     70   
static MALFORMEDDOUBLEINPUT_MEMBER_DOUBLE_IN_HEADER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "aws.protocoltests.restjson.synthetic#MalformedDoubleInput$doubleInHeader",
   73     73   
        "aws.protocoltests.restjson.synthetic",
   74     74   
        "MalformedDoubleInput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::Double,
   77         -
    "double_in_header",
          77  +
    "doubleInHeader",
   78     78   
    3,
   79     79   
)
   80     80   
.with_http_header("doubleInHeader");
   81     81   
static MALFORMEDDOUBLEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   82     82   
    MALFORMEDDOUBLEINPUT_SCHEMA_ID,
   83     83   
    ::aws_smithy_schema::ShapeType::Structure,
   84     84   
    &[
   85     85   
        &MALFORMEDDOUBLEINPUT_MEMBER_DOUBLE_IN_BODY,
   86     86   
        &MALFORMEDDOUBLEINPUT_MEMBER_DOUBLE_IN_PATH,
   87     87   
        &MALFORMEDDOUBLEINPUT_MEMBER_DOUBLE_IN_QUERY,
   88     88   
        &MALFORMEDDOUBLEINPUT_MEMBER_DOUBLE_IN_HEADER,
   89     89   
    ],
   90         -
);
          90  +
)
          91  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/MalformedDouble/{doubleInPath}", None));
   91     92   
impl MalformedDoubleInput {
   92     93   
    /// The schema for this shape.
   93     94   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &MALFORMEDDOUBLEINPUT_SCHEMA;
   94     95   
}
   95     96   
impl ::aws_smithy_schema::serde::SerializableStruct for MalformedDoubleInput {
   96     97   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   97     98   
    fn serialize_members(
   98     99   
        &self,
   99    100   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  100    101   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  101    102   
        if let Some(ref val) = self.double_in_body {
  102    103   
            ser.write_double(&MALFORMEDDOUBLEINPUT_MEMBER_DOUBLE_IN_BODY, *val)?;
  103    104   
        }
  104    105   
        if let Some(ref val) = self.double_in_path {
  105    106   
            ser.write_double(&MALFORMEDDOUBLEINPUT_MEMBER_DOUBLE_IN_PATH, *val)?;
  106    107   
        }
  107    108   
        if let Some(ref val) = self.double_in_query {
  108    109   
            ser.write_double(&MALFORMEDDOUBLEINPUT_MEMBER_DOUBLE_IN_QUERY, *val)?;
  109    110   
        }
  110    111   
        if let Some(ref val) = self.double_in_header {
  111    112   
            ser.write_double(&MALFORMEDDOUBLEINPUT_MEMBER_DOUBLE_IN_HEADER, *val)?;
  112    113   
        }
  113    114   
        Ok(())
  114    115   
    }
  115    116   
}
  116    117   
impl MalformedDoubleInput {
  117    118   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  118         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  119         -
        deserializer: &mut D,
         119  +
    pub fn deserialize(
         120  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  120    121   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  121    122   
        #[allow(unused_variables, unused_mut)]
  122    123   
        let mut builder = Self::builder();
  123    124   
        #[allow(
  124    125   
            unused_variables,
  125    126   
            unreachable_code,
  126    127   
            clippy::single_match,
  127    128   
            clippy::match_single_binding,
  128    129   
            clippy::diverging_sub_expression
  129    130   
        )]
  130         -
        deserializer.read_struct(&MALFORMEDDOUBLEINPUT_SCHEMA, (), |_, member, deser| {
         131  +
        deserializer.read_struct(&MALFORMEDDOUBLEINPUT_SCHEMA, &mut |member, deser| {
  131    132   
            match member.member_index() {
  132    133   
                Some(0) => {
  133    134   
                    builder.double_in_body = Some(deser.read_double(member)?);
  134    135   
                }
  135    136   
                Some(1) => {
  136    137   
                    builder.double_in_path = Some(deser.read_double(member)?);
  137    138   
                }
  138    139   
                Some(2) => {
  139    140   
                    builder.double_in_query = Some(deser.read_double(member)?);
  140    141   
                }
  141    142   
                Some(3) => {
  142    143   
                    builder.double_in_header = Some(deser.read_double(member)?);
  143    144   
                }
  144    145   
                _ => {}
  145    146   
            }
  146    147   
            Ok(())
  147    148   
        })?;
         149  +
        builder.double_in_path = builder.double_in_path.or(Some(0.0f64));
         150  +
        builder
         151  +
            .build()
         152  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         153  +
    }
         154  +
}
         155  +
impl MalformedDoubleInput {
         156  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         157  +
    /// Header-bound members are read directly from headers, avoiding runtime
         158  +
    /// member iteration overhead. Body members are read via the deserializer.
         159  +
    pub fn deserialize_with_response(
         160  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         161  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         162  +
        _status: u16,
         163  +
        _body: &[u8],
         164  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         165  +
        #[allow(unused_variables, unused_mut)]
         166  +
        let mut builder = Self::builder();
         167  +
        if let Some(val) = headers.get("doubleInHeader") {
         168  +
            builder.double_in_header = val.parse::<f64>().ok();
         169  +
        }
         170  +
        #[allow(
         171  +
            unused_variables,
         172  +
            unreachable_code,
         173  +
            clippy::single_match,
         174  +
            clippy::match_single_binding,
         175  +
            clippy::diverging_sub_expression
         176  +
        )]
         177  +
        deserializer.read_struct(&MALFORMEDDOUBLEINPUT_SCHEMA, &mut |member, deser| {
         178  +
            match member.member_index() {
         179  +
                Some(0) => {
         180  +
                    builder.double_in_body = Some(deser.read_double(member)?);
         181  +
                }
         182  +
                Some(1) => {
         183  +
                    builder.double_in_path = Some(deser.read_double(member)?);
         184  +
                }
         185  +
                Some(2) => {
         186  +
                    builder.double_in_query = Some(deser.read_double(member)?);
         187  +
                }
         188  +
                Some(3) => { /* read from headers above */ }
         189  +
                _ => {}
         190  +
            }
         191  +
            Ok(())
         192  +
        })?;
  148    193   
        builder
  149    194   
            .build()
  150    195   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  151    196   
    }
  152    197   
}
  153    198   
impl MalformedDoubleInput {
  154    199   
    /// Creates a new builder-style object to manufacture [`MalformedDoubleInput`](crate::operation::malformed_double::MalformedDoubleInput).
  155    200   
    pub fn builder() -> crate::operation::malformed_double::builders::MalformedDoubleInputBuilder {
  156    201   
        crate::operation::malformed_double::builders::MalformedDoubleInputBuilder::default()
  157    202   
    }

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_double/_malformed_double_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 MalformedDoubleOutput {
   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(&MALFORMEDDOUBLEOUTPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&MALFORMEDDOUBLEOUTPUT_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 MalformedDoubleOutput {
          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 MalformedDoubleOutput {
   50     61   
    /// Creates a new builder-style object to manufacture [`MalformedDoubleOutput`](crate::operation::malformed_double::MalformedDoubleOutput).
   51     62   
    pub fn builder() -> crate::operation::malformed_double::builders::MalformedDoubleOutputBuilder {
   52     63   
        crate::operation::malformed_double::builders::MalformedDoubleOutputBuilder::default()
   53     64   
    }
   54     65   
}
   55     66   
   56     67   
/// A builder for [`MalformedDoubleOutput`](crate::operation::malformed_double::MalformedDoubleOutput).
   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_json/rust-client-codegen/src/operation/malformed_float.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 `MalformedFloat`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct MalformedFloat;
    6      6   
impl MalformedFloat {
    7      7   
    /// Creates a new `MalformedFloat`
    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::malformed_float::MalformedFloatInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::malformed_float::MalformedFloatOutput::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::malformed_float::MalformedFloatInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::malformed_float::MalformedFloatOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::malformed_float::MalformedFloatError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +252,293 @@
  124    128   
                crate::operation::malformed_float::MalformedFloatError,
  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 MalformedFloatResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for MalformedFloatResponseDeserializer {
  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         -
        let headers = response.headers();
  140         -
        let body = response.body().bytes().expect("body loaded");
  141    144   
        #[allow(unused_mut)]
  142    145   
        let mut force_error = false;
  143    146   
  144         -
        let parse_result = if !success && status != 200 || force_error {
  145         -
            crate::protocol_serde::shape_malformed_float::de_malformed_float_http_error(status, headers, body)
         147  +
        if !success && status != 200 || force_error {
         148  +
            let headers = response.headers();
         149  +
            let body = response.body().bytes().expect("body loaded");
         150  +
            #[allow(unused_mut)]
         151  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         152  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         153  +
            })?;
         154  +
         155  +
            let generic = generic_builder.build();
         156  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         157  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(
         158  +
                    crate::operation::malformed_float::MalformedFloatError::generic(generic),
         159  +
                ),
         160  +
            ))
  146    161   
        } else {
  147         -
            crate::protocol_serde::shape_malformed_float::de_malformed_float_http_response(status, headers, body)
  148         -
        };
  149         -
        crate::protocol_serde::type_erase_result(parse_result)
         162  +
            let protocol = _cfg
         163  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         164  +
                .expect("a SharedClientProtocol is required");
         165  +
            let mut deser = protocol
         166  +
                .deserialize_response(response, MalformedFloat::OUTPUT_SCHEMA, _cfg)
         167  +
                .map_err(|e| {
         168  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         169  +
                })?;
         170  +
            let body = response.body().bytes().expect("body loaded");
         171  +
            let output = crate::operation::malformed_float::MalformedFloatOutput::deserialize_with_response(
         172  +
                &mut *deser,
         173  +
                response.headers(),
         174  +
                response.status().into(),
         175  +
                body,
         176  +
            )
         177  +
            .map_err(|e| {
         178  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         179  +
            })?;
         180  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         181  +
        }
  150    182   
    }
  151    183   
}
  152    184   
#[derive(Debug)]
  153    185   
struct MalformedFloatRequestSerializer;
  154    186   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for MalformedFloatRequestSerializer {
  155    187   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  156    188   
    fn serialize_input(
  157    189   
        &self,
  158    190   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  159    191   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  160    192   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  161    193   
        let input = input
  162    194   
            .downcast::<crate::operation::malformed_float::MalformedFloatInput>()
  163    195   
            .expect("correct type");
  164         -
        let _header_serialization_settings = _cfg
  165         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  166         -
            .cloned()
  167         -
            .unwrap_or_default();
  168         -
        let mut request_builder = {
  169         -
            #[allow(clippy::uninlined_format_args)]
  170         -
            fn uri_base(
  171         -
                _input: &crate::operation::malformed_float::MalformedFloatInput,
  172         -
                output: &mut ::std::string::String,
  173         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174         -
                use ::std::fmt::Write as _;
  175         -
                let input_1 = &_input.float_in_path;
  176         -
                let input_1 = input_1
  177         -
                    .as_ref()
  178         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("float_in_path", "cannot be empty or unset"))?;
  179         -
                let mut float_in_path_encoder = ::aws_smithy_types::primitive::Encoder::from(*input_1);
  180         -
                let float_in_path = float_in_path_encoder.encode();
  181         -
                if float_in_path.is_empty() {
  182         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  183         -
                        "float_in_path",
  184         -
                        "cannot be empty or unset",
  185         -
                    ));
         196  +
        let protocol = _cfg
         197  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         198  +
            .expect("a SharedClientProtocol is required");
         199  +
        if protocol.supports_http_bindings() {
         200  +
            let mut request = protocol
         201  +
                .serialize_body(&input, MalformedFloat::INPUT_SCHEMA, "", _cfg)
         202  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         203  +
            {
         204  +
                let mut uri = "/MalformedFloat/{floatInPath}".to_string();
         205  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         206  +
                if let Some(ref val) = input.float_in_path {
         207  +
                    uri = uri.replace(
         208  +
                        "{floatInPath}",
         209  +
                        &::aws_smithy_schema::http_protocol::percent_encode(&{
         210  +
                            let s = val.to_string();
         211  +
                            match s.as_str() {
         212  +
                                "inf" => "Infinity".to_string(),
         213  +
                                "-inf" => "-Infinity".to_string(),
         214  +
                                _ => s,
         215  +
                            }
         216  +
                        }),
         217  +
                    );
  186    218   
                }
  187         -
                ::std::write!(output, "/MalformedFloat/{floatInPath}", floatInPath = float_in_path).expect("formatting should succeed");
  188         -
                ::std::result::Result::Ok(())
  189         -
            }
  190         -
            fn uri_query(
  191         -
                _input: &crate::operation::malformed_float::MalformedFloatInput,
  192         -
                mut output: &mut ::std::string::String,
  193         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  194         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  195         -
                if let ::std::option::Option::Some(inner_2) = &_input.float_in_query {
  196         -
                    {
  197         -
                        query.push_kv("floatInQuery", ::aws_smithy_types::primitive::Encoder::from(*inner_2).encode());
  198         -
                    }
         219  +
                if let Some(ref val) = input.float_in_query {
         220  +
                    query_params.push(("floatInQuery".to_string(), {
         221  +
                        let s = val.to_string();
         222  +
                        match s.as_str() {
         223  +
                            "inf" => "Infinity".to_string(),
         224  +
                            "-inf" => "-Infinity".to_string(),
         225  +
                            _ => s,
         226  +
                        }
         227  +
                    }));
  199    228   
                }
  200         -
                ::std::result::Result::Ok(())
  201         -
            }
  202         -
            #[allow(clippy::unnecessary_wraps)]
  203         -
            fn update_http_builder(
  204         -
                input: &crate::operation::malformed_float::MalformedFloatInput,
  205         -
                builder: ::http_1x::request::Builder,
  206         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  207         -
                let mut uri = ::std::string::String::new();
  208         -
                uri_base(input, &mut uri)?;
  209         -
                uri_query(input, &mut uri)?;
  210         -
                let builder = crate::protocol_serde::shape_malformed_float::ser_malformed_float_headers(input, builder)?;
  211         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
         229  +
                if let Some(ref val) = input.float_in_header {
         230  +
                    request.headers_mut().insert("floatInHeader", {
         231  +
                        let s = val.to_string();
         232  +
                        match s.as_str() {
         233  +
                            "inf" => "Infinity".to_string(),
         234  +
                            "-inf" => "-Infinity".to_string(),
         235  +
                            _ => s,
         236  +
                        }
         237  +
                    });
         238  +
                }
         239  +
                if !query_params.is_empty() {
         240  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         241  +
                    let pairs: Vec<String> = query_params
         242  +
                        .iter()
         243  +
                        .map(|(k, v)| {
         244  +
                            format!(
         245  +
                                "{}={}",
         246  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         247  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         248  +
                            )
         249  +
                        })
         250  +
                        .collect();
         251  +
                    uri.push_str(&pairs.join("&"));
         252  +
                }
         253  +
                request.set_uri(uri.as_str()).expect("valid URI");
  212    254   
            }
  213         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  214         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  215         -
            builder
  216         -
        };
  217         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_malformed_float::ser_malformed_float_input(&input)?);
  218         -
        if let Some(content_length) = body.content_length() {
  219         -
            let content_length = content_length.to_string();
  220         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
         255  +
         256  +
            return ::std::result::Result::Ok(request);
         257  +
        } else {
         258  +
            let mut request = protocol
         259  +
                .serialize_request(&input, MalformedFloat::INPUT_SCHEMA, "", _cfg)
         260  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         261  +
         262  +
            return ::std::result::Result::Ok(request);
  221    263   
        }
  222         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  223    264   
    }
  224    265   
}
  225    266   
#[derive(Debug)]
  226    267   
struct MalformedFloatEndpointParamsInterceptor;
  227    268   
  228    269   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MalformedFloatEndpointParamsInterceptor {
  229    270   
    fn name(&self) -> &'static str {
  230    271   
        "MalformedFloatEndpointParamsInterceptor"
  231    272   
    }
  232    273   

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_float/_malformed_float_input.rs

@@ -15,15 +177,222 @@
   35     35   
    "aws.protocoltests.restjson.synthetic",
   36     36   
    "MalformedFloatInput",
   37     37   
);
   38     38   
static MALFORMEDFLOATINPUT_MEMBER_FLOAT_IN_BODY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "aws.protocoltests.restjson.synthetic#MalformedFloatInput$floatInBody",
   41     41   
        "aws.protocoltests.restjson.synthetic",
   42     42   
        "MalformedFloatInput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::Float,
   45         -
    "float_in_body",
          45  +
    "floatInBody",
   46     46   
    0,
   47     47   
);
   48     48   
static MALFORMEDFLOATINPUT_MEMBER_FLOAT_IN_PATH: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   49     49   
    ::aws_smithy_schema::ShapeId::from_static(
   50     50   
        "aws.protocoltests.restjson.synthetic#MalformedFloatInput$floatInPath",
   51     51   
        "aws.protocoltests.restjson.synthetic",
   52     52   
        "MalformedFloatInput",
   53     53   
    ),
   54     54   
    ::aws_smithy_schema::ShapeType::Float,
   55         -
    "float_in_path",
          55  +
    "floatInPath",
   56     56   
    1,
   57     57   
)
   58     58   
.with_http_label();
   59     59   
static MALFORMEDFLOATINPUT_MEMBER_FLOAT_IN_QUERY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   60     60   
    ::aws_smithy_schema::ShapeId::from_static(
   61     61   
        "aws.protocoltests.restjson.synthetic#MalformedFloatInput$floatInQuery",
   62     62   
        "aws.protocoltests.restjson.synthetic",
   63     63   
        "MalformedFloatInput",
   64     64   
    ),
   65     65   
    ::aws_smithy_schema::ShapeType::Float,
   66         -
    "float_in_query",
          66  +
    "floatInQuery",
   67     67   
    2,
   68     68   
)
   69     69   
.with_http_query("floatInQuery");
   70     70   
static MALFORMEDFLOATINPUT_MEMBER_FLOAT_IN_HEADER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "aws.protocoltests.restjson.synthetic#MalformedFloatInput$floatInHeader",
   73     73   
        "aws.protocoltests.restjson.synthetic",
   74     74   
        "MalformedFloatInput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::Float,
   77         -
    "float_in_header",
          77  +
    "floatInHeader",
   78     78   
    3,
   79     79   
)
   80     80   
.with_http_header("floatInHeader");
   81     81   
static MALFORMEDFLOATINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   82     82   
    MALFORMEDFLOATINPUT_SCHEMA_ID,
   83     83   
    ::aws_smithy_schema::ShapeType::Structure,
   84     84   
    &[
   85     85   
        &MALFORMEDFLOATINPUT_MEMBER_FLOAT_IN_BODY,
   86     86   
        &MALFORMEDFLOATINPUT_MEMBER_FLOAT_IN_PATH,
   87     87   
        &MALFORMEDFLOATINPUT_MEMBER_FLOAT_IN_QUERY,
   88     88   
        &MALFORMEDFLOATINPUT_MEMBER_FLOAT_IN_HEADER,
   89     89   
    ],
   90         -
);
          90  +
)
          91  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/MalformedFloat/{floatInPath}", None));
   91     92   
impl MalformedFloatInput {
   92     93   
    /// The schema for this shape.
   93     94   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &MALFORMEDFLOATINPUT_SCHEMA;
   94     95   
}
   95     96   
impl ::aws_smithy_schema::serde::SerializableStruct for MalformedFloatInput {
   96     97   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   97     98   
    fn serialize_members(
   98     99   
        &self,
   99    100   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  100    101   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  101    102   
        if let Some(ref val) = self.float_in_body {
  102    103   
            ser.write_float(&MALFORMEDFLOATINPUT_MEMBER_FLOAT_IN_BODY, *val)?;
  103    104   
        }
  104    105   
        if let Some(ref val) = self.float_in_path {
  105    106   
            ser.write_float(&MALFORMEDFLOATINPUT_MEMBER_FLOAT_IN_PATH, *val)?;
  106    107   
        }
  107    108   
        if let Some(ref val) = self.float_in_query {
  108    109   
            ser.write_float(&MALFORMEDFLOATINPUT_MEMBER_FLOAT_IN_QUERY, *val)?;
  109    110   
        }
  110    111   
        if let Some(ref val) = self.float_in_header {
  111    112   
            ser.write_float(&MALFORMEDFLOATINPUT_MEMBER_FLOAT_IN_HEADER, *val)?;
  112    113   
        }
  113    114   
        Ok(())
  114    115   
    }
  115    116   
}
  116    117   
impl MalformedFloatInput {
  117    118   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  118         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  119         -
        deserializer: &mut D,
         119  +
    pub fn deserialize(
         120  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  120    121   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  121    122   
        #[allow(unused_variables, unused_mut)]
  122    123   
        let mut builder = Self::builder();
  123    124   
        #[allow(
  124    125   
            unused_variables,
  125    126   
            unreachable_code,
  126    127   
            clippy::single_match,
  127    128   
            clippy::match_single_binding,
  128    129   
            clippy::diverging_sub_expression
  129    130   
        )]
  130         -
        deserializer.read_struct(&MALFORMEDFLOATINPUT_SCHEMA, (), |_, member, deser| {
         131  +
        deserializer.read_struct(&MALFORMEDFLOATINPUT_SCHEMA, &mut |member, deser| {
  131    132   
            match member.member_index() {
  132    133   
                Some(0) => {
  133    134   
                    builder.float_in_body = Some(deser.read_float(member)?);
  134    135   
                }
  135    136   
                Some(1) => {
  136    137   
                    builder.float_in_path = Some(deser.read_float(member)?);
  137    138   
                }
  138    139   
                Some(2) => {
  139    140   
                    builder.float_in_query = Some(deser.read_float(member)?);
  140    141   
                }
  141    142   
                Some(3) => {
  142    143   
                    builder.float_in_header = Some(deser.read_float(member)?);
  143    144   
                }
  144    145   
                _ => {}
  145    146   
            }
  146    147   
            Ok(())
  147    148   
        })?;
         149  +
        builder.float_in_path = builder.float_in_path.or(Some(0.0f32));
         150  +
        builder
         151  +
            .build()
         152  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         153  +
    }
         154  +
}
         155  +
impl MalformedFloatInput {
         156  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         157  +
    /// Header-bound members are read directly from headers, avoiding runtime
         158  +
    /// member iteration overhead. Body members are read via the deserializer.
         159  +
    pub fn deserialize_with_response(
         160  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         161  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         162  +
        _status: u16,
         163  +
        _body: &[u8],
         164  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         165  +
        #[allow(unused_variables, unused_mut)]
         166  +
        let mut builder = Self::builder();
         167  +
        if let Some(val) = headers.get("floatInHeader") {
         168  +
            builder.float_in_header = val.parse::<f32>().ok();
         169  +
        }
         170  +
        #[allow(
         171  +
            unused_variables,
         172  +
            unreachable_code,
         173  +
            clippy::single_match,
         174  +
            clippy::match_single_binding,
         175  +
            clippy::diverging_sub_expression
         176  +
        )]
         177  +
        deserializer.read_struct(&MALFORMEDFLOATINPUT_SCHEMA, &mut |member, deser| {
         178  +
            match member.member_index() {
         179  +
                Some(0) => {
         180  +
                    builder.float_in_body = Some(deser.read_float(member)?);
         181  +
                }
         182  +
                Some(1) => {
         183  +
                    builder.float_in_path = Some(deser.read_float(member)?);
         184  +
                }
         185  +
                Some(2) => {
         186  +
                    builder.float_in_query = Some(deser.read_float(member)?);
         187  +
                }
         188  +
                Some(3) => { /* read from headers above */ }
         189  +
                _ => {}
         190  +
            }
         191  +
            Ok(())
         192  +
        })?;
  148    193   
        builder
  149    194   
            .build()
  150    195   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  151    196   
    }
  152    197   
}
  153    198   
impl MalformedFloatInput {
  154    199   
    /// Creates a new builder-style object to manufacture [`MalformedFloatInput`](crate::operation::malformed_float::MalformedFloatInput).
  155    200   
    pub fn builder() -> crate::operation::malformed_float::builders::MalformedFloatInputBuilder {
  156    201   
        crate::operation::malformed_float::builders::MalformedFloatInputBuilder::default()
  157    202   
    }

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_float/_malformed_float_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 MalformedFloatOutput {
   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(&MALFORMEDFLOATOUTPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&MALFORMEDFLOATOUTPUT_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 MalformedFloatOutput {
          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 MalformedFloatOutput {
   50     61   
    /// Creates a new builder-style object to manufacture [`MalformedFloatOutput`](crate::operation::malformed_float::MalformedFloatOutput).
   51     62   
    pub fn builder() -> crate::operation::malformed_float::builders::MalformedFloatOutputBuilder {
   52     63   
        crate::operation::malformed_float::builders::MalformedFloatOutputBuilder::default()
   53     64   
    }
   54     65   
}
   55     66   
   56     67   
/// A builder for [`MalformedFloatOutput`](crate::operation::malformed_float::MalformedFloatOutput).
   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_json/rust-client-codegen/src/operation/malformed_integer.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 `MalformedInteger`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct MalformedInteger;
    6      6   
impl MalformedInteger {
    7      7   
    /// Creates a new `MalformedInteger`
    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::malformed_integer::MalformedIntegerInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::malformed_integer::MalformedIntegerOutput::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::malformed_integer::MalformedIntegerInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::malformed_integer::MalformedIntegerOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::malformed_integer::MalformedIntegerError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -110,114 +258,275 @@
  130    134   
                crate::operation::malformed_integer::MalformedIntegerError,
  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 MalformedIntegerResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for MalformedIntegerResponseDeserializer {
  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         -
        let headers = response.headers();
  146         -
        let body = response.body().bytes().expect("body loaded");
  147    150   
        #[allow(unused_mut)]
  148    151   
        let mut force_error = false;
  149    152   
  150         -
        let parse_result = if !success && status != 200 || force_error {
  151         -
            crate::protocol_serde::shape_malformed_integer::de_malformed_integer_http_error(status, headers, body)
         153  +
        if !success && status != 200 || force_error {
         154  +
            let headers = response.headers();
         155  +
            let body = response.body().bytes().expect("body loaded");
         156  +
            #[allow(unused_mut)]
         157  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         158  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         159  +
            })?;
         160  +
         161  +
            let generic = generic_builder.build();
         162  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         163  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(
         164  +
                    crate::operation::malformed_integer::MalformedIntegerError::generic(generic),
         165  +
                ),
         166  +
            ))
  152    167   
        } else {
  153         -
            crate::protocol_serde::shape_malformed_integer::de_malformed_integer_http_response(status, headers, body)
  154         -
        };
  155         -
        crate::protocol_serde::type_erase_result(parse_result)
         168  +
            let protocol = _cfg
         169  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         170  +
                .expect("a SharedClientProtocol is required");
         171  +
            let mut deser = protocol
         172  +
                .deserialize_response(response, MalformedInteger::OUTPUT_SCHEMA, _cfg)
         173  +
                .map_err(|e| {
         174  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
                })?;
         176  +
            let body = response.body().bytes().expect("body loaded");
         177  +
            let output = crate::operation::malformed_integer::MalformedIntegerOutput::deserialize_with_response(
         178  +
                &mut *deser,
         179  +
                response.headers(),
         180  +
                response.status().into(),
         181  +
                body,
         182  +
            )
         183  +
            .map_err(|e| {
         184  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         185  +
            })?;
         186  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         187  +
        }
  156    188   
    }
  157    189   
}
  158    190   
#[derive(Debug)]
  159    191   
struct MalformedIntegerRequestSerializer;
  160    192   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for MalformedIntegerRequestSerializer {
  161    193   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  162    194   
    fn serialize_input(
  163    195   
        &self,
  164    196   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  165    197   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  166    198   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  167    199   
        let input = input
  168    200   
            .downcast::<crate::operation::malformed_integer::MalformedIntegerInput>()
  169    201   
            .expect("correct type");
  170         -
        let _header_serialization_settings = _cfg
  171         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  172         -
            .cloned()
  173         -
            .unwrap_or_default();
  174         -
        let mut request_builder = {
  175         -
            #[allow(clippy::uninlined_format_args)]
  176         -
            fn uri_base(
  177         -
                _input: &crate::operation::malformed_integer::MalformedIntegerInput,
  178         -
                output: &mut ::std::string::String,
  179         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180         -
                use ::std::fmt::Write as _;
  181         -
                let input_1 = &_input.integer_in_path;
  182         -
                let input_1 = input_1
  183         -
                    .as_ref()
  184         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("integer_in_path", "cannot be empty or unset"))?;
  185         -
                let mut integer_in_path_encoder = ::aws_smithy_types::primitive::Encoder::from(*input_1);
  186         -
                let integer_in_path = integer_in_path_encoder.encode();
  187         -
                if integer_in_path.is_empty() {
  188         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  189         -
                        "integer_in_path",
  190         -
                        "cannot be empty or unset",
  191         -
                    ));
         202  +
        let protocol = _cfg
         203  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         204  +
            .expect("a SharedClientProtocol is required");
         205  +
        if protocol.supports_http_bindings() {
         206  +
            let mut request = protocol
         207  +
                .serialize_body(&input, MalformedInteger::INPUT_SCHEMA, "", _cfg)
         208  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         209  +
            {
         210  +
                let mut uri = "/MalformedInteger/{integerInPath}".to_string();
         211  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         212  +
                if let Some(ref val) = input.integer_in_path {
         213  +
                    uri = uri.replace("{integerInPath}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  192    214   
                }
  193         -
                ::std::write!(output, "/MalformedInteger/{integerInPath}", integerInPath = integer_in_path).expect("formatting should succeed");
  194         -
                ::std::result::Result::Ok(())
  195         -
            }
  196         -
            fn uri_query(
  197         -
                _input: &crate::operation::malformed_integer::MalformedIntegerInput,
  198         -
                mut output: &mut ::std::string::String,
  199         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  200         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  201         -
                if let ::std::option::Option::Some(inner_2) = &_input.integer_in_query {
  202         -
                    {
  203         -
                        query.push_kv("integerInQuery", ::aws_smithy_types::primitive::Encoder::from(*inner_2).encode());
  204         -
                    }
         215  +
                if let Some(ref val) = input.integer_in_query {
         216  +
                    query_params.push(("integerInQuery".to_string(), val.to_string()));
  205    217   
                }
  206         -
                ::std::result::Result::Ok(())
  207         -
            }
  208         -
            #[allow(clippy::unnecessary_wraps)]
  209         -
            fn update_http_builder(
  210         -
                input: &crate::operation::malformed_integer::MalformedIntegerInput,
  211         -
                builder: ::http_1x::request::Builder,
  212         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  213         -
                let mut uri = ::std::string::String::new();
  214         -
                uri_base(input, &mut uri)?;
  215         -
                uri_query(input, &mut uri)?;
  216         -
                let builder = crate::protocol_serde::shape_malformed_integer::ser_malformed_integer_headers(input, builder)?;
  217         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
         218  +
                if let Some(ref val) = input.integer_in_header {
         219  +
                    request.headers_mut().insert("integerInHeader", val.to_string());
         220  +
                }
         221  +
                if !query_params.is_empty() {
         222  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         223  +
                    let pairs: Vec<String> = query_params
         224  +
                        .iter()
         225  +
                        .map(|(k, v)| {
         226  +
                            format!(
         227  +
                                "{}={}",
         228  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         229  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         230  +
                            )
         231  +
                        })
         232  +
                        .collect();
         233  +
                    uri.push_str(&pairs.join("&"));
         234  +
                }
         235  +
                request.set_uri(uri.as_str()).expect("valid URI");
  218    236   
            }
  219         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  220         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  221         -
            builder
  222         -
        };
  223         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_malformed_integer::ser_malformed_integer_input(&input)?);
  224         -
        if let Some(content_length) = body.content_length() {
  225         -
            let content_length = content_length.to_string();
  226         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
         237  +
         238  +
            return ::std::result::Result::Ok(request);
         239  +
        } else {
         240  +
            let mut request = protocol
         241  +
                .serialize_request(&input, MalformedInteger::INPUT_SCHEMA, "", _cfg)
         242  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         243  +
         244  +
            return ::std::result::Result::Ok(request);
  227    245   
        }
  228         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  229    246   
    }
  230    247   
}
  231    248   
#[derive(Debug)]
  232    249   
struct MalformedIntegerEndpointParamsInterceptor;
  233    250   
  234    251   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MalformedIntegerEndpointParamsInterceptor {
  235    252   
    fn name(&self) -> &'static str {
  236    253   
        "MalformedIntegerEndpointParamsInterceptor"
  237    254   
    }
  238    255   

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_integer/_malformed_integer_input.rs

@@ -15,15 +177,226 @@
   35     35   
    "aws.protocoltests.restjson.synthetic",
   36     36   
    "MalformedIntegerInput",
   37     37   
);
   38     38   
static MALFORMEDINTEGERINPUT_MEMBER_INTEGER_IN_BODY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "aws.protocoltests.restjson.synthetic#MalformedIntegerInput$integerInBody",
   41     41   
        "aws.protocoltests.restjson.synthetic",
   42     42   
        "MalformedIntegerInput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::Integer,
   45         -
    "integer_in_body",
          45  +
    "integerInBody",
   46     46   
    0,
   47     47   
);
   48     48   
static MALFORMEDINTEGERINPUT_MEMBER_INTEGER_IN_PATH: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   49     49   
    ::aws_smithy_schema::ShapeId::from_static(
   50     50   
        "aws.protocoltests.restjson.synthetic#MalformedIntegerInput$integerInPath",
   51     51   
        "aws.protocoltests.restjson.synthetic",
   52     52   
        "MalformedIntegerInput",
   53     53   
    ),
   54     54   
    ::aws_smithy_schema::ShapeType::Integer,
   55         -
    "integer_in_path",
          55  +
    "integerInPath",
   56     56   
    1,
   57     57   
)
   58     58   
.with_http_label();
   59     59   
static MALFORMEDINTEGERINPUT_MEMBER_INTEGER_IN_QUERY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   60     60   
    ::aws_smithy_schema::ShapeId::from_static(
   61     61   
        "aws.protocoltests.restjson.synthetic#MalformedIntegerInput$integerInQuery",
   62     62   
        "aws.protocoltests.restjson.synthetic",
   63     63   
        "MalformedIntegerInput",
   64     64   
    ),
   65     65   
    ::aws_smithy_schema::ShapeType::Integer,
   66         -
    "integer_in_query",
          66  +
    "integerInQuery",
   67     67   
    2,
   68     68   
)
   69     69   
.with_http_query("integerInQuery");
   70     70   
static MALFORMEDINTEGERINPUT_MEMBER_INTEGER_IN_HEADER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "aws.protocoltests.restjson.synthetic#MalformedIntegerInput$integerInHeader",
   73     73   
        "aws.protocoltests.restjson.synthetic",
   74     74   
        "MalformedIntegerInput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::Integer,
   77         -
    "integer_in_header",
          77  +
    "integerInHeader",
   78     78   
    3,
   79     79   
)
   80     80   
.with_http_header("integerInHeader");
   81     81   
static MALFORMEDINTEGERINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   82     82   
    MALFORMEDINTEGERINPUT_SCHEMA_ID,
   83     83   
    ::aws_smithy_schema::ShapeType::Structure,
   84     84   
    &[
   85     85   
        &MALFORMEDINTEGERINPUT_MEMBER_INTEGER_IN_BODY,
   86     86   
        &MALFORMEDINTEGERINPUT_MEMBER_INTEGER_IN_PATH,
   87     87   
        &MALFORMEDINTEGERINPUT_MEMBER_INTEGER_IN_QUERY,
   88     88   
        &MALFORMEDINTEGERINPUT_MEMBER_INTEGER_IN_HEADER,
   89     89   
    ],
   90         -
);
          90  +
)
          91  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          92  +
    "POST",
          93  +
    "/MalformedInteger/{integerInPath}",
          94  +
    None,
          95  +
));
   91     96   
impl MalformedIntegerInput {
   92     97   
    /// The schema for this shape.
   93     98   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &MALFORMEDINTEGERINPUT_SCHEMA;
   94     99   
}
   95    100   
impl ::aws_smithy_schema::serde::SerializableStruct for MalformedIntegerInput {
   96    101   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   97    102   
    fn serialize_members(
   98    103   
        &self,
   99    104   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  100    105   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  101    106   
        if let Some(ref val) = self.integer_in_body {
  102    107   
            ser.write_integer(&MALFORMEDINTEGERINPUT_MEMBER_INTEGER_IN_BODY, *val)?;
  103    108   
        }
  104    109   
        if let Some(ref val) = self.integer_in_path {
  105    110   
            ser.write_integer(&MALFORMEDINTEGERINPUT_MEMBER_INTEGER_IN_PATH, *val)?;
  106    111   
        }
  107    112   
        if let Some(ref val) = self.integer_in_query {
  108    113   
            ser.write_integer(&MALFORMEDINTEGERINPUT_MEMBER_INTEGER_IN_QUERY, *val)?;
  109    114   
        }
  110    115   
        if let Some(ref val) = self.integer_in_header {
  111    116   
            ser.write_integer(&MALFORMEDINTEGERINPUT_MEMBER_INTEGER_IN_HEADER, *val)?;
  112    117   
        }
  113    118   
        Ok(())
  114    119   
    }
  115    120   
}
  116    121   
impl MalformedIntegerInput {
  117    122   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  118         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  119         -
        deserializer: &mut D,
         123  +
    pub fn deserialize(
         124  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  120    125   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  121    126   
        #[allow(unused_variables, unused_mut)]
  122    127   
        let mut builder = Self::builder();
  123    128   
        #[allow(
  124    129   
            unused_variables,
  125    130   
            unreachable_code,
  126    131   
            clippy::single_match,
  127    132   
            clippy::match_single_binding,
  128    133   
            clippy::diverging_sub_expression
  129    134   
        )]
  130         -
        deserializer.read_struct(&MALFORMEDINTEGERINPUT_SCHEMA, (), |_, member, deser| {
         135  +
        deserializer.read_struct(&MALFORMEDINTEGERINPUT_SCHEMA, &mut |member, deser| {
  131    136   
            match member.member_index() {
  132    137   
                Some(0) => {
  133    138   
                    builder.integer_in_body = Some(deser.read_integer(member)?);
  134    139   
                }
  135    140   
                Some(1) => {
  136    141   
                    builder.integer_in_path = Some(deser.read_integer(member)?);
  137    142   
                }
  138    143   
                Some(2) => {
  139    144   
                    builder.integer_in_query = Some(deser.read_integer(member)?);
  140    145   
                }
  141    146   
                Some(3) => {
  142    147   
                    builder.integer_in_header = Some(deser.read_integer(member)?);
  143    148   
                }
  144    149   
                _ => {}
  145    150   
            }
  146    151   
            Ok(())
  147    152   
        })?;
         153  +
        builder.integer_in_path = builder.integer_in_path.or(Some(0i32));
         154  +
        builder
         155  +
            .build()
         156  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         157  +
    }
         158  +
}
         159  +
impl MalformedIntegerInput {
         160  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         161  +
    /// Header-bound members are read directly from headers, avoiding runtime
         162  +
    /// member iteration overhead. Body members are read via the deserializer.
         163  +
    pub fn deserialize_with_response(
         164  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         165  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         166  +
        _status: u16,
         167  +
        _body: &[u8],
         168  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         169  +
        #[allow(unused_variables, unused_mut)]
         170  +
        let mut builder = Self::builder();
         171  +
        if let Some(val) = headers.get("integerInHeader") {
         172  +
            builder.integer_in_header = val.parse::<i32>().ok();
         173  +
        }
         174  +
        #[allow(
         175  +
            unused_variables,
         176  +
            unreachable_code,
         177  +
            clippy::single_match,
         178  +
            clippy::match_single_binding,
         179  +
            clippy::diverging_sub_expression
         180  +
        )]
         181  +
        deserializer.read_struct(&MALFORMEDINTEGERINPUT_SCHEMA, &mut |member, deser| {
         182  +
            match member.member_index() {
         183  +
                Some(0) => {
         184  +
                    builder.integer_in_body = Some(deser.read_integer(member)?);
         185  +
                }
         186  +
                Some(1) => {
         187  +
                    builder.integer_in_path = Some(deser.read_integer(member)?);
         188  +
                }
         189  +
                Some(2) => {
         190  +
                    builder.integer_in_query = Some(deser.read_integer(member)?);
         191  +
                }
         192  +
                Some(3) => { /* read from headers above */ }
         193  +
                _ => {}
         194  +
            }
         195  +
            Ok(())
         196  +
        })?;
  148    197   
        builder
  149    198   
            .build()
  150    199   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  151    200   
    }
  152    201   
}
  153    202   
impl MalformedIntegerInput {
  154    203   
    /// Creates a new builder-style object to manufacture [`MalformedIntegerInput`](crate::operation::malformed_integer::MalformedIntegerInput).
  155    204   
    pub fn builder() -> crate::operation::malformed_integer::builders::MalformedIntegerInputBuilder {
  156    205   
        crate::operation::malformed_integer::builders::MalformedIntegerInputBuilder::default()
  157    206   
    }

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