Client Test

Client Test

rev. ee474c7509d7728618c23068f3741e8e5b339ef9 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/recursive_union_operation.rs

@@ -157,157 +236,239 @@
  177    177   
                _input: &crate::operation::recursive_union_operation::RecursiveUnionOperationInput,
  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, "/service/RpcV2CborService/operation/RecursiveUnionOperation").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::recursive_union_operation::RecursiveUnionOperationInput,
  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/cbor");
  195         -
            builder =
  196         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
         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/cbor");
         195  +
            builder = _header_serialization_settings.set_default_header(
         196  +
                builder,
         197  +
                ::http_1x::header::HeaderName::from_static("smithy-protocol"),
         198  +
                "rpc-v2-cbor",
         199  +
            );
  197    200   
            builder =
  198         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
         201  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::HeaderName::from_static("accept"), "application/cbor");
  199    202   
            builder
  200    203   
        };
  201    204   
        let body = ::aws_smithy_types::body::SdkBody::from(
  202    205   
            crate::protocol_serde::shape_recursive_union_operation::ser_recursive_union_operation_input(&input)?,
  203    206   
        );
  204    207   
        if let Some(content_length) = body.content_length() {
  205    208   
            let content_length = content_length.to_string();
  206         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         209  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  207    210   
        }
  208    211   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  209    212   
    }
  210    213   
}
  211    214   
#[derive(Debug)]
  212    215   
struct RecursiveUnionOperationEndpointParamsInterceptor;
  213    216   
  214    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RecursiveUnionOperationEndpointParamsInterceptor {
  215    218   
    fn name(&self) -> &'static str {
  216    219   
        "RecursiveUnionOperationEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/simple_struct_operation.rs

@@ -157,157 +236,239 @@
  177    177   
                _input: &crate::operation::simple_struct_operation::SimpleStructOperationInput,
  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, "/service/RpcV2CborService/operation/SimpleStructOperation").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::simple_struct_operation::SimpleStructOperationInput,
  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/cbor");
  195         -
            builder =
  196         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
         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/cbor");
         195  +
            builder = _header_serialization_settings.set_default_header(
         196  +
                builder,
         197  +
                ::http_1x::header::HeaderName::from_static("smithy-protocol"),
         198  +
                "rpc-v2-cbor",
         199  +
            );
  197    200   
            builder =
  198         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
         201  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::HeaderName::from_static("accept"), "application/cbor");
  199    202   
            builder
  200    203   
        };
  201    204   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_simple_struct_operation::ser_simple_struct_operation_input(
  202    205   
            &input,
  203    206   
        )?);
  204    207   
        if let Some(content_length) = body.content_length() {
  205    208   
            let content_length = content_length.to_string();
  206         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         209  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  207    210   
        }
  208    211   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  209    212   
    }
  210    213   
}
  211    214   
#[derive(Debug)]
  212    215   
struct SimpleStructOperationEndpointParamsInterceptor;
  213    216   
  214    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SimpleStructOperationEndpointParamsInterceptor {
  215    218   
    fn name(&self) -> &'static str {
  216    219   
        "SimpleStructOperationEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/single_member_struct_operation.rs

@@ -157,157 +236,239 @@
  177    177   
                _input: &crate::operation::single_member_struct_operation::SingleMemberStructOperationInput,
  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, "/service/RpcV2CborService/operation/SingleMemberStructOperation").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::single_member_struct_operation::SingleMemberStructOperationInput,
  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/cbor");
  195         -
            builder =
  196         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
         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/cbor");
         195  +
            builder = _header_serialization_settings.set_default_header(
         196  +
                builder,
         197  +
                ::http_1x::header::HeaderName::from_static("smithy-protocol"),
         198  +
                "rpc-v2-cbor",
         199  +
            );
  197    200   
            builder =
  198         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
         201  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::HeaderName::from_static("accept"), "application/cbor");
  199    202   
            builder
  200    203   
        };
  201    204   
        let body = ::aws_smithy_types::body::SdkBody::from(
  202    205   
            crate::protocol_serde::shape_single_member_struct_operation::ser_single_member_struct_operation_input(&input)?,
  203    206   
        );
  204    207   
        if let Some(content_length) = body.content_length() {
  205    208   
            let content_length = content_length.to_string();
  206         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         209  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  207    210   
        }
  208    211   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  209    212   
    }
  210    213   
}
  211    214   
#[derive(Debug)]
  212    215   
