Client Test

Client Test

rev. 0b749be6d000fdc7ef59d1bc26f1dce00358d95c

Files changed:

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/types.rs

@@ -1,1 +26,26 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::types::_validation_exception_field::ValidationExceptionField;
    3         -
    4         -
pub use crate::types::_string_enum::StringEnum;
    5         -
    6      2   
pub use crate::types::_empty_struct::EmptyStruct;
    7      3   
    8      4   
pub use crate::types::_single_element_union::SingleElementUnion;
    9      5   
           6  +
pub use crate::types::_validation_exception_field::ValidationExceptionField;
           7  +
   10      8   
pub use crate::types::_enum_with_escaped_chars::EnumWithEscapedChars;
   11      9   
          10  +
pub use crate::types::_string_enum::StringEnum;
          11  +
   12     12   
mod _empty_struct;
   13     13   
   14     14   
mod _enum_with_escaped_chars;
   15     15   
   16     16   
mod _single_element_union;
   17     17   
   18     18   
mod _string_enum;
   19     19   
   20     20   
mod _validation_exception_field;
   21     21   

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/types/builders.rs

@@ -1,1 +0,4 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::types::_validation_exception_field::ValidationExceptionFieldBuilder;
    3         -
    4      2   
pub use crate::types::_empty_struct::EmptyStructBuilder;
           3  +
           4  +
pub use crate::types::_validation_exception_field::ValidationExceptionFieldBuilder;

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/types/error.rs

@@ -1,1 +15,15 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub use crate::types::error::_extra_error::ExtraError;
    3      3   
    4         -
pub use crate::types::error::_validation_exception::ValidationError;
    5         -
    6      4   
pub use crate::types::error::_case_insensitive_error::CaseInsensitiveError;
    7      5   
           6  +
pub use crate::types::error::_validation_exception::ValidationError;
           7  +
    8      8   
mod _case_insensitive_error;
    9      9   
   10     10   
mod _extra_error;
   11     11   
   12     12   
mod _validation_exception;
   13     13   
   14     14   
/// Builders
   15     15   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/types/error/builders.rs

@@ -1,1 +0,6 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub use crate::types::error::_extra_error::ExtraErrorBuilder;
    3      3   
    4         -
pub use crate::types::error::_validation_exception::ValidationErrorBuilder;
    5         -
    6      4   
pub use crate::types::error::_case_insensitive_error::CaseInsensitiveErrorBuilder;
           5  +
           6  +
pub use crate::types::error::_validation_exception::ValidationErrorBuilder;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/client.rs

@@ -85,85 +144,146 @@
  105    105   
}
  106    106   
  107    107   
mod all_query_string_types;
  108    108   
  109    109   
mod body_with_xml_name;
  110    110   
  111    111   
mod constant_and_variable_query_string;
  112    112   
  113    113   
mod constant_query_string;
  114    114   
         115  +
mod content_type_parameters;
         116  +
  115    117   
/// Operation customization and supporting types.
  116    118   
///
  117    119   
/// The underlying HTTP requests made during an operation can be customized
  118    120   
/// by calling the `customize()` method on the builder returned from a client
  119    121   
/// operation call. For example, this can be used to add an additional HTTP header:
  120    122   
///
  121    123   
/// ```ignore
  122    124   
/// # async fn wrapper() -> ::std::result::Result<(), rest_xml::Error> {
  123    125   
/// # let client: rest_xml::Client = unimplemented!();
  124    126   
/// use ::http::header::{HeaderName, HeaderValue};

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/client/content_type_parameters.rs

