Client Test

Client Test

rev. ee474c7509d7728618c23068f3741e8e5b339ef9

Files changed:

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

@@ -182,182 +249,249 @@
  202    202   
                if let ::std::option::Option::Some(inner_4) = &_input.next_token {
  203    203   
                    {
  204    204   
                        query.push_kv("pageToken", &::aws_smithy_http::query::fmt_string(inner_4));
  205    205   
                    }
  206    206   
                }
  207    207   
                ::std::result::Result::Ok(())
  208    208   
            }
  209    209   
            #[allow(clippy::unnecessary_wraps)]
  210    210   
            fn update_http_builder(
  211    211   
                input: &crate::operation::list_snapshot_blocks::ListSnapshotBlocksInput,
  212         -
                builder: ::http::request::Builder,
  213         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         212  +
                builder: ::http_1x::request::Builder,
         213  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  214    214   
                let mut uri = ::std::string::String::new();
  215    215   
                uri_base(input, &mut uri)?;
  216    216   
                uri_query(input, &mut uri)?;
  217    217   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  218    218   
            }
  219         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
         219  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  220    220   
            builder
  221    221   
        };
  222    222   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  223    223   
  224    224   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  225    225   
    }
  226    226   
}
  227    227   
#[derive(Debug)]
  228    228   
struct ListSnapshotBlocksEndpointParamsInterceptor;
  229    229   

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

@@ -177,177 +251,251 @@
  197    197   
                    "/snapshots/{SnapshotId}/blocks/{BlockIndex}",
  198    198   
                    SnapshotId = snapshot_id,
  199    199   
                    BlockIndex = block_index
  200    200   
                )
  201    201   
                .expect("formatting should succeed");
  202    202   
                ::std::result::Result::Ok(())
  203    203   
            }
  204    204   
            #[allow(clippy::unnecessary_wraps)]
  205    205   
            fn update_http_builder(
  206    206   
                input: &crate::operation::put_snapshot_block::PutSnapshotBlockInput,
  207         -
                builder: ::http::request::Builder,
  208         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         207  +
                builder: ::http_1x::request::Builder,
         208  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  209    209   
                let mut uri = ::std::string::String::new();
  210    210   
                uri_base(input, &mut uri)?;
  211    211   
                let builder = crate::protocol_serde::shape_put_snapshot_block::ser_put_snapshot_block_headers(input, builder)?;
  212    212   
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
  213    213   
            }
  214         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  215         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/octet-stream");
         214  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         215  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/octet-stream");
  216    216   
            builder
  217    217   
        };
  218    218   
        let body = crate::protocol_serde::shape_put_snapshot_block_input::ser_block_data_http_payload(input.block_data)?.into_inner();
  219    219   
        if let Some(content_length) = body.content_length() {
  220    220   
            let content_length = content_length.to_string();
  221         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         221  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  222    222   
        }
  223    223   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  224    224   
    }
  225    225   
}
  226    226   
#[derive(Debug)]
  227    227   
struct PutSnapshotBlockEndpointParamsInterceptor;
  228    228   
  229    229   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutSnapshotBlockEndpointParamsInterceptor {
  230    230   
    fn name(&self) -> &'static str {
  231    231   
        "PutSnapshotBlockEndpointParamsInterceptor"

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

@@ -156,156 +229,229 @@
  176    176   
                _input: &crate::operation::start_snapshot::StartSnapshotInput,
  177    177   
                output: &mut ::std::string::String,
  178    178   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  179    179   
                use ::std::fmt::Write as _;
  180    180   
                ::std::write!(output, "/snapshots").expect("formatting should succeed");
  181    181   
                ::std::result::Result::Ok(())
  182    182   
            }
  183    183   
            #[allow(clippy::unnecessary_wraps)]
  184    184   
            fn update_http_builder(
  185    185   
                input: &crate::operation::start_snapshot::StartSnapshotInput,
  186         -
                builder: ::http::request::Builder,
  187         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         186  +
                builder: ::http_1x::request::Builder,
         187  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  188    188   
                let mut uri = ::std::string::String::new();
  189    189   
                uri_base(input, &mut uri)?;
  190    190   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  191    191   
            }
  192         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  193         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
         192  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         193  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_start_snapshot::ser_start_snapshot_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 StartSnapshotEndpointParamsInterceptor;
  206    206   
  207    207   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StartSnapshotEndpointParamsInterceptor {
  208    208   
    fn name(&self) -> &'static str {
  209    209   
        "StartSnapshotEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/protocol_serde/shape_complete_snapshot.rs

@@ -105,105 +204,204 @@
  125    125   
        #[allow(unused_mut)]
  126    126   
        let mut output = crate::operation::complete_snapshot::builders::CompleteSnapshotOutputBuilder::default();
  127    127   
        output = crate::protocol_serde::shape_complete_snapshot::de_complete_snapshot(_response_body, output)
  128    128   
            .map_err(crate::operation::complete_snapshot::CompleteSnapshotError::unhandled)?;
  129    129   
        output.build()
  130    130   
    })
  131    131   
}
  132    132   
  133    133   
