Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/src/config/timeout.rs

@@ -1,1 +2,3 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ResiliencyConfigCustomization.kt:335 */
    2      3   
pub use ::aws_smithy_types::timeout::{TimeoutConfig, TimeoutConfigBuilder};

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/src/error.rs

@@ -1,1 +13,15 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ClientRuntimeTypesReExportGenerator.kt:96 */
    2      3   
pub use ::aws_smithy_runtime_api::box_error::BoxError;
    3      4   
           5  +
/* RequiredCustomizations.kt:104 */
    4      6   
/// Error type returned by the client.
    5      7   
pub type SdkError<E, R = ::aws_smithy_runtime_api::client::orchestrator::HttpResponse> = ::aws_smithy_runtime_api::client::result::SdkError<E, R>;
    6      8   
pub use ::aws_smithy_runtime_api::client::result::ConnectorError;
    7      9   
pub use ::aws_smithy_types::error::operation::BuildError;
    8     10   
    9     11   
pub use ::aws_smithy_types::error::display::DisplayErrorContext;
   10     12   
pub use ::aws_smithy_types::error::metadata::ErrorMetadata;
   11     13   
pub use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
   12     14   
   13     15   
pub(crate) mod sealed_unhandled;

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/src/error/sealed_unhandled.rs

@@ -1,1 +20,21 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServiceErrorGenerator.kt:277 */
    2      3   
/// This struct is not intended to be used.
    3      4   
///
    4      5   
/// This struct holds information about an unhandled error,
    5      6   
/// but that information should be obtained by using the
    6      7   
/// [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) trait
    7      8   
/// on the error type.
    8      9   
///
    9     10   
/// This struct intentionally doesn't yield any useful information itself.
   10     11   
#[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
   11     12   
variable wildcard pattern and check `.code()`:

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

@@ -1,1 +70,104 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServiceErrorGenerator.kt:252 */
    2      3   
/// All possible error types for this service.
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::fmt::Debug)]
    5         -
pub enum Error {
    6         -
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
           8  +
pub /* ServiceErrorGenerator.kt:257 */ enum Error {
           9  +
    /// /* ServiceErrorGenerator.kt:264 */An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
          10  +
    /* ServiceErrorGenerator.kt:320 */
    7     11   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
    8     12   
    variable wildcard pattern and check `.code()`:
    9     13   
     \
   10     14   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
   11     15   
     \
   12     16   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
   13         -
    Unhandled(crate::error::sealed_unhandled::Unhandled),
          17  +
    /* ServiceErrorGenerator.kt:266 */
          18  +
    Unhandled(crate::error::sealed_unhandled::Unhandled), /* ServiceErrorGenerator.kt:257 */
   14     19   
}
          20  +
/* ServiceErrorGenerator.kt:131 */
   15     21   
impl ::std::fmt::Display for Error {
          22  +
    /* ServiceErrorGenerator.kt:132 */
   16     23   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          24  +
        /* ServiceErrorGenerator.kt:133 */
   17     25   
        match self {
          26  +
            /* ServiceErrorGenerator.kt:137 */
   18     27   
            Error::Unhandled(_) => {
   19     28   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
   20     29   
                    write!(f, "unhandled error ({code})")
   21     30   
                } else {
   22     31   
                    f.write_str("unhandled error")
   23     32   
                }
   24         -
            }
          33  +
            } /* ServiceErrorGenerator.kt:133 */
   25     34   
        }
          35  +
        /* ServiceErrorGenerator.kt:132 */
   26     36   
    }
          37  +
    /* ServiceErrorGenerator.kt:131 */
   27     38   
}
          39  +
/* ServiceErrorGenerator.kt:154 */
   28     40   
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
   29     41   
    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
   30     42   
        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   31     43   
            source: value.into(),
   32     44   
            meta: ::std::default::Default::default(),
   33     45   
        })
   34     46   
    }
   35     47   
}
          48  +
/* ServiceErrorGenerator.kt:223 */
   36     49   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
   37     50   
    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
   38     51   
        match self {
   39     52   
            Self::Unhandled(inner) => &inner.meta,
   40     53   
        }
   41     54   
    }
   42     55   
}
          56  +
/* ServiceErrorGenerator.kt:174 */
   43     57   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::operation::OperationError, R>> for Error
   44     58   
where
   45     59   
    R: Send + Sync + std::fmt::Debug + 'static,
   46     60   
{
          61  +
    /* ServiceErrorGenerator.kt:179 */
   47     62   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::operation::OperationError, R>) -> Self {
          63  +
        /* ServiceErrorGenerator.kt:184 */
   48     64   
        match err {
          65  +
            /* ServiceErrorGenerator.kt:185 */
   49     66   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
          67  +
            /* ServiceErrorGenerator.kt:186 */
   50     68   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   51     69   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
   52     70   
                source: err.into(),
   53     71   
            }),
          72  +
            /* ServiceErrorGenerator.kt:184 */
   54     73   
        }
          74  +
        /* ServiceErrorGenerator.kt:179 */
   55     75   
    }
          76  +
    /* ServiceErrorGenerator.kt:174 */
   56     77   
}
          78  +
/* ServiceErrorGenerator.kt:202 */
   57     79   
impl From<crate::operation::operation::OperationError> for Error {
          80  +
    /* ServiceErrorGenerator.kt:203 */
   58     81   
    fn from(err: crate::operation::operation::OperationError) -> Self {
          82  +
        /* ServiceErrorGenerator.kt:204 */
   59     83   
        match err {
          84  +
            /* ServiceErrorGenerator.kt:212 */
   60     85   
            crate::operation::operation::OperationError::Unhandled(inner) => Error::Unhandled(inner),
          86  +
            /* ServiceErrorGenerator.kt:204 */
   61     87   
        }
          88  +
        /* ServiceErrorGenerator.kt:203 */
   62     89   
    }
          90  +
    /* ServiceErrorGenerator.kt:202 */
   63     91   
}
          92  +
/* ServiceErrorGenerator.kt:115 */
   64     93   
impl ::std::error::Error for Error {
          94  +
    /* ServiceErrorGenerator.kt:116 */
   65     95   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
          96  +
        /* ServiceErrorGenerator.kt:117 */
   66     97   
        match self {
   67         -
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
          98  +
            /* ServiceErrorGenerator.kt:121 */
          99  +
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source), /* ServiceErrorGenerator.kt:117 */
   68    100   
        }
         101  +
        /* ServiceErrorGenerator.kt:116 */
   69    102   
    }
         103  +
    /* ServiceErrorGenerator.kt:115 */
   70    104   
}

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/src/lib.rs

@@ -18,18 +129,139 @@
   38     38   
//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule
   39     39   
//! is the input, output, and error type for that API, as well as builders to construct each of those.
   40     40   
//!
   41     41   
