Client Test

Client Test

rev. ec7b2441254af868911fccffe8d8dca83aff0045 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_request_with_labels_and_timestamp_format.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 `HttpRequestWithLabelsAndTimestampFormat`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct HttpRequestWithLabelsAndTimestampFormat;
    6      6   
impl HttpRequestWithLabelsAndTimestampFormat {
    7      7   
    /// Creates a new `HttpRequestWithLabelsAndTimestampFormat`
    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::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatOutput::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::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +172,179 @@
  130    136   
                crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatError,
  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 HttpRequestWithLabelsAndTimestampFormatResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpRequestWithLabelsAndTimestampFormatResponseDeserializer {
  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_http_request_with_labels_and_timestamp_format::de_http_request_with_labels_and_timestamp_format_http_error(
  152    159   
                status, headers, body,

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

@@ -34,34 +260,274 @@
   54     54   
    "HttpRequestWithLabelsAndTimestampFormatInput",
   55     55   
);
   56     56   
static HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_MEMBER_EPOCH_SECONDS: ::aws_smithy_schema::Schema =
   57     57   
    ::aws_smithy_schema::Schema::new_member(
   58     58   
        ::aws_smithy_schema::ShapeId::from_static(
   59     59   
            "aws.protocoltests.restxml.synthetic#HttpRequestWithLabelsAndTimestampFormatInput$memberEpochSeconds",
   60     60   
            "aws.protocoltests.restxml.synthetic",
   61     61   
            "HttpRequestWithLabelsAndTimestampFormatInput",
   62     62   
        ),
   63     63   
        ::aws_smithy_schema::ShapeType::Timestamp,
   64         -
        "member_epoch_seconds",
          64  +
        "memberEpochSeconds",
   65     65   
        0,
   66     66   
    )
   67     67   
    .with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::EpochSeconds)
   68     68   
    .with_http_label();
   69     69   
static HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_MEMBER_HTTP_DATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   70     70   
    ::aws_smithy_schema::ShapeId::from_static(
   71     71   
        "aws.protocoltests.restxml.synthetic#HttpRequestWithLabelsAndTimestampFormatInput$memberHttpDate",
   72     72   
        "aws.protocoltests.restxml.synthetic",
   73     73   
        "HttpRequestWithLabelsAndTimestampFormatInput",
   74     74   
    ),
   75     75   
    ::aws_smithy_schema::ShapeType::Timestamp,
   76         -
    "member_http_date",
          76  +
    "memberHttpDate",
   77     77   
    1,
   78     78   
)
   79     79   
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::HttpDate)
   80     80   
.with_http_label();
   81     81   
static HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_MEMBER_DATE_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   82     82   
    ::aws_smithy_schema::ShapeId::from_static(
   83     83   
        "aws.protocoltests.restxml.synthetic#HttpRequestWithLabelsAndTimestampFormatInput$memberDateTime",
   84     84   
        "aws.protocoltests.restxml.synthetic",
   85     85   
        "HttpRequestWithLabelsAndTimestampFormatInput",
   86     86   
    ),
   87     87   
    ::aws_smithy_schema::ShapeType::Timestamp,
   88         -
    "member_date_time",
          88  +
    "memberDateTime",
   89     89   
    2,
   90     90   
)
   91     91   
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime)
   92     92   
.with_http_label();
   93     93   
static HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_DEFAULT_FORMAT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   94     94   
    ::aws_smithy_schema::ShapeId::from_static(
   95     95   
        "aws.protocoltests.restxml.synthetic#HttpRequestWithLabelsAndTimestampFormatInput$defaultFormat",
   96     96   
        "aws.protocoltests.restxml.synthetic",
   97     97   
        "HttpRequestWithLabelsAndTimestampFormatInput",
   98     98   
    ),
   99     99   
    ::aws_smithy_schema::ShapeType::Timestamp,
  100         -
    "default_format",
         100  +
    "defaultFormat",
  101    101   
    3,
  102    102   
)
  103    103   
.with_http_label();
  104    104   
static HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_TARGET_EPOCH_SECONDS: ::aws_smithy_schema::Schema =
  105    105   
    ::aws_smithy_schema::Schema::new_member(
  106    106   
        ::aws_smithy_schema::ShapeId::from_static(
  107    107   
            "aws.protocoltests.restxml.synthetic#HttpRequestWithLabelsAndTimestampFormatInput$targetEpochSeconds",
  108    108   
            "aws.protocoltests.restxml.synthetic",
  109    109   
            "HttpRequestWithLabelsAndTimestampFormatInput",
  110    110   
        ),
  111    111   
        ::aws_smithy_schema::ShapeType::Timestamp,
  112         -
        "target_epoch_seconds",
         112  +
        "targetEpochSeconds",
  113    113   
        4,
  114    114   
    )
  115         -
    .with_http_label();
         115  +
    .with_http_label()
         116  +
    .with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::EpochSeconds);
  116    117   
static HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_TARGET_HTTP_DATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  117    118   
    ::aws_smithy_schema::ShapeId::from_static(
  118    119   
        "aws.protocoltests.restxml.synthetic#HttpRequestWithLabelsAndTimestampFormatInput$targetHttpDate",
  119    120   
        "aws.protocoltests.restxml.synthetic",
  120    121   
        "HttpRequestWithLabelsAndTimestampFormatInput",
  121    122   
    ),
  122    123   
    ::aws_smithy_schema::ShapeType::Timestamp,
  123         -
    "target_http_date",
         124  +
    "targetHttpDate",
  124    125   
    5,
  125    126   
)
  126         -
.with_http_label();
         127  +
.with_http_label()
         128  +
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::HttpDate);
  127    129   
static HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_TARGET_DATE_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  128    130   
    ::aws_smithy_schema::ShapeId::from_static(
  129    131   
        "aws.protocoltests.restxml.synthetic#HttpRequestWithLabelsAndTimestampFormatInput$targetDateTime",
  130    132   
        "aws.protocoltests.restxml.synthetic",
  131    133   
        "HttpRequestWithLabelsAndTimestampFormatInput",
  132    134   
    ),
  133    135   
    ::aws_smithy_schema::ShapeType::Timestamp,
  134         -
    "target_date_time",
         136  +
    "targetDateTime",
  135    137   
    6,
  136    138   
)
  137         -
.with_http_label();
         139  +
.with_http_label()
         140  +
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime);
  138    141   
static HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  139    142   
                            HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_SCHEMA_ID,
  140    143   
                            ::aws_smithy_schema::ShapeType::Structure,
  141         -
    &[
  142         -
        &HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_MEMBER_EPOCH_SECONDS,
  143         -
        &HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_MEMBER_HTTP_DATE,
  144         -
        &HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_MEMBER_DATE_TIME,
  145         -
        &HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_DEFAULT_FORMAT,
  146         -
        &HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_TARGET_EPOCH_SECONDS,
  147         -
        &HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_TARGET_HTTP_DATE,
  148         -
        &HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_TARGET_DATE_TIME,
  149         -
    ],
  150         -
);
         144  +
                            &[&HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_MEMBER_EPOCH_SECONDS, &HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_MEMBER_HTTP_DATE, &HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_MEMBER_DATE_TIME, &HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_DEFAULT_FORMAT, &HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_TARGET_EPOCH_SECONDS, &HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_TARGET_HTTP_DATE, &HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_TARGET_DATE_TIME],
         145  +
                        )
         146  +
    .with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/HttpRequestWithLabelsAndTimestampFormat/{memberEpochSeconds}/{memberHttpDate}/{memberDateTime}/{defaultFormat}/{targetEpochSeconds}/{targetHttpDate}/{targetDateTime}", None));
  151    147   
impl HttpRequestWithLabelsAndTimestampFormatInput {
  152    148   
    /// The schema for this shape.
  153    149   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_SCHEMA;
  154    150   
}
  155    151   
impl ::aws_smithy_schema::serde::SerializableStruct for HttpRequestWithLabelsAndTimestampFormatInput {
  156    152   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  157    153   
    fn serialize_members(
  158    154   
        &self,
  159    155   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  160    156   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  161    157   
        if let Some(ref val) = self.member_epoch_seconds {
  162    158   
            ser.write_timestamp(&HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_MEMBER_EPOCH_SECONDS, val)?;
  163    159   
        }
  164    160   
        if let Some(ref val) = self.member_http_date {
  165    161   
            ser.write_timestamp(&HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_MEMBER_HTTP_DATE, val)?;
  166    162   
        }
  167    163   
        if let Some(ref val) = self.member_date_time {
  168    164   
            ser.write_timestamp(&HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_MEMBER_DATE_TIME, val)?;
  169    165   
        }
  170    166   
        if let Some(ref val) = self.default_format {
  171    167   
            ser.write_timestamp(&HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_DEFAULT_FORMAT, val)?;
  172    168   
        }
  173    169   
        if let Some(ref val) = self.target_epoch_seconds {
  174    170   
            ser.write_timestamp(&HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_TARGET_EPOCH_SECONDS, val)?;
  175    171   
        }
  176    172   
        if let Some(ref val) = self.target_http_date {
  177    173   
            ser.write_timestamp(&HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_TARGET_HTTP_DATE, val)?;
  178    174   
        }
  179    175   
        if let Some(ref val) = self.target_date_time {
  180    176   
            ser.write_timestamp(&HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_MEMBER_TARGET_DATE_TIME, val)?;
  181    177   
        }
  182    178   
        Ok(())
  183    179   
    }
  184    180   
}
  185    181   
impl HttpRequestWithLabelsAndTimestampFormatInput {
  186    182   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  187         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  188         -
        deserializer: &mut D,
         183  +
    pub fn deserialize(
         184  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  189    185   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  190    186   
        #[allow(unused_variables, unused_mut)]
  191    187   
        let mut builder = Self::builder();
  192    188   
        #[allow(
  193    189   
            unused_variables,
  194    190   
            unreachable_code,
  195    191   
            clippy::single_match,
  196    192   
            clippy::match_single_binding,
  197    193   
            clippy::diverging_sub_expression
  198    194   
        )]
  199         -
        deserializer.read_struct(&HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_SCHEMA, (), |_, member, deser| {
         195  +
        deserializer.read_struct(&HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATINPUT_SCHEMA, &mut |member, deser| {
  200    196   
            match member.member_index() {
  201    197   
                Some(0) => {
  202    198   
                    builder.member_epoch_seconds = Some(deser.read_timestamp(member)?);
  203    199   
                }
  204    200   
                Some(1) => {
  205    201   
                    builder.member_http_date = Some(deser.read_timestamp(member)?);
  206    202   
                }
  207    203   
                Some(2) => {
  208    204   
                    builder.member_date_time = Some(deser.read_timestamp(member)?);
  209    205   
                }
  210    206   
                Some(3) => {
  211    207   
                    builder.default_format = Some(deser.read_timestamp(member)?);
  212    208   
                }
  213    209   
                Some(4) => {
  214    210   
                    builder.target_epoch_seconds = Some(deser.read_timestamp(member)?);
  215    211   
                }
  216    212   
                Some(5) => {
  217    213   
                    builder.target_http_date = Some(deser.read_timestamp(member)?);
  218    214   
                }
  219    215   
                Some(6) => {
  220    216   
                    builder.target_date_time = Some(deser.read_timestamp(member)?);
  221    217   
                }
  222    218   
                _ => {}
  223    219   
            }
  224    220   
            Ok(())
  225    221   
        })?;
         222  +
        builder.member_epoch_seconds = builder.member_epoch_seconds.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
         223  +
        builder.member_http_date = builder.member_http_date.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
         224  +
        builder.member_date_time = builder.member_date_time.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
         225  +
        builder.default_format = builder.default_format.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
         226  +
        builder.target_epoch_seconds = builder.target_epoch_seconds.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
         227  +
        builder.target_http_date = builder.target_http_date.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
         228  +
        builder.target_date_time = builder.target_date_time.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
  226    229   
        builder
  227    230   
            .build()
  228    231   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  229    232   
    }
  230    233   
}
         234  +
