Client Test

Client Test

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

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

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

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

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

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

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

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

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

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/datetime_offsets.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 `DatetimeOffsets`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct DatetimeOffsets;
    6      6   
impl DatetimeOffsets {
    7      7   
    /// Creates a new `DatetimeOffsets`
    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::datetime_offsets::DatetimeOffsetsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::datetime_offsets::DatetimeOffsetsOutput::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::datetime_offsets::DatetimeOffsetsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::datetime_offsets::DatetimeOffsetsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::datetime_offsets::DatetimeOffsetsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +166,171 @@
  124    128   
                crate::operation::datetime_offsets::DatetimeOffsetsError,
  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 DatetimeOffsetsResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DatetimeOffsetsResponseDeserializer {
  134         -
    fn deserialize_nonstreaming(
         138  +
    fn deserialize_nonstreaming_with_config(
  135    139   
        &self,
  136    140   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         141  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  137    142   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  138    143   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  139    144   
        let headers = response.headers();
  140    145   
        let body = response.body().bytes().expect("body loaded");
  141    146   
        #[allow(unused_mut)]
  142    147   
        let mut force_error = false;
  143    148   
  144    149   
        let parse_result = if !success && status != 200 || force_error {
  145    150   
            crate::protocol_serde::shape_datetime_offsets::de_datetime_offsets_http_error(status, headers, body)
  146    151   
        } else {
@@ -241,246 +347,360 @@
  261    266   
            .expect("the config must have a deserializer");
  262    267   
  263    268   
        let parsed = de.deserialize_streaming(&mut http_response);
  264    269   
        let parsed = parsed.unwrap_or_else(|| {
  265    270   
            let http_response = http_response.map(|body| {
  266    271   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  267    272   
                    body.bytes().unwrap(),
  268    273   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  269    274   
                )))
  270    275   
            });
  271         -
            de.deserialize_nonstreaming(&http_response)
         276  +
            // Build a config bag with the protocol for schema-based deserialization
         277  +
            #[allow(unused_mut)]
         278  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         279  +
         280  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  272    281   
        });
  273    282   
        let parsed = parsed
  274    283   
            .expect("should be successful response")
  275    284   
            .downcast::<crate::operation::datetime_offsets::DatetimeOffsetsOutput>()
  276    285   
            .unwrap();
  277    286   
        ::pretty_assertions::assert_eq!(parsed.datetime, expected_output.datetime, "Unexpected value for `datetime`");
  278    287   
    }
  279    288   
  280    289   
    /// Ensures that clients can correctly parse datetime (timestamps) with offsets
  281    290   
    /// Test ID: RestXmlDateTimeWithPositiveOffset
  282    291   
    #[::tokio::test]
  283    292   
    #[::tracing_test::traced_test]
  284    293   
    async fn rest_xml_date_time_with_positive_offset_response() {
  285    294   
        let expected_output = crate::operation::datetime_offsets::DatetimeOffsetsOutput::builder()
  286    295   
            .set_datetime(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  287    296   
                1576540098, 0_f64,
  288    297   
            )))
  289    298   
            .build();
  290    299   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
  291    300   
            ::http_1x::response::Builder::new()
  292    301   
                .header("Content-Type", "application/xml")
  293    302   
                .status(200)
  294    303   
                .body(::aws_smithy_types::body::SdkBody::from(
  295    304   
                    "<DatetimeOffsetsOutput>\n    <datetime>2019-12-17T00:48:18+01:00</datetime>\n</DatetimeOffsetsOutput>\n",
  296    305   
                ))
  297    306   
                .unwrap(),
  298    307   
        )
  299    308   
        .unwrap();
  300    309   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  301    310   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  302    311   
  303    312   
        let op = crate::operation::datetime_offsets::DatetimeOffsets::new();
  304    313   
        let config = op.config().expect("the operation has config");
  305    314   
        let de = config
  306    315   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  307    316   
            .expect("the config must have a deserializer");
  308    317   
  309    318   
        let parsed = de.deserialize_streaming(&mut http_response);
  310    319   
        let parsed = parsed.unwrap_or_else(|| {
  311    320   
            let http_response = http_response.map(|body| {
  312    321   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  313    322   
                    body.bytes().unwrap(),
  314    323   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  315    324   
                )))
  316    325   
            });
  317         -
            de.deserialize_nonstreaming(&http_response)
         326  +
            // Build a config bag with the protocol for schema-based deserialization
         327  +
            #[allow(unused_mut)]
         328  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         329  +
         330  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  318    331   
        });
  319    332   
        let parsed = parsed
  320    333   
            .expect("should be successful response")
  321    334   
            .downcast::<crate::operation::datetime_offsets::DatetimeOffsetsOutput>()
  322    335   
            .unwrap();
  323    336   
        ::pretty_assertions::assert_eq!(parsed.datetime, expected_output.datetime, "Unexpected value for `datetime`");
  324    337   
    }
  325    338   
}
  326    339   
  327    340   