@@ -0,1 +0,12 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
impl super::Client {
           3  +
    /// Constructs a fluent builder for the [`ContentTypeParameters`](crate::operation::content_type_parameters::builders::ContentTypeParametersFluentBuilder) operation.
           4  +
    ///
           5  +
    /// - The fluent builder is configurable:
           6  +
    ///   - [`value(i32)`](crate::operation::content_type_parameters::builders::ContentTypeParametersFluentBuilder::value) / [`set_value(Option<i32>)`](crate::operation::content_type_parameters::builders::ContentTypeParametersFluentBuilder::set_value):<br>required: **false**<br>(undocumented)<br>
           7  +
    /// - On success, responds with [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput)
           8  +
    /// - On failure, responds with [`SdkError<ContentTypeParametersError>`](crate::operation::content_type_parameters::ContentTypeParametersError)
           9  +
    pub fn content_type_parameters(&self) -> crate::operation::content_type_parameters::builders::ContentTypeParametersFluentBuilder {
          10  +
        crate::operation::content_type_parameters::builders::ContentTypeParametersFluentBuilder::new(self.handle.clone())
          11  +
    }
          12  +
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/error_meta.rs

@@ -116,116 +175,198 @@
  136    136   
        }
  137    137   
    }
  138    138   
}
  139    139   
impl From<crate::operation::constant_query_string::ConstantQueryStringError> for Error {
  140    140   
    fn from(err: crate::operation::constant_query_string::ConstantQueryStringError) -> Self {
  141    141   
        match err {
  142    142   
            crate::operation::constant_query_string::ConstantQueryStringError::Unhandled(inner) => Error::Unhandled(inner),
  143    143   
        }
  144    144   
    }
  145    145   
}
         146  +
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::content_type_parameters::ContentTypeParametersError, R>> for Error
         147  +
where
         148  +
    R: Send + Sync + std::fmt::Debug + 'static,
         149  +
{
         150  +
    fn from(
         151  +
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::content_type_parameters::ContentTypeParametersError, R>,
         152  +
    ) -> Self {
         153  +
        match err {
         154  +
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         155  +
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
         156  +
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
         157  +
                source: err.into(),
         158  +
            }),
         159  +
        }
         160  +
    }
         161  +
}
         162  +
impl From<crate::operation::content_type_parameters::ContentTypeParametersError> for Error {
         163  +
    fn from(err: crate::operation::content_type_parameters::ContentTypeParametersError) -> Self {
         164  +
        match err {
         165  +
            crate::operation::content_type_parameters::ContentTypeParametersError::Unhandled(inner) => Error::Unhandled(inner),
         166  +
        }
         167  +
    }
         168  +
}
  146    169   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::datetime_offsets::DatetimeOffsetsError, R>> for Error
  147    170   