impl HttpRequestWithLabelsAndTimestampFormatInput {
         235  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         236  +
    pub fn deserialize_with_response(
         237  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         238  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         239  +
        _status: u16,
         240  +
        _body: &[u8],
         241  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         242  +
        Self::deserialize(deserializer)
         243  +
    }
         244  +
}
  231    245   
impl HttpRequestWithLabelsAndTimestampFormatInput {
  232    246   
    /// Creates a new builder-style object to manufacture [`HttpRequestWithLabelsAndTimestampFormatInput`](crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatInput).
  233    247   
    pub fn builder() -> crate::operation::http_request_with_labels_and_timestamp_format::builders::HttpRequestWithLabelsAndTimestampFormatInputBuilder
  234    248   
    {
  235    249   
        crate::operation::http_request_with_labels_and_timestamp_format::builders::HttpRequestWithLabelsAndTimestampFormatInputBuilder::default()
  236    250   
    }
  237    251   
}
  238    252   
  239    253   
/// A builder for [`HttpRequestWithLabelsAndTimestampFormatInput`](crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatInput).
  240    254   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_request_with_labels_and_timestamp_format/_http_request_with_labels_and_timestamp_format_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 HttpRequestWithLabelsAndTimestampFormatOutput {
   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(&HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATOUTPUT_SCHEMA, (), |_, member, deser| {
          43  +
        deserializer.read_struct(&HTTPREQUESTWITHLABELSANDTIMESTAMPFORMATOUTPUT_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 HttpRequestWithLabelsAndTimestampFormatOutput {
          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 HttpRequestWithLabelsAndTimestampFormatOutput {
   53     64   
    /// Creates a new builder-style object to manufacture [`HttpRequestWithLabelsAndTimestampFormatOutput`](crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatOutput).
   54     65   
    pub fn builder() -> crate::operation::http_request_with_labels_and_timestamp_format::builders::HttpRequestWithLabelsAndTimestampFormatOutputBuilder
   55     66   
    {
   56     67   
        crate::operation::http_request_with_labels_and_timestamp_format::builders::HttpRequestWithLabelsAndTimestampFormatOutputBuilder::default()
   57     68   
    }
   58     69   
}
   59     70   
   60     71   
/// A builder for [`HttpRequestWithLabelsAndTimestampFormatOutput`](crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatOutput).
   61     72   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_response_code.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 `HttpResponseCode`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct HttpResponseCode;
    6      6   
impl HttpResponseCode {
    7      7   
    /// Creates a new `HttpResponseCode`
    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::http_response_code::HttpResponseCodeInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::http_response_code::HttpResponseCodeOutput::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::http_response_code::HttpResponseCodeInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::http_response_code::HttpResponseCodeOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::http_response_code::HttpResponseCodeError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -110,114 +172,177 @@
  130    134   
                crate::operation::http_response_code::HttpResponseCodeError,
  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 HttpResponseCodeResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpResponseCodeResponseDeserializer {
  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_http_response_code::de_http_response_code_http_error(status, headers, body)
  152    157   
        } else {
@@ -243,248 +303,312 @@
  263    268   
            .expect("the config must have a deserializer");
  264    269   
  265    270   
        let parsed = de.deserialize_streaming(&mut http_response);
  266    271   
        let parsed = parsed.unwrap_or_else(|| {
  267    272   
            let http_response = http_response.map(|body| {
  268    273   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  269    274   
                    body.bytes().unwrap(),
  270    275   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  271    276   
                )))
  272    277   
            });
  273         -
            de.deserialize_nonstreaming(&http_response)
         278  +
            // Build a config bag with the protocol for schema-based deserialization
         279  +
            #[allow(unused_mut)]
         280  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         281  +
         282  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  274    283   
        });
  275    284   
        let parsed = parsed
  276    285   
            .expect("should be successful response")
  277    286   
            .downcast::<crate::operation::http_response_code::HttpResponseCodeOutput>()
  278    287   
            .unwrap();
  279    288   
        ::pretty_assertions::assert_eq!(parsed.status, expected_output.status, "Unexpected value for `status`");
  280    289   
    }
  281    290   
}
  282    291   
  283    292   
/// Error type for the `HttpResponseCodeError` operation.

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_response_code/_http_response_code_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 HttpResponseCodeInput {}
    6      6   
static HTTPRESPONSECODEINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    7      7   
    "aws.protocoltests.restxml.synthetic#HttpResponseCodeInput",
    8      8   
    "aws.protocoltests.restxml.synthetic",
    9      9   
    "HttpResponseCodeInput",
   10     10   
);
   11     11   
static HTTPRESPONSECODEINPUT_SCHEMA: ::aws_smithy_schema::Schema =
   12         -
    ::aws_smithy_schema::Schema::new_struct(HTTPRESPONSECODEINPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          12  +
    ::aws_smithy_schema::Schema::new_struct(HTTPRESPONSECODEINPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[])
          13  +
        .with_http(aws_smithy_schema::traits::HttpTrait::new("PUT", "/HttpResponseCode", None));
   13     14   
impl HttpResponseCodeInput {
   14     15   
    /// The schema for this shape.
   15     16   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &HTTPRESPONSECODEINPUT_SCHEMA;
   16     17   
}
   17     18   
impl ::aws_smithy_schema::serde::SerializableStruct for HttpResponseCodeInput {
   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 HttpResponseCodeInput {
   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(&HTTPRESPONSECODEINPUT_SCHEMA, (), |_, member, deser| {
          41  +
        deserializer.read_struct(&HTTPRESPONSECODEINPUT_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 HttpResponseCodeInput {
          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 HttpResponseCodeInput {
   52     66   
    /// Creates a new builder-style object to manufacture [`HttpResponseCodeInput`](crate::operation::http_response_code::HttpResponseCodeInput).
   53     67   
    pub fn builder() -> crate::operation::http_response_code::builders::HttpResponseCodeInputBuilder {
   54     68   
        crate::operation::http_response_code::builders::HttpResponseCodeInputBuilder::default()
   55     69   
    }
   56     70   
}
   57     71   
   58     72   
/// A builder for [`HttpResponseCodeInput`](crate::operation::http_response_code::HttpResponseCodeInput).
   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/http_response_code/_http_response_code_output.rs

@@ -1,1 +107,123 @@
   17     17   
    "aws.protocoltests.restxml.synthetic",
   18     18   
    "HttpResponseCodeOutput",
   19     19   
);
   20     20   
static HTTPRESPONSECODEOUTPUT_MEMBER_STATUS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "aws.protocoltests.restxml.synthetic#HttpResponseCodeOutput$Status",
   23     23   
        "aws.protocoltests.restxml.synthetic",
   24     24   
        "HttpResponseCodeOutput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Integer,
   27         -
    "status",
          27  +
    "Status",
   28     28   
    0,
   29     29   
)
   30     30   
.with_http_response_code();
   31     31   
static HTTPRESPONSECODEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     32   
    HTTPRESPONSECODEOUTPUT_SCHEMA_ID,
   33     33   
    ::aws_smithy_schema::ShapeType::Structure,
   34     34   
    &[&HTTPRESPONSECODEOUTPUT_MEMBER_STATUS],
   35     35   
);
   36     36   
impl HttpResponseCodeOutput {
   37     37   
    /// The schema for this shape.
   38     38   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &HTTPRESPONSECODEOUTPUT_SCHEMA;
   39     39   
}
   40     40   
impl ::aws_smithy_schema::serde::SerializableStruct for HttpResponseCodeOutput {
   41     41   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   42     42   
    fn serialize_members(
   43     43   
        &self,
   44     44   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     45   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     46   
        if let Some(ref val) = self.status {
   47     47   
            ser.write_integer(&HTTPRESPONSECODEOUTPUT_MEMBER_STATUS, *val)?;
   48     48   
        }
   49     49   
        Ok(())
   50     50   
    }
   51     51   
}
   52     52   
impl HttpResponseCodeOutput {
   53     53   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          54  +
    pub fn deserialize(
          55  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     56   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     57   
        #[allow(unused_variables, unused_mut)]
   58     58   
        let mut builder = Self::builder();
   59     59   
        #[allow(
   60     60   
            unused_variables,
   61     61   
            unreachable_code,
   62     62   
            clippy::single_match,
   63     63   
            clippy::match_single_binding,
   64     64   
            clippy::diverging_sub_expression
   65     65   
        )]
   66         -
        deserializer.read_struct(&HTTPRESPONSECODEOUTPUT_SCHEMA, (), |_, member, deser| {
          66  +
        deserializer.read_struct(&HTTPRESPONSECODEOUTPUT_SCHEMA, &mut |member, deser| {
   67     67   
            match member.member_index() {
   68     68   
                Some(0) => {
   69     69   
                    builder.status = Some(deser.read_integer(member)?);
   70     70   
                }
   71     71   
                _ => {}
   72     72   
            }
   73     73   
            Ok(())
   74     74   
        })?;
   75     75   
        Ok(builder.build())
   76     76   
    }
   77     77   
}
          78  +
impl HttpResponseCodeOutput {
          79  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          80  +
    /// Header-bound members are read directly from headers, avoiding runtime
          81  +
    /// member iteration overhead. Body members are read via the deserializer.
          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  +
        #[allow(unused_variables, unused_mut)]
          89  +
        let mut builder = Self::builder();
          90  +
        builder.status = Some(_status as i32);
          91  +
        Ok(builder.build())
          92  +
    }
          93  +
}
   78     94   
impl HttpResponseCodeOutput {
   79     95   
    /// Creates a new builder-style object to manufacture [`HttpResponseCodeOutput`](crate::operation::http_response_code::HttpResponseCodeOutput).
   80     96   
    pub fn builder() -> crate::operation::http_response_code::builders::HttpResponseCodeOutputBuilder {
   81     97   
        crate::operation::http_response_code::builders::HttpResponseCodeOutputBuilder::default()
   82     98   
    }
   83     99   
}
   84    100   
   85    101   
/// A builder for [`HttpResponseCodeOutput`](crate::operation::http_response_code::HttpResponseCodeOutput).
   86    102   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   87    103   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_string_payload.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 `HttpStringPayload`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct HttpStringPayload;
    6      6   
impl HttpStringPayload {
    7      7   
    /// Creates a new `HttpStringPayload`
    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::http_string_payload::HttpStringPayloadInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::http_string_payload::HttpStringPayloadOutput::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::http_string_payload::HttpStringPayloadInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::http_string_payload::HttpStringPayloadOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::http_string_payload::HttpStringPayloadError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -110,114 +172,177 @@
  130    134   
                crate::operation::http_string_payload::HttpStringPayloadError,
  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 HttpStringPayloadResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpStringPayloadResponseDeserializer {
  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_http_string_payload::de_http_string_payload_http_error(status, headers, body)
  152    157   
        } else {
@@ -280,285 +340,349 @@
  300    305   
            .expect("the config must have a deserializer");
  301    306   
  302    307   
        let parsed = de.deserialize_streaming(&mut http_response);
  303    308   
        let parsed = parsed.unwrap_or_else(|| {
  304    309   
            let http_response = http_response.map(|body| {
  305    310   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  306    311   
                    body.bytes().unwrap(),
  307    312   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
  308    313   
                )))
  309    314   
            });
  310         -
            de.deserialize_nonstreaming(&http_response)
         315  +
            // Build a config bag with the protocol for schema-based deserialization
         316  +
            #[allow(unused_mut)]
         317  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         318  +
         319  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  311    320   
        });
  312    321   
        let parsed = parsed
  313    322   
            .expect("should be successful response")
  314    323   
            .downcast::<crate::operation::http_string_payload::HttpStringPayloadOutput>()
  315    324   
            .unwrap();
  316    325   
        ::pretty_assertions::assert_eq!(parsed.payload, expected_output.payload, "Unexpected value for `payload`");
  317    326   
    }
  318    327   
}
  319    328   
  320    329   
/// Error type for the `HttpStringPayloadError` operation.

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

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

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

@@ -24,24 +107,126 @@
   44     44   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     45   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     46   
        if let Some(ref val) = self.payload {
   47     47   
            ser.write_string(&HTTPSTRINGPAYLOADOUTPUT_MEMBER_PAYLOAD, val)?;
   48     48   
        }
   49     49   
        Ok(())
   50     50   
    }
   51     51   
}
   52     52   
