Client Test

Client Test

rev. 3c756f73b1f83a0eed4275d9d1e22df0b10b66fb (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_lists.rs

@@ -145,145 +212,213 @@
  165    165   
                _input: &crate::operation::xml_lists::XmlListsInput,
  166    166   
                output: &mut ::std::string::String,
  167    167   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  168    168   
                use ::std::fmt::Write as _;
  169    169   
                ::std::write!(output, "/").expect("formatting should succeed");
  170    170   
                ::std::result::Result::Ok(())
  171    171   
            }
  172    172   
            #[allow(clippy::unnecessary_wraps)]
  173    173   
            fn update_http_builder(
  174    174   
                input: &crate::operation::xml_lists::XmlListsInput,
  175         -
                builder: ::http::request::Builder,
  176         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         175  +
                builder: ::http_1x::request::Builder,
         176  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  177    177   
                let mut uri = ::std::string::String::new();
  178    178   
                uri_base(input, &mut uri)?;
  179    179   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  180    180   
            }
  181         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  182         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
         181  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         182  +
            builder =
         183  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  183    184   
            builder
  184    185   
        };
  185    186   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_lists_input::ser_xml_lists_input_input_input(&input)?);
  186    187   
  187    188   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  188    189   
    }
  189    190   
}
  190    191   
#[derive(Debug)]
  191    192   
struct XmlListsEndpointParamsInterceptor;
  192    193   

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_maps.rs

@@ -142,142 +209,210 @@
  162    162   
                _input: &crate::operation::xml_maps::XmlMapsInput,
  163    163   
                output: &mut ::std::string::String,
  164    164   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  165    165   
                use ::std::fmt::Write as _;
  166    166   
                ::std::write!(output, "/").expect("formatting should succeed");
  167    167   
                ::std::result::Result::Ok(())
  168    168   
            }
  169    169   
            #[allow(clippy::unnecessary_wraps)]
  170    170   
            fn update_http_builder(
  171    171   
                input: &crate::operation::xml_maps::XmlMapsInput,
  172         -
                builder: ::http::request::Builder,
  173         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         172  +
                builder: ::http_1x::request::Builder,
         173  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  174    174   
                let mut uri = ::std::string::String::new();
  175    175   
                uri_base(input, &mut uri)?;
  176    176   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  177    177   
            }
  178         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  179         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
         178  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         179  +
            builder =
         180  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  180    181   
            builder
  181    182   
        };
  182    183   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_maps_input::ser_xml_maps_input_input_input(&input)?);
  183    184   
  184    185   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  185    186   
    }
  186    187   
}
  187    188   
#[derive(Debug)]
  188    189   
struct XmlMapsEndpointParamsInterceptor;
  189    190   

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_maps_xml_name.rs

@@ -151,151 +218,219 @@
  171    171   
                _input: &crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput,
  172    172   
                output: &mut ::std::string::String,
  173    173   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174    174   
                use ::std::fmt::Write as _;
  175    175   
                ::std::write!(output, "/").expect("formatting should succeed");
  176    176   
                ::std::result::Result::Ok(())
  177    177   
            }
  178    178   
            #[allow(clippy::unnecessary_wraps)]
  179    179   
            fn update_http_builder(
  180    180   
                input: &crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder =
         189  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  189    190   
            builder
  190    191   
        };
  191    192   
        let body = ::aws_smithy_types::body::SdkBody::from(
  192    193   
            crate::protocol_serde::shape_xml_maps_xml_name_input::ser_xml_maps_xml_name_input_input_input(&input)?,
  193    194   
        );
  194    195   
  195    196   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  196    197   
    }
  197    198   
}
  198    199   
#[derive(Debug)]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_namespaces.rs

@@ -151,151 +218,219 @@
  171    171   
                _input: &crate::operation::xml_namespaces::XmlNamespacesInput,
  172    172   
                output: &mut ::std::string::String,
  173    173   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174    174   
                use ::std::fmt::Write as _;
  175    175   
                ::std::write!(output, "/").expect("formatting should succeed");
  176    176   
                ::std::result::Result::Ok(())
  177    177   
            }
  178    178   
            #[allow(clippy::unnecessary_wraps)]
  179    179   
            fn update_http_builder(
  180    180   
                input: &crate::operation::xml_namespaces::XmlNamespacesInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder =
         189  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  189    190   
            builder
  190    191   
        };
  191    192   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_namespaces_input::ser_xml_namespaces_input_input_input(
  192    193   
            &input,
  193    194   
        )?);
  194    195   
  195    196   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  196    197   
    }
  197    198   
}
  198    199   
