Client Test

Client Test

rev. d06a46cae0f385cdae37a9f8264db3469a090ab5 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/err_collisions.rs

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

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/match_.rs

@@ -137,137 +212,215 @@
  157    157   
                _input: &crate::operation::match_::MatchInput,
  158    158   
                output: &mut ::std::string::String,
  159    159   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  160    160   
                use ::std::fmt::Write as _;
  161    161   
                ::std::write!(output, "/").expect("formatting should succeed");
  162    162   
                ::std::result::Result::Ok(())
  163    163   
            }
  164    164   
            #[allow(clippy::unnecessary_wraps)]
  165    165   
            fn update_http_builder(
  166    166   
                input: &crate::operation::match_::MatchInput,
  167         -
                builder: ::http::request::Builder,
  168         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         167  +
                builder: ::http_1x::request::Builder,
         168  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  169    169   
                let mut uri = ::std::string::String::new();
  170    170   
                uri_base(input, &mut uri)?;
  171    171   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  172    172   
            }
  173         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  174         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  175         -
            builder =
  176         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("x-amz-target"), "Config.Match");
         173  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         174  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         175  +
            builder = _header_serialization_settings.set_default_header(
         176  +
                builder,
         177  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
         178  +
                "Config.Match",
         179  +
            );
  177    180   
            builder
  178    181   
        };
  179    182   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_match::ser_match_input(&input)?);
  180    183   
        if let Some(content_length) = body.content_length() {
  181    184   
            let content_length = content_length.to_string();
  182         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         185  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  183    186   
        }
  184    187   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  185    188   
    }
  186    189   
}
  187    190   
#[derive(Debug)]
  188    191   
struct MatchEndpointParamsInterceptor;
  189    192   
  190    193   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MatchEndpointParamsInterceptor {
  191    194   
    fn name(&self) -> &'static str {
  192    195   
        "MatchEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/option.rs

@@ -138,138 +213,216 @@
  158    158   
                _input: &crate::operation::option::OptionInput,
  159    159   
                output: &mut ::std::string::String,
  160    160   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  161    161   
                use ::std::fmt::Write as _;
  162    162   
                ::std::write!(output, "/").expect("formatting should succeed");
  163    163   
                ::std::result::Result::Ok(())
  164    164   
            }
  165    165   
            #[allow(clippy::unnecessary_wraps)]
  166    166   
            fn update_http_builder(
  167    167   
                input: &crate::operation::option::OptionInput,
  168         -
                builder: ::http::request::Builder,
  169         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         168  +
                builder: ::http_1x::request::Builder,
         169  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  170    170   
                let mut uri = ::std::string::String::new();
  171    171   
                uri_base(input, &mut uri)?;
  172    172   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  173    173   
            }
  174         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  175         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  176         -
            builder =
  177         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("x-amz-target"), "Config.Option");
         174  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         175  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         176  +
            builder = _header_serialization_settings.set_default_header(
         177  +
                builder,
         178  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
         179  +
                "Config.Option",
         180  +
            );
  178    181   
            builder
  179    182   
        };
  180    183   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_option::ser_option_input(&input)?);
  181    184   
        if let Some(content_length) = body.content_length() {
  182    185   
            let content_length = content_length.to_string();
  183         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         186  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  184    187   
        }
  185    188   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  186    189   
    }
  187    190   
}
  188    191   
#[derive(Debug)]
  189    192   
struct OptionEndpointParamsInterceptor;
  190    193   
  191    194   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for OptionEndpointParamsInterceptor {
  192    195   
    fn name(&self) -> &'static str {
  193    196   
        "OptionEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/reserved_words_as_members.rs

@@ -151,151 +231,231 @@
  171    171   
                _input: &crate::operation::reserved_words_as_members::ReservedWordsAsMembersInput,
  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::reserved_words_as_members::ReservedWordsAsMembersInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  189    189   
            builder = _header_serialization_settings.set_default_header(
  190    190   
                builder,
  191         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         191  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192    192   
                "Config.ReservedWordsAsMembers",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(
  197    197   
            crate::protocol_serde::shape_reserved_words_as_members::ser_reserved_words_as_members_input(&input)?,
  198    198   
        );
  199    199   
        if let Some(content_length) = body.content_length() {
  200    200   
            let content_length = content_length.to_string();
  201         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         201  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  202    202   
        }
  203    203   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  204    204   
    }
  205    205   
}
  206    206   
#[derive(Debug)]
  207    207   
struct ReservedWordsAsMembersEndpointParamsInterceptor;
  208    208   
  209    209   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ReservedWordsAsMembersEndpointParamsInterceptor {
  210    210   
    fn name(&self) -> &'static str {
  211    211   
        "ReservedWordsAsMembersEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/result.rs

@@ -138,138 +213,216 @@
  158    158   
                _input: &crate::operation::result::ResultInput,
  159    159   
                output: &mut ::std::string::String,
  160    160   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  161    161   
                use ::std::fmt::Write as _;
  162    162   
                ::std::write!(output, "/").expect("formatting should succeed");
  163    163   
                ::std::result::Result::Ok(())
  164    164   
            }
  165    165   
            #[allow(clippy::unnecessary_wraps)]
  166    166   
            fn update_http_builder(
  167    167   
                input: &crate::operation::result::ResultInput,
  168         -
                builder: ::http::request::Builder,
  169         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         168  +
                builder: ::http_1x::request::Builder,
         169  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  170    170   
                let mut uri = ::std::string::String::new();
  171    171   
                uri_base(input, &mut uri)?;
  172    172   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  173    173   
            }
  174         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  175         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  176         -
            builder =
  177         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("x-amz-target"), "Config.Result");
         174  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         175  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         176  +
            builder = _header_serialization_settings.set_default_header(
         177  +
                builder,
         178  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
         179  +
                "Config.Result",
         180  +
            );
  178    181   
            builder
  179    182   
        };
  180    183   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_result::ser_result_input(&input)?);
  181    184   
        if let Some(content_length) = body.content_length() {
  182    185   
            let content_length = content_length.to_string();
  183         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         186  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  184    187   
        }
  185    188   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  186    189   
    }
  187    190   
}
  188    191   