where
  148    171   
    R: Send + Sync + std::fmt::Debug + 'static,
  149    172   
{
  150    173   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::datetime_offsets::DatetimeOffsetsError, R>) -> Self {
  151    174   
        match err {
  152    175   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
  153    176   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  154    177   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  155    178   
                source: err.into(),

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

@@ -1,1 +44,47 @@
    5      5   
    6      6   
/// Types for the `BodyWithXmlName` operation.
    7      7   
pub mod body_with_xml_name;
    8      8   
    9      9   
/// Types for the `ConstantAndVariableQueryString` operation.
   10     10   
pub mod constant_and_variable_query_string;
   11     11   
   12     12   
/// Types for the `ConstantQueryString` operation.
   13     13   
pub mod constant_query_string;
   14     14   
          15  +
/// Types for the `ContentTypeParameters` operation.
          16  +
pub mod content_type_parameters;
          17  +
   15     18   
/// Types for the `DatetimeOffsets` operation.
   16     19   
pub mod datetime_offsets;
   17     20   
   18     21   
/// Types for the `EmptyInputAndEmptyOutput` operation.
   19     22   
pub mod empty_input_and_empty_output;
   20     23   
   21     24   
/// Types for the `EndpointOperation` operation.
   22     25   
pub mod endpoint_operation;
   23     26   
   24     27   
/// Types for the `EndpointWithHostLabelHeaderOperation` operation.

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/content_type_parameters.rs

@@ -0,1 +0,325 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `ContentTypeParameters`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct ContentTypeParameters;
           6  +
impl ContentTypeParameters {
           7  +
    /// Creates a new `ContentTypeParameters`
           8  +
    pub fn new() -> Self {
           9  +
        Self
          10  +
    }
          11  +
    pub(crate) async fn orchestrate(
          12  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          13  +
        input: crate::operation::content_type_parameters::ContentTypeParametersInput,
          14  +
    ) -> ::std::result::Result<
          15  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
          16  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          17  +
            crate::operation::content_type_parameters::ContentTypeParametersError,
          18  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          19  +
        >,
          20  +
    > {
          21  +
        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
          22  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          23  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          24  +
        >| {
          25  +
            err.map_service_error(|err| {
          26  +
                err.downcast::<crate::operation::content_type_parameters::ContentTypeParametersError>()
          27  +
                    .expect("correct error type")
          28  +
            })
          29  +
        };
          30  +
        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
          31  +
            .await
          32  +
            .map_err(map_err)?;
          33  +
        let output = context.finalize().map_err(map_err)?;
          34  +
        ::std::result::Result::Ok(
          35  +
            output
          36  +
                .downcast::<crate::operation::content_type_parameters::ContentTypeParametersOutput>()
          37  +
                .expect("correct output type"),
          38  +
        )
          39  +
    }
          40  +
          41  +
    pub(crate) async fn orchestrate_with_stop_point(
          42  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          43  +
        input: crate::operation::content_type_parameters::ContentTypeParametersInput,
          44  +
        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
          45  +
    ) -> ::std::result::Result<
          46  +
        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
          47  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          48  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          49  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          50  +
        >,
          51  +
    > {
          52  +
        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
          53  +
        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point(
          54  +
            "restxmlprotocol",
          55  +
            "ContentTypeParameters",
          56  +
            input,
          57  +
            runtime_plugins,
          58  +
            stop_point,
          59  +
        )
          60  +
        .await
          61  +
    }
          62  +
          63  +
    pub(crate) fn operation_runtime_plugins(
          64  +
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          65  +
        client_config: &crate::config::Config,
          66  +
        config_override: ::std::option::Option<crate::config::Builder>,
          67  +
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
          68  +
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
          69  +
        runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![
          70  +
            ::aws_smithy_runtime::client::auth::no_auth::NO_AUTH_SCHEME_ID,
          71  +
        ]));
          72  +
        if let ::std::option::Option::Some(config_override) = config_override {
          73  +
            for plugin in config_override.runtime_plugins.iter().cloned() {
          74  +
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
          75  +
            }
          76  +
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
          77  +
                config_override,
          78  +
                client_config.config.clone(),
          79  +
                &client_config.runtime_components,
          80  +
            ));
          81  +
        }
          82  +
        runtime_plugins
          83  +
    }
          84  +
}
          85  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ContentTypeParameters {
          86  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
          87  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ContentTypeParameters");
          88  +
          89  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
          90  +
            ContentTypeParametersRequestSerializer,
          91  +
        ));
          92  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
          93  +
            ContentTypeParametersResponseDeserializer,
          94  +
        ));
          95  +
          96  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
          97  +
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
          98  +
        ));
          99  +
         100  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
         101  +
            "ContentTypeParameters",
         102  +
            "restxmlprotocol",
         103  +
        ));
         104  +
         105  +
        ::std::option::Option::Some(cfg.freeze())
         106  +
    }
         107  +
         108  +
    fn runtime_components(
         109  +
        &self,
         110  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
         111  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
         112  +
        #[allow(unused_mut)]
         113  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ContentTypeParameters")
         114  +
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
         115  +
            .with_interceptor(ContentTypeParametersEndpointParamsInterceptor)
         116  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         117  +
                crate::operation::content_type_parameters::ContentTypeParametersError,
         118  +
            >::new())
         119  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         120  +
                crate::operation::content_type_parameters::ContentTypeParametersError,
         121  +
            >::new());
         122  +
         123  +
        ::std::borrow::Cow::Owned(rcb)
         124  +
    }
         125  +
}
         126  +
         127  +
#[derive(Debug)]
         128  +
struct ContentTypeParametersResponseDeserializer;
         129  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ContentTypeParametersResponseDeserializer {
         130  +
    fn deserialize_nonstreaming(
         131  +
        &self,
         132  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         133  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         134  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         135  +
        let headers = response.headers();
         136  +
        let body = response.body().bytes().expect("body loaded");
         137  +
        #[allow(unused_mut)]
         138  +
        let mut force_error = false;
         139  +
         140  +
        let parse_result = if !success && status != 200 || force_error {
         141  +
            crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters_http_error(status, headers, body)
         142  +
        } else {
         143  +
            crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters_http_response(status, headers, body)
         144  +
        };
         145  +
        crate::protocol_serde::type_erase_result(parse_result)
         146  +
    }
         147  +
}
         148  +