#[derive(Debug)]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_timestamps.rs

@@ -151,151 +218,219 @@
  171    171   
                _input: &crate::operation::xml_timestamps::XmlTimestampsInput,
  172    172   
                output: &mut ::std::string::String,
  173    173   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174    174   
                use ::std::fmt::Write as _;
  175    175   
                ::std::write!(output, "/").expect("formatting should succeed");
  176    176   
                ::std::result::Result::Ok(())
  177    177   
            }
  178    178   
            #[allow(clippy::unnecessary_wraps)]
  179    179   
            fn update_http_builder(
  180    180   
                input: &crate::operation::xml_timestamps::XmlTimestampsInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder =
         189  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  189    190   
            builder
  190    191   
        };
  191    192   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_timestamps_input::ser_xml_timestamps_input_input_input(
  192    193   
            &input,
  193    194   
        )?);
  194    195   
  195    196   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  196    197   
    }
  197    198   
}
  198    199   
#[derive(Debug)]

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/serialization_settings.rs

@@ -1,1 +78,83 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/*
    3      3   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    4      4   
 * SPDX-License-Identifier: Apache-2.0
    5      5   
 */
    6      6   
    7      7   
#![allow(dead_code)]
    8      8   
    9      9   
use aws_smithy_http::header::set_request_header_if_absent;
   10     10   
use aws_smithy_types::config_bag::{Storable, StoreReplace};
   11         -
use http::header::{HeaderName, CONTENT_LENGTH, CONTENT_TYPE};
          11  +
use http_1x::header::{HeaderName, CONTENT_LENGTH, CONTENT_TYPE};
   12     12   
   13     13   
/// Configuration for how default protocol headers are serialized
   14     14   
#[derive(Clone, Debug, Default)]
   15     15   
pub(crate) struct HeaderSerializationSettings {
   16     16   
    omit_default_content_length: bool,
   17     17   
    omit_default_content_type: bool,
   18     18   
}
   19     19   
   20     20   