struct SingleMemberStructOperationEndpointParamsInterceptor;
  213    216   
  214    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SingleMemberStructOperationEndpointParamsInterceptor {
  215    218   
    fn name(&self) -> &'static str {
  216    219   
        "SingleMemberStructOperationEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation.rs

@@ -167,167 +257,261 @@
  187    187   
                _input: &crate::operation::streaming_operation::StreamingOperationInput,
  188    188   
                output: &mut ::std::string::String,
  189    189   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  190    190   
                use ::std::fmt::Write as _;
  191    191   
                ::std::write!(output, "/service/RpcV2CborService/operation/StreamingOperation").expect("formatting should succeed");
  192    192   
                ::std::result::Result::Ok(())
  193    193   
            }
  194    194   
            #[allow(clippy::unnecessary_wraps)]
  195    195   
            fn update_http_builder(
  196    196   
                input: &crate::operation::streaming_operation::StreamingOperationInput,
  197         -
                builder: ::http::request::Builder,
  198         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         197  +
                builder: ::http_1x::request::Builder,
         198  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  199    199   
                let mut uri = ::std::string::String::new();
  200    200   
                uri_base(input, &mut uri)?;
  201    201   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  202    202   
            }
  203         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  204         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
         203  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  205    204   
            builder =
  206         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
         205  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
  207    206   
            builder = _header_serialization_settings.set_default_header(
  208    207   
                builder,
  209         -
                ::http::header::HeaderName::from_static("accept"),
         208  +
                ::http_1x::header::HeaderName::from_static("smithy-protocol"),
         209  +
                "rpc-v2-cbor",
         210  +
            );
         211  +
            builder = _header_serialization_settings.set_default_header(
         212  +
                builder,
         213  +
                ::http_1x::header::HeaderName::from_static("accept"),
  210    214   
                "application/vnd.amazon.eventstream, application/cbor",
  211    215   
            );
  212    216   
            builder
  213    217   
        };
  214    218   
        let body = ::aws_smithy_types::body::SdkBody::from({
  215    219   
            let error_marshaller = crate::event_stream_serde::EventsErrorMarshaller::new();
  216    220   
            let marshaller = crate::event_stream_serde::EventsMarshaller::new();
  217    221   
            let (signer, signer_sender) = ::aws_smithy_eventstream::frame::DeferredSigner::new();
  218    222   
            _cfg.interceptor_state().store_put(signer_sender);
  219    223   
            ::aws_smithy_types::body::SdkBody::from_body_0_4(::hyper::Body::wrap_stream(input.events.into_body_stream(
  220    224   
                marshaller,
  221    225   
                error_marshaller,
  222    226   
                signer,
  223    227   
            )))
  224    228   
        });
  225    229   
        if let Some(content_length) = body.content_length() {
  226    230   
            let content_length = content_length.to_string();
  227         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         231  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  228    232   
        }
  229    233   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  230    234   
    }
  231    235   
}
  232    236   
#[derive(Debug)]
  233    237   