#[derive(Debug)]
  189    192   
struct ResultEndpointParamsInterceptor;
  190    193   
  191    194   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ResultEndpointParamsInterceptor {
  192    195   
    fn name(&self) -> &'static str {
  193    196   
        "ResultEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/rpc_echo.rs

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

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/operation/structure_name_punning.rs

@@ -151,151 +231,231 @@
  171    171   
                _input: &crate::operation::structure_name_punning::StructureNamePunningInput,
  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::structure_name_punning::StructureNamePunningInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  189    189   
            builder = _header_serialization_settings.set_default_header(
  190    190   
                builder,
  191         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         191  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192    192   
                "Config.StructureNamePunning",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_structure_name_punning::ser_structure_name_punning_input(
  197    197   
            &input,
  198    198   
        )?);
  199    199   
        if let Some(content_length) = body.content_length() {
  200    200   
            let content_length = content_length.to_string();
  201         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         201  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  202    202   
        }
  203    203   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  204    204   
    }
  205    205   
}
  206    206   
#[derive(Debug)]
  207    207   
struct StructureNamePunningEndpointParamsInterceptor;
  208    208   
  209    209   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StructureNamePunningEndpointParamsInterceptor {
  210    210   
    fn name(&self) -> &'static str {
  211    211   
        "StructureNamePunningEndpointParamsInterceptor"

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

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

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

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

tmp-codegen-diff/codegen-client-test/naming_test_structs/rust-client-codegen/src/operation/structs.rs

@@ -151,151 +229,229 @@
  171    171   
                _input: &crate::operation::structs::StructsInput,
  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::structs::StructsInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  189    189   
            builder = _header_serialization_settings.set_default_header(
  190    190   
                builder,
  191         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         191  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192    192   
                "NamingObstacleCourseStructs.Structs",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_structs::ser_structs_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 StructsEndpointParamsInterceptor;
  206    206   
  207    207   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StructsEndpointParamsInterceptor {
  208    208   
    fn name(&self) -> &'static str {
  209    209   
        "StructsEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/naming_test_structs/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/pokemon-service-awsjson-client/rust-client-codegen/Cargo.toml

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

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/json_errors.rs

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

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/operation/capture_pokemon.rs

@@ -161,161 +249,249 @@
  181    181   
                _input: &crate::operation::capture_pokemon::CapturePokemonInput,
  182    182   
                output: &mut ::std::string::String,
  183    183   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  184    184   
                use ::std::fmt::Write as _;
  185    185   
                ::std::write!(output, "/").expect("formatting should succeed");
  186    186   
                ::std::result::Result::Ok(())
  187    187   
            }
  188    188   
            #[allow(clippy::unnecessary_wraps)]
  189    189   
            fn update_http_builder(
  190    190   
                input: &crate::operation::capture_pokemon::CapturePokemonInput,
  191         -
                builder: ::http::request::Builder,
  192         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         191  +
                builder: ::http_1x::request::Builder,
         192  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  193    193   
                let mut uri = ::std::string::String::new();
  194    194   
                uri_base(input, &mut uri)?;
  195    195   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  196    196   
            }
  197         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  198         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.0");
         197  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         198  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  199    199   
            builder = _header_serialization_settings.set_default_header(
  200    200   
                builder,
  201         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         201  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  202    202   
                "PokemonService.CapturePokemon",
  203    203   
            );
  204    204   
            builder
  205    205   
        };
  206    206   
        let body = ::aws_smithy_types::body::SdkBody::from({
  207    207   
            let error_marshaller = crate::event_stream_serde::AttemptCapturingPokemonEventErrorMarshaller::new();
  208    208   
            let marshaller = crate::event_stream_serde::AttemptCapturingPokemonEventMarshaller::new();
  209    209   
            let (signer, signer_sender) = ::aws_smithy_eventstream::frame::DeferredSigner::new();
  210    210   
            _cfg.interceptor_state().store_put(signer_sender);
  211    211   
            ::aws_smithy_types::body::SdkBody::from_body_0_4(::hyper::Body::wrap_stream(input.events.into_body_stream(
  212    212   
                marshaller,
  213    213   
                error_marshaller,
  214    214   
                signer,
  215    215   
            )))
  216    216   
        });
  217    217   
        if let Some(content_length) = body.content_length() {
  218    218   
            let content_length = content_length.to_string();
  219         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         219  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  220    220   
        }
  221    221   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  222    222   
    }
  223    223   
}
  224    224   
#[derive(Debug)]
  225    225   
struct CapturePokemonEndpointParamsInterceptor;
  226    226   
  227    227   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CapturePokemonEndpointParamsInterceptor {
  228    228   
    fn name(&self) -> &'static str {
  229    229   
        "CapturePokemonEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/operation/check_health.rs

@@ -151,151 +221,221 @@
  171    171   
                _input: &crate::operation::check_health::CheckHealthInput,
  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::check_health::CheckHealthInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.0");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  189    189   
            builder = _header_serialization_settings.set_default_header(
  190    190   
                builder,
  191         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         191  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192    192   
                "PokemonService.CheckHealth",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_check_health::ser_check_health_input(&input)?);
  197    197   
  198    198   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  199    199   
    }
  200    200   
}
  201    201   
#[derive(Debug)]