//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the
   42     42   
//! client can return. Any other error type can be converted to this `Error` type via the
   43     43   
//! [`From`](std::convert::From) trait.
   44     44   
//!
   45     45   
//! The other modules within this crate are not required for normal usage.
   46     46   
   47     47   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
          48  +
/* ServiceErrorGenerator.kt:127 */
   48     49   
pub use error_meta::Error;
   49     50   
          51  +
/* RustType.kt:516 */
   50     52   
#[doc(inline)]
          53  +
/* ServiceGenerator.kt:63 */
   51     54   
pub use config::Config;
   52     55   
   53         -
/// Client for calling the service.
          56  +
/// /* FluentClientDocs.kt:24 */Client for calling the service.
   54     57   
///
   55     58   
/// ## Constructing a `Client`
   56     59   
///
   57     60   
/// A `Client` requires a config in order to be constructed. With the default set of Cargo features,
   58     61   
/// this config will only require an endpoint to produce a functioning client. However, some Smithy
   59     62   
/// features will require additional configuration. For example, `@auth` requires some kind of identity
   60     63   
/// or identity resolver to be configured. The config is used to customize various aspects of the client,
   61     64   
/// such as:
   62     65   
///
   63     66   
///   - [The underlying HTTP client](crate::config::Builder::http_client)
   64     67   
///   - [Retries](crate::config::Builder::retry_config)
   65     68   
///   - [Timeouts](crate::config::Builder::timeout_config)
   66     69   
///   - [... and more](crate::config::Builder)
   67     70   
///
   68     71   
/// Below is a minimal example of how to create a client:
   69     72   
///
   70     73   
/// ```rust,no_run
   71     74   
/// let config = query_compat_test::Config::builder()
   72     75   
///     .endpoint_url("http://localhost:1234")
   73     76   
///     .build();
   74     77   
/// let client = query_compat_test::Client::from_conf(config);
   75     78   
/// ```
   76     79   
///
   77     80   
/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should be done
   78     81   
/// once at application start-up. Cloning a client is cheap (it's just an [`Arc`](std::sync::Arc) under the hood),
   79     82   
/// so creating it once at start-up and cloning it around the application as needed is recommended.
   80         -
/// # Using the `Client`
          83  +
/// /* FluentClientDocs.kt:79 */# Using the `Client`
   81     84   
///
   82     85   
/// A client has a function for every operation that can be performed by the service.
   83     86   
/// For example, the [`Operation`](crate::operation::operation) operation has
   84     87   
/// a [`Client::operation`], function which returns a builder for that operation.
   85     88   
/// The fluent builder ultimately has a `send()` function that returns an async future that
   86     89   
/// returns a result, as illustrated below:
   87     90   
///
   88     91   
/// ```rust,ignore
   89     92   
/// let result = client.operation()
   90     93   
///     .message("example")
   91     94   
///     .send()
   92     95   
///     .await;
   93     96   
/// ```
   94     97   
///
   95     98   
/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
   96     99   
/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
   97    100   
/// information.
   98    101   
pub mod client;
   99    102   
  100         -
/// Configuration for the service.
         103  +
/// /* ClientRustModule.kt:121 */Configuration for the service.
  101    104   
pub mod config;
  102    105   
  103         -
/// Common errors and error handling utilities.
         106  +
/// /* ClientRustModule.kt:121 */Common errors and error handling utilities.
  104    107   
pub mod error;
  105    108   
         109  +
/* RustModule.kt:172 */
  106    110   
mod error_meta;
  107    111   
  108         -
/// Information about this crate.
         112  +
/// /* ClientRustModule.kt:121 */Information about this crate.
  109    113   
pub mod meta;
  110    114   
  111         -
/// Primitives such as `Blob` or `DateTime` used by other types.
         115  +
/// /* ClientRustModule.kt:121 */Primitives such as `Blob` or `DateTime` used by other types.
  112    116   
pub mod primitives;
  113    117   
         118  +
/* RustModule.kt:172 */
  114    119   
mod auth_plugin;
  115    120   
  116         -
/// All operations that this crate can perform.
         121  +
/// /* ClientRustModule.kt:121 */All operations that this crate can perform.
  117    122   
pub mod operation;
  118    123   
  119    124   
pub(crate) mod protocol_serde;
  120    125   
         126  +
/* RustModule.kt:172 */
  121    127   
mod sdk_feature_tracker;
  122    128   
         129  +
/* RustModule.kt:172 */
  123    130   
mod serialization_settings;
  124    131   
         132  +
/* RustModule.kt:172 */
  125    133   
mod aws_query_compatible_errors;
  126    134   
         135  +
/* RustModule.kt:172 */
  127    136   
mod json_errors;
  128    137   
         138  +
/* FluentClientDecorator.kt:76 */
  129    139   
pub use client::Client;

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/src/meta.rs

@@ -1,1 +4,5 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
           3  +
/* CrateVersionCustomization.kt:23 */
    3      4   
/// Crate version number.
    4      5   
pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION");

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

@@ -1,1 +4,4 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Types for the `Operation` operation.
           2  +
/* CodegenDelegator.kt:51 */
           3  +
/// /* CodegenDelegator.kt:51 */Types for the `Operation` operation.
    4      4   
pub mod operation;

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

@@ -1,1 +40,49 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* OperationGenerator.kt:77 */
    2      3   
/// Orchestration and serialization glue logic for `Operation`.
           4  +
/* RustType.kt:516 */
    3      5   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           6  +
/* RustType.kt:516 */
    4      7   
#[non_exhaustive]
           8  +
/* OperationGenerator.kt:84 */
    5      9   
pub struct Operation;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl Operation {
    7         -
    /// Creates a new `Operation`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `Operation`
          13  +
    /* OperationGenerator.kt:87 */
    8     14   
    pub fn new() -> Self {
          15  +
        /* OperationGenerator.kt:88 */
    9     16   
        Self
          17  +
        /* OperationGenerator.kt:87 */
   10     18   
    }
          19  +
    /* OperationGenerator.kt:138 */
   11     20   
    pub(crate) async fn orchestrate(
   12     21   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     22   
        input: crate::operation::operation::OperationInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::operation::OperationOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::operation::OperationError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -54,63 +364,440 @@
   74     83   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   75     84   
            }
   76     85   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   77     86   
                config_override,
   78     87   
                client_config.config.clone(),
   79     88   
                &client_config.runtime_components,
   80     89   
            ));
   81     90   
        }
   82     91   
        runtime_plugins
   83     92   
    }
          93  +
    /* OperationGenerator.kt:85 */
   84     94   
}
          95  +