impl HeaderSerializationSettings {
   21     21   
    /// Creates new [`HeaderSerializationSettings`]
   22     22   
    pub(crate) fn new() -> Self {
   23     23   
        Default::default()
   24     24   
    }
   25     25   
   26     26   
    /// Omit the default `Content-Length` header during serialization
   27     27   
    pub(crate) fn omit_default_content_length(self) -> Self {
   28     28   
        Self {
   29     29   
            omit_default_content_length: true,
   30     30   
            ..self
   31     31   
        }
   32     32   
    }
   33     33   
   34     34   
    /// Omit the default `Content-Type` header during serialization
   35     35   
    pub(crate) fn omit_default_content_type(self) -> Self {
   36     36   
        Self {
   37     37   
            omit_default_content_type: true,
   38     38   
            ..self
   39     39   
        }
   40     40   
    }
   41     41   
   42     42   
    /// Returns true if the given default header name should be serialized
   43     43   
    fn include_header(&self, header: &HeaderName) -> bool {
   44     44   
        (!self.omit_default_content_length || header != CONTENT_LENGTH) && (!self.omit_default_content_type || header != CONTENT_TYPE)
   45     45   
    }
   46     46   
   47     47   
    /// Sets a default header on the given request builder if it should be serialized
   48         -
    pub(crate) fn set_default_header(&self, mut request: http::request::Builder, header_name: HeaderName, value: &str) -> http::request::Builder {
          48  +
    pub(crate) fn set_default_header(
          49  +
        &self,
          50  +
        mut request: http_1x::request::Builder,
          51  +
        header_name: HeaderName,
          52  +
        value: &str,
          53  +
    ) -> http_1x::request::Builder {
   49     54   
        if self.include_header(&header_name) {
   50     55   
            request = set_request_header_if_absent(request, header_name, value);
   51     56   
        }
   52     57   
        request
   53     58   
    }
   54     59   
}
   55     60   
   56     61   
impl Storable for HeaderSerializationSettings {
   57     62   
    type Storer = StoreReplace<Self>;
   58     63   
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/Cargo.toml

@@ -1,1 +43,47 @@
   13     13   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-async"
   14     14   
[dependencies.aws-smithy-http]
   15     15   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http"
   16     16   
[dependencies.aws-smithy-json]
   17     17   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-json"
   18     18   
[dependencies.aws-smithy-runtime]
   19     19   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime"
   20     20   
features = ["client"]
   21     21   
[dependencies.aws-smithy-runtime-api]
   22     22   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
   23         -
features = ["client", "http-02x"]
          23  +
features = ["client", "http-1x"]
   24     24   
[dependencies.aws-smithy-types]
   25     25   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
          26  +
features = ["http-body-1-x"]
   26     27   
[dependencies.bytes]
   27     28   
version = "1.4.0"
   28     29   
[dependencies.fastrand]
   29     30   
version = "2.0.0"
   30     31   
[dependencies.http]
   31     32   
version = "0.2.9"
          33  +
[dependencies.http-1x]
          34  +
version = "1"
          35  +
package = "http"
   32     36   
[dependencies.tracing]
   33     37   
version = "0.1"
   34     38   
[features]
   35     39   
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
   36     40   
test-util = ["aws-smithy-runtime/test-util"]
   37     41   
behavior-version-latest = []
   38     42   
rustls = ["aws-smithy-runtime/tls-rustls"]
   39     43   
default-https-client = ["aws-smithy-runtime/default-https-client"]
   40     44   
gated-tests = []
   41     45   
default = ["rt-tokio", "rustls", "default-https-client"]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/json_errors.rs

@@ -1,1 +45,45 @@
    5      5   
 */
    6      6   
    7      7   
use aws_smithy_json::deserialize::token::skip_value;
    8      8   
use aws_smithy_json::deserialize::{error::DeserializeError, json_token_iter, Token};
    9      9   
use aws_smithy_runtime_api::http::Headers;
   10     10   
use aws_smithy_types::error::metadata::{Builder as ErrorMetadataBuilder, ErrorMetadata};
   11     11   
use std::borrow::Cow;
   12     12   
   13     13   
// currently only used by AwsJson
   14     14   
#[allow(unused)]
   15         -
pub fn is_error<B>(response: &http::Response<B>) -> bool {
          15  +
pub fn is_error<B>(response: &http_1x::Response<B>) -> bool {
   16     16   
    !response.status().is_success()
   17     17   
}
   18     18   
   19     19   
fn sanitize_error_code(error_code: &str) -> &str {
   20     20   
    // Trim a trailing URL from the error code, which is done by removing the longest suffix
   21     21   
    // beginning with a `:`
   22     22   
    let error_code = match error_code.find(':') {
   23     23   
        Some(idx) => &error_code[..idx],
   24     24   
        None => error_code,
   25     25   
    };
@@ -60,60 +120,120 @@
   80     80   
#[cfg(test)]
   81     81   
mod test {
   82     82   
    use crate::json_errors::{parse_error_body, parse_error_metadata, sanitize_error_code};
   83     83   
    use aws_smithy_runtime_api::client::orchestrator::HttpResponse;
   84     84   
    use aws_smithy_types::{body::SdkBody, error::ErrorMetadata};
   85     85   
    use std::borrow::Cow;
   86     86   
   87     87   
    #[test]
   88     88   
    fn error_metadata() {
   89     89   
        let response = HttpResponse::try_from(
   90         -
            http::Response::builder()
          90  +
            http_1x::Response::builder()
   91     91   
                .body(SdkBody::from(r#"{ "__type": "FooError", "message": "Go to foo" }"#))
   92     92   
                .unwrap(),
   93     93   
        )
   94     94   
        .unwrap();
   95     95   
        assert_eq!(
   96     96   
            parse_error_metadata(response.body().bytes().unwrap(), response.headers())
   97     97   
                .unwrap()
   98     98   
                .build(),
   99     99   
            ErrorMetadata::builder().code("FooError").message("Go to foo").build()
  100    100   
        )
@@ -129,129 +180,180 @@
  149    149   
  150    150   
    #[test]
  151    151   
    fn sanitize_namespace() {
  152    152   
        assert_eq!(sanitize_error_code("aws.protocoltests.restjson#FooError"), "FooError");
  153    153   
    }
  154    154   
  155    155   
    // services like lambda use an alternate `Message` instead of `message`
  156    156   
    #[test]
  157    157   
    fn alternative_error_message_names() {
  158    158   
        let response = HttpResponse::try_from(
  159         -
            http::Response::builder()
         159  +
            http_1x::Response::builder()
  160    160   
                .header("x-amzn-errortype", "ResourceNotFoundException")
  161    161   
                .body(SdkBody::from(
  162    162   
                    r#"{
  163    163   
                    "Type": "User",
  164    164   
                    "Message": "Functions from 'us-west-2' are not reachable from us-east-1"
  165    165   
                }"#,
  166    166   
                ))
  167    167   
                .unwrap(),
  168    168   
        )
  169    169   
        .unwrap();

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/batch_execute_statement.rs

@@ -151,151 +231,231 @@
  171    171   
                _input: &crate::operation::batch_execute_statement::BatchExecuteStatementInput,
  172    172   
                output: &mut ::std::string::String,
  173    173   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174    174   
                use ::std::fmt::Write as _;
  175    175   
                ::std::write!(output, "/").expect("formatting should succeed");
  176    176   
                ::std::result::Result::Ok(())
  177    177   
            }
  178    178   
            #[allow(clippy::unnecessary_wraps)]
  179    179   
            fn update_http_builder(
  180    180   
                input: &crate::operation::batch_execute_statement::BatchExecuteStatementInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.0");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  189    189   
            builder = _header_serialization_settings.set_default_header(
  190    190   
                builder,
  191         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         191  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192    192   
                "DynamoDB_20120810.BatchExecuteStatement",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_batch_execute_statement::ser_batch_execute_statement_input(
  197    197   
            &input,
  198    198   
        )?);
  199    199   
        if let Some(content_length) = body.content_length() {
  200    200   
            let content_length = content_length.to_string();
  201         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         201  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  202    202   
        }
  203    203   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  204    204   
    }
  205    205   
}
  206    206   
#[derive(Debug)]
  207    207   
struct BatchExecuteStatementEndpointParamsInterceptor;
  208    208   
  209    209   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for BatchExecuteStatementEndpointParamsInterceptor {
  210    210   
    fn name(&self) -> &'static str {
  211    211   
        "BatchExecuteStatementEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/batch_get_item.rs

@@ -148,148 +226,226 @@
  168    168   
                _input: &crate::operation::batch_get_item::BatchGetItemInput,
  169    169   
                output: &mut ::std::string::String,
  170    170   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  171    171   
                use ::std::fmt::Write as _;
  172    172   
                ::std::write!(output, "/").expect("formatting should succeed");
  173    173   
                ::std::result::Result::Ok(())
  174    174   
            }
  175    175   
            #[allow(clippy::unnecessary_wraps)]
  176    176   
            fn update_http_builder(
  177    177   
                input: &crate::operation::batch_get_item::BatchGetItemInput,
  178         -
                builder: ::http::request::Builder,
  179         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         178  +
                builder: ::http_1x::request::Builder,
         179  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  180    180   
                let mut uri = ::std::string::String::new();
  181    181   
                uri_base(input, &mut uri)?;
  182    182   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  183    183   
            }
  184         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  185         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.0");
         184  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         185  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  186    186   
            builder = _header_serialization_settings.set_default_header(
  187    187   
                builder,
  188         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         188  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  189    189   
                "DynamoDB_20120810.BatchGetItem",
  190    190   
            );
  191    191   
            builder
  192    192   
        };
  193    193   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_batch_get_item::ser_batch_get_item_input(&input)?);
  194    194   
        if let Some(content_length) = body.content_length() {
  195    195   
            let content_length = content_length.to_string();
  196         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         196  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  197    197   
        }
  198    198   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  199    199   
    }
  200    200   
}
  201    201   
#[derive(Debug)]
  202    202   
struct BatchGetItemEndpointParamsInterceptor;
  203    203   
  204    204   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for BatchGetItemEndpointParamsInterceptor {
  205    205   
    fn name(&self) -> &'static str {
  206    206   
        "BatchGetItemEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/batch_write_item.rs

@@ -151,151 +229,229 @@
  171    171   
                _input: &crate::operation::batch_write_item::BatchWriteItemInput,
  172    172   
                output: &mut ::std::string::String,
  173    173   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174    174   
                use ::std::fmt::Write as _;
  175    175   
                ::std::write!(output, "/").expect("formatting should succeed");
  176    176   
                ::std::result::Result::Ok(())
  177    177   
            }
  178    178   
            #[allow(clippy::unnecessary_wraps)]
  179    179   
            fn update_http_builder(
  180    180   
                input: &crate::operation::batch_write_item::BatchWriteItemInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.0");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  189    189   
            builder = _header_serialization_settings.set_default_header(
  190    190   
                builder,
  191         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         191  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192    192   
                "DynamoDB_20120810.BatchWriteItem",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_batch_write_item::ser_batch_write_item_input(&input)?);
  197    197   
        if let Some(content_length) = body.content_length() {
  198    198   
            let content_length = content_length.to_string();
  199         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         199  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  200    200   
        }
  201    201   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  202    202   
    }
  203    203   
}
  204    204   
#[derive(Debug)]
  205    205   
struct BatchWriteItemEndpointParamsInterceptor;
  206    206   
  207    207   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for BatchWriteItemEndpointParamsInterceptor {
  208    208   
    fn name(&self) -> &'static str {
  209    209   
        "BatchWriteItemEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/create_backup.rs

@@ -148,148 +226,226 @@
  168    168   
                _input: &crate::operation::create_backup::CreateBackupInput,
  169    169   
                output: &mut ::std::string::String,
  170    170   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  171    171   
                use ::std::fmt::Write as _;
  172    172   
                ::std::write!(output, "/").expect("formatting should succeed");
  173    173   
                ::std::result::Result::Ok(())
  174    174   
            }
  175    175   
            #[allow(clippy::unnecessary_wraps)]
  176    176   
            fn update_http_builder(
  177    177   
                input: &crate::operation::create_backup::CreateBackupInput,
  178         -
                builder: ::http::request::Builder,
  179         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         178  +
                builder: ::http_1x::request::Builder,
         179  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  180    180   
                let mut uri = ::std::string::String::new();
  181    181   
                uri_base(input, &mut uri)?;
  182    182   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  183    183   
            }
  184         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  185         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.0");
         184  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         185  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  186    186   
            builder = _header_serialization_settings.set_default_header(
  187    187   
                builder,
  188         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         188  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  189    189   
                "DynamoDB_20120810.CreateBackup",
  190    190   
            );
  191    191   
            builder
  192    192   
        };
  193    193   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_backup::ser_create_backup_input(&input)?);
  194    194   
        if let Some(content_length) = body.content_length() {
  195    195   
            let content_length = content_length.to_string();
  196         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         196  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  197    197   
        }
  198    198   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  199    199   
    }
  200    200   
}
  201    201   