impl HttpStringPayloadOutput {
   53     53   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          54  +
    pub fn deserialize(
          55  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     56   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     57   
        #[allow(unused_variables, unused_mut)]
   58     58   
        let mut builder = Self::builder();
   59     59   
        #[allow(
   60     60   
            unused_variables,
   61     61   
            unreachable_code,
   62     62   
            clippy::single_match,
   63     63   
            clippy::match_single_binding,
   64     64   
            clippy::diverging_sub_expression
   65     65   
        )]
   66         -
        deserializer.read_struct(&HTTPSTRINGPAYLOADOUTPUT_SCHEMA, (), |_, member, deser| {
          66  +
        deserializer.read_struct(&HTTPSTRINGPAYLOADOUTPUT_SCHEMA, &mut |member, deser| {
   67     67   
            match member.member_index() {
   68     68   
                Some(0) => {
   69     69   
                    builder.payload = Some(deser.read_string(member)?);
   70     70   
                }
   71     71   
                _ => {}
   72     72   
            }
   73     73   
            Ok(())
   74     74   
        })?;
   75     75   
        Ok(builder.build())
   76     76   
    }
   77     77   
}
          78  +
impl HttpStringPayloadOutput {
          79  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          80  +
    /// Header-bound members are read directly from headers, avoiding runtime
          81  +
    /// member iteration overhead. Body members are read via the deserializer.
          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  +
        #[allow(unused_variables, unused_mut)]
          89  +
        let mut builder = Self::builder();
          90  +
        if !body.is_empty() {
          91  +
            let s = ::std::string::String::from_utf8_lossy(body).into_owned();
          92  +
            builder.payload = Some(s);
          93  +
        }
          94  +
        Ok(builder.build())
          95  +
    }
          96  +
}
   78     97   
impl HttpStringPayloadOutput {
   79     98   
    /// Creates a new builder-style object to manufacture [`HttpStringPayloadOutput`](crate::operation::http_string_payload::HttpStringPayloadOutput).
   80     99   
    pub fn builder() -> crate::operation::http_string_payload::builders::HttpStringPayloadOutputBuilder {
   81    100   
        crate::operation::http_string_payload::builders::HttpStringPayloadOutputBuilder::default()
   82    101   
    }
   83    102   
}
   84    103   
   85    104   
/// A builder for [`HttpStringPayloadOutput`](crate::operation::http_string_payload::HttpStringPayloadOutput).
   86    105   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   87    106   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/ignore_query_params_in_response.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 `IgnoreQueryParamsInResponse`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct IgnoreQueryParamsInResponse;
    6      6   
impl IgnoreQueryParamsInResponse {
    7      7   
    /// Creates a new `IgnoreQueryParamsInResponse`
    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::ignore_query_params_in_response::IgnoreQueryParamsInResponseInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::ignore_query_params_in_response::IgnoreQueryParamsInResponseOutput::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::ignore_query_params_in_response::IgnoreQueryParamsInResponseInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::ignore_query_params_in_response::IgnoreQueryParamsInResponseOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::ignore_query_params_in_response::IgnoreQueryParamsInResponseError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +172,179 @@
  130    136   
                crate::operation::ignore_query_params_in_response::IgnoreQueryParamsInResponseError,
  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 IgnoreQueryParamsInResponseResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for IgnoreQueryParamsInResponseResponseDeserializer {
  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_ignore_query_params_in_response::de_ignore_query_params_in_response_http_error(status, headers, body)
  152    159   
        } else {
@@ -245,252 +305,316 @@
  265    272   
            .expect("the config must have a deserializer");
  266    273   
  267    274   
        let parsed = de.deserialize_streaming(&mut http_response);
  268    275   
        let parsed = parsed.unwrap_or_else(|| {
  269    276   
            let http_response = http_response.map(|body| {
  270    277   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  271    278   
                    body.bytes().unwrap(),
  272    279   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  273    280   
                )))
  274    281   
            });
  275         -
            de.deserialize_nonstreaming(&http_response)
         282  +
            // Build a config bag with the protocol for schema-based deserialization
         283  +
            #[allow(unused_mut)]
         284  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         285  +
         286  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  276    287   
        });
  277    288   
        let parsed = parsed
  278    289   
            .expect("should be successful response")
  279    290   
            .downcast::<crate::operation::ignore_query_params_in_response::IgnoreQueryParamsInResponseOutput>()
  280    291   
            .unwrap();
  281    292   
        ::pretty_assertions::assert_eq!(parsed.baz, expected_output.baz, "Unexpected value for `baz`");
  282    293   
    }
  283    294   
}
  284    295   
  285    296   
/// Error type for the `IgnoreQueryParamsInResponseError` operation.

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/ignore_query_params_in_response/_ignore_query_params_in_response_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 IgnoreQueryParamsInResponseInput {}
    6      6   
static IGNOREQUERYPARAMSINRESPONSEINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    7      7   
    "aws.protocoltests.restxml.synthetic#IgnoreQueryParamsInResponseInput",
    8      8   
    "aws.protocoltests.restxml.synthetic",
    9      9   
    "IgnoreQueryParamsInResponseInput",
   10     10   
);
   11     11   
static IGNOREQUERYPARAMSINRESPONSEINPUT_SCHEMA: ::aws_smithy_schema::Schema =
   12         -
    ::aws_smithy_schema::Schema::new_struct(IGNOREQUERYPARAMSINRESPONSEINPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          12  +
    ::aws_smithy_schema::Schema::new_struct(IGNOREQUERYPARAMSINRESPONSEINPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[])
          13  +
        .with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/IgnoreQueryParamsInResponse", None));
   13     14   
impl IgnoreQueryParamsInResponseInput {
   14     15   
    /// The schema for this shape.
   15     16   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &IGNOREQUERYPARAMSINRESPONSEINPUT_SCHEMA;
   16     17   
}
   17     18   
impl ::aws_smithy_schema::serde::SerializableStruct for IgnoreQueryParamsInResponseInput {
   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 IgnoreQueryParamsInResponseInput {
   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(&IGNOREQUERYPARAMSINRESPONSEINPUT_SCHEMA, (), |_, member, deser| {
          41  +
        deserializer.read_struct(&IGNOREQUERYPARAMSINRESPONSEINPUT_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 IgnoreQueryParamsInResponseInput {
          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 IgnoreQueryParamsInResponseInput {
   52     66   
    /// Creates a new builder-style object to manufacture [`IgnoreQueryParamsInResponseInput`](crate::operation::ignore_query_params_in_response::IgnoreQueryParamsInResponseInput).
   53     67   
    pub fn builder() -> crate::operation::ignore_query_params_in_response::builders::IgnoreQueryParamsInResponseInputBuilder {
   54     68   
        crate::operation::ignore_query_params_in_response::builders::IgnoreQueryParamsInResponseInputBuilder::default()
   55     69   
    }
   56     70   
}
   57     71   
   58     72   
/// A builder for [`IgnoreQueryParamsInResponseInput`](crate::operation::ignore_query_params_in_response::IgnoreQueryParamsInResponseInput).
   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/ignore_query_params_in_response/_ignore_query_params_in_response_output.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/input_and_output_with_headers.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 `InputAndOutputWithHeaders`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct InputAndOutputWithHeaders;
    6      6   
impl InputAndOutputWithHeaders {
    7      7   
    /// Creates a new `InputAndOutputWithHeaders`
    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::input_and_output_with_headers::InputAndOutputWithHeadersInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput::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::input_and_output_with_headers::InputAndOutputWithHeadersInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +172,179 @@
  130    136   
                crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError,
  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 InputAndOutputWithHeadersResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for InputAndOutputWithHeadersResponseDeserializer {
  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_input_and_output_with_headers::de_input_and_output_with_headers_http_error(status, headers, body)
  152    159   
        } else {
@@ -540,547 +600,611 @@
  560    567   
            .expect("the config must have a deserializer");
  561    568   
  562    569   
        let parsed = de.deserialize_streaming(&mut http_response);
  563    570   
        let parsed = parsed.unwrap_or_else(|| {
  564    571   
            let http_response = http_response.map(|body| {
  565    572   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  566    573   
                    body.bytes().unwrap(),
  567    574   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
  568    575   
                )))
  569    576   
            });
  570         -
            de.deserialize_nonstreaming(&http_response)
         577  +
            // Build a config bag with the protocol for schema-based deserialization
         578  +
            #[allow(unused_mut)]
         579  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         580  +
         581  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  571    582   
        });
  572    583   
        let parsed = parsed
  573    584   
            .expect("should be successful response")
  574    585   
            .downcast::<crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput>()
  575    586   
            .unwrap();
  576    587   
        ::pretty_assertions::assert_eq!(
  577    588   
            parsed.header_string,
  578    589   
            expected_output.header_string,
  579    590   
            "Unexpected value for `header_string`"
  580    591   
        );
@@ -659,670 +719,734 @@
  679    690   
            .expect("the config must have a deserializer");
  680    691   
  681    692   
        let parsed = de.deserialize_streaming(&mut http_response);
  682    693   
        let parsed = parsed.unwrap_or_else(|| {
  683    694   
            let http_response = http_response.map(|body| {
  684    695   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  685    696   
                    body.bytes().unwrap(),
  686    697   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
  687    698   
                )))
  688    699   
            });
  689         -
            de.deserialize_nonstreaming(&http_response)
         700  +
            // Build a config bag with the protocol for schema-based deserialization
         701  +
            #[allow(unused_mut)]
         702  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         703  +
         704  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  690    705   
        });
  691    706   
        let parsed = parsed
  692    707   
            .expect("should be successful response")
  693    708   
            .downcast::<crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput>()
  694    709   
            .unwrap();
  695    710   
        ::pretty_assertions::assert_eq!(
  696    711   
            parsed.header_string,
  697    712   
            expected_output.header_string,
  698    713   
            "Unexpected value for `header_string`"
  699    714   
        );
@@ -770,785 +830,849 @@
  790    805   
            .expect("the config must have a deserializer");
  791    806   
  792    807   
        let parsed = de.deserialize_streaming(&mut http_response);
  793    808   
        let parsed = parsed.unwrap_or_else(|| {
  794    809   
            let http_response = http_response.map(|body| {
  795    810   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  796    811   
                    body.bytes().unwrap(),
  797    812   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
  798    813   
                )))
  799    814   
            });
  800         -
            de.deserialize_nonstreaming(&http_response)
         815  +
            // Build a config bag with the protocol for schema-based deserialization
         816  +
            #[allow(unused_mut)]
         817  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         818  +
         819  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  801    820   
        });
  802    821   
        let parsed = parsed
  803    822   
            .expect("should be successful response")
  804    823   
            .downcast::<crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput>()
  805    824   
            .unwrap();
  806    825   
        ::pretty_assertions::assert_eq!(
  807    826   
            parsed.header_string,
  808    827   
            expected_output.header_string,
  809    828   
            "Unexpected value for `header_string`"
  810    829   
        );