/* OperationRuntimePluginGenerator.kt:55 */
   85     96   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for Operation {
   86     97   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   87     98   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("Operation");
   88     99   
   89    100   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   90    101   
            OperationRequestSerializer,
   91    102   
        ));
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   93    104   
            OperationResponseDeserializer,
   94    105   
        ));
   95    106   
   96    107   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
   97    108   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
   98    109   
        ));
   99    110   
  100    111   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  101    112   
            "Operation",
  102    113   
            "QueryCompatService",
  103    114   
        ));
  104    115   
  105    116   
        ::std::option::Option::Some(cfg.freeze())
  106    117   
    }
  107    118   
  108    119   
    fn runtime_components(
  109    120   
        &self,
  110    121   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  111    122   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  112    123   
        #[allow(unused_mut)]
  113    124   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("Operation")
  114    125   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  115    126   
            .with_interceptor(OperationEndpointParamsInterceptor)
  116    127   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  117    128   
                crate::operation::operation::OperationError,
  118    129   
            >::new())
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  120    131   
                crate::operation::operation::OperationError,
  121    132   
            >::new());
  122    133   
  123    134   
        ::std::borrow::Cow::Owned(rcb)
  124    135   
    }
  125    136   
}
  126    137   
         138  +
/* ResponseDeserializerGenerator.kt:64 */
  127    139   
#[derive(Debug)]
  128    140   
struct OperationResponseDeserializer;
  129    141   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for OperationResponseDeserializer {
  130    142   
    fn deserialize_nonstreaming(
  131    143   
        &self,
  132    144   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  133    145   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  134    146   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  135    147   
        let headers = response.headers();
  136    148   
        let body = response.body().bytes().expect("body loaded");
  137    149   
        #[allow(unused_mut)]
  138    150   
        let mut force_error = false;
  139    151   
  140    152   
        let parse_result = if !success && status != 200 || force_error {
  141    153   
            crate::protocol_serde::shape_operation::de_operation_http_error(status, headers, body)
  142    154   
        } else {
  143    155   
            crate::protocol_serde::shape_operation::de_operation_http_response(status, headers, body)
  144    156   
        };
  145    157   
        crate::protocol_serde::type_erase_result(parse_result)
  146    158   
    }
  147    159   
}
         160  +
/* RequestSerializerGenerator.kt:67 */
  148    161   
#[derive(Debug)]
  149    162   
struct OperationRequestSerializer;
  150    163   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for OperationRequestSerializer {
  151    164   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  152    165   
    fn serialize_input(
  153    166   
        &self,
  154    167   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  155    168   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  156    169   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  157    170   
        let input = input.downcast::<crate::operation::operation::OperationInput>().expect("correct type");
  158    171   
        let _header_serialization_settings = _cfg
  159    172   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  160    173   
            .cloned()
  161    174   
            .unwrap_or_default();
  162    175   
        let mut request_builder = {
  163    176   
            fn uri_base(
  164    177   
                _input: &crate::operation::operation::OperationInput,
  165    178   
                output: &mut ::std::string::String,
  166    179   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  167    180   
                use ::std::fmt::Write as _;
  168    181   
                ::std::write!(output, "/").expect("formatting should succeed");
  169    182   
                ::std::result::Result::Ok(())
  170    183   
            }
  171    184   
            #[allow(clippy::unnecessary_wraps)]
  172    185   
            fn update_http_builder(
  173    186   
                input: &crate::operation::operation::OperationInput,
  174    187   
                builder: ::http::request::Builder,
  175    188   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  176    189   
                let mut uri = ::std::string::String::new();
  177    190   
                uri_base(input, &mut uri)?;
  178    191   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  179    192   
            }
  180    193   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  181    194   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  182    195   
            builder = _header_serialization_settings.set_default_header(
  183    196   
                builder,
  184    197   
                ::http::header::HeaderName::from_static("x-amz-target"),
  185    198   
                "QueryCompatService.Operation",
  186    199   
            );
  187    200   
            builder =
  188    201   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("x-amzn-query-mode"), "true");
  189    202   
            builder
  190    203   
        };
  191    204   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_operation::ser_operation_input(&input)?);
  192    205   
        if let Some(content_length) = body.content_length() {
  193    206   
            let content_length = content_length.to_string();
  194    207   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  195    208   
        }
  196    209   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  197    210   
    }
  198    211   
}
         212  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  199    213   
#[derive(Debug)]
  200    214   
struct OperationEndpointParamsInterceptor;
  201    215   
  202    216   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for OperationEndpointParamsInterceptor {
  203    217   
    fn name(&self) -> &'static str {
  204    218   
        "OperationEndpointParamsInterceptor"
  205    219   
    }
  206    220   
  207    221   
    fn read_before_execution(
  208    222   
        &self,
  209    223   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  210    224   
            '_,
  211    225   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  212    226   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  213    227   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  214    228   
        >,
  215    229   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  216    230   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  217    231   
        let _input = context
  218    232   
            .input()
  219    233   
            .downcast_ref::<OperationInput>()
  220    234   
            .ok_or("failed to downcast to OperationInput")?;
  221    235   
  222    236   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  223    237   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  224    238   
        })?;
  225    239   
        cfg.interceptor_state()
  226    240   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  227    241   
        ::std::result::Result::Ok(())
  228    242   
    }
  229    243   
}
  230    244   
  231    245   
// The get_* functions below are generated from JMESPath expressions in the
  232    246   
// operationContextParams trait. They target the operation's input shape.
  233    247   
         248  +
/* RustType.kt:516 */
  234    249   
#[allow(unreachable_code, unused_variables)]
         250  +
/* RustType.kt:516 */
  235    251   
#[cfg(test)]
         252  +
/* ProtocolTestGenerator.kt:98 */
  236    253   
mod operation_test {
  237    254   
  238    255   
    /// Test ID: BasicQueryCompatTest
  239    256   
    #[::tokio::test]
  240    257   
    #[::tracing_test::traced_test]
  241    258   
    async fn basic_query_compat_test_request() {
  242    259   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  243    260   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  244    261   
  245    262   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  246    263   
        let result = client
  247    264   
            .operation()
  248    265   
            .set_message(::std::option::Option::Some("hello!".to_owned()))
  249    266   
            .send()
  250    267   
            .await;
  251    268   
        let _ = dbg!(result);
  252    269   
        let http_request = request_receiver.expect_request();
  253    270   
        let expected_headers = [("x-amz-target", "QueryCompatService.Operation"), ("x-amzn-query-mode", "true")];
  254    271   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  255    272   
        let body = http_request.body().bytes().expect("body should be strict");
  256    273   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  257    274   
            body,
  258    275   
            "{\"message\":\"hello!\"}",
  259    276   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
  260    277   
        ));
  261    278   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  262    279   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  263    280   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  264    281   
    }
         282  +
         283  +
    /* ProtocolTestGenerator.kt:98 */
  265    284   
}
  266    285   
         286  +