pub fn ser_complete_snapshot_headers(
  134    134   
    input: &crate::operation::complete_snapshot::CompleteSnapshotInput,
  135         -
    mut builder: ::http::request::Builder,
  136         -
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         135  +
    mut builder: ::http_1x::request::Builder,
         136  +
) -> std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  137    137   
    if let ::std::option::Option::Some(inner_1) = &input.changed_blocks_count {
  138    138   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_1);
  139    139   
        let formatted_2 = encoder.encode();
  140    140   
        let header_value = formatted_2;
  141         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         141  +
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
  142    142   
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  143    143   
                "changed_blocks_count",
  144    144   
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  145    145   
            )
  146    146   
        })?;
  147    147   
        builder = builder.header("x-amz-ChangedBlocksCount", header_value);
  148    148   
    }
  149    149   
    if let ::std::option::Option::Some(inner_3) = &input.checksum_aggregation_method {
  150    150   
        let formatted_4 = inner_3.as_str();
  151    151   
        let header_value = formatted_4;
  152         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         152  +
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
  153    153   
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  154    154   
                "checksum_aggregation_method",
  155    155   
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  156    156   
            )
  157    157   
        })?;
  158    158   
        builder = builder.header("x-amz-Checksum-Aggregation-Method", header_value);
  159    159   
    }
  160    160   
    if let ::std::option::Option::Some(inner_5) = &input.checksum_algorithm {
  161    161   
        let formatted_6 = inner_5.as_str();
  162    162   
        let header_value = formatted_6;
  163         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         163  +
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
  164    164   
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  165    165   
                "checksum_algorithm",
  166    166   
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  167    167   
            )
  168    168   
        })?;
  169    169   
        builder = builder.header("x-amz-Checksum-Algorithm", header_value);
  170    170   
    }
  171    171   
    if let ::std::option::Option::Some(inner_7) = &input.checksum {
  172    172   
        let formatted_8 = inner_7.as_str();
  173    173   
        let header_value = formatted_8;
  174         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         174  +
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
  175    175   
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  176    176   
                "checksum",
  177    177   
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  178    178   
            )
  179    179   
        })?;
  180    180   
        builder = builder.header("x-amz-Checksum", header_value);
  181    181   
    }
  182    182   
    Ok(builder)
  183    183   
}
  184    184   

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/protocol_serde/shape_put_snapshot_block.rs

@@ -115,115 +194,194 @@
  135    135   
                    "Failed to parse ChecksumAlgorithm from header `x-amz-Checksum-Algorithm",
  136    136   
                )
  137    137   
            })?,
  138    138   
        );
  139    139   
        output.build()
  140    140   
    })
  141    141   
}
  142    142   
  143    143   