#[derive(Debug)]
  202    202   
struct CreateBackupEndpointParamsInterceptor;
  203    203   
  204    204   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateBackupEndpointParamsInterceptor {
  205    205   
    fn name(&self) -> &'static str {
  206    206   
        "CreateBackupEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/create_global_table.rs

@@ -151,151 +229,229 @@
  171    171   
                _input: &crate::operation::create_global_table::CreateGlobalTableInput,
  172    172   
                output: &mut ::std::string::String,
  173    173   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174    174   
                use ::std::fmt::Write as _;
  175    175   
                ::std::write!(output, "/").expect("formatting should succeed");
  176    176   
                ::std::result::Result::Ok(())
  177    177   
            }
  178    178   
            #[allow(clippy::unnecessary_wraps)]
  179    179   
            fn update_http_builder(
  180    180   
                input: &crate::operation::create_global_table::CreateGlobalTableInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.0");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  189    189   
            builder = _header_serialization_settings.set_default_header(
  190    190   
                builder,
  191         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         191  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192    192   
                "DynamoDB_20120810.CreateGlobalTable",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_global_table::ser_create_global_table_input(&input)?);
  197    197   
        if let Some(content_length) = body.content_length() {
  198    198   
            let content_length = content_length.to_string();
  199         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         199  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  200    200   
        }
  201    201   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  202    202   
    }
  203    203   
}
  204    204   
