Client Test

Client Test

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/simple_scalar_properties.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 `SimpleScalarProperties`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct SimpleScalarProperties;
    6      6   
impl SimpleScalarProperties {
    7      7   
    /// Creates a new `SimpleScalarProperties`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -110,114 +172,177 @@
  130    134   
                crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
  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 SimpleScalarPropertiesResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for SimpleScalarPropertiesResponseDeserializer {
  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_simple_scalar_properties::de_simple_scalar_properties_http_error(status, headers, body)
  152    157   
        } else {
@@ -516,521 +576,585 @@
  536    541   
            .expect("the config must have a deserializer");
  537    542   
  538    543   
        let parsed = de.deserialize_streaming(&mut http_response);
  539    544   
        let parsed = parsed.unwrap_or_else(|| {
  540    545   
            let http_response = http_response.map(|body| {
  541    546   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  542    547   
                    body.bytes().unwrap(),
  543    548   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  544    549   
                )))
  545    550   
            });
  546         -
            de.deserialize_nonstreaming(&http_response)
         551  +
            // Build a config bag with the protocol for schema-based deserialization
         552  +
            #[allow(unused_mut)]
         553  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         554  +
         555  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  547    556   
        });
  548    557   
        let parsed = parsed
  549    558   
            .expect("should be successful response")
  550    559   
            .downcast::<crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput>()
  551    560   
            .unwrap();
  552    561   
        ::pretty_assertions::assert_eq!(parsed.foo, expected_output.foo, "Unexpected value for `foo`");
  553    562   
        ::pretty_assertions::assert_eq!(parsed.string_value, expected_output.string_value, "Unexpected value for `string_value`");
  554    563   
        ::pretty_assertions::assert_eq!(
  555    564   
            parsed.true_boolean_value,
  556    565   
            expected_output.true_boolean_value,
@@ -595,604 +655,668 @@
  615    624   
            .expect("the config must have a deserializer");
  616    625   
  617    626   
        let parsed = de.deserialize_streaming(&mut http_response);
  618    627   
        let parsed = parsed.unwrap_or_else(|| {
  619    628   
            let http_response = http_response.map(|body| {
  620    629   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  621    630   
                    body.bytes().unwrap(),
  622    631   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  623    632   
                )))
  624    633   
            });
  625         -
            de.deserialize_nonstreaming(&http_response)
         634  +
            // Build a config bag with the protocol for schema-based deserialization
         635  +
            #[allow(unused_mut)]
         636  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         637  +
         638  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  626    639   
        });
  627    640   
        let parsed = parsed
  628    641   
            .expect("should be successful response")
  629    642   
            .downcast::<crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput>()
  630    643   
            .unwrap();
  631    644   
        ::pretty_assertions::assert_eq!(parsed.foo, expected_output.foo, "Unexpected value for `foo`");
  632    645   
        ::pretty_assertions::assert_eq!(parsed.string_value, expected_output.string_value, "Unexpected value for `string_value`");
  633    646   
        ::pretty_assertions::assert_eq!(
  634    647   
            parsed.true_boolean_value,
  635    648   
            expected_output.true_boolean_value,
@@ -672,685 +732,749 @@
  692    705   
            .expect("the config must have a deserializer");
  693    706   
  694    707   
        let parsed = de.deserialize_streaming(&mut http_response);
  695    708   
        let parsed = parsed.unwrap_or_else(|| {
  696    709   
            let http_response = http_response.map(|body| {
  697    710   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  698    711   
                    body.bytes().unwrap(),
  699    712   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  700    713   
                )))
  701    714   
            });
  702         -
            de.deserialize_nonstreaming(&http_response)
         715  +
            // Build a config bag with the protocol for schema-based deserialization
         716  +
            #[allow(unused_mut)]
         717  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         718  +
         719  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  703    720   
        });
  704    721   
        let parsed = parsed
  705    722   
            .expect("should be successful response")
  706    723   
            .downcast::<crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput>()
  707    724   
            .unwrap();
  708    725   
        ::pretty_assertions::assert_eq!(parsed.foo, expected_output.foo, "Unexpected value for `foo`");
  709    726   
        ::pretty_assertions::assert_eq!(parsed.string_value, expected_output.string_value, "Unexpected value for `string_value`");
  710    727   
        ::pretty_assertions::assert_eq!(
  711    728   
            parsed.true_boolean_value,
  712    729   
            expected_output.true_boolean_value,
@@ -745,762 +805,826 @@
  765    782   
            .expect("the config must have a deserializer");
  766    783   
  767    784   
        let parsed = de.deserialize_streaming(&mut http_response);
  768    785   
        let parsed = parsed.unwrap_or_else(|| {
  769    786   
            let http_response = http_response.map(|body| {
  770    787   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  771    788   
                    body.bytes().unwrap(),
  772    789   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  773    790   
                )))
  774    791   
            });
  775         -
            de.deserialize_nonstreaming(&http_response)
         792  +
            // Build a config bag with the protocol for schema-based deserialization
         793  +
            #[allow(unused_mut)]
         794  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         795  +
         796  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  776    797   
        });
  777    798   
        let parsed = parsed
  778    799   
            .expect("should be successful response")
  779    800   
            .downcast::<crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput>()
  780    801   
            .unwrap();
  781    802   
        ::pretty_assertions::assert_eq!(parsed.foo, expected_output.foo, "Unexpected value for `foo`");
  782    803   
        ::pretty_assertions::assert_eq!(parsed.string_value, expected_output.string_value, "Unexpected value for `string_value`");
  783    804   
        ::pretty_assertions::assert_eq!(
  784    805   
            parsed.true_boolean_value,
  785    806   
            expected_output.true_boolean_value,
@@ -818,839 +878,903 @@
  838    859   
            .expect("the config must have a deserializer");
  839    860   
  840    861   
        let parsed = de.deserialize_streaming(&mut http_response);
  841    862   
        let parsed = parsed.unwrap_or_else(|| {
  842    863   
            let http_response = http_response.map(|body| {
  843    864   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  844    865   
                    body.bytes().unwrap(),
  845    866   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  846    867   
                )))
  847    868   
            });
  848         -
            de.deserialize_nonstreaming(&http_response)
         869  +
            // Build a config bag with the protocol for schema-based deserialization
         870  +
            #[allow(unused_mut)]
         871  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         872  +
         873  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  849    874   
        });
  850    875   
        let parsed = parsed
  851    876   
            .expect("should be successful response")
  852    877   
            .downcast::<crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput>()
  853    878   
            .unwrap();
  854    879   
        ::pretty_assertions::assert_eq!(parsed.foo, expected_output.foo, "Unexpected value for `foo`");
  855    880   
        ::pretty_assertions::assert_eq!(parsed.string_value, expected_output.string_value, "Unexpected value for `string_value`");
  856    881   
        ::pretty_assertions::assert_eq!(
  857    882   
            parsed.true_boolean_value,
  858    883   
            expected_output.true_boolean_value,
@@ -891,916 +951,980 @@
  911    936   
            .expect("the config must have a deserializer");
  912    937   
  913    938   
        let parsed = de.deserialize_streaming(&mut http_response);
  914    939   
        let parsed = parsed.unwrap_or_else(|| {
  915    940   
            let http_response = http_response.map(|body| {
  916    941   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  917    942   
                    body.bytes().unwrap(),
  918    943   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  919    944   
                )))
  920    945   
            });
  921         -
            de.deserialize_nonstreaming(&http_response)
         946  +
            // Build a config bag with the protocol for schema-based deserialization
         947  +
            #[allow(unused_mut)]
         948  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         949  +
         950  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  922    951   
        });
  923    952   
        let parsed = parsed
  924    953   
            .expect("should be successful response")
  925    954   
            .downcast::<crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput>()
  926    955   
            .unwrap();
  927    956   
        ::pretty_assertions::assert_eq!(parsed.foo, expected_output.foo, "Unexpected value for `foo`");
  928    957   
        ::pretty_assertions::assert_eq!(parsed.string_value, expected_output.string_value, "Unexpected value for `string_value`");
  929    958   
        ::pretty_assertions::assert_eq!(
  930    959   
            parsed.true_boolean_value,
  931    960   
            expected_output.true_boolean_value,
@@ -967,996 +1027,1060 @@
  987   1016   
            .expect("the config must have a deserializer");
  988   1017   
  989   1018   
        let parsed = de.deserialize_streaming(&mut http_response);
  990   1019   
        let parsed = parsed.unwrap_or_else(|| {
  991   1020   
            let http_response = http_response.map(|body| {
  992   1021   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  993   1022   
                    body.bytes().unwrap(),
  994   1023   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  995   1024   
                )))
  996   1025   
            });
  997         -
            de.deserialize_nonstreaming(&http_response)
        1026  +
            // Build a config bag with the protocol for schema-based deserialization
        1027  +
            #[allow(unused_mut)]
        1028  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
        1029  +
        1030  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  998   1031   
        });
  999   1032   
        let parsed = parsed
 1000   1033   
            .expect("should be successful response")
 1001   1034   
            .downcast::<crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput>()
 1002   1035   
            .unwrap();
 1003   1036   
        ::pretty_assertions::assert_eq!(parsed.foo, expected_output.foo, "Unexpected value for `foo`");
 1004   1037   
        ::pretty_assertions::assert_eq!(parsed.string_value, expected_output.string_value, "Unexpected value for `string_value`");
 1005   1038   
        ::pretty_assertions::assert_eq!(
 1006   1039   
            parsed.true_boolean_value,
 1007   1040   
            expected_output.true_boolean_value,
@@ -1043,1076 +1103,1140 @@
 1063   1096   
            .expect("the config must have a deserializer");
 1064   1097   
 1065   1098   
        let parsed = de.deserialize_streaming(&mut http_response);
 1066   1099   
        let parsed = parsed.unwrap_or_else(|| {
 1067   1100   
            let http_response = http_response.map(|body| {
 1068   1101   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1069   1102   
                    body.bytes().unwrap(),
 1070   1103   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
 1071   1104   
                )))
 1072   1105   
            });
 1073         -
            de.deserialize_nonstreaming(&http_response)
        1106  +
            // Build a config bag with the protocol for schema-based deserialization
        1107  +
            #[allow(unused_mut)]
        1108  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
        1109  +
        1110  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
 1074   1111   
        });
 1075   1112   
        let parsed = parsed
 1076   1113   
            .expect("should be successful response")
 1077   1114   
            .downcast::<crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput>()
 1078   1115   
            .unwrap();
 1079   1116   
        ::pretty_assertions::assert_eq!(parsed.foo, expected_output.foo, "Unexpected value for `foo`");
 1080   1117   
        ::pretty_assertions::assert_eq!(parsed.string_value, expected_output.string_value, "Unexpected value for `string_value`");
 1081   1118   
        ::pretty_assertions::assert_eq!(
 1082   1119   
            parsed.true_boolean_value,
 1083   1120   
            expected_output.true_boolean_value,
@@ -1119,1156 +1179,1220 @@
 1139   1176   
            .expect("the config must have a deserializer");
 1140   1177   
 1141   1178   
        let parsed = de.deserialize_streaming(&mut http_response);
 1142   1179   
        let parsed = parsed.unwrap_or_else(|| {
 1143   1180   
            let http_response = http_response.map(|body| {
 1144   1181   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
 1145   1182   
                    body.bytes().unwrap(),
 1146   1183   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
 1147   1184   
                )))
 1148   1185   
            });
 1149         -
            de.deserialize_nonstreaming(&http_response)
        1186  +
            // Build a config bag with the protocol for schema-based deserialization
        1187  +
            #[allow(unused_mut)]
        1188  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
        1189  +
        1190  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
 1150   1191   
        });
 1151   1192   
        let parsed = parsed
 1152   1193   
            .expect("should be successful response")
 1153   1194   
            .downcast::<crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput>()
 1154   1195   
            .unwrap();
 1155   1196   
        ::pretty_assertions::assert_eq!(parsed.foo, expected_output.foo, "Unexpected value for `foo`");
 1156   1197   
        ::pretty_assertions::assert_eq!(parsed.string_value, expected_output.string_value, "Unexpected value for `string_value`");
 1157   1198   
        ::pretty_assertions::assert_eq!(
 1158   1199   
            parsed.true_boolean_value,
 1159   1200   
            expected_output.true_boolean_value,

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

@@ -62,62 +319,381 @@
   82     82   
    0,
   83     83   
)
   84     84   