/* OperationErrorGenerator.kt:79 */
  267    287   
/// Error type for the `OperationError` operation.
         288  +
/* RustType.kt:516 */
  268    289   
#[non_exhaustive]
         290  +
/* RustType.kt:516 */
  269    291   
#[derive(::std::fmt::Debug)]
  270         -
pub enum OperationError {
         292  +
pub /* OperationErrorGenerator.kt:81 */ enum OperationError {
         293  +
    /* OperationErrorGenerator.kt:88 */
  271    294   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  272    295   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  273    296   
    variable wildcard pattern and check `.code()`:
  274    297   
     \
  275    298   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  276    299   
     \
  277    300   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-OperationError) for what information is available for the error.")]
  278    301   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         302  +
    /* OperationErrorGenerator.kt:81 */
  279    303   
}
         304  +
/* OperationErrorGenerator.kt:218 */
  280    305   
impl OperationError {
         306  +
    /* OperationErrorGenerator.kt:219 */
  281    307   
    /// Creates the `OperationError::Unhandled` variant from any error type.
  282    308   
    pub fn unhandled(
  283    309   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  284    310   
    ) -> Self {
  285    311   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  286    312   
            source: err.into(),
  287    313   
            meta: ::std::default::Default::default(),
  288    314   
        })
  289    315   
    }
  290    316   
  291    317   
    /// Creates the `OperationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  292    318   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  293    319   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  294    320   
            source: err.clone().into(),
  295    321   
            meta: err,
  296    322   
        })
  297    323   
    }
  298         -
    ///
         324  +
    /// /* OperationErrorGenerator.kt:236 */
  299    325   
    /// Returns error metadata, which includes the error code, message,
  300    326   
    /// request ID, and potentially additional information.
  301    327   
    ///
         328  +
    /* OperationErrorGenerator.kt:242 */
  302    329   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         330  +
        /* OperationErrorGenerator.kt:243 */
  303    331   
        match self {
  304         -
            Self::Unhandled(e) => &e.meta,
         332  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         333  +
            /* OperationErrorGenerator.kt:243 */
  305    334   
        }
         335  +
        /* OperationErrorGenerator.kt:242 */
  306    336   
    }
         337  +
    /* OperationErrorGenerator.kt:218 */
  307    338   
}
         339  +
/* OperationErrorGenerator.kt:269 */
  308    340   
impl ::std::error::Error for OperationError {
         341  +
    /* OperationErrorGenerator.kt:270 */
  309    342   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         343  +
        /* OperationErrorGenerator.kt:318 */
  310    344   
        match self {
  311         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         345  +
            /* OperationErrorGenerator.kt:326 */
         346  +
            Self::Unhandled(_inner) => {
         347  +
                /* OperationErrorGenerator.kt:279 */
         348  +
                ::std::option::Option::Some(&*_inner.source)
         349  +
                /* OperationErrorGenerator.kt:326 */
         350  +
            } /* OperationErrorGenerator.kt:318 */
  312    351   
        }
         352  +
        /* OperationErrorGenerator.kt:270 */
  313    353   
    }
         354  +
    /* OperationErrorGenerator.kt:269 */
  314    355   
}
         356  +
/* OperationErrorGenerator.kt:133 */
  315    357   
impl ::std::fmt::Display for OperationError {
         358  +
    /* OperationErrorGenerator.kt:134 */
  316    359   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         360  +
        /* OperationErrorGenerator.kt:318 */
  317    361   
        match self {
         362  +
            /* OperationErrorGenerator.kt:326 */
  318    363   
            Self::Unhandled(_inner) => {
         364  +
                /* OperationErrorGenerator.kt:139 */
  319    365   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  320    366   
                    write!(f, "unhandled error ({code})")
  321    367   
                } else {
  322    368   
                    f.write_str("unhandled error")
  323    369   
                }
  324         -
            }
         370  +
                /* OperationErrorGenerator.kt:326 */
         371  +
            } /* OperationErrorGenerator.kt:318 */
  325    372   
        }
         373  +
        /* OperationErrorGenerator.kt:134 */
  326    374   
    }
         375  +
    /* OperationErrorGenerator.kt:133 */
  327    376   
}
         377  +
/* OperationErrorGenerator.kt:182 */
  328    378   
impl ::aws_smithy_types::retry::ProvideErrorKind for OperationError {
         379  +
    /* OperationErrorGenerator.kt:186 */
  329    380   
    fn code(&self) -> ::std::option::Option<&str> {
         381  +
        /* OperationErrorGenerator.kt:187 */
  330    382   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         383  +
        /* OperationErrorGenerator.kt:186 */
  331    384   
    }
         385  +
    /* OperationErrorGenerator.kt:190 */
  332    386   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         387  +
        /* OperationErrorGenerator.kt:197 */
  333    388   
        ::std::option::Option::None
         389  +
        /* OperationErrorGenerator.kt:190 */
  334    390   
    }
         391  +
    /* OperationErrorGenerator.kt:182 */
  335    392   
}
         393  +
/* OperationErrorGenerator.kt:163 */
  336    394   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for OperationError {
         395  +
    /* OperationErrorGenerator.kt:164 */
  337    396   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         397  +
        /* OperationErrorGenerator.kt:318 */
  338    398   
        match self {
  339         -
            Self::Unhandled(_inner) => &_inner.meta,
         399  +
            /* OperationErrorGenerator.kt:326 */
         400  +
            Self::Unhandled(_inner) => {
         401  +
                /* OperationErrorGenerator.kt:168 */
         402  +
                &_inner.meta
         403  +
                /* OperationErrorGenerator.kt:326 */
         404  +
            } /* OperationErrorGenerator.kt:318 */
  340    405   
        }
         406  +
        /* OperationErrorGenerator.kt:164 */
  341    407   
    }
         408  +
    /* OperationErrorGenerator.kt:163 */
  342    409   
}
         410  +
/* OperationErrorGenerator.kt:109 */
  343    411   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for OperationError {
         412  +
    /* OperationErrorGenerator.kt:110 */
  344    413   
    fn create_unhandled_error(
  345    414   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  346    415   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  347    416   
    ) -> Self {
         417  +
        /* OperationErrorGenerator.kt:121 */
  348    418   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  349    419   
            source,
  350    420   
            meta: meta.unwrap_or_default(),
  351    421   
        })
         422  +
        /* OperationErrorGenerator.kt:110 */
  352    423   
    }
         424  +
    /* OperationErrorGenerator.kt:109 */
  353    425   
}
  354    426   
         427  +
/* CodegenDelegator.kt:255 */
  355    428   
pub use crate::operation::operation::_operation_output::OperationOutput;
  356    429   
         430  +
/* CodegenDelegator.kt:255 */
  357    431   
pub use crate::operation::operation::_operation_input::OperationInput;
  358    432   
         433  +