#[derive(Debug)]
  205    205   
struct CreateGlobalTableEndpointParamsInterceptor;
  206    206   
  207    207   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateGlobalTableEndpointParamsInterceptor {
  208    208   
    fn name(&self) -> &'static str {
  209    209   
        "CreateGlobalTableEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/create_table.rs

@@ -148,148 +226,226 @@
  168    168   
                _input: &crate::operation::create_table::CreateTableInput,
  169    169   
                output: &mut ::std::string::String,
  170    170   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  171    171   
                use ::std::fmt::Write as _;
  172    172   
                ::std::write!(output, "/").expect("formatting should succeed");
  173    173   
                ::std::result::Result::Ok(())
  174    174   
            }
  175    175   
            #[allow(clippy::unnecessary_wraps)]
  176    176   
            fn update_http_builder(
  177    177   
                input: &crate::operation::create_table::CreateTableInput,
  178         -
                builder: ::http::request::Builder,
  179         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         178  +
                builder: ::http_1x::request::Builder,
         179  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  180    180   
                let mut uri = ::std::string::String::new();
  181    181   
                uri_base(input, &mut uri)?;
  182    182   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  183    183   
            }
  184         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  185         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.0");
         184  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         185  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  186    186   
            builder = _header_serialization_settings.set_default_header(
  187    187   
                builder,
  188         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         188  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  189    189   
                "DynamoDB_20120810.CreateTable",
  190    190   
            );
  191    191   
            builder
  192    192   
        };
  193    193   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_table::ser_create_table_input(&input)?);
  194    194   
        if let Some(content_length) = body.content_length() {
  195    195   
            let content_length = content_length.to_string();
  196         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         196  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  197    197   
        }
  198    198   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  199    199   
    }
  200    200   
}
  201    201   