pub fn ser_put_snapshot_block_headers(
  144    144   
    input: &crate::operation::put_snapshot_block::PutSnapshotBlockInput,
  145         -
    mut builder: ::http::request::Builder,
  146         -
) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         145  +
    mut builder: ::http_1x::request::Builder,
         146  +
) -> std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  147    147   
    if let ::std::option::Option::Some(inner_1) = &input.checksum {
  148    148   
        let formatted_2 = inner_1.as_str();
  149    149   
        let header_value = formatted_2;
  150         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         150  +
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
  151    151   
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  152    152   
                "checksum",
  153    153   
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  154    154   
            )
  155    155   
        })?;
  156    156   
        builder = builder.header("x-amz-Checksum", header_value);
  157    157   
    }
  158    158   
    if let ::std::option::Option::Some(inner_3) = &input.progress {
  159    159   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_3);
  160    160   
        let formatted_4 = encoder.encode();
  161    161   
        let header_value = formatted_4;
  162         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         162  +
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
  163    163   
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  164    164   
                "progress",
  165    165   
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  166    166   
            )
  167    167   
        })?;
  168    168   
        builder = builder.header("x-amz-Progress", header_value);
  169    169   
    }
  170    170   
    if let ::std::option::Option::Some(inner_5) = &input.data_length {
  171    171   
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_5);
  172    172   
        let formatted_6 = encoder.encode();
  173    173   
        let header_value = formatted_6;
  174         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         174  +
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
  175    175   
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  176    176   
                "data_length",
  177    177   
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  178    178   
            )
  179    179   
        })?;
  180    180   
        builder = builder.header("x-amz-Data-Length", header_value);
  181    181   
    }
  182    182   
    if let ::std::option::Option::Some(inner_7) = &input.checksum_algorithm {
  183    183   
        let formatted_8 = inner_7.as_str();
  184    184   
        let header_value = formatted_8;
  185         -
        let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
         185  +
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
  186    186   
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
  187    187   
                "checksum_algorithm",
  188    188   
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
  189    189   
            )
  190    190   
        })?;
  191    191   
        builder = builder.header("x-amz-Checksum-Algorithm", header_value);
  192    192   
    }
  193    193   
    Ok(builder)
  194    194   
}

tmp-codegen-diff/codegen-client-test/ebs/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/ec2_query/rust-client-codegen/Cargo.toml

@@ -1,1 +68,74 @@
    6      6   
description = "test"
    7      7   
edition = "2021"
    8      8   
    9      9   
[package.metadata.smithy]
   10     10   
codegen-version = "ci"
   11     11   
protocol = "aws.protocols#ec2Query"
   12     12   
[dependencies.aws-smithy-async]
   13     13   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-async"
   14     14   
[dependencies.aws-smithy-compression]
   15     15   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-compression"
   16         -
features = ["http-body-0-4-x"]
   17     16   
[dependencies.aws-smithy-http]
   18     17   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http"
   19     18   
[dependencies.aws-smithy-query]
   20     19   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-query"
   21     20   
[dependencies.aws-smithy-runtime]
   22     21   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime"
   23     22   
features = ["client"]
   24     23   
[dependencies.aws-smithy-runtime-api]
   25     24   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
   26         -
features = ["client", "http-02x"]
          25  +
features = ["client", "http-1x"]
   27     26   
[dependencies.aws-smithy-types]
   28     27   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
   29         -
features = ["http-body-0-4-x"]
          28  +
features = ["http-body-1-x", "http-body-0-4-x"]
   30     29   
[dependencies.aws-smithy-xml]
   31     30   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-xml"
   32     31   
[dependencies.fastrand]
   33     32   
version = "2.0.0"
   34     33   
[dependencies.flate2]
   35     34   
version = "1.0.30"
   36     35   
[dependencies.http]
   37     36   
version = "0.2.9"
   38         -
[dependencies.http-body]
   39         -
version = "0.4.4"
          37  +
[dependencies.http-1x]
          38  +
version = "1"
          39  +
package = "http"
          40  +
[dependencies.http-body-1x]
          41  +
version = "1"
          42  +
package = "http-body"
          43  +
[dependencies.http-body-util]
          44  +
version = "0.1.3"
   40     45   
[dependencies.tracing]
   41     46   
version = "0.1"
   42     47   
[dev-dependencies.aws-smithy-http-client]
   43     48   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http-client"
   44     49   
features = ["test-util"]
   45     50   
[dev-dependencies.aws-smithy-protocol-test]
   46     51   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-protocol-test"
   47     52   