.with_http_header("X-Foo");
   85     85   
static SIMPLESCALARPROPERTIESINPUT_MEMBER_STRING_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   86     86   
    ::aws_smithy_schema::ShapeId::from_static(
   87     87   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$stringValue",
   88     88   
        "aws.protocoltests.restxml.synthetic",
   89     89   
        "SimpleScalarPropertiesInput",
   90     90   
    ),
   91     91   
    ::aws_smithy_schema::ShapeType::String,
   92         -
    "string_value",
          92  +
    "stringValue",
   93     93   
    1,
   94     94   
);
   95     95   
static SIMPLESCALARPROPERTIESINPUT_MEMBER_TRUE_BOOLEAN_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   96     96   
    ::aws_smithy_schema::ShapeId::from_static(
   97     97   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$trueBooleanValue",
   98     98   
        "aws.protocoltests.restxml.synthetic",
   99     99   
        "SimpleScalarPropertiesInput",
  100    100   
    ),
  101    101   
    ::aws_smithy_schema::ShapeType::Boolean,
  102         -
    "true_boolean_value",
         102  +
    "trueBooleanValue",
  103    103   
    2,
  104    104   
);
  105    105   
static SIMPLESCALARPROPERTIESINPUT_MEMBER_FALSE_BOOLEAN_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  106    106   
    ::aws_smithy_schema::ShapeId::from_static(
  107    107   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$falseBooleanValue",
  108    108   
        "aws.protocoltests.restxml.synthetic",
  109    109   
        "SimpleScalarPropertiesInput",
  110    110   
    ),
  111    111   
    ::aws_smithy_schema::ShapeType::Boolean,
  112         -
    "false_boolean_value",
         112  +
    "falseBooleanValue",
  113    113   
    3,
  114    114   
);
  115    115   
static SIMPLESCALARPROPERTIESINPUT_MEMBER_BYTE_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  116    116   
    ::aws_smithy_schema::ShapeId::from_static(
  117    117   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$byteValue",
  118    118   
        "aws.protocoltests.restxml.synthetic",
  119    119   
        "SimpleScalarPropertiesInput",
  120    120   
    ),
  121    121   
    ::aws_smithy_schema::ShapeType::Byte,
  122         -
    "byte_value",
         122  +
    "byteValue",
  123    123   
    4,
  124    124   
);
  125    125   
static SIMPLESCALARPROPERTIESINPUT_MEMBER_SHORT_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  126    126   
    ::aws_smithy_schema::ShapeId::from_static(
  127    127   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$shortValue",
  128    128   
        "aws.protocoltests.restxml.synthetic",
  129    129   
        "SimpleScalarPropertiesInput",
  130    130   
    ),
  131    131   
    ::aws_smithy_schema::ShapeType::Short,
  132         -
    "short_value",
         132  +
    "shortValue",
  133    133   
    5,
  134    134   
);
  135    135   
static SIMPLESCALARPROPERTIESINPUT_MEMBER_INTEGER_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  136    136   
    ::aws_smithy_schema::ShapeId::from_static(
  137    137   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$integerValue",
  138    138   
        "aws.protocoltests.restxml.synthetic",
  139    139   
        "SimpleScalarPropertiesInput",
  140    140   
    ),
  141    141   
    ::aws_smithy_schema::ShapeType::Integer,
  142         -
    "integer_value",
         142  +
    "integerValue",
  143    143   
    6,
  144    144   
);
  145    145   
static SIMPLESCALARPROPERTIESINPUT_MEMBER_LONG_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  146    146   
    ::aws_smithy_schema::ShapeId::from_static(
  147    147   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$longValue",
  148    148   
        "aws.protocoltests.restxml.synthetic",
  149    149   
        "SimpleScalarPropertiesInput",
  150    150   
    ),
  151    151   
    ::aws_smithy_schema::ShapeType::Long,
  152         -
    "long_value",
         152  +
    "longValue",
  153    153   
    7,
  154    154   
);
  155    155   