/* RustModule.kt:172 */
  359    434   
mod _operation_input;
  360    435   
         436  +
/* RustModule.kt:172 */
  361    437   
mod _operation_output;
  362    438   
  363         -
/// Builders
         439  +
/// /* CodegenDelegator.kt:51 */Builders
  364    440   
pub mod builders;

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/src/operation/operation/_operation_input.rs

@@ -1,1 +47,91 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct OperationInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct OperationInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub message: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl OperationInput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn message(&self) -> ::std::option::Option<&str> {
          20  +
        /* StructureGenerator.kt:169 */
   12     21   
        self.message.as_deref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl OperationInput {
   16         -
    /// Creates a new builder-style object to manufacture [`OperationInput`](crate::operation::operation::OperationInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`OperationInput`](crate::operation::operation::OperationInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::operation::builders::OperationInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::operation::builders::OperationInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`OperationInput`](crate::operation::operation::OperationInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`OperationInput`](crate::operation::operation::OperationInput).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct OperationInputBuilder {
   26         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl OperationInputBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* BuilderGenerator.kt:291 */
   30     53   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.message = ::std::option::Option::Some(input.into());
          56  +
        /* BuilderGenerator.kt:293 */
   32     57   
        self
          58  +
        /* BuilderGenerator.kt:291 */
   33     59   
    }
          60  +
    /* BuilderGenerator.kt:312 */
   34     61   
    #[allow(missing_docs)] // documentation missing in model
          62  +
                           /* BuilderGenerator.kt:314 */
   35     63   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          64  +
        /* BuilderGenerator.kt:315 */
   36     65   
        self.message = input;
   37     66   
        self
          67  +
        /* BuilderGenerator.kt:314 */
   38     68   
    }
          69  +
    /* BuilderGenerator.kt:334 */
   39     70   
    #[allow(missing_docs)] // documentation missing in model
          71  +
                           /* BuilderGenerator.kt:336 */
   40     72   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.message
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`OperationInput`](crate::operation::operation::OperationInput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`OperationInput`](crate::operation::operation::OperationInput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(self) -> ::std::result::Result<crate::operation::operation::OperationInput, ::aws_smithy_types::error::operation::BuildError> {
   45         -
        ::std::result::Result::Ok(crate::operation::operation::OperationInput { message: self.message })
          80  +
        /* BuilderGenerator.kt:254 */
          81  +
        ::std::result::Result::Ok(
          82  +
            /* BuilderGenerator.kt:477 */
          83  +
            crate::operation::operation::OperationInput {
          84  +
                /* BuilderGenerator.kt:481 */ message: self.message,
          85  +
                /* BuilderGenerator.kt:477 */
          86  +
            }, /* BuilderGenerator.kt:254 */
          87  +
        )
          88  +
        /* BuilderGenerator.kt:253 */
   46     89   
    }
          90  +
    /* BuilderGenerator.kt:355 */
   47     91   
}

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/src/operation/operation/_operation_output.rs

@@ -1,1 +47,88 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct OperationOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct OperationOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub message: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl OperationOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn message(&self) -> ::std::option::Option<&str> {
          20  +
        /* StructureGenerator.kt:169 */
   12     21   
        self.message.as_deref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl OperationOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`OperationOutput`](crate::operation::operation::OperationOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`OperationOutput`](crate::operation::operation::OperationOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::operation::builders::OperationOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::operation::builders::OperationOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`OperationOutput`](crate::operation::operation::OperationOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`OperationOutput`](crate::operation::operation::OperationOutput).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct OperationOutputBuilder {
   26         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl OperationOutputBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* BuilderGenerator.kt:291 */
   30     53   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.message = ::std::option::Option::Some(input.into());
          56  +
        /* BuilderGenerator.kt:293 */
   32     57   
        self
          58  +
        /* BuilderGenerator.kt:291 */
   33     59   
    }
          60  +
    /* BuilderGenerator.kt:312 */
   34     61   
    #[allow(missing_docs)] // documentation missing in model
          62  +
                           /* BuilderGenerator.kt:314 */
   35     63   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          64  +
        /* BuilderGenerator.kt:315 */
   36     65   
        self.message = input;
   37     66   
        self
          67  +
        /* BuilderGenerator.kt:314 */
   38     68   
    }
          69  +
    /* BuilderGenerator.kt:334 */
   39     70   
    #[allow(missing_docs)] // documentation missing in model
          71  +
                           /* BuilderGenerator.kt:336 */
   40     72   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.message
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`OperationOutput`](crate::operation::operation::OperationOutput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`OperationOutput`](crate::operation::operation::OperationOutput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(self) -> crate::operation::operation::OperationOutput {
   45         -
        crate::operation::operation::OperationOutput { message: self.message }
          80  +
        /* BuilderGenerator.kt:477 */
          81  +
        crate::operation::operation::OperationOutput {
          82  +
            /* BuilderGenerator.kt:481 */ message: self.message,
          83  +
            /* BuilderGenerator.kt:477 */
          84  +
        }
          85  +
        /* BuilderGenerator.kt:253 */
   46     86   
    }
          87  +
    /* BuilderGenerator.kt:355 */
   47     88   
}

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/src/operation/operation/builders.rs

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

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/src/primitives.rs

@@ -1,1 +7,8 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* SmithyTypesPubUseExtra.kt:66 */
    2      3   
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
    3      4   
pub use ::aws_smithy_types::Blob;
    4         -
pub use ::aws_smithy_types::DateTime;
           5  +
/* SmithyTypesPubUseExtra.kt:69 */ pub use ::aws_smithy_types::DateTime;
    5      6   
    6         -
/// Event stream related primitives such as `Message` or `Header`.
           7  +
/// /* ClientRustModule.kt:121 */Event stream related primitives such as `Message` or `Header`.
    7      8   
pub mod event_stream;

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

@@ -1,1 +41,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ResponseDeserializerGenerator.kt:170 */
    2      3   
pub(crate) fn type_erase_result<O, E>(
    3      4   
    result: ::std::result::Result<O, E>,
    4      5   
) -> ::std::result::Result<
    5      6   
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    6      7   
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
    7      8   
>
    8      9   
where
    9     10   
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   10     11   
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   11     12   
{
   12     13   
    result
   13     14   
        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
   14     15   
        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
   15     16   
        .map_err(::std::convert::Into::into)
   16     17   
}
   17     18   
          19  +
/* AwsQueryCompatible.kt:87 */
   18     20   