[dev-dependencies.aws-smithy-types]
   48     53   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
          54  +
features = ["http-body-1-x"]
   49     55   
[dev-dependencies.bytes]
   50     56   
version = "1.4.0"
   51     57   
[dev-dependencies.pretty_assertions]
   52     58   
version = "1.3.0"
   53     59   
[dev-dependencies.tokio]
   54     60   
version = "1.23.1"
   55     61   
features = ["macros", "test-util", "rt-multi-thread"]
   56     62   
[dev-dependencies.tracing-test]
   57     63   
version = "0.2.5"
   58     64   
features = ["no-env-filter"]

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/client_request_compression.rs

@@ -1,1 +38,38 @@
    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   
use aws_smithy_compression::body::compress::CompressedBody;
    8         -
use aws_smithy_compression::http::http_body_0_4_x::CompressRequest;
           8  +
use aws_smithy_compression::http::CompressRequest;
    9      9   
use aws_smithy_compression::{CompressionAlgorithm, CompressionOptions};
   10     10   
use aws_smithy_runtime::client::sdk_feature::SmithySdkFeature;
   11     11   
use aws_smithy_runtime_api::box_error::BoxError;
   12     12   
use aws_smithy_runtime_api::client::interceptors::context::{BeforeSerializationInterceptorContextRef, BeforeTransmitInterceptorContextMut};
   13     13   
use aws_smithy_runtime_api::client::interceptors::{Intercept, SharedInterceptor};
   14     14   
use aws_smithy_runtime_api::client::orchestrator::HttpRequest;
   15     15   
use aws_smithy_runtime_api::client::runtime_components::{RuntimeComponents, RuntimeComponentsBuilder};
   16     16   
use aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
   17     17   
use aws_smithy_types::body::SdkBody;
   18     18   
use aws_smithy_types::config_bag::{ConfigBag, Layer, Storable, StoreReplace};
@@ -80,80 +279,281 @@
  100    100   
        // Don't wrap a body if compression is disabled.
  101    101   
        if !options.is_enabled() {
  102    102   
            tracing::trace!("request compression is disabled and will not be applied");
  103    103   
            return Ok(());
  104    104   
        }
  105    105   
  106    106   
        // Don't wrap a body if it's below the minimum size
  107    107   
        //
  108    108   
        // Because compressing small amounts of data can actually increase its size,
  109    109   
        // we check to see if the data is big enough to make compression worthwhile.
  110         -
        let size_hint = http_body::Body::size_hint(request.body()).exact();
         110  +
        let size_hint = http_body_1x::Body::size_hint(request.body()).exact();
  111    111   
        if let Some(known_size) = size_hint {
  112    112   
            if known_size < options.min_compression_size_bytes() as u64 {
  113    113   
                tracing::trace!(
  114    114   
                    min_compression_size_bytes = options.min_compression_size_bytes(),
  115    115   
                    known_size,
  116    116   
                    "request body is below minimum size and will not be compressed"
  117    117   
                );
  118    118   
                return Ok(());
  119    119   
            }
  120    120   
            tracing::trace!("compressing sized request body...");
  121    121   
        } else {
  122    122   
            tracing::trace!("compressing unsized request body...");
  123    123   
        }
  124    124   
  125         -
        wrap_request_body_in_compressed_body(request, CompressionAlgorithm::Gzip.into_impl_http_body_0_4_x(&options))?;
         125  +
        wrap_request_body_in_compressed_body(request, CompressionAlgorithm::Gzip.into_impl_http_body_1_x(&options))?;
  126    126   
        cfg.interceptor_state()
  127    127   
            .store_append::<SmithySdkFeature>(SmithySdkFeature::GzipRequestCompression);
  128    128   
  129    129   
        Ok(())
  130    130   
    }
  131    131   
}
  132    132   
  133    133   