@@ -880,899 +940,963 @@
  900    919   
            .expect("the config must have a deserializer");
  901    920   
  902    921   
        let parsed = de.deserialize_streaming(&mut http_response);
  903    922   
        let parsed = parsed.unwrap_or_else(|| {
  904    923   
            let http_response = http_response.map(|body| {
  905    924   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  906    925   
                    body.bytes().unwrap(),
  907    926   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
  908    927   
                )))
  909    928   
            });
  910         -
            de.deserialize_nonstreaming(&http_response)
         929  +
            // Build a config bag with the protocol for schema-based deserialization
         930  +
            #[allow(unused_mut)]
         931  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         932  +
         933  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  911    934   
        });
  912    935   
        let parsed = parsed
  913    936   
            .expect("should be successful response")
  914    937   
            .downcast::<crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput>()
  915    938   
            .unwrap();
  916    939   
        ::pretty_assertions::assert_eq!(
  917    940   
            parsed.header_string,
  918    941   
            expected_output.header_string,
  919    942   
            "Unexpected value for `header_string`"
  920    943   
        );
@@ -995,1018 +1055,1082 @@
 1015   1038   
            .expect("the config must have a deserializer");
 1016   1039   
 1017   1040   
        let parsed = de.deserialize_streaming(&mut http_response);
 1018   1041   
        let parsed = parsed.unwrap_or_else(|| {
 1019   1042   
            let http_response = http_response.map(|body| {
 1020   1043   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1021   1044   
                    body.bytes().unwrap(),
 1022   1045   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
 1023   1046   
                )))
 1024   1047   
            });
 1025         -
            de.deserialize_nonstreaming(&http_response)
        1048  +
            // Build a config bag with the protocol for schema-based deserialization
        1049  +
            #[allow(unused_mut)]
        1050  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
        1051  +
        1052  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
 1026   1053   
        });
 1027   1054   
        let parsed = parsed
 1028   1055   
            .expect("should be successful response")
 1029   1056   
            .downcast::<crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput>()
 1030   1057   
            .unwrap();
 1031   1058   
        ::pretty_assertions::assert_eq!(
 1032   1059   
            parsed.header_string,
 1033   1060   
            expected_output.header_string,
 1034   1061   
            "Unexpected value for `header_string`"
 1035   1062   
        );
@@ -1108,1135 +1168,1199 @@
 1128   1155   
            .expect("the config must have a deserializer");
 1129   1156   
 1130   1157   
        let parsed = de.deserialize_streaming(&mut http_response);
 1131   1158   
        let parsed = parsed.unwrap_or_else(|| {
 1132   1159   
            let http_response = http_response.map(|body| {
 1133   1160   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1134   1161   
                    body.bytes().unwrap(),
 1135   1162   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
 1136   1163   
                )))
 1137   1164   
            });
 1138         -
            de.deserialize_nonstreaming(&http_response)
        1165  +
            // Build a config bag with the protocol for schema-based deserialization
        1166  +
            #[allow(unused_mut)]
        1167  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
        1168  +
        1169  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
 1139   1170   
        });
 1140   1171   
        let parsed = parsed
 1141   1172   
            .expect("should be successful response")
 1142   1173   
            .downcast::<crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput>()
 1143   1174   
            .unwrap();
 1144   1175   
        ::pretty_assertions::assert_eq!(
 1145   1176   
            parsed.header_string,
 1146   1177   
            expected_output.header_string,
 1147   1178   
            "Unexpected value for `header_string`"
 1148   1179   
        );
@@ -1221,1252 +1281,1316 @@
 1241   1272   
            .expect("the config must have a deserializer");
 1242   1273   
 1243   1274   
        let parsed = de.deserialize_streaming(&mut http_response);
 1244   1275   
        let parsed = parsed.unwrap_or_else(|| {
 1245   1276   
            let http_response = http_response.map(|body| {
 1246   1277   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1247   1278   
                    body.bytes().unwrap(),
 1248   1279   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
 1249   1280   
                )))
 1250   1281   
            });
 1251         -
            de.deserialize_nonstreaming(&http_response)
        1282  +
            // Build a config bag with the protocol for schema-based deserialization
        1283  +
            #[allow(unused_mut)]
        1284  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
        1285  +
        1286  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
 1252   1287   
        });
 1253   1288   
        let parsed = parsed
 1254   1289   
            .expect("should be successful response")
 1255   1290   
            .downcast::<crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput>()
 1256   1291   
            .unwrap();
 1257   1292   
        ::pretty_assertions::assert_eq!(
 1258   1293   
            parsed.header_string,
 1259   1294   
            expected_output.header_string,
 1260   1295   
            "Unexpected value for `header_string`"
 1261   1296   
        );
@@ -1334,1369 +1394,1433 @@
 1354   1389   
            .expect("the config must have a deserializer");
 1355   1390   
 1356   1391   
        let parsed = de.deserialize_streaming(&mut http_response);
 1357   1392   
        let parsed = parsed.unwrap_or_else(|| {
 1358   1393   
            let http_response = http_response.map(|body| {
 1359   1394   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1360   1395   
                    body.bytes().unwrap(),
 1361   1396   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
 1362   1397   
                )))
 1363   1398   
            });
 1364         -
            de.deserialize_nonstreaming(&http_response)
        1399  +
            // Build a config bag with the protocol for schema-based deserialization
        1400  +
            #[allow(unused_mut)]
        1401  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
        1402  +
        1403  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
 1365   1404   
        });
 1366   1405   
        let parsed = parsed
 1367   1406   
            .expect("should be successful response")
 1368   1407   
            .downcast::<crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput>()
 1369   1408   
            .unwrap();
 1370   1409   
        ::pretty_assertions::assert_eq!(
 1371   1410   
            parsed.header_string,
 1372   1411   
            expected_output.header_string,
 1373   1412   
            "Unexpected value for `header_string`"
 1374   1413   
        );

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

@@ -99,99 +349,350 @@
  119    119   
    "aws.protocoltests.restxml.synthetic",
  120    120   
    "InputAndOutputWithHeadersInput",
  121    121   
);
  122    122   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_STRING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  123    123   
    ::aws_smithy_schema::ShapeId::from_static(
  124    124   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerString",
  125    125   
        "aws.protocoltests.restxml.synthetic",
  126    126   
        "InputAndOutputWithHeadersInput",
  127    127   
    ),
  128    128   
    ::aws_smithy_schema::ShapeType::String,
  129         -
    "header_string",
         129  +
    "headerString",
  130    130   
    0,
  131    131   
)
  132    132   
.with_http_header("X-String");
  133    133   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_BYTE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  134    134   
    ::aws_smithy_schema::ShapeId::from_static(
  135    135   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerByte",
  136    136   
        "aws.protocoltests.restxml.synthetic",
  137    137   
        "InputAndOutputWithHeadersInput",
  138    138   
    ),
  139    139   
    ::aws_smithy_schema::ShapeType::Byte,
  140         -
    "header_byte",
         140  +
    "headerByte",
  141    141   
    1,
  142    142   
)
  143    143   
.with_http_header("X-Byte");
  144    144   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_SHORT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  145    145   
    ::aws_smithy_schema::ShapeId::from_static(
  146    146   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerShort",
  147    147   
        "aws.protocoltests.restxml.synthetic",
  148    148   
        "InputAndOutputWithHeadersInput",
  149    149   
    ),
  150    150   
    ::aws_smithy_schema::ShapeType::Short,
  151         -
    "header_short",
         151  +
    "headerShort",
  152    152   
    2,
  153    153   
)
  154    154   
.with_http_header("X-Short");
  155    155   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_INTEGER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  156    156   
    ::aws_smithy_schema::ShapeId::from_static(
  157    157   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerInteger",
  158    158   
        "aws.protocoltests.restxml.synthetic",
  159    159   
        "InputAndOutputWithHeadersInput",
  160    160   
    ),
  161    161   
    ::aws_smithy_schema::ShapeType::Integer,
  162         -
    "header_integer",
         162  +
    "headerInteger",
  163    163   
    3,
  164    164   
)
  165    165   
.with_http_header("X-Integer");
  166    166   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_LONG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  167    167   
    ::aws_smithy_schema::ShapeId::from_static(
  168    168   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerLong",
  169    169   
        "aws.protocoltests.restxml.synthetic",
  170    170   
        "InputAndOutputWithHeadersInput",
  171    171   
    ),
  172    172   
    ::aws_smithy_schema::ShapeType::Long,
  173         -
    "header_long",
         173  +
    "headerLong",
  174    174   
    4,
  175    175   
)
  176    176   
.with_http_header("X-Long");
  177    177   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_FLOAT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  178    178   
    ::aws_smithy_schema::ShapeId::from_static(
  179    179   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerFloat",
  180    180   
        "aws.protocoltests.restxml.synthetic",
  181    181   
        "InputAndOutputWithHeadersInput",
  182    182   
    ),
  183    183   
    ::aws_smithy_schema::ShapeType::Float,
  184         -
    "header_float",
         184  +
    "headerFloat",
  185    185   
    5,
  186    186   
)
  187    187   
.with_http_header("X-Float");
  188    188   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_DOUBLE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  189    189   
    ::aws_smithy_schema::ShapeId::from_static(
  190    190   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerDouble",
  191    191   
        "aws.protocoltests.restxml.synthetic",
  192    192   
        "InputAndOutputWithHeadersInput",
  193    193   
    ),
  194    194   
    ::aws_smithy_schema::ShapeType::Double,
  195         -
    "header_double",
         195  +
    "headerDouble",
  196    196   
    6,
  197    197   
)
  198    198   
.with_http_header("X-Double");
  199    199   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_TRUE_BOOL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  200    200   
    ::aws_smithy_schema::ShapeId::from_static(
  201    201   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerTrueBool",
  202    202   
        "aws.protocoltests.restxml.synthetic",
  203    203   
        "InputAndOutputWithHeadersInput",
  204    204   
    ),
  205    205   
    ::aws_smithy_schema::ShapeType::Boolean,
  206         -
    "header_true_bool",
         206  +
    "headerTrueBool",
  207    207   
    7,
  208    208   
)
  209    209   
.with_http_header("X-Boolean1");
  210    210   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_FALSE_BOOL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  211    211   
    ::aws_smithy_schema::ShapeId::from_static(
  212    212   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerFalseBool",
  213    213   
        "aws.protocoltests.restxml.synthetic",
  214    214   
        "InputAndOutputWithHeadersInput",
  215    215   
    ),
  216    216   
    ::aws_smithy_schema::ShapeType::Boolean,
  217         -
    "header_false_bool",
         217  +
    "headerFalseBool",
  218    218   
    8,
  219    219   
)
  220    220   