static SIMPLESCALARPROPERTIESINPUT_MEMBER_FLOAT_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  156    156   
    ::aws_smithy_schema::ShapeId::from_static(
  157    157   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$floatValue",
  158    158   
        "aws.protocoltests.restxml.synthetic",
  159    159   
        "SimpleScalarPropertiesInput",
  160    160   
    ),
  161    161   
    ::aws_smithy_schema::ShapeType::Float,
  162         -
    "float_value",
         162  +
    "floatValue",
  163    163   
    8,
  164    164   
);
  165    165   
static SIMPLESCALARPROPERTIESINPUT_MEMBER_DOUBLE_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  166    166   
    ::aws_smithy_schema::ShapeId::from_static(
  167    167   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesInput$doubleValue",
  168    168   
        "aws.protocoltests.restxml.synthetic",
  169    169   
        "SimpleScalarPropertiesInput",
  170    170   
    ),
  171    171   
    ::aws_smithy_schema::ShapeType::Double,
  172         -
    "double_value",
         172  +
    "doubleValue",
  173    173   
    9,
  174    174   
)
  175    175   
.with_xml_name("DoubleDribble");
  176    176   
static SIMPLESCALARPROPERTIESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  177    177   
    SIMPLESCALARPROPERTIESINPUT_SCHEMA_ID,
  178    178   
    ::aws_smithy_schema::ShapeType::Structure,
  179    179   
    &[
  180    180   
        &SIMPLESCALARPROPERTIESINPUT_MEMBER_FOO,
  181    181   
        &SIMPLESCALARPROPERTIESINPUT_MEMBER_STRING_VALUE,
  182    182   
        &SIMPLESCALARPROPERTIESINPUT_MEMBER_TRUE_BOOLEAN_VALUE,
  183    183   
        &SIMPLESCALARPROPERTIESINPUT_MEMBER_FALSE_BOOLEAN_VALUE,
  184    184   
        &SIMPLESCALARPROPERTIESINPUT_MEMBER_BYTE_VALUE,
  185    185   
        &SIMPLESCALARPROPERTIESINPUT_MEMBER_SHORT_VALUE,
  186    186   
        &SIMPLESCALARPROPERTIESINPUT_MEMBER_INTEGER_VALUE,
  187    187   
        &SIMPLESCALARPROPERTIESINPUT_MEMBER_LONG_VALUE,
  188    188   
        &SIMPLESCALARPROPERTIESINPUT_MEMBER_FLOAT_VALUE,
  189    189   
        &SIMPLESCALARPROPERTIESINPUT_MEMBER_DOUBLE_VALUE,
  190    190   
    ],
  191         -
);
         191  +
)
         192  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("PUT", "/SimpleScalarProperties", None));
  192    193   
impl SimpleScalarPropertiesInput {
  193    194   
    /// The schema for this shape.
  194    195   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &SIMPLESCALARPROPERTIESINPUT_SCHEMA;
  195    196   
}
  196    197   
impl ::aws_smithy_schema::serde::SerializableStruct for SimpleScalarPropertiesInput {
  197    198   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  198    199   
    fn serialize_members(
  199    200   
        &self,
  200    201   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  201    202   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  202    203   
        if let Some(ref val) = self.foo {
  203    204   
            ser.write_string(&SIMPLESCALARPROPERTIESINPUT_MEMBER_FOO, val)?;
  204    205   
        }
  205    206   
        if let Some(ref val) = self.string_value {
  206    207   
            ser.write_string(&SIMPLESCALARPROPERTIESINPUT_MEMBER_STRING_VALUE, val)?;
  207    208   
        }
  208    209   
        if let Some(ref val) = self.true_boolean_value {
  209    210   
            ser.write_boolean(&SIMPLESCALARPROPERTIESINPUT_MEMBER_TRUE_BOOLEAN_VALUE, *val)?;
  210    211   
        }
  211    212   
        if let Some(ref val) = self.false_boolean_value {
  212    213   
            ser.write_boolean(&SIMPLESCALARPROPERTIESINPUT_MEMBER_FALSE_BOOLEAN_VALUE, *val)?;
  213    214   
        }
  214    215   
        if let Some(ref val) = self.byte_value {
  215    216   
            ser.write_byte(&SIMPLESCALARPROPERTIESINPUT_MEMBER_BYTE_VALUE, *val)?;
  216    217   
        }
  217    218   
        if let Some(ref val) = self.short_value {
  218    219   
            ser.write_short(&SIMPLESCALARPROPERTIESINPUT_MEMBER_SHORT_VALUE, *val)?;
  219    220   
        }
  220    221   
        if let Some(ref val) = self.integer_value {
  221    222   
            ser.write_integer(&SIMPLESCALARPROPERTIESINPUT_MEMBER_INTEGER_VALUE, *val)?;
  222    223   
        }
  223    224   
        if let Some(ref val) = self.long_value {
  224    225   
            ser.write_long(&SIMPLESCALARPROPERTIESINPUT_MEMBER_LONG_VALUE, *val)?;
  225    226   
        }
  226    227   
        if let Some(ref val) = self.float_value {
  227    228   
            ser.write_float(&SIMPLESCALARPROPERTIESINPUT_MEMBER_FLOAT_VALUE, *val)?;
  228    229   
        }
  229    230   
        if let Some(ref val) = self.double_value {
  230    231   
            ser.write_double(&SIMPLESCALARPROPERTIESINPUT_MEMBER_DOUBLE_VALUE, *val)?;
  231    232   
        }
  232    233   
        Ok(())
  233    234   
    }
  234    235   
}
  235    236   
impl SimpleScalarPropertiesInput {
  236    237   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  237         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  238         -
        deserializer: &mut D,
         238  +
    pub fn deserialize(
         239  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  239    240   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  240    241   
        #[allow(unused_variables, unused_mut)]
  241    242   
        let mut builder = Self::builder();
  242    243   
        #[allow(
  243    244   
            unused_variables,
  244    245   
            unreachable_code,
  245    246   
            clippy::single_match,
  246    247   
            clippy::match_single_binding,
  247    248   
            clippy::diverging_sub_expression
  248    249   
        )]
  249         -
        deserializer.read_struct(&SIMPLESCALARPROPERTIESINPUT_SCHEMA, (), |_, member, deser| {
         250  +
        deserializer.read_struct(&SIMPLESCALARPROPERTIESINPUT_SCHEMA, &mut |member, deser| {
  250    251   
            match member.member_index() {
  251    252   
                Some(0) => {
  252    253   
                    builder.foo = Some(deser.read_string(member)?);
  253    254   
                }
  254    255   
                Some(1) => {
  255    256   
                    builder.string_value = Some(deser.read_string(member)?);
  256    257   
                }
  257    258   
                Some(2) => {
  258    259   
                    builder.true_boolean_value = Some(deser.read_boolean(member)?);
  259    260   
                }
  260    261   
                Some(3) => {
  261    262   
                    builder.false_boolean_value = Some(deser.read_boolean(member)?);
  262    263   
                }
  263    264   
                Some(4) => {
  264    265   
                    builder.byte_value = Some(deser.read_byte(member)?);
  265    266   
                }
  266    267   
                Some(5) => {
  267    268   
                    builder.short_value = Some(deser.read_short(member)?);
  268    269   
                }
  269    270   
                Some(6) => {
  270    271   
                    builder.integer_value = Some(deser.read_integer(member)?);
  271    272   
                }
  272    273   
                Some(7) => {
  273    274   
                    builder.long_value = Some(deser.read_long(member)?);
  274    275   
                }
  275    276   
                Some(8) => {
  276    277   
                    builder.float_value = Some(deser.read_float(member)?);
  277    278   
                }
  278    279   
                Some(9) => {
  279    280   
                    builder.double_value = Some(deser.read_double(member)?);
  280    281   
                }
  281    282   
                _ => {}
  282    283   
            }
  283    284   
            Ok(())
  284    285   
        })?;
  285    286   
        builder
  286    287   
            .build()
  287    288   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  288    289   
    }
  289    290   
}
         291  +