fn wrap_request_body_in_compressed_body(request: &mut HttpRequest, request_compress_impl: Box<dyn CompressRequest>) -> Result<(), BuildError> {
  134    134   
    request
  135    135   
        .headers_mut()
  136    136   
        .append(request_compress_impl.header_name(), request_compress_impl.header_value());
  137    137   
    let mut body = {
  138    138   
        let body = mem::replace(request.body_mut(), SdkBody::taken());
  139    139   
  140    140   
        if body.is_streaming() {
  141         -
            request.headers_mut().remove(http::header::CONTENT_LENGTH);
         141  +
            request.headers_mut().remove(http_1x::header::CONTENT_LENGTH);
  142    142   
            body.map(move |body| {
  143    143   
                let body = CompressedBody::new(body, request_compress_impl.clone());
  144         -
                SdkBody::from_body_0_4(body)
         144  +
                SdkBody::from_body_1_x(body)
  145    145   
            })
  146    146   
        } else {
  147    147   
            let body = CompressedBody::new(body, request_compress_impl.clone());
  148    148   
            let body = body.into_compressed_sdk_body().map_err(BuildError::other)?;
  149    149   
  150    150   
            let content_length = body.content_length().expect("this payload is in-memory");
  151         -
            request.headers_mut().insert(http::header::CONTENT_LENGTH, content_length.to_string());
         151  +
            request.headers_mut().insert(http_1x::header::CONTENT_LENGTH, content_length.to_string());
  152    152   
  153    153   
            body
  154    154   
        }
  155    155   
    };
  156    156   
    mem::swap(request.body_mut(), &mut body);
  157    157   
  158    158   
    Ok(())
  159    159   
}
  160    160   
  161    161   
#[derive(Debug, Copy, Clone, Default)]
  162    162   
pub(crate) struct DisableRequestCompression(pub(crate) bool);
  163    163   
  164    164   
impl From<bool> for DisableRequestCompression {
  165    165   
    fn from(value: bool) -> Self {
  166    166   
        DisableRequestCompression(value)
  167    167   
    }
  168    168   
}
  169    169   
  170    170   
impl Storable for DisableRequestCompression {
  171    171   
    type Storer = StoreReplace<Self>;
  172    172   
}
  173    173   
  174    174   
#[derive(Debug, Copy, Clone)]
  175    175   
pub(crate) struct RequestMinCompressionSizeBytes(pub(crate) u32);
  176    176   
  177    177   
impl Default for RequestMinCompressionSizeBytes {
  178    178   
    fn default() -> Self {
  179    179   
        RequestMinCompressionSizeBytes(10240)
  180    180   
    }
  181    181   
}
  182    182   
  183    183   
impl From<u32> for RequestMinCompressionSizeBytes {
  184    184   
    fn from(value: u32) -> Self {
  185    185   
        RequestMinCompressionSizeBytes(value)
  186    186   
    }
  187    187   
}
  188    188   
  189    189   
impl Storable for RequestMinCompressionSizeBytes {
  190    190   
    type Storer = StoreReplace<Self>;
  191    191   
}
  192    192   
  193    193   
#[cfg(test)]
  194    194   