pub fn parse_http_error_metadata(
   19     21   
    _response_status: u16,
   20     22   
    response_headers: &::aws_smithy_runtime_api::http::Headers,
   21     23   
    response_body: &[u8],
   22     24   
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
   23     25   
    let mut builder = crate::json_errors::parse_error_metadata(response_body, response_headers)?;
   24     26   
    if let Some((error_code, error_type)) = crate::aws_query_compatible_errors::parse_aws_query_compatible_error(response_headers) {
   25     27   
        builder = builder.code(error_code);
   26     28   
        builder = builder.custom("type", error_type);
   27     29   
    }
   28     30   
    Ok(builder)
   29     31   
}
   30     32   
   31     33   
pub(crate) mod shape_operation;
   32     34   
          35  +
/* JsonParserGenerator.kt:227 */
   33     36   
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
   34     37   
    if data.is_empty() {
   35     38   
        b"{}"
   36     39   
    } else {
   37     40   
        data
   38     41   
    }
   39     42   
}
   40     43   
   41     44   
pub(crate) mod shape_operation_input;

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/src/protocol_serde/shape_operation.rs

@@ -1,1 +74,120 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_operation_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<crate::operation::operation::OperationOutput, crate::operation::operation::OperationError> {
          10  +
    /* RustType.kt:516 */
    8     11   
    #[allow(unused_mut)]
          12  +
    /* ProtocolParserGenerator.kt:106 */
    9     13   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10     14   
        .map_err(crate::operation::operation::OperationError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::operation::OperationError::generic(generic))
          19  +
    /* ProtocolParserGenerator.kt:99 */
   13     20   
}
   14     21   
          22  +
/* RustType.kt:516 */
   15     23   
#[allow(clippy::unnecessary_wraps)]
          24  +
/* ProtocolParserGenerator.kt:71 */
   16     25   
pub fn de_operation_http_response(
   17     26   
    _response_status: u16,
   18     27   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   19     28   
    _response_body: &[u8],
   20     29   
) -> std::result::Result<crate::operation::operation::OperationOutput, crate::operation::operation::OperationError> {
          30  +
    /* ProtocolParserGenerator.kt:77 */
   21     31   
    Ok({
          32  +
        /* RustType.kt:516 */
   22     33   
        #[allow(unused_mut)]
          34  +
        /* ProtocolParserGenerator.kt:240 */
   23     35   
        let mut output = crate::operation::operation::builders::OperationOutputBuilder::default();
          36  +
        /* ProtocolParserGenerator.kt:247 */
   24     37   
        output = crate::protocol_serde::shape_operation::de_operation(_response_body, output)
   25     38   
            .map_err(crate::operation::operation::OperationError::unhandled)?;
          39  +
        /* ClientBuilderInstantiator.kt:56 */
   26     40   
        output.build()
          41  +
        /* ProtocolParserGenerator.kt:77 */
   27     42   
    })
          43  +
    /* ProtocolParserGenerator.kt:71 */
   28     44   
}
   29     45   
          46  +
/* JsonSerializerGenerator.kt:287 */
   30     47   
pub fn ser_operation_input(
   31     48   
    input: &crate::operation::operation::OperationInput,
   32     49   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          50  +
    /* JsonSerializerGenerator.kt:291 */
   33     51   
    let mut out = String::new();
          52  +
    /* JsonSerializerGenerator.kt:292 */
   34     53   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
          54  +
    /* JsonSerializerGenerator.kt:375 */
   35     55   
    crate::protocol_serde::shape_operation_input::ser_operation_input_input(&mut object, input)?;
          56  +
    /* JsonSerializerGenerator.kt:295 */
   36     57   
    object.finish();
          58  +
    /* JsonSerializerGenerator.kt:296 */
   37     59   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          60  +
    /* JsonSerializerGenerator.kt:287 */
   38     61   
}
   39     62   
          63  +
/* JsonParserGenerator.kt:148 */
   40     64   
pub(crate) fn de_operation(
   41     65   
    value: &[u8],
   42     66   
    mut builder: crate::operation::operation::builders::OperationOutputBuilder,
   43     67   
) -> ::std::result::Result<crate::operation::operation::builders::OperationOutputBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
          68  +
    /* JsonParserGenerator.kt:153 */
   44     69   
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable();
   45     70   
    let tokens = &mut tokens_owned;
   46     71   
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
          72  +
    /* JsonParserGenerator.kt:684 */
   47     73   
    loop {
          74  +
        /* JsonParserGenerator.kt:685 */
   48     75   
        match tokens.next().transpose()? {
   49         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   50         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   51         -
                "message" => {
   52         -
                    builder = builder.set_message(
   53         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   54         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   55         -
                            .transpose()?,
   56         -
                    );
          76  +
            /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          77  +
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          78  +
                /* JsonParserGenerator.kt:260 */
          79  +
                match key.to_unescaped()?.as_ref() {
          80  +
                    /* JsonParserGenerator.kt:262 */
          81  +
                    "message" => {
          82  +
                        /* JsonParserGenerator.kt:265 */
          83  +
                        builder = builder.set_message(
          84  +
                            /* JsonParserGenerator.kt:354 */
          85  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
          86  +
                                .map(|s|
          87  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          88  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          89  +
                                /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
          90  +
                                .transpose()?, /* JsonParserGenerator.kt:265 */
          91  +
                        );
          92  +
                        /* JsonParserGenerator.kt:262 */
          93  +
                    }
          94  +
                    /* JsonParserGenerator.kt:290 */
          95  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   57     96   
                }
   58         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   59         -
            },
          97  +
                /* JsonParserGenerator.kt:686 */
          98  +
            }
          99  +
            /* JsonParserGenerator.kt:695 */
   60    100   
            other => {
   61    101   
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   62    102   
                    "expected object key or end object, found: {:?}",
   63    103   
                    other
   64    104   
                )))
   65         -
            }
         105  +
            } /* JsonParserGenerator.kt:685 */
   66    106   
        }
         107  +
        /* JsonParserGenerator.kt:684 */
   67    108   
    }
         109  +
    /* JsonParserGenerator.kt:250 */
   68    110   
    if tokens.next().is_some() {
         111  +
        /* JsonParserGenerator.kt:251 */
   69    112   
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   70    113   
            "found more JSON tokens after completing parsing",
   71    114   
        ));
         115  +
        /* JsonParserGenerator.kt:250 */
   72    116   
    }
         117  +
    /* JsonParserGenerator.kt:163 */
   73    118   
    Ok(builder)
         119  +
    /* JsonParserGenerator.kt:148 */
   74    120   
}

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/src/protocol_serde/shape_operation_input.rs

@@ -1,1 +10,16 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:358 */
    2      3   
pub fn ser_operation_input_input(
    3      4   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      5   
    input: &crate::operation::operation::OperationInput,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* JsonSerializerGenerator.kt:382 */
    6      8   
    if let Some(var_1) = &input.message {
           9  +
        /* JsonSerializerGenerator.kt:423 */
    7     10   
        object.key("message").string(var_1.as_str());
          11  +
        /* JsonSerializerGenerator.kt:382 */
    8     12   
    }
          13  +
    /* JsonSerializerGenerator.kt:372 */
    9     14   
    Ok(())
          15  +
    /* JsonSerializerGenerator.kt:358 */
   10     16   
}

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

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* FluentClientGenerator.kt:105 */
    2      3   