/// Error type for the `DatetimeOffsetsError` operation.

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

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

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

@@ -1,1 +106,118 @@
   19     19   
);
   20     20   
static DATETIMEOFFSETSOUTPUT_MEMBER_DATETIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "aws.protocoltests.restxml.synthetic#DatetimeOffsetsOutput$datetime",
   23     23   
        "aws.protocoltests.restxml.synthetic",
   24     24   
        "DatetimeOffsetsOutput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Timestamp,
   27     27   
    "datetime",
   28     28   
    0,
   29         -
);
          29  +
)
          30  +
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime);
   30     31   
static DATETIMEOFFSETSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   31     32   
    DATETIMEOFFSETSOUTPUT_SCHEMA_ID,
   32     33   
    ::aws_smithy_schema::ShapeType::Structure,
   33     34   
    &[&DATETIMEOFFSETSOUTPUT_MEMBER_DATETIME],
   34     35   
);
   35     36   
impl DatetimeOffsetsOutput {
   36     37   
    /// The schema for this shape.
   37     38   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DATETIMEOFFSETSOUTPUT_SCHEMA;
   38     39   
}
   39     40   
impl ::aws_smithy_schema::serde::SerializableStruct for DatetimeOffsetsOutput {
   40     41   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     42   
    fn serialize_members(
   42     43   
        &self,
   43     44   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     45   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     46   
        if let Some(ref val) = self.datetime {
   46     47   
            ser.write_timestamp(&DATETIMEOFFSETSOUTPUT_MEMBER_DATETIME, val)?;
   47     48   
        }
   48     49   
        Ok(())
   49     50   
    }
   50     51   
}
   51     52   
impl DatetimeOffsetsOutput {
   52     53   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          54  +
    pub fn deserialize(
          55  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     56   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     57   
        #[allow(unused_variables, unused_mut)]
   57     58   
        let mut builder = Self::builder();
   58     59   
        #[allow(
   59     60   
            unused_variables,
   60     61   
            unreachable_code,
   61     62   
            clippy::single_match,
   62     63   
            clippy::match_single_binding,
   63     64   
            clippy::diverging_sub_expression
   64     65   
        )]
   65         -
        deserializer.read_struct(&DATETIMEOFFSETSOUTPUT_SCHEMA, (), |_, member, deser| {
          66  +
        deserializer.read_struct(&DATETIMEOFFSETSOUTPUT_SCHEMA, &mut |member, deser| {
   66     67   
            match member.member_index() {
   67     68   
                Some(0) => {
   68     69   
                    builder.datetime = Some(deser.read_timestamp(member)?);
   69     70   
                }
   70     71   
                _ => {}
   71     72   
            }
   72     73   
            Ok(())
   73     74   
        })?;
   74     75   
        Ok(builder.build())
   75     76   
    }
   76     77   
}
          78  +
impl DatetimeOffsetsOutput {
          79  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          80  +
    pub fn deserialize_with_response(
          81  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          82  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          83  +
        _status: u16,
          84  +
        _body: &[u8],
          85  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          86  +
        Self::deserialize(deserializer)
          87  +
    }
          88  +
}
   77     89   
impl DatetimeOffsetsOutput {
   78     90   
    /// Creates a new builder-style object to manufacture [`DatetimeOffsetsOutput`](crate::operation::datetime_offsets::DatetimeOffsetsOutput).
   79     91   
    pub fn builder() -> crate::operation::datetime_offsets::builders::DatetimeOffsetsOutputBuilder {
   80     92   
        crate::operation::datetime_offsets::builders::DatetimeOffsetsOutputBuilder::default()
   81     93   
    }
   82     94   
}
   83     95   
   84     96   
/// A builder for [`DatetimeOffsetsOutput`](crate::operation::datetime_offsets::DatetimeOffsetsOutput).
   85     97   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   86     98   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/empty_input_and_empty_output.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 `EmptyInputAndEmptyOutput`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct EmptyInputAndEmptyOutput;
    6      6   