.with_http_header("X-Boolean2");
  221    221   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_STRING_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  222    222   
    ::aws_smithy_schema::ShapeId::from_static(
  223    223   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerStringList",
  224    224   
        "aws.protocoltests.restxml.synthetic",
  225    225   
        "InputAndOutputWithHeadersInput",
  226    226   
    ),
  227    227   
    ::aws_smithy_schema::ShapeType::List,
  228         -
    "header_string_list",
         228  +
    "headerStringList",
  229    229   
    9,
  230    230   
)
  231    231   
.with_http_header("X-StringList");
  232    232   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_STRING_SET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  233    233   
    ::aws_smithy_schema::ShapeId::from_static(
  234    234   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerStringSet",
  235    235   
        "aws.protocoltests.restxml.synthetic",
  236    236   
        "InputAndOutputWithHeadersInput",
  237    237   
    ),
  238    238   
    ::aws_smithy_schema::ShapeType::List,
  239         -
    "header_string_set",
         239  +
    "headerStringSet",
  240    240   
    10,
  241    241   
)
  242    242   
.with_http_header("X-StringSet");
  243    243   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_INTEGER_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  244    244   
    ::aws_smithy_schema::ShapeId::from_static(
  245    245   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerIntegerList",
  246    246   
        "aws.protocoltests.restxml.synthetic",
  247    247   
        "InputAndOutputWithHeadersInput",
  248    248   
    ),
  249    249   
    ::aws_smithy_schema::ShapeType::List,
  250         -
    "header_integer_list",
         250  +
    "headerIntegerList",
  251    251   
    11,
  252    252   
)
  253    253   
.with_http_header("X-IntegerList");
  254    254   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_BOOLEAN_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  255    255   
    ::aws_smithy_schema::ShapeId::from_static(
  256    256   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerBooleanList",
  257    257   
        "aws.protocoltests.restxml.synthetic",
  258    258   
        "InputAndOutputWithHeadersInput",
  259    259   
    ),
  260    260   
    ::aws_smithy_schema::ShapeType::List,
  261         -
    "header_boolean_list",
         261  +
    "headerBooleanList",
  262    262   
    12,
  263    263   
)
  264    264   
.with_http_header("X-BooleanList");
  265    265   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_TIMESTAMP_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  266    266   
    ::aws_smithy_schema::ShapeId::from_static(
  267    267   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerTimestampList",
  268    268   
        "aws.protocoltests.restxml.synthetic",
  269    269   
        "InputAndOutputWithHeadersInput",
  270    270   
    ),
  271    271   
    ::aws_smithy_schema::ShapeType::List,
  272         -
    "header_timestamp_list",
         272  +
    "headerTimestampList",
  273    273   
    13,
  274    274   
)
  275    275   
.with_http_header("X-TimestampList");
  276    276   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_ENUM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  277    277   
    ::aws_smithy_schema::ShapeId::from_static(
  278    278   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerEnum",
  279    279   
        "aws.protocoltests.restxml.synthetic",
  280    280   
        "InputAndOutputWithHeadersInput",
  281    281   
    ),
  282    282   
    ::aws_smithy_schema::ShapeType::String,
  283         -
    "header_enum",
         283  +
    "headerEnum",
  284    284   
    14,
  285    285   
)
  286    286   
.with_http_header("X-Enum");
  287    287   
static INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_ENUM_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  288    288   
    ::aws_smithy_schema::ShapeId::from_static(
  289    289   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersInput$headerEnumList",
  290    290   
        "aws.protocoltests.restxml.synthetic",
  291    291   
        "InputAndOutputWithHeadersInput",
  292    292   
    ),
  293    293   
    ::aws_smithy_schema::ShapeType::List,
  294         -
    "header_enum_list",
         294  +
    "headerEnumList",
  295    295   
    15,
  296    296   
)
  297    297   
.with_http_header("X-EnumList");
  298    298   
static INPUTANDOUTPUTWITHHEADERSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  299    299   
    INPUTANDOUTPUTWITHHEADERSINPUT_SCHEMA_ID,
  300    300   
    ::aws_smithy_schema::ShapeType::Structure,
  301    301   
    &[
  302    302   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_STRING,
  303    303   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_BYTE,
  304    304   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_SHORT,
  305    305   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_INTEGER,
  306    306   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_LONG,
  307    307   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_FLOAT,
  308    308   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_DOUBLE,
  309    309   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_TRUE_BOOL,
  310    310   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_FALSE_BOOL,
  311    311   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_STRING_LIST,
  312    312   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_STRING_SET,
  313    313   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_INTEGER_LIST,
  314    314   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_BOOLEAN_LIST,
  315    315   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_TIMESTAMP_LIST,
  316    316   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_ENUM,
  317    317   
        &INPUTANDOUTPUTWITHHEADERSINPUT_MEMBER_HEADER_ENUM_LIST,
  318    318   
    ],
  319         -
);
         319  +
)
         320  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/InputAndOutputWithHeaders", None));
  320    321   
impl InputAndOutputWithHeadersInput {
  321    322   
    /// The schema for this shape.
  322    323   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INPUTANDOUTPUTWITHHEADERSINPUT_SCHEMA;
  323    324   
}
  324    325   
impl ::aws_smithy_schema::serde::SerializableStruct for InputAndOutputWithHeadersInput {
  325    326   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  326    327   
    fn serialize_members(
  327    328   
        &self,
  328    329   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  329    330   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
@@ -401,402 +591,715 @@
  421    422   
                    }
  422    423   
                    Ok(())
  423    424   
                },
  424    425   
            )?;
  425    426   
        }
  426    427   
        Ok(())
  427    428   
    }
  428    429   
}
  429    430   