impl SimpleScalarPropertiesInput {
         292  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         293  +
    /// Header-bound members are read directly from headers, avoiding runtime
         294  +
    /// member iteration overhead. Body members are read via the deserializer.
         295  +
    pub fn deserialize_with_response(
         296  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         297  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         298  +
        _status: u16,
         299  +
        _body: &[u8],
         300  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         301  +
        #[allow(unused_variables, unused_mut)]
         302  +
        let mut builder = Self::builder();
         303  +
        if let Some(val) = headers.get("X-Foo") {
         304  +
            builder.foo = Some(val.to_string());
         305  +
        }
         306  +
        #[allow(
         307  +
            unused_variables,
         308  +
            unreachable_code,
         309  +
            clippy::single_match,
         310  +
            clippy::match_single_binding,
         311  +
            clippy::diverging_sub_expression
         312  +
        )]
         313  +
        deserializer.read_struct(&SIMPLESCALARPROPERTIESINPUT_SCHEMA, &mut |member, deser| {
         314  +
            match member.member_index() {
         315  +
                Some(0) => { /* read from headers above */ }
         316  +
                Some(1) => {
         317  +
                    builder.string_value = Some(deser.read_string(member)?);
         318  +
                }
         319  +
                Some(2) => {
         320  +
                    builder.true_boolean_value = Some(deser.read_boolean(member)?);
         321  +
                }
         322  +
                Some(3) => {
         323  +
                    builder.false_boolean_value = Some(deser.read_boolean(member)?);
         324  +
                }
         325  +
                Some(4) => {
         326  +
                    builder.byte_value = Some(deser.read_byte(member)?);
         327  +
                }
         328  +
                Some(5) => {
         329  +
                    builder.short_value = Some(deser.read_short(member)?);
         330  +
                }
         331  +
                Some(6) => {
         332  +
                    builder.integer_value = Some(deser.read_integer(member)?);
         333  +
                }
         334  +
                Some(7) => {
         335  +
                    builder.long_value = Some(deser.read_long(member)?);
         336  +
                }
         337  +
                Some(8) => {
         338  +
                    builder.float_value = Some(deser.read_float(member)?);
         339  +
                }
         340  +
                Some(9) => {
         341  +
                    builder.double_value = Some(deser.read_double(member)?);
         342  +
                }
         343  +
                _ => {}
         344  +
            }
         345  +
            Ok(())
         346  +
        })?;
         347  +
        builder
         348  +
            .build()
         349  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         350  +
    }
         351  +
}
  290    352   
impl SimpleScalarPropertiesInput {
  291    353   
    /// Creates a new builder-style object to manufacture [`SimpleScalarPropertiesInput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput).
  292    354   
    pub fn builder() -> crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesInputBuilder {
  293    355   
        crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesInputBuilder::default()
  294    356   
    }
  295    357   
}
  296    358   
  297    359   
/// A builder for [`SimpleScalarPropertiesInput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput).
  298    360   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  299    361   
#[non_exhaustive]

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

@@ -62,62 +202,202 @@
   82     82   
    0,
   83     83   
)
   84     84   
.with_http_header("X-Foo");
   85     85   
static SIMPLESCALARPROPERTIESOUTPUT_MEMBER_STRING_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   86     86   
    ::aws_smithy_schema::ShapeId::from_static(
   87     87   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesOutput$stringValue",
   88     88   
        "aws.protocoltests.restxml.synthetic",
   89     89   
        "SimpleScalarPropertiesOutput",
   90     90   
    ),
   91     91   
    ::aws_smithy_schema::ShapeType::String,
   92         -
    "string_value",
          92  +
    "stringValue",
   93     93   
    1,
   94     94   
);
   95     95   
static SIMPLESCALARPROPERTIESOUTPUT_MEMBER_TRUE_BOOLEAN_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   96     96   
    ::aws_smithy_schema::ShapeId::from_static(
   97     97   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesOutput$trueBooleanValue",
   98     98   
        "aws.protocoltests.restxml.synthetic",
   99     99   
        "SimpleScalarPropertiesOutput",
  100    100   
    ),
  101    101   
    ::aws_smithy_schema::ShapeType::Boolean,
  102         -
    "true_boolean_value",
         102  +
    "trueBooleanValue",
  103    103   
    2,
  104    104   
);
  105    105   
static SIMPLESCALARPROPERTIESOUTPUT_MEMBER_FALSE_BOOLEAN_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  106    106   
    ::aws_smithy_schema::ShapeId::from_static(
  107    107   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesOutput$falseBooleanValue",
  108    108   
        "aws.protocoltests.restxml.synthetic",
  109    109   
        "SimpleScalarPropertiesOutput",
  110    110   
    ),
  111    111   
    ::aws_smithy_schema::ShapeType::Boolean,
  112         -
    "false_boolean_value",
         112  +
    "falseBooleanValue",
  113    113   
    3,
  114    114   
);
  115    115   
static SIMPLESCALARPROPERTIESOUTPUT_MEMBER_BYTE_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  116    116   
    ::aws_smithy_schema::ShapeId::from_static(
  117    117   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesOutput$byteValue",
  118    118   
        "aws.protocoltests.restxml.synthetic",
  119    119   
        "SimpleScalarPropertiesOutput",
  120    120   
    ),
  121    121   
    ::aws_smithy_schema::ShapeType::Byte,
  122         -
    "byte_value",
         122  +
    "byteValue",
  123    123   
    4,
  124    124   
);
  125    125   
static SIMPLESCALARPROPERTIESOUTPUT_MEMBER_SHORT_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  126    126   
    ::aws_smithy_schema::ShapeId::from_static(
  127    127   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesOutput$shortValue",
  128    128   
        "aws.protocoltests.restxml.synthetic",
  129    129   
        "SimpleScalarPropertiesOutput",
  130    130   
    ),
  131    131   
    ::aws_smithy_schema::ShapeType::Short,
  132         -
    "short_value",
         132  +
    "shortValue",
  133    133   
    5,
  134    134   
);
  135    135   
static SIMPLESCALARPROPERTIESOUTPUT_MEMBER_INTEGER_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  136    136   
    ::aws_smithy_schema::ShapeId::from_static(
  137    137   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesOutput$integerValue",
  138    138   
        "aws.protocoltests.restxml.synthetic",
  139    139   
        "SimpleScalarPropertiesOutput",
  140    140   
    ),
  141    141   
    ::aws_smithy_schema::ShapeType::Integer,
  142         -
    "integer_value",
         142  +
    "integerValue",
  143    143   
    6,
  144    144   
);
  145    145   
static SIMPLESCALARPROPERTIESOUTPUT_MEMBER_LONG_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  146    146   
    ::aws_smithy_schema::ShapeId::from_static(
  147    147   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesOutput$longValue",
  148    148   
        "aws.protocoltests.restxml.synthetic",
  149    149   
        "SimpleScalarPropertiesOutput",
  150    150   
    ),
  151    151   
    ::aws_smithy_schema::ShapeType::Long,
  152         -
    "long_value",
         152  +
    "longValue",
  153    153   
    7,
  154    154   
);
  155    155   
static SIMPLESCALARPROPERTIESOUTPUT_MEMBER_FLOAT_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  156    156   
    ::aws_smithy_schema::ShapeId::from_static(
  157    157   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesOutput$floatValue",
  158    158   
        "aws.protocoltests.restxml.synthetic",
  159    159   
        "SimpleScalarPropertiesOutput",
  160    160   
    ),
  161    161   
    ::aws_smithy_schema::ShapeType::Float,
  162         -
    "float_value",
         162  +
    "floatValue",
  163    163   
    8,
  164    164   
);
  165    165   
static SIMPLESCALARPROPERTIESOUTPUT_MEMBER_DOUBLE_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  166    166   
    ::aws_smithy_schema::ShapeId::from_static(
  167    167   
        "aws.protocoltests.restxml.synthetic#SimpleScalarPropertiesOutput$doubleValue",
  168    168   
        "aws.protocoltests.restxml.synthetic",
  169    169   
        "SimpleScalarPropertiesOutput",
  170    170   
    ),
  171    171   
    ::aws_smithy_schema::ShapeType::Double,
  172         -
    "double_value",
         172  +
    "doubleValue",
  173    173   
    9,
  174    174   
)
  175    175   
.with_xml_name("DoubleDribble");
  176    176   
static SIMPLESCALARPROPERTIESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  177    177   
    SIMPLESCALARPROPERTIESOUTPUT_SCHEMA_ID,
  178    178   
    ::aws_smithy_schema::ShapeType::Structure,
  179    179   
    &[
  180    180   
        &SIMPLESCALARPROPERTIESOUTPUT_MEMBER_FOO,
  181    181   
        &SIMPLESCALARPROPERTIESOUTPUT_MEMBER_STRING_VALUE,
  182    182   
        &SIMPLESCALARPROPERTIESOUTPUT_MEMBER_TRUE_BOOLEAN_VALUE,
@@ -207,207 +317,376 @@
  227    227   
            ser.write_float(&SIMPLESCALARPROPERTIESOUTPUT_MEMBER_FLOAT_VALUE, *val)?;
  228    228   
        }
  229    229   
        if let Some(ref val) = self.double_value {
  230    230   
            ser.write_double(&SIMPLESCALARPROPERTIESOUTPUT_MEMBER_DOUBLE_VALUE, *val)?;
  231    231   
        }
  232    232   
        Ok(())
  233    233   
    }
  234    234   
}
  235    235   