impl EmptyInputAndEmptyOutput {
    7      7   
    /// Creates a new `EmptyInputAndEmptyOutput`
    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::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput::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::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +172,179 @@
  130    136   
                crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError,
  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 EmptyInputAndEmptyOutputResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for EmptyInputAndEmptyOutputResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         146  +
    fn deserialize_nonstreaming_with_config(
  141    147   
        &self,
  142    148   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         149  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    150   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    151   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  145    152   
        let headers = response.headers();
  146    153   
        let body = response.body().bytes().expect("body loaded");
  147    154   
        #[allow(unused_mut)]
  148    155   
        let mut force_error = false;
  149    156   
  150    157   
        let parse_result = if !success && status != 200 || force_error {
  151    158   
            crate::protocol_serde::shape_empty_input_and_empty_output::de_empty_input_and_empty_output_http_error(status, headers, body)
  152    159   
        } else {
@@ -265,272 +325,336 @@
  285    292   
            .expect("the config must have a deserializer");
  286    293   
  287    294   
        let parsed = de.deserialize_streaming(&mut http_response);
  288    295   
        let parsed = parsed.unwrap_or_else(|| {
  289    296   
            let http_response = http_response.map(|body| {
  290    297   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  291    298   
                    body.bytes().unwrap(),
  292    299   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
  293    300   
                )))
  294    301   
            });
  295         -
            de.deserialize_nonstreaming(&http_response)
         302  +
            // Build a config bag with the protocol for schema-based deserialization
         303  +
            #[allow(unused_mut)]
         304  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         305  +
         306  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  296    307   
        });
  297    308   
        let parsed = parsed
  298    309   
            .expect("should be successful response")
  299    310   
            .downcast::<crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputOutput>()
  300    311   
            .unwrap();
  301    312   
    }
  302    313   
}
  303    314   
  304    315   
/// Error type for the `EmptyInputAndEmptyOutputError` operation.
  305    316   
#[non_exhaustive]

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

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

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

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

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

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

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/endpoint_with_host_label_header_operation.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 `EndpointWithHostLabelHeaderOperation`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct EndpointWithHostLabelHeaderOperation;
    6      6   
impl EndpointWithHostLabelHeaderOperation {
    7      7   
    /// Creates a new `EndpointWithHostLabelHeaderOperation`
    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::endpoint_with_host_label_header_operation::EndpointWithHostLabelHeaderOperationInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::endpoint_with_host_label_header_operation::EndpointWithHostLabelHeaderOperationOutput::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::endpoint_with_host_label_header_operation::EndpointWithHostLabelHeaderOperationInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::endpoint_with_host_label_header_operation::EndpointWithHostLabelHeaderOperationOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::endpoint_with_host_label_header_operation::EndpointWithHostLabelHeaderOperationError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +172,179 @@
  130    136   
                crate::operation::endpoint_with_host_label_header_operation::EndpointWithHostLabelHeaderOperationError,
  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 EndpointWithHostLabelHeaderOperationResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for EndpointWithHostLabelHeaderOperationResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         146  +
    fn deserialize_nonstreaming_with_config(
  141    147   
        &self,
  142    148   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         149  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    150   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    151   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  145    152   
        let headers = response.headers();
  146    153   
        let body = response.body().bytes().expect("body loaded");
  147    154   
        #[allow(unused_mut)]
  148    155   
        let mut force_error = false;
  149    156   
  150    157   
        let parse_result = if !success && status != 200 || force_error {
  151    158   
            crate::protocol_serde::shape_endpoint_with_host_label_header_operation::de_endpoint_with_host_label_header_operation_http_error(
  152    159   
                status, headers, body,

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

@@ -1,1 +105,131 @@
   17     17   
    "aws.protocoltests.restxml.synthetic",
   18     18   
    "EndpointWithHostLabelHeaderOperationInput",
   19     19   
);
   20     20   
static ENDPOINTWITHHOSTLABELHEADEROPERATIONINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "aws.protocoltests.restxml.synthetic#EndpointWithHostLabelHeaderOperationInput$accountId",
   23     23   
        "aws.protocoltests.restxml.synthetic",
   24     24   
        "EndpointWithHostLabelHeaderOperationInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "account_id",
          27  +
    "accountId",
   28     28   
    0,
   29     29   
)
   30     30   
.with_host_label()
   31     31   
.with_http_header("X-Amz-Account-Id");
   32     32   
static ENDPOINTWITHHOSTLABELHEADEROPERATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   33     33   
    ENDPOINTWITHHOSTLABELHEADEROPERATIONINPUT_SCHEMA_ID,
   34     34   
    ::aws_smithy_schema::ShapeType::Structure,
   35     35   
    &[&ENDPOINTWITHHOSTLABELHEADEROPERATIONINPUT_MEMBER_ACCOUNT_ID],
   36         -
);
          36  +
)
          37  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          38  +
    "POST",
          39  +
    "/EndpointWithHostLabelHeaderOperation",
          40  +
    None,
          41  +
));
   37     42   