struct StreamingOperationEndpointParamsInterceptor;
  234    238   
  235    239   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StreamingOperationEndpointParamsInterceptor {
  236    240   
    fn name(&self) -> &'static str {
  237    241   
        "StreamingOperationEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_initial_data.rs

@@ -169,169 +265,269 @@
  189    189   
                _input: &crate::operation::streaming_operation_with_initial_data::StreamingOperationWithInitialDataInput,
  190    190   
                output: &mut ::std::string::String,
  191    191   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  192    192   
                use ::std::fmt::Write as _;
  193    193   
                ::std::write!(output, "/service/RpcV2CborService/operation/StreamingOperationWithInitialData").expect("formatting should succeed");
  194    194   
                ::std::result::Result::Ok(())
  195    195   
            }
  196    196   
            #[allow(clippy::unnecessary_wraps)]
  197    197   
            fn update_http_builder(
  198    198   
                input: &crate::operation::streaming_operation_with_initial_data::StreamingOperationWithInitialDataInput,
  199         -
                builder: ::http::request::Builder,
  200         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         199  +
                builder: ::http_1x::request::Builder,
         200  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  201    201   
                let mut uri = ::std::string::String::new();
  202    202   
                uri_base(input, &mut uri)?;
  203    203   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  204    204   
            }
  205         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  206         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
         205  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  207    206   
            builder =
  208         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
         207  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
  209    208   
            builder = _header_serialization_settings.set_default_header(
  210    209   
                builder,
  211         -
                ::http::header::HeaderName::from_static("accept"),
         210  +
                ::http_1x::header::HeaderName::from_static("smithy-protocol"),
         211  +
                "rpc-v2-cbor",
         212  +
            );
         213  +
            builder = _header_serialization_settings.set_default_header(
         214  +
                builder,
         215  +
                ::http_1x::header::HeaderName::from_static("accept"),
  212    216   
                "application/vnd.amazon.eventstream, application/cbor",
  213    217   
            );
  214    218   
            builder
  215    219   
        };
  216    220   
        let body = ::aws_smithy_types::body::SdkBody::from({
  217    221   
            let error_marshaller = crate::event_stream_serde::EventsErrorMarshaller::new();
  218    222   
            let marshaller = crate::event_stream_serde::EventsMarshaller::new();
  219    223   
            let (signer, signer_sender) = ::aws_smithy_eventstream::frame::DeferredSigner::new();
  220    224   
            _cfg.interceptor_state().store_put(signer_sender);
  221    225   
            ::aws_smithy_types::body::SdkBody::from_body_0_4(::hyper::Body::wrap_stream({
  222    226   
                use ::futures_util::StreamExt;
  223    227   
                let body =
  224    228   
                    crate::protocol_serde::shape_streaming_operation_with_initial_data::ser_streaming_operation_with_initial_data_input(&input)?;
  225    229   
                let initial_message = crate::event_stream_serde::initial_message_from_body(body);
  226    230   
                let mut buffer = ::std::vec::Vec::new();
  227    231   
                ::aws_smithy_eventstream::frame::write_message_to(&initial_message, &mut buffer)?;
  228    232   
                let initial_message_stream = futures_util::stream::iter(vec![Ok(buffer.into())]);
  229    233   
                let adapter = input.events.into_body_stream(marshaller, error_marshaller, signer);
  230    234   
                initial_message_stream.chain(adapter)
  231    235   
            }))
  232    236   
        });
  233    237   
        if let Some(content_length) = body.content_length() {
  234    238   
            let content_length = content_length.to_string();
  235         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         239  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  236    240   
        }
  237    241   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  238    242   
    }
  239    243   
}
  240    244   
#[derive(Debug)]
  241    245   
struct StreamingOperationWithInitialDataEndpointParamsInterceptor;
  242    246   
  243    247   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StreamingOperationWithInitialDataEndpointParamsInterceptor {
  244    248   
    fn name(&self) -> &'static str {
  245    249   
        "StreamingOperationWithInitialDataEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_initial_response.rs

@@ -172,172 +262,266 @@
  192    192   
                output: &mut ::std::string::String,
  193    193   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  194    194   
                use ::std::fmt::Write as _;
  195    195   
                ::std::write!(output, "/service/RpcV2CborService/operation/StreamingOperationWithInitialResponse")
  196    196   
                    .expect("formatting should succeed");
  197    197   
                ::std::result::Result::Ok(())
  198    198   
            }
  199    199   
            #[allow(clippy::unnecessary_wraps)]
  200    200   
            fn update_http_builder(
  201    201   
                input: &crate::operation::streaming_operation_with_initial_response::StreamingOperationWithInitialResponseInput,
  202         -
                builder: ::http::request::Builder,
  203         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         202  +
                builder: ::http_1x::request::Builder,
         203  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  204    204   
                let mut uri = ::std::string::String::new();
  205    205   
                uri_base(input, &mut uri)?;
  206    206   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  207    207   
            }
  208         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  209         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
         208  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  210    209   
            builder =
  211         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
         210  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
  212    211   
            builder = _header_serialization_settings.set_default_header(
  213    212   
                builder,
  214         -
                ::http::header::HeaderName::from_static("accept"),
         213  +
                ::http_1x::header::HeaderName::from_static("smithy-protocol"),
         214  +
                "rpc-v2-cbor",
         215  +
            );
         216  +
            builder = _header_serialization_settings.set_default_header(
         217  +
                builder,
         218  +
                ::http_1x::header::HeaderName::from_static("accept"),
  215    219   
                "application/vnd.amazon.eventstream, application/cbor",
  216    220   
            );
  217    221   
            builder
  218    222   
        };
  219    223   
        let body = ::aws_smithy_types::body::SdkBody::from({
  220    224   
            let error_marshaller = crate::event_stream_serde::EventsErrorMarshaller::new();
  221    225   
            let marshaller = crate::event_stream_serde::EventsMarshaller::new();
  222    226   
            let (signer, signer_sender) = ::aws_smithy_eventstream::frame::DeferredSigner::new();
  223    227   
            _cfg.interceptor_state().store_put(signer_sender);
  224    228   
            ::aws_smithy_types::body::SdkBody::from_body_0_4(::hyper::Body::wrap_stream(input.events.into_body_stream(
  225    229   
                marshaller,
  226    230   
                error_marshaller,
  227    231   
                signer,
  228    232   
            )))
  229    233   
        });
  230    234   
        if let Some(content_length) = body.content_length() {
  231    235   
            let content_length = content_length.to_string();
  232         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         236  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  233    237   
        }
  234    238   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  235    239   
    }
  236    240   
}
  237    241   