impl SimpleScalarPropertiesOutput {
  236    236   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  237         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  238         -
        deserializer: &mut D,
         237  +
    pub fn deserialize(
         238  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  239    239   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  240    240   
        #[allow(unused_variables, unused_mut)]
  241    241   
        let mut builder = Self::builder();
  242    242   
        #[allow(
  243    243   
            unused_variables,
  244    244   
            unreachable_code,
  245    245   
            clippy::single_match,
  246    246   
            clippy::match_single_binding,
  247    247   
            clippy::diverging_sub_expression
  248    248   
        )]
  249         -
        deserializer.read_struct(&SIMPLESCALARPROPERTIESOUTPUT_SCHEMA, (), |_, member, deser| {
         249  +
        deserializer.read_struct(&SIMPLESCALARPROPERTIESOUTPUT_SCHEMA, &mut |member, deser| {
  250    250   
            match member.member_index() {
  251    251   
                Some(0) => {
  252    252   
                    builder.foo = Some(deser.read_string(member)?);
  253    253   
                }
  254    254   
                Some(1) => {
  255    255   
                    builder.string_value = Some(deser.read_string(member)?);
  256    256   
                }
  257    257   
                Some(2) => {
  258    258   
                    builder.true_boolean_value = Some(deser.read_boolean(member)?);
  259    259   
                }
  260    260   
                Some(3) => {
  261    261   
                    builder.false_boolean_value = Some(deser.read_boolean(member)?);
  262    262   
                }
  263    263   
                Some(4) => {
  264    264   
                    builder.byte_value = Some(deser.read_byte(member)?);
  265    265   
                }
  266    266   
                Some(5) => {
  267    267   
                    builder.short_value = Some(deser.read_short(member)?);
  268    268   
                }
  269    269   
                Some(6) => {
  270    270   
                    builder.integer_value = Some(deser.read_integer(member)?);
  271    271   
                }
  272    272   
                Some(7) => {
  273    273   
                    builder.long_value = Some(deser.read_long(member)?);
  274    274   
                }
  275    275   
                Some(8) => {
  276    276   
                    builder.float_value = Some(deser.read_float(member)?);
  277    277   
                }
  278    278   
                Some(9) => {
  279    279   
                    builder.double_value = Some(deser.read_double(member)?);
  280    280   
                }
  281    281   
                _ => {}
  282    282   
            }
  283    283   
            Ok(())
  284    284   
        })?;
  285    285   
        Ok(builder.build())
  286    286   
    }
  287    287   
}
         288  +
impl SimpleScalarPropertiesOutput {
         289  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         290  +
    /// Header-bound members are read directly from headers, avoiding runtime
         291  +
    /// member iteration overhead. Body members are read via the deserializer.
         292  +
    pub fn deserialize_with_response(
         293  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         294  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         295  +
        _status: u16,
         296  +
        _body: &[u8],
         297  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         298  +
        #[allow(unused_variables, unused_mut)]
         299  +
        let mut builder = Self::builder();
         300  +
        if let Some(val) = headers.get("X-Foo") {
         301  +
            builder.foo = Some(val.to_string());
         302  +
        }
         303  +
        #[allow(
         304  +
            unused_variables,
         305  +
            unreachable_code,
         306  +
            clippy::single_match,
         307  +
            clippy::match_single_binding,
         308  +
            clippy::diverging_sub_expression
         309  +
        )]
         310  +
        deserializer.read_struct(&SIMPLESCALARPROPERTIESOUTPUT_SCHEMA, &mut |member, deser| {
         311  +
            match member.member_index() {
         312  +
                Some(0) => { /* read from headers above */ }
         313  +
                Some(1) => {
         314  +
                    builder.string_value = Some(deser.read_string(member)?);
         315  +
                }
         316  +
                Some(2) => {
         317  +
                    builder.true_boolean_value = Some(deser.read_boolean(member)?);
         318  +
                }
         319  +
                Some(3) => {
         320  +
                    builder.false_boolean_value = Some(deser.read_boolean(member)?);
         321  +
                }
         322  +
                Some(4) => {
         323  +
                    builder.byte_value = Some(deser.read_byte(member)?);
         324  +
                }
         325  +
                Some(5) => {
         326  +
                    builder.short_value = Some(deser.read_short(member)?);
         327  +
                }
         328  +
                Some(6) => {
         329  +
                    builder.integer_value = Some(deser.read_integer(member)?);
         330  +
                }
         331  +
                Some(7) => {
         332  +
                    builder.long_value = Some(deser.read_long(member)?);
         333  +
                }
         334  +
                Some(8) => {
         335  +
                    builder.float_value = Some(deser.read_float(member)?);
         336  +
                }
         337  +
                Some(9) => {
         338  +
                    builder.double_value = Some(deser.read_double(member)?);
         339  +
                }
         340  +
                _ => {}
         341  +
            }
         342  +
            Ok(())
         343  +
        })?;
         344  +
        Ok(builder.build())
         345  +
    }
         346  +
}
  288    347   
impl SimpleScalarPropertiesOutput {
  289    348   
    /// Creates a new builder-style object to manufacture [`SimpleScalarPropertiesOutput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput).
  290    349   
    pub fn builder() -> crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesOutputBuilder {
  291    350   
        crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesOutputBuilder::default()
  292    351   
    }
  293    352   
}
  294    353   
  295    354   
/// A builder for [`SimpleScalarPropertiesOutput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput).
  296    355   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  297    356   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/timestamp_format_headers.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 `TimestampFormatHeaders`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct TimestampFormatHeaders;
    6      6   
impl TimestampFormatHeaders {
    7      7   
    /// Creates a new `TimestampFormatHeaders`
    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::timestamp_format_headers::TimestampFormatHeadersInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::timestamp_format_headers::TimestampFormatHeadersOutput::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::timestamp_format_headers::TimestampFormatHeadersInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::timestamp_format_headers::TimestampFormatHeadersOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::timestamp_format_headers::TimestampFormatHeadersError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -110,114 +172,177 @@
  130    134   
                crate::operation::timestamp_format_headers::TimestampFormatHeadersError,
  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 TimestampFormatHeadersResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for TimestampFormatHeadersResponseDeserializer {
  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_timestamp_format_headers::de_timestamp_format_headers_http_error(status, headers, body)
  152    157   
        } else {
@@ -329,334 +389,398 @@
  349    354   
            .expect("the config must have a deserializer");
  350    355   
  351    356   
        let parsed = de.deserialize_streaming(&mut http_response);
  352    357   
        let parsed = parsed.unwrap_or_else(|| {
  353    358   
            let http_response = http_response.map(|body| {
  354    359   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  355    360   
                    body.bytes().unwrap(),
  356    361   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
  357    362   
                )))
  358    363   
            });
  359         -
            de.deserialize_nonstreaming(&http_response)
         364  +
            // Build a config bag with the protocol for schema-based deserialization
         365  +
            #[allow(unused_mut)]
         366  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         367  +
         368  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  360    369   
        });
  361    370   
        let parsed = parsed
  362    371   
            .expect("should be successful response")
  363    372   
            .downcast::<crate::operation::timestamp_format_headers::TimestampFormatHeadersOutput>()
  364    373   
            .unwrap();
  365    374   
        ::pretty_assertions::assert_eq!(
  366    375   
            parsed.member_epoch_seconds,
  367    376   
            expected_output.member_epoch_seconds,
  368    377   
            "Unexpected value for `member_epoch_seconds`"
  369    378   
        );

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

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

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

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_attributes.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 `XmlAttributes`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct XmlAttributes;
    6      6   