#[derive(Debug)]
         149  +
struct ContentTypeParametersRequestSerializer;
         150  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ContentTypeParametersRequestSerializer {
         151  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         152  +
    fn serialize_input(
         153  +
        &self,
         154  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         155  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         156  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         157  +
        let input = input
         158  +
            .downcast::<crate::operation::content_type_parameters::ContentTypeParametersInput>()
         159  +
            .expect("correct type");
         160  +
        let _header_serialization_settings = _cfg
         161  +
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
         162  +
            .cloned()
         163  +
            .unwrap_or_default();
         164  +
        let mut request_builder = {
         165  +
            fn uri_base(
         166  +
                _input: &crate::operation::content_type_parameters::ContentTypeParametersInput,
         167  +
                output: &mut ::std::string::String,
         168  +
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
         169  +
                use ::std::fmt::Write as _;
         170  +
                ::std::write!(output, "/ContentTypeParameters").expect("formatting should succeed");
         171  +
                ::std::result::Result::Ok(())
         172  +
            }
         173  +
            #[allow(clippy::unnecessary_wraps)]
         174  +
            fn update_http_builder(
         175  +
                input: &crate::operation::content_type_parameters::ContentTypeParametersInput,
         176  +
                builder: ::http::request::Builder,
         177  +
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         178  +
                let mut uri = ::std::string::String::new();
         179  +
                uri_base(input, &mut uri)?;
         180  +
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
         181  +
            }
         182  +
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
         183  +
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
         184  +
            builder
         185  +
        };
         186  +
        let body = ::aws_smithy_types::body::SdkBody::from(
         187  +
            crate::protocol_serde::shape_content_type_parameters::ser_content_type_parameters_op_input(&input)?,
         188  +
        );
         189  +
        if let Some(content_length) = body.content_length() {
         190  +
            let content_length = content_length.to_string();
         191  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         192  +
        }
         193  +
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         194  +
    }
         195  +
}
         196  +
#[derive(Debug)]
         197  +
struct ContentTypeParametersEndpointParamsInterceptor;
         198  +
         199  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ContentTypeParametersEndpointParamsInterceptor {
         200  +
    fn name(&self) -> &'static str {
         201  +
        "ContentTypeParametersEndpointParamsInterceptor"
         202  +
    }
         203  +
         204  +
    fn read_before_execution(
         205  +
        &self,
         206  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         207  +
            '_,
         208  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         209  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         210  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         211  +
        >,
         212  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         213  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         214  +
        let _input = context
         215  +
            .input()
         216  +
            .downcast_ref::<ContentTypeParametersInput>()
         217  +
            .ok_or("failed to downcast to ContentTypeParametersInput")?;
         218  +
         219  +
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
         220  +
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         221  +
        })?;
         222  +
        cfg.interceptor_state()
         223  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         224  +
        ::std::result::Result::Ok(())
         225  +
    }
         226  +
}
         227  +
         228  +
/// Error type for the `ContentTypeParametersError` operation.
         229  +
#[non_exhaustive]
         230  +
#[derive(::std::fmt::Debug)]
         231  +
pub enum ContentTypeParametersError {
         232  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         233  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         234  +
    variable wildcard pattern and check `.code()`:
         235  +
     \
         236  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         237  +
     \
         238  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ContentTypeParametersError) for what information is available for the error.")]
         239  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         240  +
}
         241  +
impl ContentTypeParametersError {
         242  +
    /// Creates the `ContentTypeParametersError::Unhandled` variant from any error type.
         243  +
    pub fn unhandled(
         244  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         245  +
    ) -> Self {
         246  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         247  +
            source: err.into(),
         248  +
            meta: ::std::default::Default::default(),
         249  +
        })
         250  +
    }
         251  +
         252  +
    /// Creates the `ContentTypeParametersError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         253  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         254  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         255  +
            source: err.clone().into(),
         256  +
            meta: err,
         257  +
        })
         258  +
    }
         259  +
    ///
         260  +
    /// Returns error metadata, which includes the error code, message,
         261  +
    /// request ID, and potentially additional information.
         262  +
    ///
         263  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         264  +
        match self {
         265  +
            Self::Unhandled(e) => &e.meta,
         266  +
        }
         267  +
    }
         268  +
}
         269  +