#[derive(Debug)]
  238    242   
struct StreamingOperationWithInitialResponseEndpointParamsInterceptor;
  239    243   
  240    244   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StreamingOperationWithInitialResponseEndpointParamsInterceptor {
  241    245   
    fn name(&self) -> &'static str {
  242    246   
        "StreamingOperationWithInitialResponseEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_optional_data.rs

@@ -169,169 +265,269 @@
  189    189   
                _input: &crate::operation::streaming_operation_with_optional_data::StreamingOperationWithOptionalDataInput,
  190    190   
                output: &mut ::std::string::String,
  191    191   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  192    192   
                use ::std::fmt::Write as _;
  193    193   
                ::std::write!(output, "/service/RpcV2CborService/operation/StreamingOperationWithOptionalData").expect("formatting should succeed");
  194    194   
                ::std::result::Result::Ok(())
  195    195   
            }
  196    196   
            #[allow(clippy::unnecessary_wraps)]
  197    197   
            fn update_http_builder(
  198    198   
                input: &crate::operation::streaming_operation_with_optional_data::StreamingOperationWithOptionalDataInput,
  199         -
                builder: ::http::request::Builder,
  200         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         199  +
                builder: ::http_1x::request::Builder,
         200  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  201    201   
                let mut uri = ::std::string::String::new();
  202    202   
                uri_base(input, &mut uri)?;
  203    203   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  204    204   
            }
  205         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  206         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
         205  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  207    206   
            builder =
  208         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
         207  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
  209    208   
            builder = _header_serialization_settings.set_default_header(
  210    209   
                builder,
  211         -
                ::http::header::HeaderName::from_static("accept"),
         210  +
                ::http_1x::header::HeaderName::from_static("smithy-protocol"),
         211  +
                "rpc-v2-cbor",
         212  +
            );
         213  +
            builder = _header_serialization_settings.set_default_header(
         214  +
                builder,
         215  +
                ::http_1x::header::HeaderName::from_static("accept"),
  212    216   
                "application/vnd.amazon.eventstream, application/cbor",
  213    217   
            );
  214    218   
            builder
  215    219   
        };
  216    220   
        let body = ::aws_smithy_types::body::SdkBody::from({
  217    221   
            let error_marshaller = crate::event_stream_serde::EventsErrorMarshaller::new();
  218    222   
            let marshaller = crate::event_stream_serde::EventsMarshaller::new();
  219    223   
            let (signer, signer_sender) = ::aws_smithy_eventstream::frame::DeferredSigner::new();
  220    224   
            _cfg.interceptor_state().store_put(signer_sender);
  221    225   
            ::aws_smithy_types::body::SdkBody::from_body_0_4(::hyper::Body::wrap_stream({
  222    226   
                use ::futures_util::StreamExt;
  223    227   
                let body =
  224    228   
                    crate::protocol_serde::shape_streaming_operation_with_optional_data::ser_streaming_operation_with_optional_data_input(&input)?;
  225    229   
                let initial_message = crate::event_stream_serde::initial_message_from_body(body);
  226    230   
                let mut buffer = ::std::vec::Vec::new();
  227    231   
                ::aws_smithy_eventstream::frame::write_message_to(&initial_message, &mut buffer)?;
  228    232   
                let initial_message_stream = futures_util::stream::iter(vec![Ok(buffer.into())]);
  229    233   
                let adapter = input.events.into_body_stream(marshaller, error_marshaller, signer);
  230    234   
                initial_message_stream.chain(adapter)
  231    235   
            }))
  232    236   
        });
  233    237   
        if let Some(content_length) = body.content_length() {
  234    238   
            let content_length = content_length.to_string();
  235         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         239  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  236    240   
        }
  237    241   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  238    242   
    }
  239    243   
}
  240    244   