impl XmlAttributes {
    7      7   
    /// Creates a new `XmlAttributes`
    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::xml_attributes::XmlAttributesInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::xml_attributes::XmlAttributesOutput::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::xml_attributes::XmlAttributesInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::xml_attributes::XmlAttributesOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::xml_attributes::XmlAttributesError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -104,108 +166,171 @@
  124    128   
                crate::operation::xml_attributes::XmlAttributesError,
  125    129   
            >::new());
  126    130   
  127    131   
        ::std::borrow::Cow::Owned(rcb)
  128    132   
    }
  129    133   
}
  130    134   
  131    135   
#[derive(Debug)]
  132    136   
struct XmlAttributesResponseDeserializer;
  133    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlAttributesResponseDeserializer {
  134         -
    fn deserialize_nonstreaming(
         138  +
    fn deserialize_nonstreaming_with_config(
  135    139   
        &self,
  136    140   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         141  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  137    142   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  138    143   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  139    144   
        let headers = response.headers();
  140    145   
        let body = response.body().bytes().expect("body loaded");
  141    146   
        #[allow(unused_mut)]
  142    147   
        let mut force_error = false;
  143    148   
  144    149   
        let parse_result = if !success && status != 200 || force_error {
  145    150   
            crate::protocol_serde::shape_xml_attributes::de_xml_attributes_http_error(status, headers, body)
  146    151   
        } else {
@@ -314,319 +374,383 @@
  334    339   
            .expect("the config must have a deserializer");
  335    340   
  336    341   
        let parsed = de.deserialize_streaming(&mut http_response);
  337    342   
        let parsed = parsed.unwrap_or_else(|| {
  338    343   
            let http_response = http_response.map(|body| {
  339    344   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  340    345   
                    body.bytes().unwrap(),
  341    346   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  342    347   
                )))
  343    348   
            });
  344         -
            de.deserialize_nonstreaming(&http_response)
         349  +
            // Build a config bag with the protocol for schema-based deserialization
         350  +
            #[allow(unused_mut)]
         351  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         352  +
         353  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  345    354   
        });
  346    355   
        let parsed = parsed
  347    356   
            .expect("should be successful response")
  348    357   
            .downcast::<crate::operation::xml_attributes::XmlAttributesOutput>()
  349    358   
            .unwrap();
  350    359   
        ::pretty_assertions::assert_eq!(parsed.foo, expected_output.foo, "Unexpected value for `foo`");
  351    360   
        ::pretty_assertions::assert_eq!(parsed.attr, expected_output.attr, "Unexpected value for `attr`");
  352    361   
    }
  353    362   
}
  354    363   

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

@@ -22,22 +132,144 @@
   42     42   
    ::aws_smithy_schema::ShapeType::String,
   43     43   
    "attr",
   44     44   
    1,
   45     45   
)
   46     46   
.with_xml_name("test")
   47     47   
.with_xml_attribute();
   48     48   
static XMLATTRIBUTESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   49     49   
    XMLATTRIBUTESINPUT_SCHEMA_ID,
   50     50   
    ::aws_smithy_schema::ShapeType::Structure,
   51     51   
    &[&XMLATTRIBUTESINPUT_MEMBER_FOO, &XMLATTRIBUTESINPUT_MEMBER_ATTR],
   52         -
);
          52  +
)
          53  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("PUT", "/XmlAttributes", None));
   53     54   
impl XmlAttributesInput {
   54     55   
    /// The schema for this shape.
   55     56   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &XMLATTRIBUTESINPUT_SCHEMA;
   56     57   
}
   57     58   
impl ::aws_smithy_schema::serde::SerializableStruct for XmlAttributesInput {
   58     59   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   59     60   
    fn serialize_members(
   60     61   
        &self,
   61     62   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   62     63   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   63     64   
        if let Some(ref val) = self.foo {
   64     65   
            ser.write_string(&XMLATTRIBUTESINPUT_MEMBER_FOO, val)?;
   65     66   
        }
   66     67   
        if let Some(ref val) = self.attr {
   67     68   
            ser.write_string(&XMLATTRIBUTESINPUT_MEMBER_ATTR, val)?;
   68     69   
        }
   69     70   
        Ok(())
   70     71   
    }
   71     72   
}
   72     73   
impl XmlAttributesInput {
   73     74   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   74         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   75         -
        deserializer: &mut D,
          75  +
    pub fn deserialize(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   76     77   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   77     78   
        #[allow(unused_variables, unused_mut)]
   78     79   
        let mut builder = Self::builder();
   79     80   
        #[allow(
   80     81   
            unused_variables,
   81     82   
            unreachable_code,
   82     83   
            clippy::single_match,
   83     84   
            clippy::match_single_binding,
   84     85   
            clippy::diverging_sub_expression
   85     86   
        )]
   86         -
        deserializer.read_struct(&XMLATTRIBUTESINPUT_SCHEMA, (), |_, member, deser| {
          87  +
        deserializer.read_struct(&XMLATTRIBUTESINPUT_SCHEMA, &mut |member, deser| {
   87     88   
            match member.member_index() {
   88     89   
                Some(0) => {
   89     90   
                    builder.foo = Some(deser.read_string(member)?);
   90     91   
                }
   91     92   
                Some(1) => {
   92     93   
                    builder.attr = Some(deser.read_string(member)?);
   93     94   
                }
   94     95   
                _ => {}
   95     96   
            }
   96     97   
            Ok(())
   97     98   
        })?;
   98     99   
        builder
   99    100   
            .build()
  100    101   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  101    102   
    }
  102    103   
}
         104  +
impl XmlAttributesInput {
         105  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         106  +
    pub fn deserialize_with_response(
         107  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         108  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         109  +
        _status: u16,
         110  +
        _body: &[u8],
         111  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         112  +
        Self::deserialize(deserializer)
         113  +
    }
         114  +
}
  103    115   
impl XmlAttributesInput {
  104    116   
    /// Creates a new builder-style object to manufacture [`XmlAttributesInput`](crate::operation::xml_attributes::XmlAttributesInput).
  105    117   
    pub fn builder() -> crate::operation::xml_attributes::builders::XmlAttributesInputBuilder {
  106    118   
        crate::operation::xml_attributes::builders::XmlAttributesInputBuilder::default()
  107    119   
    }
  108    120   
}
  109    121   
  110    122   
/// A builder for [`XmlAttributesInput`](crate::operation::xml_attributes::XmlAttributesInput).
  111    123   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  112    124   
#[non_exhaustive]

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

@@ -44,44 +130,141 @@
   64     64   
            ser.write_string(&XMLATTRIBUTESOUTPUT_MEMBER_FOO, val)?;
   65     65   
        }
   66     66   
        if let Some(ref val) = self.attr {
   67     67   
            ser.write_string(&XMLATTRIBUTESOUTPUT_MEMBER_ATTR, val)?;
   68     68   
        }
   69     69   
        Ok(())
   70     70   
    }
   71     71   
}
   72     72   
impl XmlAttributesOutput {
   73     73   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   74         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   75         -
        deserializer: &mut D,
          74  +
    pub fn deserialize(
          75  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   76     76   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   77     77   
        #[allow(unused_variables, unused_mut)]
   78     78   
        let mut builder = Self::builder();
   79     79   
        #[allow(
   80     80   
            unused_variables,
   81     81   
            unreachable_code,
   82     82   
            clippy::single_match,
   83     83   
            clippy::match_single_binding,
   84     84   
            clippy::diverging_sub_expression
   85     85   
        )]
   86         -
        deserializer.read_struct(&XMLATTRIBUTESOUTPUT_SCHEMA, (), |_, member, deser| {
          86  +
        deserializer.read_struct(&XMLATTRIBUTESOUTPUT_SCHEMA, &mut |member, deser| {
   87     87   
            match member.member_index() {
   88     88   
                Some(0) => {
   89     89   
                    builder.foo = Some(deser.read_string(member)?);
   90     90   
                }
   91     91   
                Some(1) => {
   92     92   
                    builder.attr = Some(deser.read_string(member)?);
   93     93   
                }
   94     94   
                _ => {}
   95     95   
            }
   96     96   
            Ok(())
   97     97   
        })?;
   98     98   
        Ok(builder.build())
   99     99   
    }
  100    100   
}
         101  +
impl XmlAttributesOutput {
         102  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         103  +
    pub fn deserialize_with_response(
         104  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         105  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         106  +
        _status: u16,
         107  +
        _body: &[u8],
         108  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         109  +
        Self::deserialize(deserializer)
         110  +
    }
         111  +
}
  101    112   