impl ::std::error::Error for ContentTypeParametersError {
         270  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         271  +
        match self {
         272  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         273  +
        }
         274  +
    }
         275  +
}
         276  +
impl ::std::fmt::Display for ContentTypeParametersError {
         277  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         278  +
        match self {
         279  +
            Self::Unhandled(_inner) => {
         280  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         281  +
                    write!(f, "unhandled error ({code})")
         282  +
                } else {
         283  +
                    f.write_str("unhandled error")
         284  +
                }
         285  +
            }
         286  +
        }
         287  +
    }
         288  +
}
         289  +
impl ::aws_smithy_types::retry::ProvideErrorKind for ContentTypeParametersError {
         290  +
    fn code(&self) -> ::std::option::Option<&str> {
         291  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         292  +
    }
         293  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         294  +
        ::std::option::Option::None
         295  +
    }
         296  +
}
         297  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ContentTypeParametersError {
         298  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         299  +
        match self {
         300  +
            Self::Unhandled(_inner) => &_inner.meta,
         301  +
        }
         302  +
    }
         303  +
}
         304  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ContentTypeParametersError {
         305  +
    fn create_unhandled_error(
         306  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         307  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         308  +
    ) -> Self {
         309  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         310  +
            source,
         311  +
            meta: meta.unwrap_or_default(),
         312  +
        })
         313  +
    }
         314  +
}
         315  +
         316  +
pub use crate::operation::content_type_parameters::_content_type_parameters_output::ContentTypeParametersOutput;
         317  +
         318  +
pub use crate::operation::content_type_parameters::_content_type_parameters_input::ContentTypeParametersInput;
         319  +
         320  +
mod _content_type_parameters_input;
         321  +
         322  +
mod _content_type_parameters_output;
         323  +
         324  +
/// Builders
         325  +
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/content_type_parameters/_content_type_parameters_input.rs

@@ -0,1 +0,50 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct ContentTypeParametersInput {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub value: ::std::option::Option<i32>,
           8  +
}
           9  +
impl ContentTypeParametersInput {
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub fn value(&self) -> ::std::option::Option<i32> {
          12  +
        self.value
          13  +
    }
          14  +
}
          15  +
impl ContentTypeParametersInput {
          16  +
    /// Creates a new builder-style object to manufacture [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          17  +
    pub fn builder() -> crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
          18  +
        crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder::default()
          19  +
    }
          20  +
}
          21  +
          22  +
/// A builder for [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          23  +
#[non_exhaustive]
          24  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          25  +
pub struct ContentTypeParametersInputBuilder {
          26  +
    pub(crate) value: ::std::option::Option<i32>,
          27  +
}
          28  +