#[derive(Debug)]
  241    245   
struct StreamingOperationWithOptionalDataEndpointParamsInterceptor;
  242    246   
  243    247   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StreamingOperationWithOptionalDataEndpointParamsInterceptor {
  244    248   
    fn name(&self) -> &'static str {
  245    249   
        "StreamingOperationWithOptionalDataEndpointParamsInterceptor"

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

@@ -1,1 +56,60 @@
   13     13   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-async"
   14     14   
[dependencies.aws-smithy-cbor]
   15     15   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-cbor"
   16     16   
[dependencies.aws-smithy-http]
   17     17   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http"
   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.fastrand]
   27     28   
version = "2.0.0"
   28     29   
[dependencies.http]
   29     30   
version = "0.2.9"
          31  +
[dependencies.http-1x]
          32  +
version = "1"
          33  +
package = "http"
   30     34   
[dependencies.tracing]
   31     35   
version = "0.1"
   32     36   
[dev-dependencies.aws-smithy-http-client]
   33     37   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http-client"
   34     38   
features = ["test-util"]
   35     39   
[dev-dependencies.aws-smithy-protocol-test]
   36     40   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-protocol-test"
   37     41   
[dev-dependencies.bytes]
   38     42   
version = "1.4.0"
   39     43   
[dev-dependencies.pretty_assertions]

tmp-codegen-diff/codegen-client-test/rpcv2cbor_non_query_compatible/rust-client-codegen/src/operation/non_query_compatible_operation.rs

@@ -158,158 +234,237 @@
  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, "/service/NonQueryCompatibleRpcV2Protocol/operation/NonQueryCompatibleOperation")
  182    182   
                    .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::non_query_compatible_operation::NonQueryCompatibleOperationInput,
  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 =
  196         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
         194  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         195  +
            builder = _header_serialization_settings.set_default_header(
         196  +
                builder,
         197  +
                ::http_1x::header::HeaderName::from_static("smithy-protocol"),
         198  +
                "rpc-v2-cbor",
         199  +
            );
  197    200   
            builder =
  198         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
         201  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::HeaderName::from_static("accept"), "application/cbor");
  199    202   
            builder
  200    203   
        };
  201    204   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  202    205   
        if let Some(content_length) = body.content_length() {
  203    206   
            let content_length = content_length.to_string();
  204         -
            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);
  205    208   
        }
  206    209   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  207    210   
    }
  208    211   
}
  209    212   
#[derive(Debug)]
  210    213   
struct NonQueryCompatibleOperationEndpointParamsInterceptor;
  211    214   
  212    215   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for NonQueryCompatibleOperationEndpointParamsInterceptor {
  213    216   
    fn name(&self) -> &'static str {
  214    217   
        "NonQueryCompatibleOperationEndpointParamsInterceptor"

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

@@ -1,1 +58,62 @@
   15     15   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-cbor"
   16     16   
[dependencies.aws-smithy-http]
   17     17   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http"
   18     18   
[dependencies.aws-smithy-json]
   19     19   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-json"
   20     20   
[dependencies.aws-smithy-runtime]
   21     21   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime"
   22     22   
features = ["client"]
   23     23   
[dependencies.aws-smithy-runtime-api]
   24     24   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
   25         -
features = ["client", "http-02x"]
          25  +
features = ["client", "http-1x"]
   26     26   
[dependencies.aws-smithy-types]
   27     27   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
          28  +
features = ["http-body-1-x"]
   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   
[dev-dependencies.aws-smithy-http-client]
   35     39   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http-client"
   36     40   
features = ["test-util"]
   37     41   
[dev-dependencies.aws-smithy-protocol-test]
   38     42   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-protocol-test"
   39     43   
[dev-dependencies.bytes]
   40     44   
version = "1.4.0"
   41     45   
[dev-dependencies.pretty_assertions]

tmp-codegen-diff/codegen-client-test/rpcv2cbor_query_compatible/rust-client-codegen/src/aws_query_compatible_errors.rs

@@ -3,3 +71,72 @@
   23     23   
        .map(|idx| (&header_value[..idx], &header_value[idx + 1..]))
   24     24   
}
   25     25   
   26     26   
#[cfg(test)]
   27     27   