impl XmlAttributesOutput {
  102    113   
    /// Creates a new builder-style object to manufacture [`XmlAttributesOutput`](crate::operation::xml_attributes::XmlAttributesOutput).
  103    114   
    pub fn builder() -> crate::operation::xml_attributes::builders::XmlAttributesOutputBuilder {
  104    115   
        crate::operation::xml_attributes::builders::XmlAttributesOutputBuilder::default()
  105    116   
    }
  106    117   
}
  107    118   
  108    119   
/// A builder for [`XmlAttributesOutput`](crate::operation::xml_attributes::XmlAttributesOutput).
  109    120   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  110    121   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_attributes_in_middle.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 `XmlAttributesInMiddle`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct XmlAttributesInMiddle;
    6      6   
impl XmlAttributesInMiddle {
    7      7   
    /// Creates a new `XmlAttributesInMiddle`
    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::xml_attributes_in_middle::XmlAttributesInMiddleInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput::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::xml_attributes_in_middle::XmlAttributesInMiddleInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -110,114 +172,177 @@
  130    134   
                crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleError,
  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 XmlAttributesInMiddleResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlAttributesInMiddleResponseDeserializer {
  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_xml_attributes_in_middle::de_xml_attributes_in_middle_http_error(status, headers, body)
  152    157   
        } else {
@@ -291,296 +351,360 @@
  311    316   
            .expect("the config must have a deserializer");
  312    317   
  313    318   
        let parsed = de.deserialize_streaming(&mut http_response);
  314    319   
        let parsed = parsed.unwrap_or_else(|| {
  315    320   
            let http_response = http_response.map(|body| {
  316    321   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  317    322   
                    body.bytes().unwrap(),
  318    323   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  319    324   
                )))
  320    325   
            });
  321         -
            de.deserialize_nonstreaming(&http_response)
         326  +
            // Build a config bag with the protocol for schema-based deserialization
         327  +
            #[allow(unused_mut)]
         328  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         329  +
         330  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  322    331   
        });
  323    332   
        let parsed = parsed
  324    333   
            .expect("should be successful response")
  325    334   
            .downcast::<crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput>()
  326    335   
            .unwrap();
  327    336   
        ::pretty_assertions::assert_eq!(parsed.payload, expected_output.payload, "Unexpected value for `payload`");
  328    337   
    }
  329    338   
}
  330    339   
  331    340   
/// Error type for the `XmlAttributesInMiddleError` operation.

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

@@ -5,5 +109,130 @@
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Structure,
   27     27   
    "payload",
   28     28   
    0,
   29     29   
)
   30     30   
.with_http_payload();
   31     31   
static XMLATTRIBUTESINMIDDLEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     32   
    XMLATTRIBUTESINMIDDLEINPUT_SCHEMA_ID,
   33     33   
    ::aws_smithy_schema::ShapeType::Structure,
   34     34   
    &[&XMLATTRIBUTESINMIDDLEINPUT_MEMBER_PAYLOAD],
   35         -
);
          35  +
)
          36  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("PUT", "/XmlAttributesInMiddle", None));
   36     37   
impl XmlAttributesInMiddleInput {
   37     38   
    /// The schema for this shape.
   38     39   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &XMLATTRIBUTESINMIDDLEINPUT_SCHEMA;
   39     40   
}
   40     41   
impl ::aws_smithy_schema::serde::SerializableStruct for XmlAttributesInMiddleInput {
   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_struct(&XMLATTRIBUTESINMIDDLEINPUT_MEMBER_PAYLOAD, val)?;
   48     49   
        }
   49     50   
        Ok(())
   50     51   
    }
   51     52   
}
   52     53   
impl XmlAttributesInMiddleInput {
   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(&XMLATTRIBUTESINMIDDLEINPUT_SCHEMA, (), |_, member, deser| {
          67  +
        deserializer.read_struct(&XMLATTRIBUTESINMIDDLEINPUT_SCHEMA, &mut |member, deser| {
   67     68   
            match member.member_index() {
   68     69   
                Some(0) => {
   69     70   
                    builder.payload = Some(crate::types::XmlAttributesInMiddlePayloadRequest::deserialize(deser)?);
   70     71   
                }
   71     72   
                _ => {}
   72     73   
            }
   73     74   
            Ok(())
   74     75   
        })?;
   75     76   
        builder
   76     77   
            .build()
   77     78   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   78     79   
    }
   79     80   
}
          81  +
impl XmlAttributesInMiddleInput {
          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  +
            builder.payload = Some(crate::types::XmlAttributesInMiddlePayloadRequest::deserialize(deserializer)?);
          95  +
        }
          96  +
        builder
          97  +
            .build()
          98  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
          99  +
    }
         100  +
}
   80    101   
impl XmlAttributesInMiddleInput {
   81    102   
    /// Creates a new builder-style object to manufacture [`XmlAttributesInMiddleInput`](crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleInput).
   82    103   
    pub fn builder() -> crate::operation::xml_attributes_in_middle::builders::XmlAttributesInMiddleInputBuilder {
   83    104   
        crate::operation::xml_attributes_in_middle::builders::XmlAttributesInMiddleInputBuilder::default()
   84    105   
    }
   85    106   
}
   86    107   
   87    108   
/// A builder for [`XmlAttributesInMiddleInput`](crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleInput).
   88    109   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   89    110   
#[non_exhaustive]

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

@@ -24,24 +107,125 @@
   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_struct(&XMLATTRIBUTESINMIDDLEOUTPUT_MEMBER_PAYLOAD, val)?;
   48     48   
        }
   49     49   
        Ok(())
   50     50   
    }
   51     51   
}
   52     52   
impl XmlAttributesInMiddleOutput {
   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(&XMLATTRIBUTESINMIDDLEOUTPUT_SCHEMA, (), |_, member, deser| {
          66  +
        deserializer.read_struct(&XMLATTRIBUTESINMIDDLEOUTPUT_SCHEMA, &mut |member, deser| {
   67     67   
            match member.member_index() {
   68     68   
                Some(0) => {
   69     69   
                    builder.payload = Some(crate::types::XmlAttributesInMiddlePayloadResponse::deserialize(deser)?);
   70     70   
                }
   71     71   
                _ => {}
   72     72   
            }
   73     73   
            Ok(())
   74     74   
        })?;
   75     75   
        Ok(builder.build())
   76     76   
    }
   77     77   
}
          78  +
impl XmlAttributesInMiddleOutput {
          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  +
            builder.payload = Some(crate::types::XmlAttributesInMiddlePayloadResponse::deserialize(deserializer)?);
          92  +
        }
          93  +
        Ok(builder.build())
          94  +
    }
          95  +
}
   78     96   
impl XmlAttributesInMiddleOutput {
   79     97   
    /// Creates a new builder-style object to manufacture [`XmlAttributesInMiddleOutput`](crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput).
   80     98   
    pub fn builder() -> crate::operation::xml_attributes_in_middle::builders::XmlAttributesInMiddleOutputBuilder {
   81     99   
        crate::operation::xml_attributes_in_middle::builders::XmlAttributesInMiddleOutputBuilder::default()
   82    100   
    }
   83    101   
}
   84    102   
   85    103   
/// A builder for [`XmlAttributesInMiddleOutput`](crate::operation::xml_attributes_in_middle::XmlAttributesInMiddleOutput).
   86    104   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   87    105   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_attributes_on_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 `XmlAttributesOnPayload`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct XmlAttributesOnPayload;
    6      6   
impl XmlAttributesOnPayload {
    7      7   
    /// Creates a new `XmlAttributesOnPayload`
    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::xml_attributes_on_payload::XmlAttributesOnPayloadInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadOutput::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::xml_attributes_on_payload::XmlAttributesOnPayloadInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -110,114 +172,177 @@
  130    134   
                crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadError,
  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 XmlAttributesOnPayloadResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlAttributesOnPayloadResponseDeserializer {
  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_xml_attributes_on_payload::de_xml_attributes_on_payload_http_error(status, headers, body)
  152    157   
        } else {
@@ -295,300 +355,364 @@
  315    320   
            .expect("the config must have a deserializer");
  316    321   
  317    322   
        let parsed = de.deserialize_streaming(&mut http_response);
  318    323   
        let parsed = parsed.unwrap_or_else(|| {
  319    324   
            let http_response = http_response.map(|body| {
  320    325   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  321    326   
                    body.bytes().unwrap(),
  322    327   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  323    328   
                )))
  324    329   
            });
  325         -
            de.deserialize_nonstreaming(&http_response)
         330  +
            // Build a config bag with the protocol for schema-based deserialization
         331  +
            #[allow(unused_mut)]
         332  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         333  +
         334  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  326    335   
        });
  327    336   
        let parsed = parsed
  328    337   
            .expect("should be successful response")
  329    338   
            .downcast::<crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadOutput>()
  330    339   
            .unwrap();
  331    340   
        ::pretty_assertions::assert_eq!(parsed.payload, expected_output.payload, "Unexpected value for `payload`");
  332    341   
    }
  333    342   
}
  334    343   
  335    344   