impl InputAndOutputWithHeadersInput {
  430    431   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  431         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  432         -
        deserializer: &mut D,
         432  +
    pub fn deserialize(
         433  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  433    434   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  434    435   
        #[allow(unused_variables, unused_mut)]
  435    436   
        let mut builder = Self::builder();
  436    437   
        #[allow(
  437    438   
            unused_variables,
  438    439   
            unreachable_code,
  439    440   
            clippy::single_match,
  440    441   
            clippy::match_single_binding,
  441    442   
            clippy::diverging_sub_expression
  442    443   
        )]
  443         -
        deserializer.read_struct(&INPUTANDOUTPUTWITHHEADERSINPUT_SCHEMA, (), |_, member, deser| {
         444  +
        deserializer.read_struct(&INPUTANDOUTPUTWITHHEADERSINPUT_SCHEMA, &mut |member, deser| {
  444    445   
            match member.member_index() {
  445    446   
                Some(0) => {
  446    447   
                    builder.header_string = Some(deser.read_string(member)?);
  447    448   
                }
  448    449   
                Some(1) => {
  449    450   
                    builder.header_byte = Some(deser.read_byte(member)?);
  450    451   
                }
  451    452   
                Some(2) => {
  452    453   
                    builder.header_short = Some(deser.read_short(member)?);
  453    454   
                }
  454    455   
                Some(3) => {
  455    456   
                    builder.header_integer = Some(deser.read_integer(member)?);
  456    457   
                }
  457    458   
                Some(4) => {
  458    459   
                    builder.header_long = Some(deser.read_long(member)?);
  459    460   
                }
  460    461   
                Some(5) => {
  461    462   
                    builder.header_float = Some(deser.read_float(member)?);
  462    463   
                }
  463    464   
                Some(6) => {
  464    465   
                    builder.header_double = Some(deser.read_double(member)?);
  465    466   
                }
  466    467   
                Some(7) => {
  467    468   
                    builder.header_true_bool = Some(deser.read_boolean(member)?);
  468    469   
                }
  469    470   
                Some(8) => {
  470    471   
                    builder.header_false_bool = Some(deser.read_boolean(member)?);
  471    472   
                }
  472    473   
                Some(9) => {
  473         -
                    builder.header_string_list = Some({
  474         -
                        let container = if let Some(cap) = deser.container_size() {
  475         -
                            Vec::with_capacity(cap)
  476         -
                        } else {
  477         -
                            Vec::new()
  478         -
                        };
  479         -
                        deser.read_list(member, container, |mut list, deser| {
  480         -
                            list.push(deser.read_string(member)?);
  481         -
                            Ok(list)
  482         -
                        })?
  483         -
                    });
         474  +
                    builder.header_string_list = Some(deser.read_string_list(member)?);
  484    475   
                }
  485    476   
                Some(10) => {
  486         -
                    builder.header_string_set = Some({
  487         -
                        let container = if let Some(cap) = deser.container_size() {
  488         -
                            Vec::with_capacity(cap)
  489         -
                        } else {
  490         -
                            Vec::new()
  491         -
                        };
  492         -
                        deser.read_list(member, container, |mut list, deser| {
  493         -
                            list.push(deser.read_string(member)?);
  494         -
                            Ok(list)
  495         -
                        })?
  496         -
                    });
         477  +
                    builder.header_string_set = Some(deser.read_string_list(member)?);
  497    478   
                }
  498    479   
                Some(11) => {
  499         -
                    builder.header_integer_list = Some({
  500         -
                        let container = if let Some(cap) = deser.container_size() {
  501         -
                            Vec::with_capacity(cap)
  502         -
                        } else {
  503         -
                            Vec::new()
  504         -
                        };
  505         -
                        deser.read_list(member, container, |mut list, deser| {
  506         -
                            list.push(deser.read_integer(member)?);
  507         -
                            Ok(list)
  508         -
                        })?
  509         -
                    });
         480  +
                    builder.header_integer_list = Some(deser.read_integer_list(member)?);
  510    481   
                }
  511    482   
                Some(12) => {
  512    483   
                    builder.header_boolean_list = Some({
  513         -
                        let container = if let Some(cap) = deser.container_size() {
  514         -
                            Vec::with_capacity(cap)
  515         -
                        } else {
  516         -
                            Vec::new()
  517         -
                        };
  518         -
                        deser.read_list(member, container, |mut list, deser| {
  519         -
                            list.push(deser.read_boolean(member)?);
  520         -
                            Ok(list)
  521         -
                        })?
         484  +
                        let mut container = Vec::new();
         485  +
                        deser.read_list(member, &mut |deser| {
         486  +
                            container.push(deser.read_boolean(member)?);
         487  +
                            Ok(())
         488  +
                        })?;
         489  +
                        container
  522    490   
                    });
  523    491   
                }
  524    492   
                Some(13) => {
  525    493   
                    builder.header_timestamp_list = Some({
  526         -
                        let container = if let Some(cap) = deser.container_size() {
  527         -
                            Vec::with_capacity(cap)
  528         -
                        } else {
  529         -
                            Vec::new()
  530         -
                        };
  531         -
                        deser.read_list(member, container, |mut list, deser| {
  532         -
                            list.push(deser.read_timestamp(member)?);
  533         -
                            Ok(list)
  534         -
                        })?
         494  +
                        let mut container = Vec::new();
         495  +
                        deser.read_list(member, &mut |deser| {
         496  +
                            container.push(deser.read_timestamp(member)?);
         497  +
                            Ok(())
         498  +
                        })?;
         499  +
                        container
  535    500   
                    });
  536    501   
                }
  537    502   
                Some(14) => {
  538    503   
                    builder.header_enum = Some(crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
  539    504   
                }
  540    505   
                Some(15) => {
  541    506   
                    builder.header_enum_list = Some({
  542         -
                        let container = if let Some(cap) = deser.container_size() {
  543         -
                            Vec::with_capacity(cap)
  544         -
                        } else {
  545         -
                            Vec::new()
  546         -
                        };
  547         -
                        deser.read_list(member, container, |mut list, deser| {
  548         -
                            list.push(crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
  549         -
                            Ok(list)
  550         -
                        })?
         507  +
                        let mut container = Vec::new();
         508  +
                        deser.read_list(member, &mut |deser| {
         509  +
                            container.push(crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
         510  +
                            Ok(())
         511  +
                        })?;
         512  +
                        container
  551    513   
                    });
  552    514   
                }
  553    515   
                _ => {}
  554    516   
            }
  555    517   
            Ok(())
  556    518   
        })?;
  557    519   
        builder
  558    520   
            .build()
  559    521   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  560    522   
    }
  561    523   
}
         524  +
impl InputAndOutputWithHeadersInput {
         525  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         526  +
    /// Header-bound members are read directly from headers, avoiding runtime
         527  +
    /// member iteration overhead. Body members are read via the deserializer.
         528  +
    pub fn deserialize_with_response(
         529  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         530  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         531  +
        _status: u16,
         532  +
        _body: &[u8],
         533  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         534  +
        #[allow(unused_variables, unused_mut)]
         535  +
        let mut builder = Self::builder();
         536  +
        if let Some(val) = headers.get("X-String") {
         537  +
            builder.header_string = Some(val.to_string());
         538  +
        }
         539  +
        if let Some(val) = headers.get("X-Byte") {
         540  +
            builder.header_byte = val.parse::<i8>().ok();
         541  +
        }
         542  +
        if let Some(val) = headers.get("X-Short") {
         543  +
            builder.header_short = val.parse::<i16>().ok();
         544  +
        }
         545  +
        if let Some(val) = headers.get("X-Integer") {
         546  +
            builder.header_integer = val.parse::<i32>().ok();
         547  +
        }
         548  +
        if let Some(val) = headers.get("X-Long") {
         549  +
            builder.header_long = val.parse::<i64>().ok();
         550  +
        }
         551  +
        if let Some(val) = headers.get("X-Float") {
         552  +
            builder.header_float = val.parse::<f32>().ok();
         553  +
        }
         554  +
        if let Some(val) = headers.get("X-Double") {
         555  +
            builder.header_double = val.parse::<f64>().ok();
         556  +
        }
         557  +
        if let Some(val) = headers.get("X-Boolean1") {
         558  +
            builder.header_true_bool = val.parse::<bool>().ok();
         559  +
        }
         560  +
        if let Some(val) = headers.get("X-Boolean2") {
         561  +
            builder.header_false_bool = val.parse::<bool>().ok();
         562  +
        }
         563  +
        if let Some(val) = headers.get("X-StringList") {
         564  +
            builder.header_string_list = {
         565  +
                let mut items = Vec::new();
         566  +
                let mut chars = val.chars().peekable();
         567  +
                while chars.peek().is_some() {
         568  +
                    // Skip whitespace
         569  +
                    while chars.peek() == Some(&' ') {
         570  +
                        chars.next();
         571  +
                    }
         572  +
                    if chars.peek() == Some(&'"') {
         573  +
                        chars.next(); // skip opening quote
         574  +
                        let mut s = String::new();
         575  +
                        while let Some(&c) = chars.peek() {
         576  +
                            if c == '\\' {
         577  +
                                chars.next();
         578  +
                                if let Some(escaped) = chars.next() {
         579  +
                                    s.push(escaped);
         580  +
                                }
         581  +
                            } else if c == '"' {
         582  +
                                chars.next();
         583  +
                                break;
         584  +
                            } else {
         585  +
                                s.push(c);
         586  +
                                chars.next();
         587  +
                            }
         588  +
                        }
         589  +
                        items.push(s);
         590  +
                    } else {
         591  +
                        let s: String = chars.by_ref().take_while(|&c| c != ',').collect();
         592  +
                        let trimmed = s.trim();
         593  +
                        if !trimmed.is_empty() {
         594  +
                            items.push(trimmed.to_string());
         595  +
                        }
         596  +
                    }
         597  +
                    // Skip comma separator
         598  +
                    while chars.peek() == Some(&',') || chars.peek() == Some(&' ') {
         599  +
                        chars.next();
         600  +
                    }
         601  +
                }
         602  +
                Some(items)
         603  +
            };
         604  +
        }
         605  +
        if let Some(val) = headers.get("X-StringSet") {
         606  +
            builder.header_string_set = {
         607  +
                let mut items = Vec::new();
         608  +
                let mut chars = val.chars().peekable();
         609  +
                while chars.peek().is_some() {
         610  +
                    // Skip whitespace
         611  +
                    while chars.peek() == Some(&' ') {
         612  +
                        chars.next();
         613  +
                    }
         614  +
                    if chars.peek() == Some(&'"') {
         615  +
                        chars.next(); // skip opening quote
         616  +
                        let mut s = String::new();
         617  +
                        while let Some(&c) = chars.peek() {
         618  +
                            if c == '\\' {
         619  +
                                chars.next();
         620  +
                                if let Some(escaped) = chars.next() {
         621  +
                                    s.push(escaped);
         622  +
                                }
         623  +
                            } else if c == '"' {
         624  +
                                chars.next();
         625  +
                                break;
         626  +
                            } else {
         627  +
                                s.push(c);
         628  +
                                chars.next();
         629  +
                            }
         630  +
                        }
         631  +
                        items.push(s);
         632  +
                    } else {
         633  +
                        let s: String = chars.by_ref().take_while(|&c| c != ',').collect();
         634  +
                        let trimmed = s.trim();
         635  +
                        if !trimmed.is_empty() {
         636  +
                            items.push(trimmed.to_string());
         637  +
                        }
         638  +
                    }
         639  +
                    // Skip comma separator
         640  +
                    while chars.peek() == Some(&',') || chars.peek() == Some(&' ') {
         641  +
                        chars.next();
         642  +
                    }
         643  +
                }
         644  +
                Some(items)
         645  +
            };
         646  +
        }
         647  +
        if let Some(val) = headers.get("X-IntegerList") {
         648  +
            builder.header_integer_list = Some(val.split(',').filter_map(|s| s.trim().parse::<i32>().ok()).collect());
         649  +
        }
         650  +
        if let Some(val) = headers.get("X-BooleanList") {
         651  +
            builder.header_boolean_list = Some(val.split(',').filter_map(|s| s.trim().parse::<bool>().ok()).collect());
         652  +
        }
         653  +
        if let Some(val) = headers.get("X-TimestampList") {
         654  +
            builder.header_timestamp_list = {
         655  +
                let mut timestamps = Vec::new();
         656  +
                let re_split: Vec<&str> = val.split(", ").collect();
         657  +
                let mut i = 0;
         658  +
                while i < re_split.len() {
         659  +
                    if i + 1 < re_split.len() {
         660  +
                        let combined = format!("{}, {}", re_split[i], re_split[i + 1]);
         661  +
                        if let Ok(ts) = ::aws_smithy_types::DateTime::from_str(&combined, ::aws_smithy_types::date_time::Format::HttpDate) {
         662  +
                            timestamps.push(ts);
         663  +
                            i += 2;
         664  +
                            continue;
         665  +
                        }
         666  +
                    }
         667  +
                    if let Ok(ts) = ::aws_smithy_types::DateTime::from_str(re_split[i].trim(), ::aws_smithy_types::date_time::Format::HttpDate) {
         668  +
                        timestamps.push(ts);
         669  +
                    }
         670  +
                    i += 1;
         671  +
                }
         672  +
                Some(timestamps)
         673  +
            };
         674  +
        }
         675  +
        if let Some(val) = headers.get("X-Enum") {
         676  +
            builder.header_enum = Some(crate::types::FooEnum::from(val));
         677  +
        }
         678  +
        if let Some(val) = headers.get("X-EnumList") {
         679  +
            builder.header_enum_list = Some(val.split(',').map(|s| crate::types::FooEnum::from(s.trim())).collect());
         680  +
        }
         681  +
        builder
         682  +
            .build()
         683  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         684  +
    }
         685  +
}
  562    686   
impl InputAndOutputWithHeadersInput {
  563    687   
    /// Creates a new builder-style object to manufacture [`InputAndOutputWithHeadersInput`](crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersInput).
  564    688   
    pub fn builder() -> crate::operation::input_and_output_with_headers::builders::InputAndOutputWithHeadersInputBuilder {
  565    689   
        crate::operation::input_and_output_with_headers::builders::InputAndOutputWithHeadersInputBuilder::default()
  566    690   
    }
  567    691   
}
  568    692   
  569    693   
/// A builder for [`InputAndOutputWithHeadersInput`](crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersInput).
  570    694   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  571    695   
#[non_exhaustive]

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

@@ -99,99 +324,324 @@
  119    119   
    "aws.protocoltests.restxml.synthetic",
  120    120   
    "InputAndOutputWithHeadersOutput",
  121    121   
);
  122    122   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_STRING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  123    123   
    ::aws_smithy_schema::ShapeId::from_static(
  124    124   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerString",
  125    125   
        "aws.protocoltests.restxml.synthetic",
  126    126   
        "InputAndOutputWithHeadersOutput",
  127    127   
    ),
  128    128   
    ::aws_smithy_schema::ShapeType::String,
  129         -
    "header_string",
         129  +
    "headerString",
  130    130   
    0,
  131    131   
)
  132    132   
.with_http_header("X-String");
  133    133   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_BYTE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  134    134   
    ::aws_smithy_schema::ShapeId::from_static(
  135    135   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerByte",
  136    136   
        "aws.protocoltests.restxml.synthetic",
  137    137   
        "InputAndOutputWithHeadersOutput",
  138    138   
    ),
  139    139   
    ::aws_smithy_schema::ShapeType::Byte,
  140         -
    "header_byte",
         140  +
    "headerByte",
  141    141   
    1,
  142    142   
)
  143    143   
.with_http_header("X-Byte");
  144    144   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_SHORT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  145    145   
    ::aws_smithy_schema::ShapeId::from_static(
  146    146   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerShort",
  147    147   
        "aws.protocoltests.restxml.synthetic",
  148    148   
        "InputAndOutputWithHeadersOutput",
  149    149   
    ),
  150    150   
    ::aws_smithy_schema::ShapeType::Short,
  151         -
    "header_short",
         151  +
    "headerShort",
  152    152   
    2,
  153    153   
)
  154    154   
.with_http_header("X-Short");
  155    155   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_INTEGER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  156    156   
    ::aws_smithy_schema::ShapeId::from_static(
  157    157   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerInteger",
  158    158   
        "aws.protocoltests.restxml.synthetic",
  159    159   
        "InputAndOutputWithHeadersOutput",
  160    160   
    ),
  161    161   
    ::aws_smithy_schema::ShapeType::Integer,
  162         -
    "header_integer",
         162  +
    "headerInteger",
  163    163   
    3,
  164    164   
)
  165    165   
.with_http_header("X-Integer");
  166    166   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_LONG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  167    167   
    ::aws_smithy_schema::ShapeId::from_static(
  168    168   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerLong",
  169    169   
        "aws.protocoltests.restxml.synthetic",
  170    170   
        "InputAndOutputWithHeadersOutput",
  171    171   
    ),
  172    172   
    ::aws_smithy_schema::ShapeType::Long,
  173         -
    "header_long",
         173  +
    "headerLong",
  174    174   
    4,
  175    175   
)
  176    176   
.with_http_header("X-Long");
  177    177   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_FLOAT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  178    178   
    ::aws_smithy_schema::ShapeId::from_static(
  179    179   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerFloat",
  180    180   
        "aws.protocoltests.restxml.synthetic",
  181    181   
        "InputAndOutputWithHeadersOutput",
  182    182   
    ),
  183    183   
    ::aws_smithy_schema::ShapeType::Float,
  184         -
    "header_float",
         184  +
    "headerFloat",
  185    185   
    5,
  186    186   
)
  187    187   