mod test {
   28     28   
    use crate::aws_query_compatible_errors::{parse_aws_query_compatible_error, X_AMZN_QUERY_ERROR};
   29     29   
    use aws_smithy_runtime_api::http::Response;
   30     30   
   31     31   
    #[test]
   32     32   
    fn parse_aws_query_compatible_error_should_parse_code_and_type_fields() {
   33         -
        let mut response: http::Response<()> = http::Response::default();
          33  +
        let mut response: http_1x::Response<()> = http_1x::Response::default();
   34     34   
        response.headers_mut().insert(
   35     35   
            X_AMZN_QUERY_ERROR,
   36         -
            http::HeaderValue::from_static("AWS.SimpleQueueService.NonExistentQueue;Sender"),
          36  +
            http_1x::HeaderValue::from_static("AWS.SimpleQueueService.NonExistentQueue;Sender"),
   37     37   
        );
   38     38   
        let response = Response::try_from(response).unwrap();
   39     39   
   40     40   
        let actual = parse_aws_query_compatible_error(response.headers());
   41     41   
   42     42   
        assert_eq!(Some(("AWS.SimpleQueueService.NonExistentQueue", "Sender")), actual,);
   43     43   
    }
   44     44   
   45     45   
    #[test]
   46     46   
    fn parse_aws_query_compatible_error_should_return_none_when_header_value_has_no_delimiter() {
   47         -
        let mut response: http::Response<()> = http::Response::default();
          47  +
        let mut response: http_1x::Response<()> = http_1x::Response::default();
   48     48   
        response.headers_mut().insert(
   49     49   
            X_AMZN_QUERY_ERROR,
   50         -
            http::HeaderValue::from_static("AWS.SimpleQueueService.NonExistentQueue"),
          50  +
            http_1x::HeaderValue::from_static("AWS.SimpleQueueService.NonExistentQueue"),
   51     51   
        );
   52     52   
        let response = Response::try_from(response).unwrap();
   53     53   
   54     54   
        let actual = parse_aws_query_compatible_error(response.headers());
   55     55   
   56     56   
        assert_eq!(None, actual);
   57     57   
    }
   58     58   
   59     59   
    #[test]
   60     60   
    fn parse_aws_query_compatible_error_should_return_none_when_there_is_no_target_header() {
   61         -
        let mut response: http::Response<()> = http::Response::default();
   62         -
        response
   63         -
            .headers_mut()
   64         -
            .insert("x-amzn-requestid", http::HeaderValue::from_static("a918fbf2-457a-4fe1-99ba-5685ce220fc1"));
          61  +
        let mut response: http_1x::Response<()> = http_1x::Response::default();
          62  +
        response.headers_mut().insert(
          63  +
            "x-amzn-requestid",
          64  +
            http_1x::HeaderValue::from_static("a918fbf2-457a-4fe1-99ba-5685ce220fc1"),
          65  +
        );
   65     66   
        let response = Response::try_from(response).unwrap();
   66     67   
   67     68   
        let actual = parse_aws_query_compatible_error(response.headers());
   68     69   
   69     70   
        assert_eq!(None, actual);
   70     71   
    }
   71     72   
}

tmp-codegen-diff/codegen-client-test/rpcv2cbor_query_compatible/rust-client-codegen/src/operation/query_compatible_operation.rs

@@ -157,157 +229,232 @@
  177    177   
                _input: &crate::operation::query_compatible_operation::QueryCompatibleOperationInput,
  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, "/service/QueryCompatibleRpcV2Protocol/operation/QueryCompatibleOperation").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::query_compatible_operation::QueryCompatibleOperationInput,
  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 =
  195         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
         193  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         194  +
            builder = _header_serialization_settings.set_default_header(
         195  +
                builder,
         196  +
                ::http_1x::header::HeaderName::from_static("smithy-protocol"),
         197  +
                "rpc-v2-cbor",
         198  +
            );
  196    199   
            builder =
  197         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
         200  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::HeaderName::from_static("accept"), "application/cbor");
  198    201   
            builder =
  199         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("x-amzn-query-mode"), "true");
         202  +
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::HeaderName::from_static("x-amzn-query-mode"), "true");
  200    203   
            builder
  201    204   
        };
  202    205   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  203    206   
  204    207   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  205    208   
    }
  206    209   
}
  207    210   
#[derive(Debug)]
  208    211   
struct QueryCompatibleOperationEndpointParamsInterceptor;
  209    212   

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

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