/// Error type for the `XmlAttributesOnPayloadError` operation.

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

@@ -5,5 +109,130 @@
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::Structure,
   27     27   
    "payload",
   28     28   
    0,
   29     29   
)
   30     30   
.with_http_payload();
   31     31   
static XMLATTRIBUTESONPAYLOADINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     32   
    XMLATTRIBUTESONPAYLOADINPUT_SCHEMA_ID,
   33     33   
    ::aws_smithy_schema::ShapeType::Structure,
   34     34   
    &[&XMLATTRIBUTESONPAYLOADINPUT_MEMBER_PAYLOAD],
   35         -
);
          35  +
)
          36  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("PUT", "/XmlAttributesOnPayload", None));
   36     37   
impl XmlAttributesOnPayloadInput {
   37     38   
    /// The schema for this shape.
   38     39   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &XMLATTRIBUTESONPAYLOADINPUT_SCHEMA;
   39     40   
}
   40     41   
impl ::aws_smithy_schema::serde::SerializableStruct for XmlAttributesOnPayloadInput {
   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_struct(&XMLATTRIBUTESONPAYLOADINPUT_MEMBER_PAYLOAD, val)?;
   48     49   
        }
   49     50   
        Ok(())
   50     51   
    }
   51     52   
}
   52     53   
impl XmlAttributesOnPayloadInput {
   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(&XMLATTRIBUTESONPAYLOADINPUT_SCHEMA, (), |_, member, deser| {
          67  +
        deserializer.read_struct(&XMLATTRIBUTESONPAYLOADINPUT_SCHEMA, &mut |member, deser| {
   67     68   
            match member.member_index() {
   68     69   
                Some(0) => {
   69     70   
                    builder.payload = Some(crate::types::XmlAttributesPayloadRequest::deserialize(deser)?);
   70     71   
                }
   71     72   
                _ => {}
   72     73   
            }
   73     74   
            Ok(())
   74     75   
        })?;
   75     76   
        builder
   76     77   
            .build()
   77     78   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   78     79   
    }
   79     80   
}
          81  +
impl XmlAttributesOnPayloadInput {
          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  +
            builder.payload = Some(crate::types::XmlAttributesPayloadRequest::deserialize(deserializer)?);
          95  +
        }
          96  +
        builder
          97  +
            .build()
          98  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
          99  +
    }
         100  +
}
   80    101   
impl XmlAttributesOnPayloadInput {
   81    102   
    /// Creates a new builder-style object to manufacture [`XmlAttributesOnPayloadInput`](crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadInput).
   82    103   
    pub fn builder() -> crate::operation::xml_attributes_on_payload::builders::XmlAttributesOnPayloadInputBuilder {
   83    104   
        crate::operation::xml_attributes_on_payload::builders::XmlAttributesOnPayloadInputBuilder::default()
   84    105   
    }
   85    106   
}
   86    107   
   87    108   
/// A builder for [`XmlAttributesOnPayloadInput`](crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadInput).
   88    109   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   89    110   
#[non_exhaustive]

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

@@ -24,24 +107,125 @@
   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_struct(&XMLATTRIBUTESONPAYLOADOUTPUT_MEMBER_PAYLOAD, val)?;
   48     48   
        }
   49     49   
        Ok(())
   50     50   
    }
   51     51   
}
   52     52   
impl XmlAttributesOnPayloadOutput {
   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(&XMLATTRIBUTESONPAYLOADOUTPUT_SCHEMA, (), |_, member, deser| {
          66  +
        deserializer.read_struct(&XMLATTRIBUTESONPAYLOADOUTPUT_SCHEMA, &mut |member, deser| {
   67     67   
            match member.member_index() {
   68     68   
                Some(0) => {
   69     69   
                    builder.payload = Some(crate::types::XmlAttributesPayloadResponse::deserialize(deser)?);
   70     70   
                }
   71     71   
                _ => {}
   72     72   
            }
   73     73   
            Ok(())
   74     74   
        })?;
   75     75   
        Ok(builder.build())
   76     76   
    }
   77     77   
}
          78  +
impl XmlAttributesOnPayloadOutput {
          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  +
            builder.payload = Some(crate::types::XmlAttributesPayloadResponse::deserialize(deserializer)?);
          92  +
        }
          93  +
        Ok(builder.build())
          94  +
    }
          95  +
}
   78     96   
impl XmlAttributesOnPayloadOutput {
   79     97   
    /// Creates a new builder-style object to manufacture [`XmlAttributesOnPayloadOutput`](crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadOutput).
   80     98   
    pub fn builder() -> crate::operation::xml_attributes_on_payload::builders::XmlAttributesOnPayloadOutputBuilder {
   81     99   
        crate::operation::xml_attributes_on_payload::builders::XmlAttributesOnPayloadOutputBuilder::default()
   82    100   
    }
   83    101   
}
   84    102   
   85    103   
/// A builder for [`XmlAttributesOnPayloadOutput`](crate::operation::xml_attributes_on_payload::XmlAttributesOnPayloadOutput).
   86    104   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   87    105   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/xml_blobs.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 `XmlBlobs`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct XmlBlobs;
    6      6   
impl XmlBlobs {
    7      7   
    /// Creates a new `XmlBlobs`
    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::xml_blobs::XmlBlobsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::xml_blobs::XmlBlobsOutput::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::xml_blobs::XmlBlobsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::xml_blobs::XmlBlobsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::xml_blobs::XmlBlobsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -100,104 +162,167 @@
  120    124   
                crate::operation::xml_blobs::XmlBlobsError,
  121    125   
            >::new());
  122    126   
  123    127   
        ::std::borrow::Cow::Owned(rcb)
  124    128   
    }
  125    129   
}
  126    130   
  127    131   
#[derive(Debug)]
  128    132   
struct XmlBlobsResponseDeserializer;
  129    133   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlBlobsResponseDeserializer {
  130         -
    fn deserialize_nonstreaming(
         134  +
    fn deserialize_nonstreaming_with_config(
  131    135   
        &self,
  132    136   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         137  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  133    138   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  134    139   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  135    140   
        let headers = response.headers();
  136    141   
        let body = response.body().bytes().expect("body loaded");
  137    142   
        #[allow(unused_mut)]
  138    143   
        let mut force_error = false;
  139    144   
  140    145   
        let parse_result = if !success && status != 200 || force_error {
  141    146   
            crate::protocol_serde::shape_xml_blobs::de_xml_blobs_http_error(status, headers, body)
  142    147   
        } else {
@@ -271,276 +331,340 @@
  291    296   
            .expect("the config must have a deserializer");
  292    297   
  293    298   
        let parsed = de.deserialize_streaming(&mut http_response);
  294    299   
        let parsed = parsed.unwrap_or_else(|| {
  295    300   
            let http_response = http_response.map(|body| {
  296    301   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  297    302   
                    body.bytes().unwrap(),
  298    303   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  299    304   
                )))
  300    305   
            });
  301         -
            de.deserialize_nonstreaming(&http_response)
         306  +
            // Build a config bag with the protocol for schema-based deserialization
         307  +
            #[allow(unused_mut)]
         308  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         309  +
         310  +
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)
  302    311   
        });
  303    312   
        let parsed = parsed
  304    313   
            .expect("should be successful response")
  305    314   
            .downcast::<crate::operation::xml_blobs::XmlBlobsOutput>()
  306    315   
            .unwrap();
  307    316   
        ::pretty_assertions::assert_eq!(parsed.data, expected_output.data, "Unexpected value for `data`");
  308    317   
    }
  309    318   
}
  310    319   
  311    320   
/// Error type for the `XmlBlobsError` operation.