.with_http_header("X-Float");
  188    188   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_DOUBLE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  189    189   
    ::aws_smithy_schema::ShapeId::from_static(
  190    190   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerDouble",
  191    191   
        "aws.protocoltests.restxml.synthetic",
  192    192   
        "InputAndOutputWithHeadersOutput",
  193    193   
    ),
  194    194   
    ::aws_smithy_schema::ShapeType::Double,
  195         -
    "header_double",
         195  +
    "headerDouble",
  196    196   
    6,
  197    197   
)
  198    198   
.with_http_header("X-Double");
  199    199   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_TRUE_BOOL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  200    200   
    ::aws_smithy_schema::ShapeId::from_static(
  201    201   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerTrueBool",
  202    202   
        "aws.protocoltests.restxml.synthetic",
  203    203   
        "InputAndOutputWithHeadersOutput",
  204    204   
    ),
  205    205   
    ::aws_smithy_schema::ShapeType::Boolean,
  206         -
    "header_true_bool",
         206  +
    "headerTrueBool",
  207    207   
    7,
  208    208   
)
  209    209   
.with_http_header("X-Boolean1");
  210    210   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_FALSE_BOOL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  211    211   
    ::aws_smithy_schema::ShapeId::from_static(
  212    212   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerFalseBool",
  213    213   
        "aws.protocoltests.restxml.synthetic",
  214    214   
        "InputAndOutputWithHeadersOutput",
  215    215   
    ),
  216    216   
    ::aws_smithy_schema::ShapeType::Boolean,
  217         -
    "header_false_bool",
         217  +
    "headerFalseBool",
  218    218   
    8,
  219    219   
)
  220    220   
.with_http_header("X-Boolean2");
  221    221   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_STRING_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  222    222   
    ::aws_smithy_schema::ShapeId::from_static(
  223    223   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerStringList",
  224    224   
        "aws.protocoltests.restxml.synthetic",
  225    225   
        "InputAndOutputWithHeadersOutput",
  226    226   
    ),
  227    227   
    ::aws_smithy_schema::ShapeType::List,
  228         -
    "header_string_list",
         228  +
    "headerStringList",
  229    229   
    9,
  230    230   
)
  231    231   
.with_http_header("X-StringList");
  232    232   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_STRING_SET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  233    233   
    ::aws_smithy_schema::ShapeId::from_static(
  234    234   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerStringSet",
  235    235   
        "aws.protocoltests.restxml.synthetic",
  236    236   
        "InputAndOutputWithHeadersOutput",
  237    237   
    ),
  238    238   
    ::aws_smithy_schema::ShapeType::List,
  239         -
    "header_string_set",
         239  +
    "headerStringSet",
  240    240   
    10,
  241    241   
)
  242    242   
.with_http_header("X-StringSet");
  243    243   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_INTEGER_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  244    244   
    ::aws_smithy_schema::ShapeId::from_static(
  245    245   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerIntegerList",
  246    246   
        "aws.protocoltests.restxml.synthetic",
  247    247   
        "InputAndOutputWithHeadersOutput",
  248    248   
    ),
  249    249   
    ::aws_smithy_schema::ShapeType::List,
  250         -
    "header_integer_list",
         250  +
    "headerIntegerList",
  251    251   
    11,
  252    252   
)
  253    253   
.with_http_header("X-IntegerList");
  254    254   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_BOOLEAN_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  255    255   
    ::aws_smithy_schema::ShapeId::from_static(
  256    256   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerBooleanList",
  257    257   
        "aws.protocoltests.restxml.synthetic",
  258    258   
        "InputAndOutputWithHeadersOutput",
  259    259   
    ),
  260    260   
    ::aws_smithy_schema::ShapeType::List,
  261         -
    "header_boolean_list",
         261  +
    "headerBooleanList",
  262    262   
    12,
  263    263   
)
  264    264   
.with_http_header("X-BooleanList");
  265    265   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_TIMESTAMP_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  266    266   
    ::aws_smithy_schema::ShapeId::from_static(
  267    267   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerTimestampList",
  268    268   
        "aws.protocoltests.restxml.synthetic",
  269    269   
        "InputAndOutputWithHeadersOutput",
  270    270   
    ),
  271    271   
    ::aws_smithy_schema::ShapeType::List,
  272         -
    "header_timestamp_list",
         272  +
    "headerTimestampList",
  273    273   
    13,
  274    274   
)
  275    275   
.with_http_header("X-TimestampList");
  276    276   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_ENUM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  277    277   
    ::aws_smithy_schema::ShapeId::from_static(
  278    278   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerEnum",
  279    279   
        "aws.protocoltests.restxml.synthetic",
  280    280   
        "InputAndOutputWithHeadersOutput",
  281    281   
    ),
  282    282   
    ::aws_smithy_schema::ShapeType::String,
  283         -
    "header_enum",
         283  +
    "headerEnum",
  284    284   
    14,
  285    285   
)
  286    286   
.with_http_header("X-Enum");
  287    287   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_ENUM_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  288    288   
    ::aws_smithy_schema::ShapeId::from_static(
  289    289   
        "aws.protocoltests.restxml.synthetic#InputAndOutputWithHeadersOutput$headerEnumList",
  290    290   
        "aws.protocoltests.restxml.synthetic",
  291    291   
        "InputAndOutputWithHeadersOutput",
  292    292   
    ),
  293    293   
    ::aws_smithy_schema::ShapeType::List,
  294         -
    "header_enum_list",
         294  +
    "headerEnumList",
  295    295   
    15,
  296    296   
)
  297    297   
.with_http_header("X-EnumList");
  298    298   
static INPUTANDOUTPUTWITHHEADERSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  299    299   
    INPUTANDOUTPUTWITHHEADERSOUTPUT_SCHEMA_ID,
  300    300   
    ::aws_smithy_schema::ShapeType::Structure,
  301    301   
    &[
  302    302   
        &INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_STRING,
  303    303   
        &INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_BYTE,
  304    304   
        &INPUTANDOUTPUTWITHHEADERSOUTPUT_MEMBER_HEADER_SHORT,
@@ -401,401 +589,710 @@
  421    421   
                    }
  422    422   
                    Ok(())
  423    423   
                },
  424    424   
            )?;
  425    425   
        }
  426    426   
        Ok(())
  427    427   
    }
  428    428   
}
  429    429   
