Client Test

Client Test

rev. ee474c7509d7728618c23068f3741e8e5b339ef9 (ignoring whitespace)

Files changed:

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

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

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

@@ -148,148 +226,226 @@
  168    168   
                _input: &crate::operation::untag_resource::UntagResourceInput,
  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::untag_resource::UntagResourceInput,
  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.UntagResource",
  190    190   
            );
  191    191   
            builder
  192    192   
        };
  193    193   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_untag_resource::ser_untag_resource_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 UntagResourceEndpointParamsInterceptor;
  203    203   
  204    204   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UntagResourceEndpointParamsInterceptor {
  205    205   
    fn name(&self) -> &'static str {
  206    206   
        "UntagResourceEndpointParamsInterceptor"

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

@@ -151,151 +231,231 @@
  171    171   
                _input: &crate::operation::update_continuous_backups::UpdateContinuousBackupsInput,
  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::update_continuous_backups::UpdateContinuousBackupsInput,
  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.UpdateContinuousBackups",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(
  197    197   
            crate::protocol_serde::shape_update_continuous_backups::ser_update_continuous_backups_input(&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 UpdateContinuousBackupsEndpointParamsInterceptor;
  208    208   
  209    209   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateContinuousBackupsEndpointParamsInterceptor {
  210    210   
    fn name(&self) -> &'static str {
  211    211   
        "UpdateContinuousBackupsEndpointParamsInterceptor"

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

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

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

@@ -151,151 +229,229 @@
  171    171   
                _input: &crate::operation::update_global_table::UpdateGlobalTableInput,
  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::update_global_table::UpdateGlobalTableInput,
  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.UpdateGlobalTable",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_global_table::ser_update_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 UpdateGlobalTableEndpointParamsInterceptor;
  206    206   
  207    207   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateGlobalTableEndpointParamsInterceptor {
  208    208   
    fn name(&self) -> &'static str {
  209    209   
        "UpdateGlobalTableEndpointParamsInterceptor"

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

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

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

@@ -146,146 +224,224 @@
  166    166   
                _input: &crate::operation::update_item::UpdateItemInput,
  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::update_item::UpdateItemInput,
  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.UpdateItem",
  188    188   
            );
  189    189   
            builder
  190    190   
        };
  191    191   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_item::ser_update_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 UpdateItemEndpointParamsInterceptor;
  201    201   
  202    202   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateItemEndpointParamsInterceptor {
  203    203   
    fn name(&self) -> &'static str {
  204    204   
        "UpdateItemEndpointParamsInterceptor"

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

@@ -148,148 +226,226 @@
  168    168   
                _input: &crate::operation::update_table::UpdateTableInput,
  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::update_table::UpdateTableInput,
  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.UpdateTable",
  190    190   
            );
  191    191   
            builder
  192    192   
        };
  193    193   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_table::ser_update_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 UpdateTableEndpointParamsInterceptor;
  203    203   
  204    204   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateTableEndpointParamsInterceptor {
  205    205   
    fn name(&self) -> &'static str {
  206    206   
        "UpdateTableEndpointParamsInterceptor"

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

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

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

@@ -151,151 +229,229 @@
  171    171   
                _input: &crate::operation::update_time_to_live::UpdateTimeToLiveInput,
  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::update_time_to_live::UpdateTimeToLiveInput,
  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.UpdateTimeToLive",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_time_to_live::ser_update_time_to_live_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 UpdateTimeToLiveEndpointParamsInterceptor;
  206    206   
  207    207   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateTimeToLiveEndpointParamsInterceptor {
  208    208   
    fn name(&self) -> &'static str {
  209    209   
        "UpdateTimeToLiveEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/dynamo/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/ebs/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   
test-util = ["aws-smithy-runtime/test-util"]
   36         -
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"]
          40  +
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/http-body-1-x", "aws-smithy-types/rt-tokio"]
   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"]
   42     46   
   43     47   

tmp-codegen-diff/codegen-client-test/ebs/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/ebs/rust-client-codegen/src/operation/complete_snapshot.rs

@@ -159,159 +226,226 @@
  179    179   
                        "snapshot_id",
  180    180   
                        "cannot be empty or unset",
  181    181   
                    ));
  182    182   
                }
  183    183   
                ::std::write!(output, "/snapshots/completion/{SnapshotId}", SnapshotId = snapshot_id).expect("formatting should succeed");
  184    184   
                ::std::result::Result::Ok(())
  185    185   
            }
  186    186   
            #[allow(clippy::unnecessary_wraps)]
  187    187   
            fn update_http_builder(
  188    188   
                input: &crate::operation::complete_snapshot::CompleteSnapshotInput,
  189         -
                builder: ::http::request::Builder,
  190         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         189  +
                builder: ::http_1x::request::Builder,
         190  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  191    191   
                let mut uri = ::std::string::String::new();
  192    192   
                uri_base(input, &mut uri)?;
  193    193   
                let builder = crate::protocol_serde::shape_complete_snapshot::ser_complete_snapshot_headers(input, builder)?;
  194    194   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  195    195   
            }
  196         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
         196  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  197    197   
            builder
  198    198   
        };
  199    199   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  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 CompleteSnapshotEndpointParamsInterceptor;
  206    206   

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/get_snapshot_block.rs