#[derive(Debug)]
    3      4   
pub(crate) struct Handle {
    4      5   
    pub(crate) conf: crate::Config,
    5      6   
    #[allow(dead_code)] // unused when a service does not provide any operations
    6      7   
    pub(crate) runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
    7      8   
}
    8      9   
    9     10   
///
   10     11   
/// An ergonomic client for Sample Rest Json Protocol Service.
   11     12   
///
@@ -77,78 +334,436 @@
   97     98   
    fn validate_config(handle: &Handle) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
   98     99   
        let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
   99    100   
        handle
  100    101   
            .runtime_plugins
  101    102   
            .apply_client_configuration(&mut cfg)?
  102    103   
            .validate_base_client_config(&cfg)?;
  103    104   
        Ok(())
  104    105   
    }
  105    106   
}
  106    107   
         108  +
/* RustModule.kt:172 */
  107    109   
mod all_query_string_types;
  108    110   
         111  +
/* RustModule.kt:172 */
  109    112   
mod constant_and_variable_query_string;
  110    113   
         114  +
/* RustModule.kt:172 */
  111    115   
mod constant_query_string;
  112    116   
         117  +
/* RustModule.kt:172 */
  113    118   
mod content_type_parameters;
  114    119   
  115         -
/// Operation customization and supporting types.
         120  +
/// /* ClientRustModule.kt:161 */Operation customization and supporting types.
  116    121   
///
  117         -
/// The underlying HTTP requests made during an operation can be customized
         122  +
/// /* ClientRustModule.kt:170 */The underlying HTTP requests made during an operation can be customized
  118    123   
/// by calling the `customize()` method on the builder returned from a client
  119    124   
/// operation call. For example, this can be used to add an additional HTTP header:
  120    125   
///
  121    126   
/// ```ignore
  122    127   
/// # async fn wrapper() -> ::std::result::Result<(), rest_json::Error> {
  123    128   
/// # let client: rest_json::Client = unimplemented!();
  124    129   
/// use ::http::header::{HeaderName, HeaderValue};
  125    130   
///
  126    131   
/// let result = client.all_query_string_types()
  127    132   
///     .customize()
  128    133   
///     .mutate_request(|req| {
  129    134   
///         // Add `x-example-header` with value
  130    135   
///         req.headers_mut()
  131    136   
///             .insert(
  132    137   
///                 HeaderName::from_static("x-example-header"),
  133    138   
///                 HeaderValue::from_static("1"),
  134    139   
///             );
  135    140   
///     })
  136    141   
///     .send()
  137    142   
///     .await;
  138    143   
/// # }
  139    144   
/// ```
  140    145   
pub mod customize;
  141    146   
         147  +
/* RustModule.kt:172 */
  142    148   
mod datetime_offsets;
  143    149   
         150  +
/* RustModule.kt:172 */
  144    151   
mod document_type;
  145    152   
         153  +
/* RustModule.kt:172 */
  146    154   
mod document_type_as_map_value;
  147    155   
         156  +
/* RustModule.kt:172 */
  148    157   
mod document_type_as_payload;
  149    158   
         159  +
/* RustModule.kt:172 */
  150    160   
mod empty_input_and_empty_output;
  151    161   
         162  +
/* RustModule.kt:172 */
  152    163   
mod endpoint_operation;
  153    164   
         165  +
/* RustModule.kt:172 */
  154    166   
mod endpoint_with_host_label_operation;
  155    167   
         168  +
/* RustModule.kt:172 */
  156    169   
mod fractional_seconds;
  157    170   
         171  +
/* RustModule.kt:172 */
  158    172   
mod greeting_with_errors;
  159    173   
         174  +
/* RustModule.kt:172 */
  160    175   
mod host_with_path_operation;
  161    176   
         177  +
/* RustModule.kt:172 */
  162    178   
mod http_checksum_required;
  163    179   
         180  +
/* RustModule.kt:172 */
  164    181   
mod http_enum_payload;
  165    182   
         183  +
/* RustModule.kt:172 */
  166    184   
mod http_payload_traits;
  167    185   
         186  +
/* RustModule.kt:172 */
  168    187   
mod http_payload_traits_with_media_type;
  169    188   
         189  +
/* RustModule.kt:172 */
  170    190   
mod http_payload_with_structure;
  171    191   
         192  +
/* RustModule.kt:172 */
  172    193   
mod http_payload_with_union;
  173    194   
         195  +
/* RustModule.kt:172 */
  174    196   
mod http_prefix_headers;
  175    197   
         198  +
/* RustModule.kt:172 */
  176    199   
mod http_prefix_headers_in_response;
  177    200   
         201  +
/* RustModule.kt:172 */
  178    202   
mod http_request_with_float_labels;
  179    203   
         204  +
/* RustModule.kt:172 */
  180    205   
mod http_request_with_greedy_label_in_path;
  181    206   
         207  +
/* RustModule.kt:172 */
  182    208   
mod http_request_with_labels;
  183    209   
         210  +
/* RustModule.kt:172 */
  184    211   
mod http_request_with_labels_and_timestamp_format;
  185    212   
         213  +
/* RustModule.kt:172 */
  186    214   
mod http_request_with_regex_literal;
  187    215   
         216  +
/* RustModule.kt:172 */
  188    217   
mod http_response_code;
  189    218   
         219  +
/* RustModule.kt:172 */
  190    220   
mod http_string_payload;
  191    221   
         222  +
/* RustModule.kt:172 */
  192    223   
mod ignore_query_params_in_response;
  193    224   
         225  +
/* RustModule.kt:172 */
  194    226   
mod input_and_output_with_headers;
  195    227   
         228  +
/* RustModule.kt:172 */
  196    229   
mod json_blobs;
  197    230   
         231  +
/* RustModule.kt:172 */
  198    232   
mod json_enums;
  199    233   
         234  +
/* RustModule.kt:172 */
  200    235   
mod json_int_enums;
  201    236   
         237  +
/* RustModule.kt:172 */
  202    238   
mod json_lists;
  203    239   
         240  +
/* RustModule.kt:172 */
  204    241   
mod json_maps;
  205    242   
         243  +
/* RustModule.kt:172 */
  206    244   
mod json_timestamps;
  207    245   
         246  +
/* RustModule.kt:172 */
  208    247   
mod json_unions;
  209    248   
         249  +
/* RustModule.kt:172 */
  210    250   
mod malformed_accept_with_body;
  211    251   
         252  +
/* RustModule.kt:172 */
  212    253   