impl ContentTypeParametersInputBuilder {
          29  +
    #[allow(missing_docs)] // documentation missing in model
          30  +
    pub fn value(mut self, input: i32) -> Self {
          31  +
        self.value = ::std::option::Option::Some(input);
          32  +
        self
          33  +
    }
          34  +
    #[allow(missing_docs)] // documentation missing in model
          35  +
    pub fn set_value(mut self, input: ::std::option::Option<i32>) -> Self {
          36  +
        self.value = input;
          37  +
        self
          38  +
    }
          39  +
    #[allow(missing_docs)] // documentation missing in model
          40  +
    pub fn get_value(&self) -> &::std::option::Option<i32> {
          41  +
        &self.value
          42  +
    }
          43  +
    /// Consumes the builder and constructs a [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          44  +
    pub fn build(
          45  +
        self,
          46  +
    ) -> ::std::result::Result<crate::operation::content_type_parameters::ContentTypeParametersInput, ::aws_smithy_types::error::operation::BuildError>
          47  +
    {
          48  +
        ::std::result::Result::Ok(crate::operation::content_type_parameters::ContentTypeParametersInput { value: self.value })
          49  +
    }
          50  +
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/content_type_parameters/_content_type_parameters_output.rs

@@ -0,1 +0,22 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct ContentTypeParametersOutput {}
           6  +
impl ContentTypeParametersOutput {
           7  +
    /// Creates a new builder-style object to manufacture [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
           8  +
    pub fn builder() -> crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder {
           9  +
        crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder::default()
          10  +
    }
          11  +
}
          12  +
          13  +
/// A builder for [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          14  +
#[non_exhaustive]
          15  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          16  +
pub struct ContentTypeParametersOutputBuilder {}
          17  +
impl ContentTypeParametersOutputBuilder {
          18  +
    /// Consumes the builder and constructs a [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          19  +
    pub fn build(self) -> crate::operation::content_type_parameters::ContentTypeParametersOutput {
          20  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput {}
          21  +
    }
          22  +
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/content_type_parameters/builders.rs

@@ -0,1 +0,125 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::content_type_parameters::_content_type_parameters_output::ContentTypeParametersOutputBuilder;
           3  +
           4  +
pub use crate::operation::content_type_parameters::_content_type_parameters_input::ContentTypeParametersInputBuilder;
           5  +
           6  +
impl crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
           7  +
    /// Sends a request with this input using the given client.
           8  +
    pub async fn send_with(
           9  +
        self,
          10  +
        client: &crate::Client,
          11  +
    ) -> ::std::result::Result<
          12  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::content_type_parameters::ContentTypeParametersError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.content_type_parameters();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `ContentTypeParameters`.
          24  +
///
          25  +
/// The example tests how servers must support requests containing a `Content-Type` header with parameters.
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct ContentTypeParametersFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
          35  +
        crate::operation::content_type_parameters::ContentTypeParametersError,
          36  +
    > for ContentTypeParametersFluentBuilder
          37  +
{
          38  +
    fn send(
          39  +
        self,
          40  +
        config_override: crate::config::Builder,
          41  +
    ) -> crate::client::customize::internal::BoxFuture<
          42  +
        crate::client::customize::internal::SendResult<
          43  +
            crate::operation::content_type_parameters::ContentTypeParametersOutput,
          44  +
            crate::operation::content_type_parameters::ContentTypeParametersError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl ContentTypeParametersFluentBuilder {
          51  +
    /// Creates a new `ContentTypeParametersFluentBuilder`.
          52  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          53  +
        Self {
          54  +
            handle,
          55  +
            inner: ::std::default::Default::default(),
          56  +
            config_override: ::std::option::Option::None,
          57  +
        }
          58  +
    }
          59  +
    /// Access the ContentTypeParameters as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
          61  +
        &self.inner
          62  +
    }
          63  +
    /// Sends the request and returns the response.
          64  +
    ///
          65  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          66  +
    /// can be matched against.
          67  +
    ///
          68  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          69  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          70  +
    /// set when configuring the client.
          71  +
    pub async fn send(
          72  +
        self,
          73  +
    ) -> ::std::result::Result<
          74  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::content_type_parameters::ContentTypeParametersError,
          77  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          78  +
        >,
          79  +
    > {
          80  +
        let input = self
          81  +
            .inner
          82  +
            .build()
          83  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          84  +
        let runtime_plugins = crate::operation::content_type_parameters::ContentTypeParameters::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::content_type_parameters::ContentTypeParameters::orchestrate(&runtime_plugins, input).await
          90  +
    }
          91  +
          92  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          93  +
    pub fn customize(
          94  +
        self,
          95  +
    ) -> crate::client::customize::CustomizableOperation<
          96  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
          97  +
        crate::operation::content_type_parameters::ContentTypeParametersError,
          98  +
        Self,
          99  +
    > {
         100  +
        crate::client::customize::CustomizableOperation::new(self)
         101  +
    }
         102  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         103  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         104  +
        self
         105  +
    }
         106  +
         107  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         108  +
        self.config_override = config_override;
         109  +
        self
         110  +
    }
         111  +
    #[allow(missing_docs)] // documentation missing in model
         112  +
    pub fn value(mut self, input: i32) -> Self {
         113  +
        self.inner = self.inner.value(input);
         114  +
        self
         115  +
    }
         116  +
    #[allow(missing_docs)] // documentation missing in model
         117  +
    pub fn set_value(mut self, input: ::std::option::Option<i32>) -> Self {
         118  +
        self.inner = self.inner.set_value(input);
         119  +
        self
         120  +
    }
         121  +
    #[allow(missing_docs)] // documentation missing in model
         122  +
    pub fn get_value(&self) -> &::std::option::Option<i32> {
         123  +
        self.inner.get_value()
         124  +
    }
         125  +
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_enum_payload.rs