mod tests {
  195    195   
    use super::wrap_request_body_in_compressed_body;
  196    196   
    use crate::client_request_compression::{RequestCompressionInterceptor, RequestMinCompressionSizeBytes};
  197    197   
    use aws_smithy_compression::{CompressionAlgorithm, CompressionOptions};
  198    198   
    use aws_smithy_runtime::client::sdk_feature::SmithySdkFeature;
  199    199   
    use aws_smithy_runtime_api::client::interceptors::context::{Input, InterceptorContext};
  200    200   
    use aws_smithy_runtime_api::client::interceptors::Intercept;
  201    201   
    use aws_smithy_runtime_api::client::orchestrator::HttpRequest;
  202    202   
    use aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder;
  203    203   
    use aws_smithy_types::body::SdkBody;
  204    204   
    use aws_smithy_types::config_bag::{ConfigBag, Layer};
  205         -
    use http_body::Body;
         205  +
    use http_body_util::BodyExt;
  206    206   
  207    207   
    const UNCOMPRESSED_INPUT: &[u8] = b"hello world";
  208    208   
    const COMPRESSED_OUTPUT: &[u8] = &[
  209    209   
        31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 203, 72, 205, 201, 201, 87, 40, 207, 47, 202, 73, 1, 0, 133, 17, 74, 13, 11, 0, 0, 0,
  210    210   
    ];
  211    211   
  212    212   
    #[tokio::test]
  213    213   
    async fn test_compressed_body_is_retryable() {
  214         -
        let mut request: HttpRequest = http::Request::builder()
         214  +
        let mut request: HttpRequest = http_1x::Request::builder()
  215    215   
            .body(SdkBody::retryable(move || SdkBody::from(UNCOMPRESSED_INPUT)))
  216    216   
            .unwrap()
  217    217   
            .try_into()
  218    218   
            .unwrap();
  219    219   
  220    220   
        // ensure original SdkBody is retryable
  221    221   
        let mut body = request.body().try_clone().unwrap();
  222    222   
        let mut body_data = Vec::new();
  223         -
        while let Some(data) = body.data().await {
  224         -
            body_data.extend_from_slice(&data.unwrap())
         223  +
        while let Some(Ok(frame)) = body.frame().await {
         224  +
            let data = frame.into_data().expect("Data frame");
         225  +
            body_data.extend_from_slice(&data)
  225    226   
        }
  226    227   
        // Not yet wrapped, should still be the same as UNCOMPRESSED_INPUT.
  227    228   
        assert_eq!(UNCOMPRESSED_INPUT, body_data);
  228    229   
  229    230   
        let compression_algorithm = CompressionAlgorithm::Gzip;
  230    231   
        let compression_options = CompressionOptions::default().with_min_compression_size_bytes(0).unwrap();
  231    232   
  232         -
        wrap_request_body_in_compressed_body(&mut request, compression_algorithm.into_impl_http_body_0_4_x(&compression_options)).unwrap();
         233  +
        wrap_request_body_in_compressed_body(&mut request, compression_algorithm.into_impl_http_body_1_x(&compression_options)).unwrap();
  233    234   
  234    235   
        // ensure again that wrapped SdkBody is retryable
  235    236   
        let mut body = request.body().try_clone().expect("body is retryable");
  236    237   
        let mut body_data = Vec::new();
  237         -
        while let Some(data) = body.data().await {
  238         -
            body_data.extend_from_slice(&data.unwrap())
         238  +
        while let Some(Ok(frame)) = body.frame().await {
         239  +
            let data = frame.into_data().expect("Data frame");
         240  +
            body_data.extend_from_slice(&data)
  239    241   
        }
  240    242   
  241    243   
        // Since this body was wrapped, the output should be compressed data
  242    244   
        assert_ne!(UNCOMPRESSED_INPUT, body_data.as_slice());
  243    245   
        assert_eq!(COMPRESSED_OUTPUT, body_data.as_slice());
  244    246   
    }
  245    247   
  246    248   
    fn context() -> InterceptorContext {
  247    249   
        let mut context = InterceptorContext::new(Input::doesnt_matter());
  248    250   
        context.enter_serialization_phase();
  249    251   
        context.set_request(
  250         -
            http::Request::builder()
         252  +
            http_1x::Request::builder()
  251    253   
                .body(SdkBody::from(UNCOMPRESSED_INPUT))
  252    254   
                .unwrap()
  253    255   
                .try_into()
  254    256   
                .unwrap(),
  255    257   
        );
  256    258   
        let _ = context.take_input();
  257    259   
        context.enter_before_transmit_phase();
  258    260   
        context
  259    261   
    }
  260    262   

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

@@ -151,151 +218,219 @@
  171    171   
                _input: &crate::operation::datetime_offsets::DatetimeOffsetsInput,
  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::datetime_offsets::DatetimeOffsetsInput,
  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_datetime_offsets_input::ser_datetime_offsets_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/ec2_query/rust-client-codegen/src/operation/empty_input_and_empty_output.rs

@@ -157,157 +224,225 @@
  177    177   
                _input: &crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput,
  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::empty_input_and_empty_output::EmptyInputAndEmptyOutputInput,
  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-www-form-urlencoded");
         193  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         194  +
            builder =
         195  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  195    196   
            builder
  196    197   
        };
  197    198   
        let body = ::aws_smithy_types::body::SdkBody::from(
  198    199   
            crate::protocol_serde::shape_empty_input_and_empty_output_input::ser_empty_input_and_empty_output_input_input_input(&input)?,
  199    200   
        );
  200    201   
  201    202   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  202    203   
    }
  203    204   
}
  204    205   