impl EndpointWithHostLabelHeaderOperationInput {
   38     43   
    /// The schema for this shape.
   39     44   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ENDPOINTWITHHOSTLABELHEADEROPERATIONINPUT_SCHEMA;
   40     45   
}
   41     46   
impl ::aws_smithy_schema::serde::SerializableStruct for EndpointWithHostLabelHeaderOperationInput {
   42     47   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   43     48   
    fn serialize_members(
   44     49   
        &self,
   45     50   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   46     51   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   47     52   
        if let Some(ref val) = self.account_id {
   48     53   
            ser.write_string(&ENDPOINTWITHHOSTLABELHEADEROPERATIONINPUT_MEMBER_ACCOUNT_ID, val)?;
   49     54   
        }
   50     55   
        Ok(())
   51     56   
    }
   52     57   
}
   53     58   
impl EndpointWithHostLabelHeaderOperationInput {
   54     59   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   55         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   56         -
        deserializer: &mut D,
          60  +
    pub fn deserialize(
          61  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   57     62   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   58     63   
        #[allow(unused_variables, unused_mut)]
   59     64   
        let mut builder = Self::builder();
   60     65   
        #[allow(
   61     66   
            unused_variables,
   62     67   
            unreachable_code,
   63     68   
            clippy::single_match,
   64     69   
            clippy::match_single_binding,
   65     70   
            clippy::diverging_sub_expression
   66     71   
        )]
   67         -
        deserializer.read_struct(&ENDPOINTWITHHOSTLABELHEADEROPERATIONINPUT_SCHEMA, (), |_, member, deser| {
          72  +
        deserializer.read_struct(&ENDPOINTWITHHOSTLABELHEADEROPERATIONINPUT_SCHEMA, &mut |member, deser| {
   68     73   
            match member.member_index() {
   69     74   
                Some(0) => {
   70     75   
                    builder.account_id = Some(deser.read_string(member)?);
   71     76   
                }
   72     77   
                _ => {}
   73     78   
            }
   74     79   
            Ok(())
   75     80   
        })?;
          81  +
        builder.account_id = builder.account_id.or(Some(String::new()));
          82  +
        builder
          83  +
            .build()
          84  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
          85  +
    }
          86  +
}
          87  +
impl EndpointWithHostLabelHeaderOperationInput {
          88  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          89  +
    /// Header-bound members are read directly from headers, avoiding runtime
          90  +
    /// member iteration overhead. Body members are read via the deserializer.
          91  +
    pub fn deserialize_with_response(
          92  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          93  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          94  +
        _status: u16,
          95  +
        _body: &[u8],
          96  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          97  +
        #[allow(unused_variables, unused_mut)]
          98  +
        let mut builder = Self::builder();
          99  +
        if let Some(val) = headers.get("X-Amz-Account-Id") {
         100  +
            builder.account_id = Some(val.to_string());
         101  +
        }
   76    102   
        builder
   77    103   
            .build()
   78    104   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   79    105   
    }
   80    106   
}
   81    107   
impl EndpointWithHostLabelHeaderOperationInput {
   82    108   
    /// Creates a new builder-style object to manufacture [`EndpointWithHostLabelHeaderOperationInput`](crate::operation::endpoint_with_host_label_header_operation::EndpointWithHostLabelHeaderOperationInput).
   83    109   
    pub fn builder() -> crate::operation::endpoint_with_host_label_header_operation::builders::EndpointWithHostLabelHeaderOperationInputBuilder {
   84    110   
        crate::operation::endpoint_with_host_label_header_operation::builders::EndpointWithHostLabelHeaderOperationInputBuilder::default()
   85    111   
    }