@@ -212,212 +292,295 @@
  232    232   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  233    233   
        let result = client
  234    234   
            .http_enum_payload()
  235    235   
            .set_payload(::std::option::Option::Some(
  236    236   
                "enumvalue".parse::<crate::types::StringEnum>().expect("static value validated to member"),
  237    237   
            ))
  238    238   
            .send()
  239    239   
            .await;
  240    240   
        let _ = dbg!(result);
  241    241   
        let http_request = request_receiver.expect_request();
         242  +
        let expected_headers = [("Content-Type", "text/plain")];
         243  +
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  242    244   
        let body = http_request.body().bytes().expect("body should be strict");
  243    245   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  244    246   
            body,
  245    247   
            "enumvalue",
  246    248   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
  247    249   
        ));
  248    250   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  249    251   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  250    252   
        ::pretty_assertions::assert_eq!(uri.path(), "/EnumPayload", "path was incorrect");
  251    253   
    }
  252    254   
    /// Test ID: RestXmlEnumPayloadResponse
  253    255   
    #[::tokio::test]
  254    256   
    #[::tracing_test::traced_test]
  255    257   
    async fn rest_xml_enum_payload_response_response() {
  256    258   
        let expected_output = crate::operation::http_enum_payload::HttpEnumPayloadOutput::builder()
  257    259   
            .set_payload(::std::option::Option::Some(
  258    260   
                "enumvalue".parse::<crate::types::StringEnum>().expect("static value validated to member"),
  259    261   
            ))
  260    262   
            .build();
  261    263   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
  262    264   
            ::http::response::Builder::new()
         265  +
                .header("Content-Type", "text/plain")
  263    266   
                .status(200)
  264    267   
                .body(::aws_smithy_types::body::SdkBody::from("enumvalue"))
  265    268   
                .unwrap(),
  266    269   
        )
  267    270   
        .unwrap();
  268    271   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  269    272   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  270    273   
  271    274   
        let op = crate::operation::http_enum_payload::HttpEnumPayload::new();
  272    275   
        let config = op.config().expect("the operation has config");

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_string_payload.rs

@@ -210,210 +288,291 @@
  230    230   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  231    231   
  232    232   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  233    233   
        let result = client
  234    234   
            .http_string_payload()
  235    235   
            .set_payload(::std::option::Option::Some("rawstring".to_owned()))
  236    236   
            .send()
  237    237   
            .await;
  238    238   
        let _ = dbg!(result);
  239    239   
        let http_request = request_receiver.expect_request();
         240  +
        let expected_headers = [("Content-Type", "text/plain")];
         241  +
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  240    242   
        let body = http_request.body().bytes().expect("body should be strict");
  241    243   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  242    244   
            body,
  243    245   
            "rawstring",
  244    246   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
  245    247   
        ));
  246    248   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  247    249   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  248    250   
        ::pretty_assertions::assert_eq!(uri.path(), "/StringPayload", "path was incorrect");
  249    251   
    }
  250    252   
    /// Test ID: RestXmlStringPayloadResponse
  251    253   
    #[::tokio::test]
  252    254   
    #[::tracing_test::traced_test]
  253    255   
    async fn rest_xml_string_payload_response_response() {
  254    256   
        let expected_output = crate::operation::http_string_payload::HttpStringPayloadOutput::builder()
  255    257   
            .set_payload(::std::option::Option::Some("rawstring".to_owned()))
  256    258   
            .build();
  257    259   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
  258    260   
            ::http::response::Builder::new()
         261  +
                .header("Content-Type", "text/plain")
  259    262   
                .status(200)
  260    263   
                .body(::aws_smithy_types::body::SdkBody::from("rawstring"))
  261    264   
                .unwrap(),
  262    265   
        )
  263    266   
        .unwrap();
  264    267   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  265    268   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  266    269   
  267    270   
        let op = crate::operation::http_string_payload::HttpStringPayload::new();
  268    271   
        let config = op.config().expect("the operation has config");

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