impl InputAndOutputWithHeadersOutput {
  430    430   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  431         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  432         -
        deserializer: &mut D,
         431  +
    pub fn deserialize(
         432  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  433    433   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  434    434   
        #[allow(unused_variables, unused_mut)]
  435    435   
        let mut builder = Self::builder();
  436    436   
        #[allow(
  437    437   
            unused_variables,
  438    438   
            unreachable_code,
  439    439   
            clippy::single_match,
  440    440   
            clippy::match_single_binding,
  441    441   
            clippy::diverging_sub_expression
  442    442   
        )]
  443         -
        deserializer.read_struct(&INPUTANDOUTPUTWITHHEADERSOUTPUT_SCHEMA, (), |_, member, deser| {
         443  +
        deserializer.read_struct(&INPUTANDOUTPUTWITHHEADERSOUTPUT_SCHEMA, &mut |member, deser| {
  444    444   
            match member.member_index() {
  445    445   
                Some(0) => {
  446    446   
                    builder.header_string = Some(deser.read_string(member)?);
  447    447   
                }
  448    448   
                Some(1) => {
  449    449   
                    builder.header_byte = Some(deser.read_byte(member)?);
  450    450   
                }
  451    451   
                Some(2) => {
  452    452   
                    builder.header_short = Some(deser.read_short(member)?);
  453    453   
                }
  454    454   
                Some(3) => {
  455    455   
                    builder.header_integer = Some(deser.read_integer(member)?);
  456    456   
                }
  457    457   
                Some(4) => {
  458    458   
                    builder.header_long = Some(deser.read_long(member)?);
  459    459   
                }
  460    460   
                Some(5) => {
  461    461   
                    builder.header_float = Some(deser.read_float(member)?);
  462    462   
                }
  463    463   
                Some(6) => {
  464    464   
                    builder.header_double = Some(deser.read_double(member)?);
  465    465   
                }
  466    466   
                Some(7) => {
  467    467   
                    builder.header_true_bool = Some(deser.read_boolean(member)?);
  468    468   
                }
  469    469   
                Some(8) => {
  470    470   
                    builder.header_false_bool = Some(deser.read_boolean(member)?);
  471    471   
                }
  472    472   
                Some(9) => {
  473         -
                    builder.header_string_list = Some({
  474         -
                        let container = if let Some(cap) = deser.container_size() {
  475         -
                            Vec::with_capacity(cap)
  476         -
                        } else {
  477         -
                            Vec::new()
  478         -
                        };
  479         -
                        deser.read_list(member, container, |mut list, deser| {
  480         -
                            list.push(deser.read_string(member)?);
  481         -
                            Ok(list)
  482         -
                        })?
  483         -
                    });
         473  +
                    builder.header_string_list = Some(deser.read_string_list(member)?);
  484    474   
                }
  485    475   
                Some(10) => {
  486         -
                    builder.header_string_set = Some({
  487         -
                        let container = if let Some(cap) = deser.container_size() {
  488         -
                            Vec::with_capacity(cap)
  489         -
                        } else {
  490         -
                            Vec::new()
  491         -
                        };
  492         -
                        deser.read_list(member, container, |mut list, deser| {
  493         -
                            list.push(deser.read_string(member)?);
  494         -
                            Ok(list)
  495         -
                        })?
  496         -
                    });
         476  +
                    builder.header_string_set = Some(deser.read_string_list(member)?);
  497    477   
                }
  498    478   
                Some(11) => {
  499         -
                    builder.header_integer_list = Some({
  500         -
                        let container = if let Some(cap) = deser.container_size() {
  501         -
                            Vec::with_capacity(cap)
  502         -
                        } else {
  503         -
                            Vec::new()
  504         -
                        };
  505         -
                        deser.read_list(member, container, |mut list, deser| {
  506         -
                            list.push(deser.read_integer(member)?);
  507         -
                            Ok(list)
  508         -
                        })?
  509         -
                    });
         479  +
                    builder.header_integer_list = Some(deser.read_integer_list(member)?);
  510    480   
                }
  511    481   
                Some(12) => {
  512    482   
                    builder.header_boolean_list = Some({
  513         -
                        let container = if let Some(cap) = deser.container_size() {
  514         -
                            Vec::with_capacity(cap)
  515         -
                        } else {
  516         -
                            Vec::new()
  517         -
                        };
  518         -
                        deser.read_list(member, container, |mut list, deser| {
  519         -
                            list.push(deser.read_boolean(member)?);
  520         -
                            Ok(list)
  521         -
                        })?
         483  +
                        let mut container = Vec::new();
         484  +
                        deser.read_list(member, &mut |deser| {
         485  +
                            container.push(deser.read_boolean(member)?);
         486  +
                            Ok(())
         487  +
                        })?;
         488  +
                        container
  522    489   
                    });
  523    490   
                }
  524    491   
                Some(13) => {
  525    492   
                    builder.header_timestamp_list = Some({
  526         -
                        let container = if let Some(cap) = deser.container_size() {
  527         -
                            Vec::with_capacity(cap)
  528         -
                        } else {
  529         -
                            Vec::new()
  530         -
                        };
  531         -
                        deser.read_list(member, container, |mut list, deser| {
  532         -
                            list.push(deser.read_timestamp(member)?);
  533         -
                            Ok(list)
  534         -
                        })?
         493  +
                        let mut container = Vec::new();
         494  +
                        deser.read_list(member, &mut |deser| {
         495  +
                            container.push(deser.read_timestamp(member)?);
         496  +
                            Ok(())
         497  +
                        })?;
         498  +
                        container
  535    499   
                    });
  536    500   
                }
  537    501   
                Some(14) => {
  538    502   
                    builder.header_enum = Some(crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
  539    503   
                }
  540    504   
                Some(15) => {
  541    505   
                    builder.header_enum_list = Some({
  542         -
                        let container = if let Some(cap) = deser.container_size() {
  543         -
                            Vec::with_capacity(cap)
  544         -
                        } else {
  545         -
                            Vec::new()
  546         -
                        };
  547         -
                        deser.read_list(member, container, |mut list, deser| {
  548         -
                            list.push(crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
  549         -
                            Ok(list)
  550         -
                        })?
         506  +
                        let mut container = Vec::new();
         507  +
                        deser.read_list(member, &mut |deser| {
         508  +
                            container.push(crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
         509  +
                            Ok(())
         510  +
                        })?;
         511  +
                        container
  551    512   
                    });
  552    513   
                }
  553    514   
                _ => {}
  554    515   
            }
  555    516   
            Ok(())
  556    517   
        })?;
  557    518   
        Ok(builder.build())
  558    519   
    }
  559    520   
}
         521  +
impl InputAndOutputWithHeadersOutput {
         522  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         523  +
    /// Header-bound members are read directly from headers, avoiding runtime
         524  +
    /// member iteration overhead. Body members are read via the deserializer.
         525  +
    pub fn deserialize_with_response(
         526  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         527  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         528  +
        _status: u16,
         529  +
        _body: &[u8],
         530  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         531  +
        #[allow(unused_variables, unused_mut)]
         532  +
        let mut builder = Self::builder();
         533  +
        if let Some(val) = headers.get("X-String") {
         534  +
            builder.header_string = Some(val.to_string());
         535  +
        }
         536  +
        if let Some(val) = headers.get("X-Byte") {
         537  +
            builder.header_byte = val.parse::<i8>().ok();
         538  +
        }
         539  +
        if let Some(val) = headers.get("X-Short") {
         540  +
            builder.header_short = val.parse::<i16>().ok();
         541  +
        }
         542  +
        if let Some(val) = headers.get("X-Integer") {
         543  +
            builder.header_integer = val.parse::<i32>().ok();
         544  +
        }
         545  +
        if let Some(val) = headers.get("X-Long") {
         546  +
            builder.header_long = val.parse::<i64>().ok();
         547  +
        }
         548  +
        if let Some(val) = headers.get("X-Float") {
         549  +
            builder.header_float = val.parse::<f32>().ok();
         550  +
        }
         551  +
        if let Some(val) = headers.get("X-Double") {
         552  +
            builder.header_double = val.parse::<f64>().ok();
         553  +
        }
         554  +
        if let Some(val) = headers.get("X-Boolean1") {
         555  +
            builder.header_true_bool = val.parse::<bool>().ok();
         556  +
        }
         557  +
        if let Some(val) = headers.get("X-Boolean2") {
         558  +
            builder.header_false_bool = val.parse::<bool>().ok();
         559  +
        }
         560  +
        if let Some(val) = headers.get("X-StringList") {
         561  +
            builder.header_string_list = {
         562  +
                let mut items = Vec::new();
         563  +
                let mut chars = val.chars().peekable();
         564  +
                while chars.peek().is_some() {
         565  +
                    // Skip whitespace
         566  +
                    while chars.peek() == Some(&' ') {
         567  +
                        chars.next();
         568  +
                    }
         569  +
                    if chars.peek() == Some(&'"') {
         570  +
                        chars.next(); // skip opening quote
         571  +
                        let mut s = String::new();
         572  +
                        while let Some(&c) = chars.peek() {
         573  +
                            if c == '\\' {
         574  +
                                chars.next();
         575  +
                                if let Some(escaped) = chars.next() {
         576  +
                                    s.push(escaped);
         577  +
                                }
         578  +
                            } else if c == '"' {
         579  +
                                chars.next();
         580  +
                                break;
         581  +
                            } else {
         582  +
                                s.push(c);
         583  +
                                chars.next();
         584  +
                            }
         585  +
                        }
         586  +
                        items.push(s);
         587  +
                    } else {
         588  +
                        let s: String = chars.by_ref().take_while(|&c| c != ',').collect();
         589  +
                        let trimmed = s.trim();
         590  +
                        if !trimmed.is_empty() {
         591  +
                            items.push(trimmed.to_string());
         592  +
                        }
         593  +
                    }
         594  +
                    // Skip comma separator
         595  +
                    while chars.peek() == Some(&',') || chars.peek() == Some(&' ') {
         596  +
                        chars.next();
         597  +
                    }
         598  +
                }
         599  +
                Some(items)
         600  +
            };
         601  +
        }
         602  +
        if let Some(val) = headers.get("X-StringSet") {
         603  +
            builder.header_string_set = {
         604  +
                let mut items = Vec::new();
         605  +
                let mut chars = val.chars().peekable();
         606  +
                while chars.peek().is_some() {
         607  +
                    // Skip whitespace
         608  +
                    while chars.peek() == Some(&' ') {
         609  +
                        chars.next();
         610  +
                    }
         611  +
                    if chars.peek() == Some(&'"') {
         612  +
                        chars.next(); // skip opening quote
         613  +
                        let mut s = String::new();
         614  +
                        while let Some(&c) = chars.peek() {
         615  +
                            if c == '\\' {
         616  +
                                chars.next();
         617  +
                                if let Some(escaped) = chars.next() {
         618  +
                                    s.push(escaped);
         619  +
                                }
         620  +
                            } else if c == '"' {
         621  +
                                chars.next();
         622  +
                                break;
         623  +
                            } else {
         624  +
                                s.push(c);
         625  +
                                chars.next();
         626  +
                            }
         627  +
                        }
         628  +
                        items.push(s);
         629  +
                    } else {
         630  +
                        let s: String = chars.by_ref().take_while(|&c| c != ',').collect();
         631  +
                        let trimmed = s.trim();
         632  +
                        if !trimmed.is_empty() {
         633  +
                            items.push(trimmed.to_string());
         634  +
                        }
         635  +
                    }
         636  +
                    // Skip comma separator
         637  +
                    while chars.peek() == Some(&',') || chars.peek() == Some(&' ') {
         638  +
                        chars.next();
         639  +
                    }
         640  +
                }
         641  +
                Some(items)
         642  +
            };
         643  +
        }
         644  +
        if let Some(val) = headers.get("X-IntegerList") {
         645  +
            builder.header_integer_list = Some(val.split(',').filter_map(|s| s.trim().parse::<i32>().ok()).collect());
         646  +
        }
         647  +
        if let Some(val) = headers.get("X-BooleanList") {
         648  +
            builder.header_boolean_list = Some(val.split(',').filter_map(|s| s.trim().parse::<bool>().ok()).collect());
         649  +
        }
         650  +
        if let Some(val) = headers.get("X-TimestampList") {
         651  +
            builder.header_timestamp_list = {
         652  +
                let mut timestamps = Vec::new();
         653  +
                let re_split: Vec<&str> = val.split(", ").collect();
         654  +
                let mut i = 0;
         655  +
                while i < re_split.len() {
         656  +
                    if i + 1 < re_split.len() {
         657  +
                        let combined = format!("{}, {}", re_split[i], re_split[i + 1]);
         658  +
                        if let Ok(ts) = ::aws_smithy_types::DateTime::from_str(&combined, ::aws_smithy_types::date_time::Format::HttpDate) {
         659  +
                            timestamps.push(ts);
         660  +
                            i += 2;
         661  +
                            continue;
         662  +
                        }
         663  +
                    }
         664  +
                    if let Ok(ts) = ::aws_smithy_types::DateTime::from_str(re_split[i].trim(), ::aws_smithy_types::date_time::Format::HttpDate) {
         665  +
                        timestamps.push(ts);
         666  +
                    }
         667  +
                    i += 1;
         668  +
                }
         669  +
                Some(timestamps)
         670  +
            };
         671  +
        }
         672  +
        if let Some(val) = headers.get("X-Enum") {
         673  +
            builder.header_enum = Some(crate::types::FooEnum::from(val));
         674  +
        }
         675  +
        if let Some(val) = headers.get("X-EnumList") {
         676  +
            builder.header_enum_list = Some(val.split(',').map(|s| crate::types::FooEnum::from(s.trim())).collect());
         677  +
        }
         678  +
        Ok(builder.build())
         679  +
    }
         680  +
}
  560    681   
impl InputAndOutputWithHeadersOutput {
  561    682   
    /// Creates a new builder-style object to manufacture [`InputAndOutputWithHeadersOutput`](crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput).
  562    683   
    pub fn builder() -> crate::operation::input_and_output_with_headers::builders::InputAndOutputWithHeadersOutputBuilder {
  563    684   
        crate::operation::input_and_output_with_headers::builders::InputAndOutputWithHeadersOutputBuilder::default()
  564    685   
    }
  565    686   
}
  566    687   
  567    688   
/// A builder for [`InputAndOutputWithHeadersOutput`](crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersOutput).
  568    689   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  569    690   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/nested_xml_map_with_xml_name.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 `NestedXmlMapWithXmlName`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct NestedXmlMapWithXmlName;
    6      6   
impl NestedXmlMapWithXmlName {
    7      7   
    /// Creates a new `NestedXmlMapWithXmlName`
    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::nested_xml_map_with_xml_name::NestedXmlMapWithXmlNameInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::nested_xml_map_with_xml_name::NestedXmlMapWithXmlNameOutput::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::nested_xml_map_with_xml_name::NestedXmlMapWithXmlNameInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::nested_xml_map_with_xml_name::NestedXmlMapWithXmlNameOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::nested_xml_map_with_xml_name::NestedXmlMapWithXmlNameError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +172,179 @@
  130    136   
                crate::operation::nested_xml_map_with_xml_name::NestedXmlMapWithXmlNameError,
  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 NestedXmlMapWithXmlNameResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for NestedXmlMapWithXmlNameResponseDeserializer {
  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_nested_xml_map_with_xml_name::de_nested_xml_map_with_xml_name_http_error(status, headers, body)
  152    159   
        } else {
@@ -309,316 +369,380 @@
  329    336   
            .expect("the config must have a deserializer");
  330    337   
  331    338   
        let parsed = de.deserialize_streaming(&mut http_response);
  332    339   
        let parsed = parsed.unwrap_or_else(|| {
  333    340   
            let http_response = http_response.map(|body| {
  334    341   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  335    342   
                    body.bytes().unwrap(),
  336    343   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  337    344   
                )))
  338    345   
            });
  339         -
            de.deserialize_nonstreaming(&http_response)
         346  +
            // Build a config bag with the protocol for schema-based deserialization
         347  +
            #[allow(unused_mut)]
         348  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         349  +
         350  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  340    351   
        });
  341    352   
        let parsed = parsed
  342    353   
            .expect("should be successful response")
  343    354   
            .downcast::<crate::operation::nested_xml_map_with_xml_name::NestedXmlMapWithXmlNameOutput>()
  344    355   
            .unwrap();
  345    356   
        ::pretty_assertions::assert_eq!(
  346    357   
            parsed.nested_xml_map_with_xml_name_map,
  347    358   
            expected_output.nested_xml_map_with_xml_name_map,
  348    359   
            "Unexpected value for `nested_xml_map_with_xml_name_map`"
  349    360   
        );