#[derive(Debug)]

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

@@ -151,151 +218,219 @@
  171    171   
                _input: &crate::operation::endpoint_operation::EndpointOperationInput,
  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::endpoint_operation::EndpointOperationInput,
  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_endpoint_operation_input::ser_endpoint_operation_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/ec2_query/rust-client-codegen/src/operation/endpoint_with_host_label_operation.rs

@@ -159,159 +234,235 @@
  179    179   
                _input: &crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationInput,
  180    180   
                output: &mut ::std::string::String,
  181    181   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  182    182   
                use ::std::fmt::Write as _;
  183    183   
                ::std::write!(output, "/").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::endpoint_with_host_label_operation::EndpointWithHostLabelOperationInput,
  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   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  194    194   
            }
  195         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  196         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
         195  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         196  +
            builder =
         197  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  197    198   
            builder
  198    199   
        };
  199    200   
        let body = ::aws_smithy_types::body::SdkBody::from(
  200    201   
            crate::protocol_serde::shape_endpoint_with_host_label_operation_input::ser_endpoint_with_host_label_operation_input_input_input(&input)?,
  201    202   
        );
  202    203   
        if let Some(content_length) = body.content_length() {
  203    204   
            let content_length = content_length.to_string();
  204         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         205  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  205    206   
        }
  206    207   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  207    208   
    }
  208    209   
}
  209    210   
#[derive(Debug)]
  210    211   
struct EndpointWithHostLabelOperationEndpointParamsInterceptor;
  211    212   
  212    213   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for EndpointWithHostLabelOperationEndpointParamsInterceptor {
  213    214   
    fn name(&self) -> &'static str {
  214    215   
        "EndpointWithHostLabelOperationEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/fractional_seconds.rs

@@ -151,151 +218,219 @@
  171    171   
                _input: &crate::operation::fractional_seconds::FractionalSecondsInput,
  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::fractional_seconds::FractionalSecondsInput,
  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_fractional_seconds_input::ser_fractional_seconds_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/ec2_query/rust-client-codegen/src/operation/greeting_with_errors.rs

@@ -151,151 +218,219 @@
  171    171   
                _input: &crate::operation::greeting_with_errors::GreetingWithErrorsInput,
  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::greeting_with_errors::GreetingWithErrorsInput,
  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_greeting_with_errors_input::ser_greeting_with_errors_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/ec2_query/rust-client-codegen/src/operation/host_with_path_operation.rs

@@ -157,157 +224,225 @@
  177    177   
                _input: &crate::operation::host_with_path_operation::HostWithPathOperationInput,
  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::host_with_path_operation::HostWithPathOperationInput,
  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-www-form-urlencoded");
         193  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         194  +
            builder =
         195  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  195    196   
            builder
  196    197   
        };
  197    198   
        let body = ::aws_smithy_types::body::SdkBody::from(
  198    199   
            crate::protocol_serde::shape_host_with_path_operation_input::ser_host_with_path_operation_input_input_input(&input)?,
  199    200   
        );
  200    201   
  201    202   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  202    203   
    }
  203    204   
}
  204    205   
#[derive(Debug)]

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/ignores_wrapping_xml_name.rs

@@ -157,157 +224,225 @@
  177    177   
                _input: &crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameInput,
  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::ignores_wrapping_xml_name::IgnoresWrappingXmlNameInput,
  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-www-form-urlencoded");
         193  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         194  +
            builder =
         195  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  195    196   
            builder
  196    197   
        };
  197    198   
        let body = ::aws_smithy_types::body::SdkBody::from(
  198    199   
            crate::protocol_serde::shape_ignores_wrapping_xml_name_input::ser_ignores_wrapping_xml_name_input_input_input(&input)?,
  199    200   
        );
  200    201   
  201    202   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  202    203   
    }
  203    204   
}
  204    205   
#[derive(Debug)]