@@ -207,207 +274,274 @@
  227    227   
                        "block_token",
  228    228   
                        "cannot be empty or unset",
  229    229   
                    ));
  230    230   
                }
  231    231   
                query.push_kv("blockToken", &::aws_smithy_http::query::fmt_string(inner_3));
  232    232   
                ::std::result::Result::Ok(())
  233    233   
            }
  234    234   
            #[allow(clippy::unnecessary_wraps)]
  235    235   
            fn update_http_builder(
  236    236   
                input: &crate::operation::get_snapshot_block::GetSnapshotBlockInput,
  237         -
                builder: ::http::request::Builder,
  238         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         237  +
                builder: ::http_1x::request::Builder,
         238  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  239    239   
                let mut uri = ::std::string::String::new();
  240    240   
                uri_base(input, &mut uri)?;
  241    241   
                uri_query(input, &mut uri)?;
  242    242   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  243    243   
            }
  244         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
         244  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  245    245   
            builder
  246    246   
        };
  247    247   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  248    248   
  249    249   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  250    250   
    }
  251    251   
}
  252    252   
#[derive(Debug)]
  253    253   
struct GetSnapshotBlockEndpointParamsInterceptor;
  254    254   

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/list_changed_blocks.rs

@@ -192,192 +259,259 @@
  212    212   
                if let ::std::option::Option::Some(inner_5) = &_input.starting_block_index {
  213    213   
                    {
  214    214   
                        query.push_kv("startingBlockIndex", ::aws_smithy_types::primitive::Encoder::from(*inner_5).encode());
  215    215   
                    }
  216    216   
                }
  217    217   
                ::std::result::Result::Ok(())
  218    218   
            }
  219    219   
            #[allow(clippy::unnecessary_wraps)]
  220    220   
            fn update_http_builder(
  221    221   
                input: &crate::operation::list_changed_blocks::ListChangedBlocksInput,
  222         -
                builder: ::http::request::Builder,
  223         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         222  +
                builder: ::http_1x::request::Builder,
         223  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  224    224   
                let mut uri = ::std::string::String::new();
  225    225   
                uri_base(input, &mut uri)?;
  226    226   
                uri_query(input, &mut uri)?;
  227    227   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  228    228   
            }
  229         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
         229  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  230    230   
            builder
  231    231   
        };
  232    232   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  233    233   
  234    234   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  235    235   
    }
  236    236   
}
  237    237   
#[derive(Debug)]
  238    238   
struct ListChangedBlocksEndpointParamsInterceptor;
  239    239