#[derive(Debug)]
  202    202   
struct CreateTableEndpointParamsInterceptor;
  203    203   
  204    204   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateTableEndpointParamsInterceptor {
  205    205   
    fn name(&self) -> &'static str {
  206    206   
        "CreateTableEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/delete_backup.rs

@@ -148,148 +226,226 @@
  168    168   
                _input: &crate::operation::delete_backup::DeleteBackupInput,
  169    169   
                output: &mut ::std::string::String,
  170    170   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  171    171   
                use ::std::fmt::Write as _;
  172    172   
                ::std::write!(output, "/").expect("formatting should succeed");
  173    173   
                ::std::result::Result::Ok(())
  174    174   
            }
  175    175   
            #[allow(clippy::unnecessary_wraps)]
  176    176   
            fn update_http_builder(
  177    177   
                input: &crate::operation::delete_backup::DeleteBackupInput,
  178         -
                builder: ::http::request::Builder,
  179         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         178  +
                builder: ::http_1x::request::Builder,
         179  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  180    180   
                let mut uri = ::std::string::String::new();
  181    181   
                uri_base(input, &mut uri)?;
  182    182   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  183    183   
            }
  184         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  185         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.0");
         184  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         185  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  186    186   
            builder = _header_serialization_settings.set_default_header(
  187    187   
                builder,
  188         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         188  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  189    189   
                "DynamoDB_20120810.DeleteBackup",
  190    190   
            );
  191    191   
            builder
  192    192   
        };
  193    193   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_backup::ser_delete_backup_input(&input)?);
  194    194   
        if let Some(content_length) = body.content_length() {
  195    195   
            let content_length = content_length.to_string();
  196         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         196  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  197    197   
        }
  198    198   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  199    199   
    }
  200    200   
}
  201    201   
#[derive(Debug)]
  202    202   
struct DeleteBackupEndpointParamsInterceptor;
  203    203   
  204    204   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteBackupEndpointParamsInterceptor {
  205    205   
    fn name(&self) -> &'static str {
  206    206   
        "DeleteBackupEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/delete_item.rs

@@ -146,146 +224,224 @@
  166    166   
                _input: &crate::operation::delete_item::DeleteItemInput,
  167    167   
                output: &mut ::std::string::String,
  168    168   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  169    169   
                use ::std::fmt::Write as _;
  170    170   
                ::std::write!(output, "/").expect("formatting should succeed");
  171    171   
                ::std::result::Result::Ok(())
  172    172   
            }
  173    173   
            #[allow(clippy::unnecessary_wraps)]
  174    174   
            fn update_http_builder(
  175    175   
                input: &crate::operation::delete_item::DeleteItemInput,
  176         -
                builder: ::http::request::Builder,
  177         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         176  +
                builder: ::http_1x::request::Builder,
         177  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  178    178   
                let mut uri = ::std::string::String::new();
  179    179   
                uri_base(input, &mut uri)?;
  180    180   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  181    181   
            }
  182         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  183         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.0");
         182  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         183  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  184    184   
            builder = _header_serialization_settings.set_default_header(
  185    185   
                builder,
  186         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         186  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  187    187   
                "DynamoDB_20120810.DeleteItem",
  188    188   
            );
  189    189   
            builder
  190    190   
        };
  191    191   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_item::ser_delete_item_input(&input)?);
  192    192   
        if let Some(content_length) = body.content_length() {
  193    193   
            let content_length = content_length.to_string();
  194         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         194  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  195    195   
        }
  196    196   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  197    197   
    }
  198    198   
}
  199    199   
#[derive(Debug)]
  200    200   
struct DeleteItemEndpointParamsInterceptor;
  201    201   
  202    202   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteItemEndpointParamsInterceptor {
  203    203   
    fn name(&self) -> &'static str {
  204    204   
        "DeleteItemEndpointParamsInterceptor"