@@ -4,4 +63,65 @@
   24     24   
}
   25     25   
   26     26   
pub(crate) mod shape_all_query_string_types;
   27     27   
   28     28   
pub(crate) mod shape_body_with_xml_name;
   29     29   
   30     30   
pub(crate) mod shape_constant_and_variable_query_string;
   31     31   
   32     32   
pub(crate) mod shape_constant_query_string;
   33     33   
          34  +
pub(crate) mod shape_content_type_parameters;
          35  +
   34     36   
pub(crate) mod shape_datetime_offsets;
   35     37   
   36     38   
pub(crate) mod shape_empty_input_and_empty_output;
   37     39   
   38     40   
pub(crate) mod shape_endpoint_operation;
   39     41   
   40     42   
pub(crate) mod shape_endpoint_with_host_label_header_operation;
   41     43   
   42     44   
pub(crate) mod shape_endpoint_with_host_label_operation;
   43     45   
@@ -152,154 +211,215 @@
  172    174   
pub(crate) mod shape_xml_namespaces;
  173    175   
  174    176   
pub(crate) mod shape_xml_timestamps;
  175    177   
  176    178   
pub(crate) mod shape_xml_unions;
  177    179   
  178    180   
pub(crate) mod shape_body_with_xml_name_input;
  179    181   
  180    182   
pub(crate) mod shape_complex_error;
  181    183   
         184  +
pub(crate) mod shape_content_type_parameters_input;
         185  +
  182    186   
pub(crate) mod shape_endpoint_with_host_label_operation_input;
  183    187   
  184    188   
pub(crate) mod shape_flattened_xml_map_input;
  185    189   
  186    190   
pub(crate) mod shape_flattened_xml_map_with_xml_name_input;
  187    191   
  188    192   
pub(crate) mod shape_greeting_with_errors_output;
  189    193   
  190    194   
pub(crate) mod shape_http_enum_payload_output;
  191    195   

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/protocol_serde/shape_content_type_parameters.rs

@@ -0,1 +0,45 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub fn de_content_type_parameters_http_error(
           4  +
    _response_status: u16,
           5  +
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
           6  +
    _response_body: &[u8],
           7  +
) -> std::result::Result<
           8  +
    crate::operation::content_type_parameters::ContentTypeParametersOutput,
           9  +
    crate::operation::content_type_parameters::ContentTypeParametersError,
          10  +
> {
          11  +
    #[allow(unused_mut)]
          12  +
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
          13  +
        .map_err(crate::operation::content_type_parameters::ContentTypeParametersError::unhandled)?;
          14  +
    let generic = generic_builder.build();
          15  +
    Err(crate::operation::content_type_parameters::ContentTypeParametersError::generic(generic))
          16  +
}
          17  +
          18  +
#[allow(clippy::unnecessary_wraps)]
          19  +
pub fn de_content_type_parameters_http_response(
          20  +
    _response_status: u16,
          21  +
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
          22  +
    _response_body: &[u8],
          23  +
) -> std::result::Result<
          24  +
    crate::operation::content_type_parameters::ContentTypeParametersOutput,
          25  +
    crate::operation::content_type_parameters::ContentTypeParametersError,
          26  +
> {
          27  +
    Ok({
          28  +
        #[allow(unused_mut)]
          29  +
        let mut output = crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder::default();
          30  +
        output.build()
          31  +
    })
          32  +
}
          33  +
          34  +
pub fn ser_content_type_parameters_op_input(
          35  +
    input: &crate::operation::content_type_parameters::ContentTypeParametersInput,
          36  +
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          37  +
    let mut out = String::new();
          38  +
    {
          39  +
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
          40  +
        #[allow(unused_mut)]
          41  +
        let mut root = writer.start_el("ContentTypeParametersInput");
          42  +
        crate::protocol_serde::shape_content_type_parameters_input::ser_content_type_parameters_input_input_input(input, root)?
          43  +
    }
          44  +
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          45  +
}