mod malformed_accept_with_generic_string;
  213    254   
         255  +
/* RustModule.kt:172 */
  214    256   
mod malformed_accept_with_payload;
  215    257   
         258  +
/* RustModule.kt:172 */
  216    259   
mod malformed_blob;
  217    260   
         261  +
/* RustModule.kt:172 */
  218    262   
mod malformed_boolean;
  219    263   
         264  +
/* RustModule.kt:172 */
  220    265   
mod malformed_byte;
  221    266   
         267  +
/* RustModule.kt:172 */
  222    268   
mod malformed_content_type_with_body;
  223    269   
         270  +
/* RustModule.kt:172 */
  224    271   
mod malformed_content_type_with_generic_string;
  225    272   
         273  +
/* RustModule.kt:172 */
  226    274   
mod malformed_content_type_with_payload;
  227    275   
         276  +
/* RustModule.kt:172 */
  228    277   
mod malformed_content_type_without_body;
  229    278   
         279  +
/* RustModule.kt:172 */
  230    280   
mod malformed_double;
  231    281   
         282  +
/* RustModule.kt:172 */
  232    283   
mod malformed_float;
  233    284   
         285  +
/* RustModule.kt:172 */
  234    286   
mod malformed_integer;
  235    287   
         288  +
/* RustModule.kt:172 */
  236    289   
mod malformed_list;
  237    290   
         291  +
/* RustModule.kt:172 */
  238    292   
mod malformed_long;
  239    293   
         294  +
/* RustModule.kt:172 */
  240    295   
mod malformed_map;
  241    296   
         297  +
/* RustModule.kt:172 */
  242    298   
mod malformed_request_body;
  243    299   
         300  +
/* RustModule.kt:172 */
  244    301   
mod malformed_short;
  245    302   
         303  +
/* RustModule.kt:172 */
  246    304   
mod malformed_string;
  247    305   
         306  +
/* RustModule.kt:172 */
  248    307   
mod malformed_timestamp_body_date_time;
  249    308   
         309  +
/* RustModule.kt:172 */
  250    310   
mod malformed_timestamp_body_default;
  251    311   
         312  +
/* RustModule.kt:172 */
  252    313   
mod malformed_timestamp_body_http_date;
  253    314   
         315  +
/* RustModule.kt:172 */
  254    316   
mod malformed_timestamp_header_date_time;
  255    317   
         318  +
/* RustModule.kt:172 */
  256    319   
mod malformed_timestamp_header_default;
  257    320   
         321  +
/* RustModule.kt:172 */
  258    322   
mod malformed_timestamp_header_epoch;
  259    323   
         324  +
/* RustModule.kt:172 */
  260    325   
mod malformed_timestamp_path_default;
  261    326   
         327  +
/* RustModule.kt:172 */
  262    328   
mod malformed_timestamp_path_epoch;
  263    329   
         330  +
/* RustModule.kt:172 */
  264    331   
mod malformed_timestamp_path_http_date;
  265    332   
         333  +
/* RustModule.kt:172 */
  266    334   
mod malformed_timestamp_query_default;
  267    335   
         336  +
/* RustModule.kt:172 */
  268    337   
mod malformed_timestamp_query_epoch;
  269    338   
         339  +
/* RustModule.kt:172 */
  270    340   
mod malformed_timestamp_query_http_date;
  271    341   
         342  +
/* RustModule.kt:172 */
  272    343   
mod malformed_union;
  273    344   
         345  +
/* RustModule.kt:172 */
  274    346   
mod media_type_header;
  275    347   
         348  +
/* RustModule.kt:172 */
  276    349   
mod no_input_and_no_output;
  277    350   
         351  +
/* RustModule.kt:172 */
  278    352   
mod no_input_and_output;
  279    353   
         354  +
/* RustModule.kt:172 */
  280    355   
mod null_and_empty_headers_client;
  281    356   
         357  +
/* RustModule.kt:172 */
  282    358   
mod null_and_empty_headers_server;
  283    359   
         360  +
/* RustModule.kt:172 */
  284    361   
mod omits_null_serializes_empty_string;
  285    362   
         363  +
/* RustModule.kt:172 */
  286    364   
mod omits_serializing_empty_lists;
  287    365   
         366  +
/* RustModule.kt:172 */
  288    367   
mod operation_with_defaults;
  289    368   
         369  +
/* RustModule.kt:172 */
  290    370   
mod operation_with_nested_structure;
  291    371   
         372  +
/* RustModule.kt:172 */
  292    373   
mod post_player_action;
  293    374   
         375  +
/* RustModule.kt:172 */
  294    376   
mod post_union_with_json_name;
  295    377   
         378  +
/* RustModule.kt:172 */
  296    379   
mod put_with_content_encoding;
  297    380   
         381  +
/* RustModule.kt:172 */
  298    382   
mod query_idempotency_token_auto_fill;
  299    383   
         384  +
/* RustModule.kt:172 */
  300    385   
mod query_params_as_string_list_map;
  301    386   
         387  +
/* RustModule.kt:172 */
  302    388   
mod query_precedence;
  303    389   
         390  +
/* RustModule.kt:172 */
  304    391   
mod recursive_shapes;
  305    392   
         393  +
/* RustModule.kt:172 */
  306    394   
mod simple_scalar_properties;
  307    395   
         396  +
/* RustModule.kt:172 */
  308    397   
mod sparse_json_lists;
  309    398   
         399  +
/* RustModule.kt:172 */
  310    400   
mod sparse_json_maps;
  311    401   
         402  +
/* RustModule.kt:172 */
  312    403   
mod streaming_traits;
  313    404   
         405  +
/* RustModule.kt:172 */
  314    406   
mod streaming_traits_require_length;
  315    407   
         408  +
/* RustModule.kt:172 */
  316    409   
mod streaming_traits_with_media_type;
  317    410   
         411  +
/* RustModule.kt:172 */
  318    412   
mod test_body_structure;
  319    413   
         414  +
/* RustModule.kt:172 */
  320    415   
mod test_get_no_input_no_payload;
  321    416   
         417  +
/* RustModule.kt:172 */
  322    418   
mod test_get_no_payload;
  323    419   
         420  +
/* RustModule.kt:172 */
  324    421   
mod test_payload_blob;
  325    422   
         423  +
/* RustModule.kt:172 */
  326    424   
mod test_payload_structure;
  327    425   
         426  +
/* RustModule.kt:172 */
  328    427   
mod test_post_no_input_no_payload;
  329    428   
         429  +
/* RustModule.kt:172 */
  330    430   
mod test_post_no_payload;
  331    431   
         432  +
/* RustModule.kt:172 */
  332    433   
mod timestamp_format_headers;
  333    434   
         435  +
/* RustModule.kt:172 */
  334    436   
mod unit_input_and_output;