Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/config.rs

@@ -1,1 +171,209 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Configuration for a json_rpc10 service client.
           2  +
/* ServiceConfigGenerator.kt:409 */
           3  +
/// /* ServiceConfigGenerator.kt:409 */Configuration for a json_rpc10 service client.
    4      4   
///
           5  +
/* RustType.kt:516 */
    5      6   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
           7  +
/* ServiceConfigGenerator.kt:414 */
    6      8   
pub struct Config {
    7         -
    // Both `config` and `cloneable` are the same config, but the cloneable one
           9  +
    /* ServiceConfigGenerator.kt:415 */// Both `config` and `cloneable` are the same config, but the cloneable one
    8     10   
    // is kept around so that it is possible to convert back into a builder. This can be
    9     11   
    // optimized in the future.
   10     12   
    pub(crate) config: crate::config::FrozenLayer,
   11     13   
    cloneable: ::aws_smithy_types::config_bag::CloneableLayer,
   12     14   
    pub(crate) runtime_components: crate::config::RuntimeComponentsBuilder,
   13     15   
    pub(crate) runtime_plugins: ::std::vec::Vec<crate::config::SharedRuntimePlugin>,
   14     16   
    pub(crate) behavior_version: ::std::option::Option<crate::config::BehaviorVersion>,
          17  +
    /* ServiceConfigGenerator.kt:414 */
   15     18   
}
          19  +
/* ServiceConfigGenerator.kt:433 */
   16     20   
impl Config {
   17         -
    ///
          21  +
    /// /* ServiceConfigGenerator.kt:434 */
   18     22   
    /// Constructs a config builder.
   19     23   
    /// <div class="warning">
   20     24   
    /// Note that a config created from this builder will not have the same safe defaults as one created by
   21     25   
    /// the <a href="https://crates.io/crates/aws-config" target="_blank">aws-config</a> crate.
   22     26   
    /// </div>
   23     27   
    ///
          28  +
    /* ServiceConfigGenerator.kt:435 */
   24     29   
    pub fn builder() -> Builder {
   25     30   
        Builder::default()
   26     31   
    }
          32  +
    /* ServiceConfigGenerator.kt:440 */
   27     33   
    /// Converts this config back into a builder so that it can be tweaked.
   28     34   
    pub fn to_builder(&self) -> Builder {
   29     35   
        Builder {
   30     36   
            config: self.cloneable.clone(),
   31     37   
            runtime_components: self.runtime_components.clone(),
   32     38   
            runtime_plugins: self.runtime_plugins.clone(),
   33     39   
            behavior_version: self.behavior_version,
   34     40   
        }
   35     41   
    }
          42  +
    /* StalledStreamProtectionConfigCustomization.kt:57 */
   36     43   
    /// Return a reference to the stalled stream protection configuration contained in this config, if any.
   37     44   
    pub fn stalled_stream_protection(&self) -> ::std::option::Option<&crate::config::StalledStreamProtectionConfig> {
   38     45   
        self.config.load::<crate::config::StalledStreamProtectionConfig>()
   39     46   
    }
          47  +
    /* HttpConnectorConfigDecorator.kt:52 */
   40     48   
    /// Return the [`SharedHttpClient`](crate::config::SharedHttpClient) to use when making requests, if any.
   41     49   
    pub fn http_client(&self) -> Option<crate::config::SharedHttpClient> {
   42     50   
        self.runtime_components.http_client()
   43     51   
    }
          52  +
    /* EndpointConfigCustomization.kt:47 */
   44     53   
    /// Returns the endpoint resolver.
   45     54   
    pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver {
   46     55   
        self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set")
   47     56   
    }
          57  +
    /* ResiliencyConfigCustomization.kt:51 */
   48     58   
    /// Return a reference to the retry configuration contained in this config, if any.
   49     59   
    pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> {
   50     60   
        self.config.load::<::aws_smithy_types::retry::RetryConfig>()
   51     61   
    }
   52     62   
   53     63   
    /// Return a cloned shared async sleep implementation from this config, if any.
   54     64   
    pub fn sleep_impl(&self) -> ::std::option::Option<crate::config::SharedAsyncSleep> {
   55     65   
        self.runtime_components.sleep_impl()
   56     66   
    }
   57     67   
   58     68   
    /// Return a reference to the timeout configuration contained in this config, if any.
   59     69   
    pub fn timeout_config(&self) -> ::std::option::Option<&::aws_smithy_types::timeout::TimeoutConfig> {
   60     70   
        self.config.load::<::aws_smithy_types::timeout::TimeoutConfig>()
   61     71   
    }
   62     72   
   63     73   
    /// Returns a reference to the retry partition contained in this config, if any.
   64     74   
    ///
   65     75   
    /// WARNING: This method is unstable and may be removed at any time. Do not rely on this
   66     76   
    /// method for anything!
   67     77   
    pub fn retry_partition(&self) -> ::std::option::Option<&::aws_smithy_runtime::client::retries::RetryPartition> {
   68     78   
        self.config.load::<::aws_smithy_runtime::client::retries::RetryPartition>()
   69     79   
    }
          80  +
    /* IdentityCacheDecorator.kt:96 */
   70     81   
    /// Returns the configured identity cache for auth.
   71     82   
    pub fn identity_cache(&self) -> ::std::option::Option<crate::config::SharedIdentityCache> {
   72     83   
        self.runtime_components.identity_cache()
   73     84   
    }
          85  +
    /* InterceptorConfigCustomization.kt:30 */
   74     86   
    /// Returns interceptors currently registered by the user.
   75     87   
    pub fn interceptors(&self) -> impl Iterator<Item = crate::config::SharedInterceptor> + '_ {
   76     88   
        self.runtime_components.interceptors()
   77     89   
    }
          90  +
    /* TimeSourceCustomization.kt:34 */
   78     91   
    /// Return time source used for this service.
          92  +
    /* TimeSourceCustomization.kt:35 */
   79     93   
    pub fn time_source(&self) -> ::std::option::Option<::aws_smithy_async::time::SharedTimeSource> {
          94  +
        /* TimeSourceCustomization.kt:39 */
   80     95   
        self.runtime_components.time_source()
          96  +
        /* TimeSourceCustomization.kt:35 */
   81     97   
    }
          98  +
    /* RetryClassifierConfigCustomization.kt:39 */
   82     99   
    /// Returns retry classifiers currently registered by the user.
   83    100   
    pub fn retry_classifiers(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier> + '_ {
   84    101   
        self.runtime_components.retry_classifiers()
   85    102   
    }
         103  +
    /* ServiceConfigGenerator.kt:433 */
   86    104   
}
   87         -
/// Builder for creating a `Config`.
         105  +
/// /* ServiceConfigGenerator.kt:458 */Builder for creating a `Config`.
         106  +
/* RustType.kt:516 */
   88    107   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
         108  +
/* ServiceConfigGenerator.kt:460 */
   89    109   
pub struct Builder {
   90         -
    pub(crate) config: ::aws_smithy_types::config_bag::CloneableLayer,
         110  +
    /* ServiceConfigGenerator.kt:461 */ pub(crate) config: ::aws_smithy_types::config_bag::CloneableLayer,
   91    111   
    pub(crate) runtime_components: crate::config::RuntimeComponentsBuilder,
   92    112   
    pub(crate) runtime_plugins: ::std::vec::Vec<crate::config::SharedRuntimePlugin>,
   93    113   
    pub(crate) behavior_version: ::std::option::Option<crate::config::BehaviorVersion>,
         114  +
    /* ServiceConfigGenerator.kt:460 */
   94    115   
}
         116  +
/* ServiceConfigGenerator.kt:476 */
   95    117   
impl ::std::default::Default for Builder {
         118  +
    /* ServiceConfigGenerator.kt:477 */
   96    119   
    fn default() -> Self {
   97    120   
        Self {
   98    121   
            config: ::std::default::Default::default(),
   99    122   
            runtime_components: crate::config::RuntimeComponentsBuilder::new("service config"),
  100    123   
            runtime_plugins: ::std::default::Default::default(),
  101    124   
            behavior_version: ::std::default::Default::default(),
  102    125   
        }
  103    126   
    }
         127  +
    /* ServiceConfigGenerator.kt:476 */
  104    128   
}
         129  +
/* ServiceConfigGenerator.kt:492 */
  105    130   
impl Builder {
  106         -
    ///
         131  +
    /// /* ServiceConfigGenerator.kt:493 */
  107    132   
    /// Constructs a config builder.
  108    133   
    /// <div class="warning">
  109    134   
    /// Note that a config created from this builder will not have the same safe defaults as one created by
  110    135   
    /// the <a href="https://crates.io/crates/aws-config" target="_blank">aws-config</a> crate.
  111    136   
    /// </div>
  112    137   
    ///
         138  +
    /* ServiceConfigGenerator.kt:494 */
  113    139   
    pub fn new() -> Self {
  114    140   
        Self::default()
  115    141   
    }
  116         -
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  117         -
    /// but not those in runtime components.
         142  +
    /// /* ServiceConfigGenerator.kt:327 */Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
         143  +
    /// /* ServiceConfigGenerator.kt:328 */but not those in runtime components.
         144  +
    /* RustType.kt:516 */
  118    145   
    #[allow(unused)]
         146  +
    /* ServiceConfigGenerator.kt:330 */
  119    147   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
         148  +
        /* ServiceConfigGenerator.kt:334 */
  120    149   
        let mut builder = Self::new();
         150  +
        /* StalledStreamProtectionConfigCustomization.kt:102 */
  121    151   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         152  +
        /* ResiliencyConfigCustomization.kt:294 */
  122    153   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
         154  +
        /* ResiliencyConfigCustomization.kt:298 */
  123    155   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
         156  +
        /* ResiliencyConfigCustomization.kt:302 */
  124    157   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
         158  +
        /* ServiceConfigGenerator.kt:338 */
  125    159   
        builder
         160  +
        /* ServiceConfigGenerator.kt:330 */
  126    161   
    }
         162  +
    /* StalledStreamProtectionConfigCustomization.kt:69 */
  127    163   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  128    164   
    /// to configure protection for stalled streams.
  129    165   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  130    166   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  131    167   
        self
  132    168   
    }
         169  +
    /* StalledStreamProtectionConfigCustomization.kt:84 */
  133    170   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  134    171   
    /// to configure protection for stalled streams.
  135    172   
    pub fn set_stalled_stream_protection(
  136    173   
        &mut self,
  137    174   
        stalled_stream_protection_config: ::std::option::Option<crate::config::StalledStreamProtectionConfig>,
  138    175   
    ) -> &mut Self {
  139    176   
        self.config.store_or_unset(stalled_stream_protection_config);
  140    177   
        self
  141    178   
    }
         179  +
    /* HttpConnectorConfigDecorator.kt:65 */
  142    180   
    /// Sets the HTTP client to use when making requests.
  143    181   
    ///
  144    182   
    /// # Examples
  145    183   
    /// ```no_run
  146    184   
    /// # #[cfg(test)]
  147    185   
    /// # mod tests {
  148    186   
    /// # #[test]
  149    187   
    /// # fn example() {
  150    188   
    /// use std::time::Duration;
  151    189   
    /// use json_rpc10::config::Config;
@@ -179,217 +461,511 @@
  199    237   
    /// let mut builder = json_rpc10::Config::builder();
  200    238   
    /// override_http_client(&mut builder);
  201    239   
    /// let config = builder.build();
  202    240   
    /// # }
  203    241   
    /// # }
  204    242   
    /// ```
  205    243   
    pub fn set_http_client(&mut self, http_client: Option<crate::config::SharedHttpClient>) -> &mut Self {
  206    244   
        self.runtime_components.set_http_client(http_client);
  207    245   
        self
  208    246   
    }
         247  +
    /* EndpointConfigCustomization.kt:73 */
  209    248   
    /// Set the endpoint URL to use when making requests.
  210    249   
    ///
  211    250   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  212    251   
    ///
  213    252   
    /// # Panics
  214    253   
    /// Panics if an invalid URL is given.
  215    254   
    pub fn endpoint_url(mut self, endpoint_url: impl ::std::convert::Into<::std::string::String>) -> Self {
  216    255   
        self.set_endpoint_url(::std::option::Option::Some(endpoint_url.into()));
  217    256   
        self
  218    257   
    }
  219    258   
  220    259   
    /// Set the endpoint URL to use when making requests.
  221    260   
    ///
  222    261   
    /// Note: setting an endpoint URL will replace any endpoint resolver that has been set.
  223    262   
    ///
  224    263   
    /// # Panics
  225    264   
    /// Panics if an invalid URL is given.
  226    265   
    pub fn set_endpoint_url(&mut self, endpoint_url: ::std::option::Option<::std::string::String>) -> &mut Self {
  227    266   
        #[allow(deprecated)]
  228    267   
        self.set_endpoint_resolver(endpoint_url.map(|url| {
  229    268   
            ::aws_smithy_runtime_api::shared::IntoShared::into_shared(
  230    269   
                ::aws_smithy_runtime::client::orchestrator::endpoints::StaticUriEndpointResolver::uri(url),
  231    270   
            )
  232    271   
        }));
  233    272   
        self
  234    273   
    }
         274  +
    /* EndpointConfigCustomization.kt:105 */
  235    275   
    /// Sets the endpoint resolver to use when making requests.
  236    276   
    ///
  237    277   
    /// This service does not define a default endpoint resolver.
  238    278   
    ///
  239    279   
    /// Note: setting an endpoint resolver will replace any endpoint URL that has been set.
  240    280   
    /// This method accepts an endpoint resolver [specific to this service](crate::config::endpoint::ResolveEndpoint). If you want to
  241    281   
    /// provide a shared endpoint resolver, use [`Self::set_endpoint_resolver`].
  242    282   
    ///
  243    283   
    /// # Examples
  244    284   
    /// Create a custom endpoint resolver that resolves a different endpoing per-stage, e.g. staging vs. production.
  245    285   
    /// ```no_run
  246    286   
    /// use json_rpc10::config::endpoint::{ResolveEndpoint, EndpointFuture, Params, Endpoint};
  247    287   
    /// #[derive(Debug)]
  248    288   
    /// struct StageResolver { stage: String }
  249    289   
    /// impl ResolveEndpoint for StageResolver {
  250    290   
    ///     fn resolve_endpoint(&self, params: &Params) -> EndpointFuture<'_> {
  251    291   
    ///         let stage = &self.stage;
  252    292   
    ///         EndpointFuture::ready(Ok(Endpoint::builder().url(format!("{stage}.myservice.com")).build()))
  253    293   
    ///     }
  254    294   
    /// }
  255    295   
    /// let resolver = StageResolver { stage: std::env::var("STAGE").unwrap() };
  256    296   
    /// let config = json_rpc10::Config::builder().endpoint_resolver(resolver).build();
  257    297   
    /// let client = json_rpc10::Client::from_conf(config);
  258    298   
    /// ```
  259    299   
    pub fn endpoint_resolver(mut self, endpoint_resolver: impl crate::config::endpoint::ResolveEndpoint + 'static) -> Self {
  260    300   
        self.set_endpoint_resolver(::std::option::Option::Some(endpoint_resolver.into_shared_resolver()));
  261    301   
        self
  262    302   
    }
  263    303   
  264    304   
    /// Sets the endpoint resolver to use when making requests.
  265    305   
    ///
  266    306   
    /// This service does not define a default endpoint resolver.
         307  +
    /* EndpointConfigCustomization.kt:143 */
  267    308   
    pub fn set_endpoint_resolver(
  268    309   
        &mut self,
  269    310   
        endpoint_resolver: ::std::option::Option<::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver>,
  270    311   
    ) -> &mut Self {
  271    312   
        self.runtime_components.set_endpoint_resolver(endpoint_resolver);
  272    313   
        self
  273    314   
    }
         315  +
    /* ResiliencyConfigCustomization.kt:81 */
  274    316   
    /// Set the retry_config for the builder
  275    317   
    ///
  276    318   
    /// # Examples
  277    319   
    /// ```no_run
  278    320   
    /// use json_rpc10::config::Config;
  279    321   
    /// use json_rpc10::config::retry::RetryConfig;
  280    322   
    ///
  281    323   
    /// let retry_config = RetryConfig::standard().with_max_attempts(5);
  282    324   
    /// let config = Config::builder().retry_config(retry_config).build();
  283    325   
    /// ```
  284    326   
    pub fn retry_config(mut self, retry_config: ::aws_smithy_types::retry::RetryConfig) -> Self {
  285    327   
        self.set_retry_config(Some(retry_config));
  286    328   
        self
  287    329   
    }
  288    330   
  289    331   
    /// Set the retry_config for the builder
  290    332   
    ///
  291    333   
    /// # Examples
  292    334   
    /// ```no_run
  293    335   
    /// use json_rpc10::config::{Builder, Config};
  294    336   
    /// use json_rpc10::config::retry::RetryConfig;
  295    337   
    ///
  296    338   
    /// fn disable_retries(builder: &mut Builder) {
  297    339   
    ///     let retry_config = RetryConfig::standard().with_max_attempts(1);
  298    340   
    ///     builder.set_retry_config(Some(retry_config));
  299    341   
    /// }
  300    342   
    ///
  301    343   
    /// let mut builder = Config::builder();
  302    344   
    /// disable_retries(&mut builder);
  303    345   
    /// let config = builder.build();
  304    346   
    /// ```
         347  +
    /* ResiliencyConfigCustomization.kt:118 */
  305    348   
    pub fn set_retry_config(&mut self, retry_config: ::std::option::Option<::aws_smithy_types::retry::RetryConfig>) -> &mut Self {
  306    349   
        retry_config.map(|r| self.config.store_put(r));
  307    350   
        self
  308    351   
    }
         352  +
    /* ResiliencyConfigCustomization.kt:128 */
  309    353   
    /// Set the sleep_impl for the builder
  310    354   
    ///
  311    355   
    /// # Examples
  312    356   
    ///
  313    357   
    /// ```no_run
  314    358   
    /// use json_rpc10::config::{AsyncSleep, Config, SharedAsyncSleep, Sleep};
  315    359   
    ///
  316    360   
    /// #[derive(Debug)]
  317    361   
    /// pub struct ForeverSleep;
  318    362   
    ///
  319    363   
    /// impl AsyncSleep for ForeverSleep {
  320    364   
    ///     fn sleep(&self, duration: std::time::Duration) -> Sleep {
  321    365   
    ///         Sleep::new(std::future::pending())
  322    366   
    ///     }
  323    367   
    /// }
  324    368   
    ///
  325    369   
    /// let sleep_impl = SharedAsyncSleep::new(ForeverSleep);
  326    370   
    /// let config = Config::builder().sleep_impl(sleep_impl).build();
  327    371   
    /// ```
  328    372   
    pub fn sleep_impl(mut self, sleep_impl: impl crate::config::AsyncSleep + 'static) -> Self {
  329    373   
        self.set_sleep_impl(Some(::aws_smithy_runtime_api::shared::IntoShared::into_shared(sleep_impl)));
  330    374   
        self
  331    375   
    }
  332    376   
  333    377   
    /// Set the sleep_impl for the builder
  334    378   
    ///
  335    379   
    /// # Examples
  336    380   
    ///
  337    381   
    /// ```no_run
  338    382   
    /// use json_rpc10::config::{AsyncSleep, Builder, Config, SharedAsyncSleep, Sleep};
  339    383   
    ///
  340    384   
    /// #[derive(Debug)]
  341    385   
    /// pub struct ForeverSleep;
  342    386   
    ///
  343    387   
    /// impl AsyncSleep for ForeverSleep {
  344    388   
    ///     fn sleep(&self, duration: std::time::Duration) -> Sleep {
  345    389   
    ///         Sleep::new(std::future::pending())
  346    390   
    ///     }
  347    391   
    /// }
  348    392   
    ///
  349    393   
    /// fn set_never_ending_sleep_impl(builder: &mut Builder) {
  350    394   
    ///     let sleep_impl = SharedAsyncSleep::new(ForeverSleep);
  351    395   
    ///     builder.set_sleep_impl(Some(sleep_impl));
  352    396   
    /// }
  353    397   
    ///
  354    398   
    /// let mut builder = Config::builder();
  355    399   
    /// set_never_ending_sleep_impl(&mut builder);
  356    400   
    /// let config = builder.build();
  357    401   
    /// ```
         402  +
    /* ResiliencyConfigCustomization.kt:184 */
  358    403   
    pub fn set_sleep_impl(&mut self, sleep_impl: ::std::option::Option<crate::config::SharedAsyncSleep>) -> &mut Self {
  359    404   
        self.runtime_components.set_sleep_impl(sleep_impl);
  360    405   
        self
  361    406   
    }
         407  +
    /* ResiliencyConfigCustomization.kt:194 */
  362    408   
    /// Set the timeout_config for the builder
  363    409   
    ///
  364    410   
    /// # Examples
  365    411   
    ///
  366    412   
    /// ```no_run
  367    413   
    /// # use std::time::Duration;
  368    414   
    /// use json_rpc10::config::Config;
  369    415   
    /// use json_rpc10::config::timeout::TimeoutConfig;
  370    416   
    ///
  371    417   
    /// let timeout_config = TimeoutConfig::builder()
  372    418   
    ///     .operation_attempt_timeout(Duration::from_secs(1))
  373    419   
    ///     .build();
  374    420   
    /// let config = Config::builder().timeout_config(timeout_config).build();
  375    421   
    /// ```
  376    422   
    pub fn timeout_config(mut self, timeout_config: ::aws_smithy_types::timeout::TimeoutConfig) -> Self {
  377    423   
        self.set_timeout_config(Some(timeout_config));
  378    424   
        self
  379    425   
    }
  380    426   
  381    427   
    /// Set the timeout_config for the builder.
  382    428   
    ///
  383    429   
    /// Setting this to `None` has no effect if another source of configuration has set timeouts. If you
  384    430   
    /// are attempting to disable timeouts, use [`TimeoutConfig::disabled`](::aws_smithy_types::timeout::TimeoutConfig::disabled)
  385    431   
    ///
  386    432   
    ///
  387    433   
    /// # Examples
  388    434   
    ///
  389    435   
    /// ```no_run
  390    436   
    /// # use std::time::Duration;
  391    437   
    /// use json_rpc10::config::{Builder, Config};
  392    438   
    /// use json_rpc10::config::timeout::TimeoutConfig;
  393    439   
    ///
  394    440   
    /// fn set_request_timeout(builder: &mut Builder) {
  395    441   
    ///     let timeout_config = TimeoutConfig::builder()
  396    442   
    ///         .operation_attempt_timeout(Duration::from_secs(1))
  397    443   
    ///         .build();
  398    444   
    ///     builder.set_timeout_config(Some(timeout_config));
  399    445   
    /// }
  400    446   
    ///
  401    447   
    /// let mut builder = Config::builder();
  402    448   
    /// set_request_timeout(&mut builder);
  403    449   
    /// let config = builder.build();
  404    450   
    /// ```
         451  +
    /* ResiliencyConfigCustomization.kt:248 */
  405    452   
    pub fn set_timeout_config(&mut self, timeout_config: ::std::option::Option<::aws_smithy_types::timeout::TimeoutConfig>) -> &mut Self {
  406    453   
        // passing None has no impact.
  407    454   
        let Some(mut timeout_config) = timeout_config else { return self };
  408    455   
  409    456   
        if let Some(base) = self.config.load::<::aws_smithy_types::timeout::TimeoutConfig>() {
  410    457   
            timeout_config.take_defaults_from(base);
  411    458   
        }
  412    459   
        self.config.store_put(timeout_config);
  413    460   
        self
  414    461   
    }
         462  +
    /* ResiliencyConfigCustomization.kt:266 */
  415    463   
    /// Set the partition for retry-related state. When clients share a retry partition, they will
  416    464   
    /// also share things like token buckets and client rate limiters. By default, all clients
  417    465   
    /// for the same service will share a partition.
  418    466   
    pub fn retry_partition(mut self, retry_partition: ::aws_smithy_runtime::client::retries::RetryPartition) -> Self {
  419    467   
        self.set_retry_partition(Some(retry_partition));
  420    468   
        self
  421    469   
    }
         470  +
    /* ResiliencyConfigCustomization.kt:279 */
  422    471   
    /// Set the partition for retry-related state. When clients share a retry partition, they will
  423    472   
    /// also share things like token buckets and client rate limiters. By default, all clients
  424    473   
    /// for the same service will share a partition.
  425    474   
    pub fn set_retry_partition(
  426    475   
        &mut self,
  427    476   
        retry_partition: ::std::option::Option<::aws_smithy_runtime::client::retries::RetryPartition>,
  428    477   
    ) -> &mut Self {
  429    478   
        retry_partition.map(|r| self.config.store_put(r));
  430    479   
        self
  431    480   
    }
         481  +
    /* IdentityCacheDecorator.kt:77 */
  432    482   
    /// Set the identity cache for auth.
  433    483   
    ///
  434    484   
    /// The identity cache defaults to a lazy caching implementation that will resolve
  435    485   
    /// an identity when it is requested, and place it in the cache thereafter. Subsequent
  436    486   
    /// requests will take the value from the cache while it is still valid. Once it expires,
  437    487   
    /// the next request will result in refreshing the identity.
  438    488   
    ///
  439    489   
    /// This configuration allows you to disable or change the default caching mechanism.
  440    490   
    /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity)
  441    491   
    /// trait and pass that implementation into this function.
@@ -493,543 +552,603 @@
  513    563   
    ///     )
  514    564   
    ///     // ...
  515    565   
    ///     .build();
  516    566   
    /// let client = json_rpc10::Client::from_conf(config);
  517    567   
    /// ```
  518    568   
  519    569   
    pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self {
  520    570   
        self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache));
  521    571   
        self
  522    572   
    }
         573  +
    /* InterceptorConfigCustomization.kt:41 */
  523    574   
    /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline.
  524    575   
    ///
  525    576   
    /// Interceptors targeted at a certain stage are executed according to the pre-defined priority.
  526    577   
    /// The SDK provides a default set of interceptors. An interceptor configured by this method
  527    578   
    /// will run after those default interceptors.
  528    579   
    ///
  529    580   
    /// # Examples
  530    581   
    /// ```no_run
  531    582   
    /// # #[cfg(test)]
  532    583   
    /// # mod tests {
@@ -599,650 +670,724 @@
  619    670   
    pub fn push_interceptor(&mut self, interceptor: crate::config::SharedInterceptor) -> &mut Self {
  620    671   
        self.runtime_components.push_interceptor(interceptor);
  621    672   
        self
  622    673   
    }
  623    674   
  624    675   
    /// Set [`SharedInterceptor`](crate::config::SharedInterceptor)s for the builder.
  625    676   
    pub fn set_interceptors(&mut self, interceptors: impl IntoIterator<Item = crate::config::SharedInterceptor>) -> &mut Self {
  626    677   
        self.runtime_components.set_interceptors(interceptors.into_iter());
  627    678   
        self
  628    679   
    }
         680  +
    /* TimeSourceCustomization.kt:47 */
  629    681   
    /// Sets the time source used for this service
  630    682   
    pub fn time_source(mut self, time_source: impl ::aws_smithy_async::time::TimeSource + 'static) -> Self {
  631    683   
        self.set_time_source(::std::option::Option::Some(::aws_smithy_runtime_api::shared::IntoShared::into_shared(
  632    684   
            time_source,
  633    685   
        )));
  634    686   
        self
  635    687   
    }
         688  +
    /* TimeSourceCustomization.kt:61 */
  636    689   
    /// Sets the time source used for this service
  637    690   
    pub fn set_time_source(&mut self, time_source: ::std::option::Option<::aws_smithy_async::time::SharedTimeSource>) -> &mut Self {
  638    691   
        self.runtime_components.set_time_source(time_source);
  639    692   
        self
  640    693   
    }
         694  +
    /* RetryClassifierConfigCustomization.kt:50 */
  641    695   
    /// Add type implementing [`ClassifyRetry`](::aws_smithy_runtime_api::client::retries::classifiers::ClassifyRetry) that will be used by the
  642    696   
    /// [`RetryStrategy`](::aws_smithy_runtime_api::client::retries::RetryStrategy) to determine what responses should be retried.
  643    697   
    ///
  644    698   
    /// A retry classifier configured by this method will run according to its [priority](::aws_smithy_runtime_api::client::retries::classifiers::RetryClassifierPriority).
  645    699   
    ///
  646    700   
    /// # Examples
  647    701   
    /// ```no_run
  648    702   
    /// # #[cfg(test)]
  649    703   
    /// # mod tests {
  650    704   
    /// # #[test]
@@ -805,859 +864,919 @@
  825    879   
  826    880   
    /// Set [`SharedRetryClassifier`](::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier)s for the builder, replacing any that
  827    881   
    /// were previously set.
  828    882   
    pub fn set_retry_classifiers(
  829    883   
        &mut self,
  830    884   
        retry_classifiers: impl IntoIterator<Item = ::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier>,
  831    885   
    ) -> &mut Self {
  832    886   
        self.runtime_components.set_retry_classifiers(retry_classifiers.into_iter());
  833    887   
        self
  834    888   
    }
         889  +
    /* ServiceConfigGenerator.kt:375 */
  835    890   
    /// Sets the [`behavior major version`](crate::config::BehaviorVersion).
  836    891   
    ///
  837    892   
    /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards
  838    893   
    /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for
  839    894   
    /// all operations might be the ideal behavior but could break existing applications.
  840    895   
    ///
  841    896   
    /// # Examples
  842    897   
    ///
  843    898   
    /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature.
  844    899   
    /// ```no_run
@@ -882,937 +1137,1236 @@
  902    957   
        self
  903    958   
    }
  904    959   
  905    960   
    /// Convenience method to set the latest behavior major version
  906    961   
    ///
  907    962   
    /// This is equivalent to enabling the `behavior-version-latest` Cargo feature
  908    963   
    pub fn behavior_version_latest(mut self) -> Self {
  909    964   
        self.set_behavior_version(Some(crate::config::BehaviorVersion::latest()));
  910    965   
        self
  911    966   
    }
  912         -
    /// Adds a runtime plugin to the config.
         967  +
    /// /* ServiceConfigGenerator.kt:509 */Adds a runtime plugin to the config.
         968  +
    /* ServiceConfigGenerator.kt:513 */
  913    969   
    pub fn runtime_plugin(mut self, plugin: impl crate::config::RuntimePlugin + 'static) -> Self {
  914    970   
        self.push_runtime_plugin(crate::config::SharedRuntimePlugin::new(plugin));
  915    971   
        self
  916    972   
    }
  917         -
    /// Adds a runtime plugin to the config.
         973  +
    /// /* ServiceConfigGenerator.kt:522 */Adds a runtime plugin to the config.
         974  +
    /* ServiceConfigGenerator.kt:526 */
  918    975   
    pub fn push_runtime_plugin(&mut self, plugin: crate::config::SharedRuntimePlugin) -> &mut Self {
  919    976   
        self.runtime_plugins.push(plugin);
  920    977   
        self
  921    978   
    }
         979  +
    /* RustType.kt:516 */
  922    980   
    #[cfg(any(feature = "test-util", test))]
         981  +
    /* RustType.kt:516 */
  923    982   
    #[allow(unused_mut)]
  924         -
    /// Apply test defaults to the builder
         983  +
    /// /* ServiceConfigGenerator.kt:541 */Apply test defaults to the builder
         984  +
    /* ServiceConfigGenerator.kt:542 */
  925    985   
    pub fn apply_test_defaults(&mut self) -> &mut Self {
         986  +
        /* TimeSourceCustomization.kt:88 */
  926    987   
        self.set_time_source(::std::option::Option::Some(::aws_smithy_async::time::SharedTimeSource::new(
  927    988   
            ::aws_smithy_async::time::StaticTimeSource::new(::std::time::UNIX_EPOCH + ::std::time::Duration::from_secs(1234567890)),
  928    989   
        )));
         990  +
        /* ServiceConfigGenerator.kt:544 */
  929    991   
        self.behavior_version = ::std::option::Option::Some(crate::config::BehaviorVersion::latest());
         992  +
        /* ServiceConfigGenerator.kt:545 */
  930    993   
        self
         994  +
        /* ServiceConfigGenerator.kt:542 */
  931    995   
    }
         996  +
    /* RustType.kt:516 */
  932    997   
    #[cfg(any(feature = "test-util", test))]
         998  +
    /* RustType.kt:516 */
  933    999   
    #[allow(unused_mut)]
  934         -
    /// Apply test defaults to the builder
        1000  +
    /// /* ServiceConfigGenerator.kt:550 */Apply test defaults to the builder
        1001  +
    /* ServiceConfigGenerator.kt:551 */
  935   1002   
    pub fn with_test_defaults(mut self) -> Self {
        1003  +
        /* ServiceConfigGenerator.kt:552 */
  936   1004   
        self.apply_test_defaults();
  937   1005   
        self
        1006  +
        /* ServiceConfigGenerator.kt:551 */
  938   1007   
    }
  939         -
    /// Builds a [`Config`].
        1008  +
    /// /* ServiceConfigGenerator.kt:555 */Builds a [`Config`].
        1009  +
    /* ServiceConfigGenerator.kt:556 */
  940   1010   
    #[allow(unused_mut)]
        1011  +
    /* ServiceConfigGenerator.kt:557 */
  941   1012   
    pub fn build(mut self) -> Config {
        1013  +
        /* ServiceConfigGenerator.kt:558 */
  942   1014   
        let mut layer = self.config;
        1015  +
        /* TimeSourceCustomization.kt:77 */
  943   1016   
        if self.runtime_components.time_source().is_none() {
  944   1017   
            self.runtime_components
  945   1018   
                .set_time_source(::std::option::Option::Some(::std::default::Default::default()));
  946   1019   
        }
        1020  +
        /* ServiceConfigGenerator.kt:567 */
  947   1021   
        Config {
        1022  +
            /* ServiceConfigGenerator.kt:568 */
  948   1023   
            config: crate::config::Layer::from(layer.clone()).with_name("json_rpc10::config::Config").freeze(),
  949   1024   
            cloneable: layer,
  950   1025   
            runtime_components: self.runtime_components,
  951   1026   
            runtime_plugins: self.runtime_plugins,
  952   1027   
            behavior_version: self.behavior_version,
        1028  +
            /* ServiceConfigGenerator.kt:567 */
  953   1029   
        }
        1030  +
        /* ServiceConfigGenerator.kt:557 */
  954   1031   
    }
        1032  +
    /* ServiceConfigGenerator.kt:492 */
  955   1033   
}
        1034  +
/* ServiceRuntimePluginGenerator.kt:116 */
  956   1035   
#[derive(::std::fmt::Debug)]
  957   1036   
pub(crate) struct ServiceRuntimePlugin {
  958   1037   
    config: ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer>,
  959   1038   
    runtime_components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  960   1039   
}
  961   1040   
  962   1041   
impl ServiceRuntimePlugin {
  963   1042   
    pub fn new(_service_config: crate::config::Config) -> Self {
  964   1043   
        let config = {
  965   1044   
            let mut cfg = ::aws_smithy_types::config_bag::Layer::new("JsonRpc10");
  966   1045   
            cfg.store_put(::aws_smithy_runtime::client::orchestrator::AuthSchemeAndEndpointOrchestrationV2);
  967   1046   
            ::std::option::Option::Some(cfg.freeze())
  968   1047   
        };
  969   1048   
        let mut runtime_components = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ServiceRuntimePlugin");
  970   1049   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
  971   1050   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
  972   1051   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
  973   1052   
        Self { config, runtime_components }
  974   1053   
    }
  975   1054   
}
  976   1055   
  977   1056   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
  978   1057   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
  979   1058   
        self.config.clone()
  980   1059   
    }
  981   1060   
  982   1061   
    fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {
  983   1062   
        ::aws_smithy_runtime_api::client::runtime_plugin::Order::Defaults
  984   1063   
    }
  985   1064   
  986   1065   
    fn runtime_components(
  987   1066   
        &self,
  988   1067   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  989   1068   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  990   1069   
        ::std::borrow::Cow::Borrowed(&self.runtime_components)
  991   1070   
    }
  992   1071   
}
  993   1072   
  994   1073   
/// Cross-operation shared-state singletons
  995   1074   
        1075  +
/* ConfigOverrideRuntimePluginGenerator.kt:42 */
  996   1076   
/// A plugin that enables configuration for a single operation invocation
  997   1077   
///
  998   1078   
/// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
  999   1079   
/// In the case of default values requested, they will be obtained from `client_config`.
 1000   1080   
#[derive(Debug)]
 1001   1081   
pub(crate) struct ConfigOverrideRuntimePlugin {
 1002   1082   
    pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
 1003   1083   
    pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1004   1084   
}
 1005   1085   
 1006   1086   
impl ConfigOverrideRuntimePlugin {
 1007   1087   
    #[allow(dead_code)] // unused when a service does not provide any operations
 1008   1088   
    pub(crate) fn new(
 1009   1089   
        config_override: Builder,
 1010   1090   
        initial_config: ::aws_smithy_types::config_bag::FrozenLayer,
 1011   1091   
        initial_components: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1012   1092   
    ) -> Self {
 1013   1093   
        let mut layer = config_override.config;
 1014   1094   
        let mut components = config_override.runtime_components;
 1015   1095   
        #[allow(unused_mut)]
 1016   1096   
        let mut resolver =
 1017   1097   
            ::aws_smithy_runtime::client::config_override::Resolver::overrid(initial_config, initial_components, &mut layer, &mut components);
 1018   1098   
 1019   1099   
        let _ = resolver;
 1020   1100   
        Self {
 1021   1101   
            config: ::aws_smithy_types::config_bag::Layer::from(layer)
 1022   1102   
                .with_name("json_rpc10::config::ConfigOverrideRuntimePlugin")
 1023   1103   
                .freeze(),
 1024   1104   
            components,
 1025   1105   
        }
 1026   1106   
    }
 1027   1107   
}
 1028   1108   
 1029   1109   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ConfigOverrideRuntimePlugin {
 1030   1110   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
 1031   1111   
        Some(self.config.clone())
 1032   1112   
    }
 1033   1113   
 1034   1114   
    fn runtime_components(
 1035   1115   
        &self,
 1036   1116   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1037   1117   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
 1038   1118   
        ::std::borrow::Cow::Borrowed(&self.components)
 1039   1119   
    }
 1040   1120   
}
 1041   1121   
        1122  +
/* ClientRuntimeTypesReExportGenerator.kt:24 */
 1042   1123   
pub use ::aws_smithy_runtime::client::identity::IdentityCache;
 1043   1124   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1044   1125   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1045   1126   
        1127  +
/* ResiliencyConfigCustomization.kt:318 */
 1046   1128   
pub use ::aws_smithy_async::rt::sleep::Sleep;
 1047   1129   
        1130  +
/* FluentClientGenerator.kt:261 */
 1048   1131   
pub(crate) fn base_client_runtime_plugins(mut config: crate::Config) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
 1049   1132   
    let mut configured_plugins = ::std::vec::Vec::new();
 1050   1133   
    ::std::mem::swap(&mut config.runtime_plugins, &mut configured_plugins);
 1051   1134   
    #[cfg(feature = "behavior-version-latest")]
 1052   1135   
    {
 1053   1136   
        if config.behavior_version.is_none() {
 1054   1137   
            config.behavior_version = Some(::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion::latest());
 1055   1138   
        }
 1056   1139   
    }
 1057   1140   
 1058   1141   
    let default_retry_partition = "jsonrpc10";
 1059   1142   
 1060   1143   
    let scope = "json_rpc10";
 1061   1144   
 1062   1145   
    let mut plugins = ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins::new()
 1063   1146   
                        // defaults
 1064   1147   
                        .with_client_plugins(::aws_smithy_runtime::client::defaults::default_plugins(
 1065   1148   
                            ::aws_smithy_runtime::client::defaults::DefaultPluginParams::new()
 1066   1149   
                                .with_retry_partition_name(default_retry_partition)
 1067   1150   
                                .with_behavior_version(config.behavior_version.expect("Invalid client configuration: A behavior major version must be set when sending a request or constructing a client. You must set it during client construction or by enabling the `behavior-version-latest` cargo feature."))
 1068   1151   
                        ))
 1069   1152   
                        // user config
 1070   1153   
                        .with_client_plugin(
 1071   1154   
                            ::aws_smithy_runtime_api::client::runtime_plugin::StaticRuntimePlugin::new()
 1072   1155   
                                .with_config(config.config.clone())
 1073   1156   
                                .with_runtime_components(config.runtime_components.clone())
 1074   1157   
                        )
 1075   1158   
                        // codegen config
 1076   1159   
                        .with_client_plugin(crate::config::ServiceRuntimePlugin::new(config.clone()))
 1077   1160   
                        .with_client_plugin(::aws_smithy_runtime::client::auth::no_auth::NoAuthRuntimePlugin::new())
 1078   1161   
                        .with_client_plugin(
 1079   1162   
                            ::aws_smithy_runtime::client::metrics::MetricsRuntimePlugin::builder()
 1080   1163   
                                .with_scope(scope)
 1081   1164   
                                .with_time_source(config.runtime_components.time_source().unwrap_or_default())
 1082   1165   
                                .build()
 1083   1166   
                                .expect("All required fields have been set")
 1084   1167   
                        );
 1085   1168   
 1086   1169   
    for plugin in configured_plugins {
 1087   1170   
        plugins = plugins.with_client_plugin(plugin);
 1088   1171   
    }
 1089   1172   
    plugins
 1090   1173   
}
 1091   1174   
        1175  +
/* ClientReExports.kt:17 */
 1092   1176   
pub use ::aws_smithy_types::config_bag::FrozenLayer;
 1093   1177   
        1178  +
/* ClientReExports.kt:17 */
 1094   1179   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder;
 1095   1180   
        1181  +
/* ClientReExports.kt:17 */
 1096   1182   
pub use ::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin;
 1097   1183   
        1184  +
/* ClientReExports.kt:17 */
 1098   1185   
pub use ::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion;
 1099   1186   
        1187  +
/* ClientReExports.kt:17 */
 1100   1188   
pub use ::aws_smithy_runtime_api::client::stalled_stream_protection::StalledStreamProtectionConfig;
 1101   1189   
        1190  +
/* ClientReExports.kt:17 */
 1102   1191   
pub use ::aws_smithy_runtime_api::client::http::SharedHttpClient;
 1103   1192   
        1193  +
/* ClientReExports.kt:17 */
 1104   1194   
pub use ::aws_smithy_async::rt::sleep::SharedAsyncSleep;
 1105   1195   
        1196  +
/* ClientReExports.kt:17 */
 1106   1197   
pub use ::aws_smithy_runtime_api::client::identity::SharedIdentityCache;
 1107   1198   
        1199  +
/* ClientReExports.kt:17 */
 1108   1200   
pub use ::aws_smithy_runtime_api::client::interceptors::SharedInterceptor;
 1109   1201   
        1202  +
/* ClientReExports.kt:17 */
 1110   1203   
pub use ::aws_smithy_runtime_api::client::http::HttpClient;
 1111   1204   
        1205  +
/* ClientReExports.kt:17 */
 1112   1206   
pub use ::aws_smithy_runtime_api::shared::IntoShared;
 1113   1207   
        1208  +
/* ClientReExports.kt:17 */
 1114   1209   
pub use ::aws_smithy_async::rt::sleep::AsyncSleep;
 1115   1210   
        1211  +
/* ClientReExports.kt:17 */
 1116   1212   
pub use ::aws_smithy_runtime_api::client::identity::ResolveCachedIdentity;
 1117   1213   
        1214  +
/* ClientReExports.kt:17 */
 1118   1215   
pub use ::aws_smithy_runtime_api::client::interceptors::Intercept;
 1119   1216   
        1217  +
/* ClientReExports.kt:17 */
 1120   1218   
pub use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
 1121   1219   
        1220  +
/* ClientReExports.kt:17 */
 1122   1221   
pub use ::aws_smithy_types::config_bag::Layer;
 1123   1222   
 1124         -
/// Types needed to configure endpoint resolution.
        1223  +
/// /* ClientRustModule.kt:121 */Types needed to configure endpoint resolution.
 1125   1224   
pub mod endpoint;
 1126   1225   
 1127         -
/// HTTP request and response types.
        1226  +
/// /* ClientRustModule.kt:121 */HTTP request and response types.
 1128   1227   
pub mod http;
 1129   1228   
 1130         -
/// Types needed to implement [`Intercept`](crate::config::Intercept).
        1229  +
/// /* ClientRustModule.kt:121 */Types needed to implement [`Intercept`](crate::config::Intercept).
 1131   1230   
pub mod interceptors;
 1132   1231   
 1133         -
/// Retry configuration.
        1232  +
/// /* ClientRustModule.kt:121 */Retry configuration.
 1134   1233   
pub mod retry;
 1135   1234   
 1136         -
/// Timeout configuration.
        1235  +
/// /* ClientRustModule.kt:121 */Timeout configuration.
 1137   1236   
pub mod timeout;

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/config/endpoint.rs

@@ -1,1 +86,107 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ClientRuntimeTypesReExportGenerator.kt:38 */
    2      3   
pub use ::aws_smithy_runtime_api::client::endpoint::EndpointFuture;
    3      4   
pub use ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver;
    4      5   
pub use ::aws_smithy_types::endpoint::Endpoint;
    5      6   
           7  +
/* RustType.kt:516 */
    6      8   
#[cfg(test)]
    7         -
mod test {}
           9  +
/* EndpointsDecorator.kt:175 */
          10  +
mod test {
    8     11   
          12  +
    /* EndpointsDecorator.kt:175 */
          13  +
}
          14  +
          15  +
/* EndpointResolverGenerator.kt:416 */
    9     16   
/// Endpoint resolver trait specific to Sample Json 1.0 Protocol Service
   10     17   
pub trait ResolveEndpoint: ::std::marker::Send + ::std::marker::Sync + ::std::fmt::Debug {
   11     18   
    /// Resolve an endpoint with the given parameters
   12     19   
    fn resolve_endpoint<'a>(&'a self, params: &'a crate::config::endpoint::Params) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'a>;
   13     20   
   14     21   
    /// Convert this service-specific resolver into a `SharedEndpointResolver`
   15     22   
    ///
   16     23   
    /// The resulting resolver will downcast `EndpointResolverParams` into `crate::config::endpoint::Params`.
   17     24   
    fn into_shared_resolver(self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver
   18     25   
    where
   19     26   
        Self: Sized + 'static,
   20     27   
    {
   21     28   
        ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver::new(DowncastParams(self))
   22     29   
    }
   23     30   
}
   24     31   
   25     32   
#[derive(Debug)]
   26     33   
struct DowncastParams<T>(T);
   27     34   
impl<T> ::aws_smithy_runtime_api::client::endpoint::ResolveEndpoint for DowncastParams<T>
   28     35   
where
   29     36   
    T: ResolveEndpoint,
   30     37   
{
   31     38   
    fn resolve_endpoint<'a>(
   32     39   
        &'a self,
   33     40   
        params: &'a ::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams,
   34     41   
    ) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'a> {
   35     42   
        let ep = match params.get::<crate::config::endpoint::Params>() {
   36     43   
            Some(params) => self.0.resolve_endpoint(params),
   37     44   
            None => ::aws_smithy_runtime_api::client::endpoint::EndpointFuture::ready(Err("params of expected type was not present".into())),
   38     45   
        };
   39     46   
        ep
   40     47   
    }
   41     48   
}
   42     49   
          50  +
/* RustType.kt:516 */
   43     51   
#[non_exhaustive]
          52  +
/* RustType.kt:516 */
   44     53   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
   45         -
/// Configuration parameters for resolving the correct endpoint
   46         -
pub struct Params {}
          54  +
/// /* EndpointParamsGenerator.kt:178 */Configuration parameters for resolving the correct endpoint
          55  +
/* EndpointParamsGenerator.kt:179 */
          56  +
pub struct Params {/* EndpointParamsGenerator.kt:179 */}
          57  +
/* EndpointParamsGenerator.kt:188 */
   47     58   
impl Params {
          59  +
    /* EndpointParamsGenerator.kt:189 */
   48     60   
    /// Create a builder for [`Params`]
   49     61   
    pub fn builder() -> crate::config::endpoint::ParamsBuilder {
   50     62   
        crate::config::endpoint::ParamsBuilder::default()
   51     63   
    }
          64  +
    /* EndpointParamsGenerator.kt:188 */
   52     65   
}
   53     66   
   54         -
/// Builder for [`Params`]
          67  +
/// /* EndpointParamsGenerator.kt:234 */Builder for [`Params`]
          68  +
/* RustType.kt:516 */
   55     69   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   56         -
pub struct ParamsBuilder {}
          70  +
/* EndpointParamsGenerator.kt:238 */
          71  +
pub struct ParamsBuilder {/* EndpointParamsGenerator.kt:238 */}
          72  +
/* EndpointParamsGenerator.kt:246 */
   57     73   
impl ParamsBuilder {
   58         -
    /// Consume this builder, creating [`Params`].
          74  +
    /// /* EndpointParamsGenerator.kt:247 */Consume this builder, creating [`Params`].
          75  +
    /* EndpointParamsGenerator.kt:248 */
   59     76   
    pub fn build(self) -> ::std::result::Result<crate::config::endpoint::Params, crate::config::endpoint::InvalidParams> {
          77  +
        /* EndpointParamsGenerator.kt:272 */
   60     78   
        Ok(
   61     79   
            #[allow(clippy::unnecessary_lazy_evaluations)]
   62     80   
            crate::config::endpoint::Params {},
   63     81   
        )
          82  +
        /* EndpointParamsGenerator.kt:248 */
   64     83   
    }
          84  +
    /* EndpointParamsGenerator.kt:246 */
   65     85   
}
   66     86   
          87  +
/* EndpointParamsGenerator.kt:139 */
   67     88   
/// An error that occurred during endpoint resolution
   68     89   
#[derive(Debug)]
   69     90   
pub struct InvalidParams {
   70     91   
    field: std::borrow::Cow<'static, str>,
   71     92   
}
   72     93   
   73     94   
impl InvalidParams {
   74     95   
    #[allow(dead_code)]
   75     96   
    fn missing(field: &'static str) -> Self {
   76     97   
        Self { field: field.into() }

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/config/http.rs

@@ -1,1 +3,4 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ClientRuntimeTypesReExportGenerator.kt:60 */
    2      3   
pub use ::aws_smithy_runtime_api::client::orchestrator::HttpRequest;
    3      4   
pub use ::aws_smithy_runtime_api::client::orchestrator::HttpResponse;

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/config/interceptors.rs

@@ -1,1 +11,12 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ClientRuntimeTypesReExportGenerator.kt:70 */
    2      3   
pub use ::aws_smithy_runtime_api::client::interceptors::context::AfterDeserializationInterceptorContextRef;
    3      4   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeDeserializationInterceptorContextMut;
    4      5   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeDeserializationInterceptorContextRef;
    5      6   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextMut;
    6      7   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef;
    7      8   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeTransmitInterceptorContextMut;
    8      9   
pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeTransmitInterceptorContextRef;
    9     10   
pub use ::aws_smithy_runtime_api::client::interceptors::context::FinalizerInterceptorContextMut;
   10     11   
pub use ::aws_smithy_runtime_api::client::interceptors::context::FinalizerInterceptorContextRef;
   11     12   
pub use ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext;

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/config/retry.rs

@@ -1,1 +7,9 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ClientRuntimeTypesReExportGenerator.kt:48 */
    2      3   
pub use ::aws_smithy_runtime_api::client::retries::classifiers::ClassifyRetry;
    3      4   
pub use ::aws_smithy_runtime_api::client::retries::classifiers::RetryAction;
    4      5   
pub use ::aws_smithy_runtime_api::client::retries::ShouldAttempt;
    5      6   
    6         -
pub use ::aws_smithy_runtime::client::retries::RetryPartition;
           7  +
/* ResiliencyConfigCustomization.kt:324 */
           8  +
/* ResiliencyConfigCustomization.kt:329 */ pub use ::aws_smithy_runtime::client::retries::RetryPartition;
    7      9   
pub use ::aws_smithy_types::retry::{ReconnectMode, RetryConfig, RetryConfigBuilder, RetryMode};

tmp-codegen-diff/codegen-client-test/json_rpc10/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/json_rpc10/rust-client-codegen/src/error.rs

@@ -1,1 +30,33 @@
    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   
          15  +
/* ClientEnumGenerator.kt:302 */
   13     16   
/// The given enum value failed to parse since it is not a known value.
   14     17   
#[derive(Debug)]
   15     18   
pub struct UnknownVariantError {
   16     19   
    value: ::std::string::String,
   17     20   
}
   18     21   
impl UnknownVariantError {
   19     22   
    pub(crate) fn new(value: impl ::std::convert::Into<::std::string::String>) -> Self {
   20     23   
        Self { value: value.into() }
   21     24   
    }
   22     25   
}

tmp-codegen-diff/codegen-client-test/json_rpc10/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/json_rpc10/rust-client-codegen/src/error_meta.rs

@@ -1,1 +400,635 @@
    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         -
    /// This error is thrown when a request is invalid.
           8  +
pub /* ServiceErrorGenerator.kt:257 */ enum Error {
           9  +
    /// /* ServiceErrorGenerator.kt:259 */This error is thrown when a request is invalid.
          10  +
    /* ServiceErrorGenerator.kt:262 */
    7     11   
    ComplexError(crate::types::error::ComplexError),
    8         -
    /// This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
          12  +
    /// /* ServiceErrorGenerator.kt:259 */This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
          13  +
    /* ServiceErrorGenerator.kt:262 */
    9     14   
    FooError(crate::types::error::FooError),
   10         -
    /// This error is thrown when an invalid greeting value is provided.
          15  +
    /// /* ServiceErrorGenerator.kt:259 */This error is thrown when an invalid greeting value is provided.
          16  +
    /* ServiceErrorGenerator.kt:262 */
   11     17   
    InvalidGreeting(crate::types::error::InvalidGreeting),
   12         -
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
          18  +
    /// /* ServiceErrorGenerator.kt:264 */An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
          19  +
    /* ServiceErrorGenerator.kt:320 */
   13     20   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
   14     21   
    variable wildcard pattern and check `.code()`:
   15     22   
     \
   16     23   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
   17     24   
     \
   18     25   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
   19         -
    Unhandled(crate::error::sealed_unhandled::Unhandled),
          26  +
    /* ServiceErrorGenerator.kt:266 */
          27  +
    Unhandled(crate::error::sealed_unhandled::Unhandled), /* ServiceErrorGenerator.kt:257 */
   20     28   
}
          29  +
/* ServiceErrorGenerator.kt:131 */
   21     30   
impl ::std::fmt::Display for Error {
          31  +
    /* ServiceErrorGenerator.kt:132 */
   22     32   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          33  +
        /* ServiceErrorGenerator.kt:133 */
   23     34   
        match self {
   24         -
            Error::ComplexError(inner) => inner.fmt(f),
   25         -
            Error::FooError(inner) => inner.fmt(f),
   26         -
            Error::InvalidGreeting(inner) => inner.fmt(f),
          35  +
            /* ServiceErrorGenerator.kt:135 */ Error::ComplexError(inner) => inner.fmt(f),
          36  +
            /* ServiceErrorGenerator.kt:135 */ Error::FooError(inner) => inner.fmt(f),
          37  +
            /* ServiceErrorGenerator.kt:135 */ Error::InvalidGreeting(inner) => inner.fmt(f),
          38  +
            /* ServiceErrorGenerator.kt:137 */
   27     39   
            Error::Unhandled(_) => {
   28     40   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
   29     41   
                    write!(f, "unhandled error ({code})")
   30     42   
                } else {
   31     43   
                    f.write_str("unhandled error")
   32     44   
                }
          45  +
            } /* ServiceErrorGenerator.kt:133 */
   33     46   
        }
          47  +
        /* ServiceErrorGenerator.kt:132 */
   34     48   
    }
   35         -
    }
          49  +
    /* ServiceErrorGenerator.kt:131 */
   36     50   
}
          51  +
/* ServiceErrorGenerator.kt:154 */
   37     52   
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
   38     53   
    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
   39     54   
        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   40     55   
            source: value.into(),
   41     56   
            meta: ::std::default::Default::default(),
   42     57   
        })
   43     58   
    }
   44     59   
}
          60  +
/* ServiceErrorGenerator.kt:223 */
   45     61   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
   46     62   
    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
   47     63   
        match self {
   48     64   
            Self::ComplexError(inner) => inner.meta(),
   49     65   
            Self::FooError(inner) => inner.meta(),
   50     66   
            Self::InvalidGreeting(inner) => inner.meta(),
   51     67   
            Self::Unhandled(inner) => &inner.meta,
   52     68   
        }
   53     69   
    }
   54     70   
}
          71  +
/* ServiceErrorGenerator.kt:174 */
   55     72   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::content_type_parameters::ContentTypeParametersError, R>> for Error
   56     73   
where
   57     74   
    R: Send + Sync + std::fmt::Debug + 'static,
   58     75   
{
          76  +
    /* ServiceErrorGenerator.kt:179 */
   59     77   
    fn from(
   60     78   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::content_type_parameters::ContentTypeParametersError, R>,
   61     79   
    ) -> Self {
          80  +
        /* ServiceErrorGenerator.kt:184 */
   62     81   
        match err {
          82  +
            /* ServiceErrorGenerator.kt:185 */
   63     83   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
          84  +
            /* ServiceErrorGenerator.kt:186 */
   64     85   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   65     86   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
   66     87   
                source: err.into(),
   67     88   
            }),
          89  +
            /* ServiceErrorGenerator.kt:184 */
   68     90   
        }
          91  +
        /* ServiceErrorGenerator.kt:179 */
   69     92   
    }
          93  +
    /* ServiceErrorGenerator.kt:174 */
   70     94   
}
          95  +
/* ServiceErrorGenerator.kt:202 */
   71     96   
impl From<crate::operation::content_type_parameters::ContentTypeParametersError> for Error {
          97  +
    /* ServiceErrorGenerator.kt:203 */
   72     98   
    fn from(err: crate::operation::content_type_parameters::ContentTypeParametersError) -> Self {
          99  +
        /* ServiceErrorGenerator.kt:204 */
   73    100   
        match err {
         101  +
            /* ServiceErrorGenerator.kt:212 */
   74    102   
            crate::operation::content_type_parameters::ContentTypeParametersError::Unhandled(inner) => Error::Unhandled(inner),
         103  +
            /* ServiceErrorGenerator.kt:204 */
   75    104   
        }
         105  +
        /* ServiceErrorGenerator.kt:203 */
   76    106   
    }
         107  +
    /* ServiceErrorGenerator.kt:202 */
   77    108   
}
         109  +
/* ServiceErrorGenerator.kt:174 */
   78    110   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError, R>>
   79    111   
    for Error
   80    112   
where
   81    113   
    R: Send + Sync + std::fmt::Debug + 'static,
   82    114   
{
         115  +
    /* ServiceErrorGenerator.kt:179 */
   83    116   
    fn from(
   84    117   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError, R>,
   85    118   
    ) -> Self {
         119  +
        /* ServiceErrorGenerator.kt:184 */
   86    120   
        match err {
         121  +
            /* ServiceErrorGenerator.kt:185 */
   87    122   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         123  +
            /* ServiceErrorGenerator.kt:186 */
   88    124   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   89    125   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
   90    126   
                source: err.into(),
   91    127   
            }),
         128  +
            /* ServiceErrorGenerator.kt:184 */
   92    129   
        }
         130  +
        /* ServiceErrorGenerator.kt:179 */
   93    131   
    }
         132  +
    /* ServiceErrorGenerator.kt:174 */
   94    133   
}
         134  +
/* ServiceErrorGenerator.kt:202 */
   95    135   
impl From<crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError> for Error {
         136  +
    /* ServiceErrorGenerator.kt:203 */
   96    137   
    fn from(err: crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError) -> Self {
         138  +
        /* ServiceErrorGenerator.kt:204 */
   97    139   
        match err {
         140  +
            /* ServiceErrorGenerator.kt:212 */
   98    141   
            crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError::Unhandled(inner) => Error::Unhandled(inner),
         142  +
            /* ServiceErrorGenerator.kt:204 */
   99    143   
        }
         144  +
        /* ServiceErrorGenerator.kt:203 */
  100    145   
    }
         146  +
    /* ServiceErrorGenerator.kt:202 */
  101    147   
}
         148  +
/* ServiceErrorGenerator.kt:174 */
  102    149   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::endpoint_operation::EndpointOperationError, R>> for Error
  103    150   
where
  104    151   
    R: Send + Sync + std::fmt::Debug + 'static,
  105    152   
{
         153  +
    /* ServiceErrorGenerator.kt:179 */
  106    154   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::endpoint_operation::EndpointOperationError, R>) -> Self {
         155  +
        /* ServiceErrorGenerator.kt:184 */
  107    156   
        match err {
         157  +
            /* ServiceErrorGenerator.kt:185 */
  108    158   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         159  +
            /* ServiceErrorGenerator.kt:186 */
  109    160   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  110    161   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  111    162   
                source: err.into(),
  112    163   
            }),
         164  +
            /* ServiceErrorGenerator.kt:184 */
  113    165   
        }
         166  +
        /* ServiceErrorGenerator.kt:179 */
  114    167   
    }
         168  +
    /* ServiceErrorGenerator.kt:174 */
  115    169   
}
         170  +
/* ServiceErrorGenerator.kt:202 */
  116    171   
impl From<crate::operation::endpoint_operation::EndpointOperationError> for Error {
         172  +
    /* ServiceErrorGenerator.kt:203 */
  117    173   
    fn from(err: crate::operation::endpoint_operation::EndpointOperationError) -> Self {
         174  +
        /* ServiceErrorGenerator.kt:204 */
  118    175   
        match err {
         176  +
            /* ServiceErrorGenerator.kt:212 */
  119    177   
            crate::operation::endpoint_operation::EndpointOperationError::Unhandled(inner) => Error::Unhandled(inner),
         178  +
            /* ServiceErrorGenerator.kt:204 */
  120    179   
        }
         180  +
        /* ServiceErrorGenerator.kt:203 */
  121    181   
    }
         182  +
    /* ServiceErrorGenerator.kt:202 */
  122    183   
}
         184  +
/* ServiceErrorGenerator.kt:174 */
  123    185   
impl<R>
  124    186   
    From<
  125    187   
        ::aws_smithy_runtime_api::client::result::SdkError<
  126    188   
            crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
  127    189   
            R,
  128    190   
        >,
  129    191   
    > for Error
  130    192   
where
  131    193   
    R: Send + Sync + std::fmt::Debug + 'static,
  132    194   
{
         195  +
    /* ServiceErrorGenerator.kt:179 */
  133    196   
    fn from(
  134    197   
        err: ::aws_smithy_runtime_api::client::result::SdkError<
  135    198   
            crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError,
  136    199   
            R,
  137    200   
        >,
  138    201   
    ) -> Self {
         202  +
        /* ServiceErrorGenerator.kt:184 */
  139    203   
        match err {
         204  +
            /* ServiceErrorGenerator.kt:185 */
  140    205   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         206  +
            /* ServiceErrorGenerator.kt:186 */
  141    207   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  142    208   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  143    209   
                source: err.into(),
  144    210   
            }),
         211  +
            /* ServiceErrorGenerator.kt:184 */
  145    212   
        }
         213  +
        /* ServiceErrorGenerator.kt:179 */
  146    214   
    }
         215  +
    /* ServiceErrorGenerator.kt:174 */
  147    216   
}
         217  +
/* ServiceErrorGenerator.kt:202 */
  148    218   
impl From<crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError> for Error {
         219  +
    /* ServiceErrorGenerator.kt:203 */
  149    220   
    fn from(err: crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError) -> Self {
         221  +
        /* ServiceErrorGenerator.kt:204 */
  150    222   
        match err {
         223  +
            /* ServiceErrorGenerator.kt:212 */
  151    224   
            crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationError::Unhandled(inner) => Error::Unhandled(inner),
         225  +
            /* ServiceErrorGenerator.kt:204 */
  152    226   
        }
         227  +
        /* ServiceErrorGenerator.kt:203 */
  153    228   
    }
         229  +
    /* ServiceErrorGenerator.kt:202 */
  154    230   
}
         231  +
/* ServiceErrorGenerator.kt:174 */
  155    232   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::greeting_with_errors::GreetingWithErrorsError, R>> for Error
  156    233   
where
  157    234   
    R: Send + Sync + std::fmt::Debug + 'static,
  158    235   
{
         236  +
    /* ServiceErrorGenerator.kt:179 */
  159    237   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::greeting_with_errors::GreetingWithErrorsError, R>) -> Self {
         238  +
        /* ServiceErrorGenerator.kt:184 */
  160    239   
        match err {
         240  +
            /* ServiceErrorGenerator.kt:185 */
  161    241   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         242  +
            /* ServiceErrorGenerator.kt:186 */
  162    243   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  163    244   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  164    245   
                source: err.into(),
  165    246   
            }),
         247  +
            /* ServiceErrorGenerator.kt:184 */
  166    248   
        }
         249  +
        /* ServiceErrorGenerator.kt:179 */
  167    250   
    }
         251  +
    /* ServiceErrorGenerator.kt:174 */
  168    252   
}
         253  +
/* ServiceErrorGenerator.kt:202 */
  169    254   
impl From<crate::operation::greeting_with_errors::GreetingWithErrorsError> for Error {
         255  +
    /* ServiceErrorGenerator.kt:203 */
  170    256   
    fn from(err: crate::operation::greeting_with_errors::GreetingWithErrorsError) -> Self {
         257  +
        /* ServiceErrorGenerator.kt:204 */
  171    258   
        match err {
         259  +
            /* ServiceErrorGenerator.kt:207 */
  172    260   
            crate::operation::greeting_with_errors::GreetingWithErrorsError::InvalidGreeting(inner) => Error::InvalidGreeting(inner),
         261  +
            /* ServiceErrorGenerator.kt:207 */
  173    262   
            crate::operation::greeting_with_errors::GreetingWithErrorsError::ComplexError(inner) => Error::ComplexError(inner),
         263  +
            /* ServiceErrorGenerator.kt:207 */
  174    264   
            crate::operation::greeting_with_errors::GreetingWithErrorsError::FooError(inner) => Error::FooError(inner),
         265  +
            /* ServiceErrorGenerator.kt:212 */
  175    266   
            crate::operation::greeting_with_errors::GreetingWithErrorsError::Unhandled(inner) => Error::Unhandled(inner),
         267  +
            /* ServiceErrorGenerator.kt:204 */
  176    268   
        }
         269  +
        /* ServiceErrorGenerator.kt:203 */
  177    270   
    }
         271  +
    /* ServiceErrorGenerator.kt:202 */
  178    272   
}
         273  +
/* ServiceErrorGenerator.kt:174 */
  179    274   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::host_with_path_operation::HostWithPathOperationError, R>> for Error
  180    275   
where
  181    276   
    R: Send + Sync + std::fmt::Debug + 'static,
  182    277   
{
         278  +
    /* ServiceErrorGenerator.kt:179 */
  183    279   
    fn from(
  184    280   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::host_with_path_operation::HostWithPathOperationError, R>,
  185    281   
    ) -> Self {
         282  +
        /* ServiceErrorGenerator.kt:184 */
  186    283   
        match err {
         284  +
            /* ServiceErrorGenerator.kt:185 */
  187    285   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         286  +
            /* ServiceErrorGenerator.kt:186 */
  188    287   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  189    288   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  190    289   
                source: err.into(),
  191    290   
            }),
         291  +
            /* ServiceErrorGenerator.kt:184 */
  192    292   
        }
         293  +
        /* ServiceErrorGenerator.kt:179 */
  193    294   
    }
         295  +
    /* ServiceErrorGenerator.kt:174 */
  194    296   
}
         297  +
/* ServiceErrorGenerator.kt:202 */
  195    298   
impl From<crate::operation::host_with_path_operation::HostWithPathOperationError> for Error {
         299  +
    /* ServiceErrorGenerator.kt:203 */
  196    300   
    fn from(err: crate::operation::host_with_path_operation::HostWithPathOperationError) -> Self {
         301  +
        /* ServiceErrorGenerator.kt:204 */
  197    302   
        match err {
         303  +
            /* ServiceErrorGenerator.kt:212 */
  198    304   
            crate::operation::host_with_path_operation::HostWithPathOperationError::Unhandled(inner) => Error::Unhandled(inner),
         305  +
            /* ServiceErrorGenerator.kt:204 */
  199    306   
        }
         307  +
        /* ServiceErrorGenerator.kt:203 */
  200    308   
    }
         309  +
    /* ServiceErrorGenerator.kt:202 */
  201    310   
}
         311  +
/* ServiceErrorGenerator.kt:174 */
  202    312   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::json_unions::JsonUnionsError, R>> for Error
  203    313   
where
  204    314   
    R: Send + Sync + std::fmt::Debug + 'static,
  205    315   
{
         316  +
    /* ServiceErrorGenerator.kt:179 */
  206    317   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::json_unions::JsonUnionsError, R>) -> Self {
         318  +
        /* ServiceErrorGenerator.kt:184 */
  207    319   
        match err {
         320  +
            /* ServiceErrorGenerator.kt:185 */
  208    321   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         322  +
            /* ServiceErrorGenerator.kt:186 */
  209    323   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  210    324   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  211    325   
                source: err.into(),
  212    326   
            }),
         327  +
            /* ServiceErrorGenerator.kt:184 */
  213    328   
        }
         329  +
        /* ServiceErrorGenerator.kt:179 */
  214    330   
    }
         331  +
    /* ServiceErrorGenerator.kt:174 */
  215    332   
}
         333  +
/* ServiceErrorGenerator.kt:202 */
  216    334   
impl From<crate::operation::json_unions::JsonUnionsError> for Error {
         335  +
    /* ServiceErrorGenerator.kt:203 */
  217    336   
    fn from(err: crate::operation::json_unions::JsonUnionsError) -> Self {
         337  +
        /* ServiceErrorGenerator.kt:204 */
  218    338   
        match err {
         339  +
            /* ServiceErrorGenerator.kt:212 */
  219    340   
            crate::operation::json_unions::JsonUnionsError::Unhandled(inner) => Error::Unhandled(inner),
         341  +
            /* ServiceErrorGenerator.kt:204 */
  220    342   
        }
         343  +
        /* ServiceErrorGenerator.kt:203 */
  221    344   
    }
         345  +
    /* ServiceErrorGenerator.kt:202 */
  222    346   
}
         347  +
/* ServiceErrorGenerator.kt:174 */
  223    348   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::no_input_and_no_output::NoInputAndNoOutputError, R>> for Error
  224    349   
where
  225    350   
    R: Send + Sync + std::fmt::Debug + 'static,
  226    351   
{
         352  +
    /* ServiceErrorGenerator.kt:179 */
  227    353   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::no_input_and_no_output::NoInputAndNoOutputError, R>) -> Self {
         354  +
        /* ServiceErrorGenerator.kt:184 */
  228    355   
        match err {
         356  +
            /* ServiceErrorGenerator.kt:185 */
  229    357   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         358  +
            /* ServiceErrorGenerator.kt:186 */
  230    359   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  231    360   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  232    361   
                source: err.into(),
  233    362   
            }),
         363  +
            /* ServiceErrorGenerator.kt:184 */
  234    364   
        }
         365  +
        /* ServiceErrorGenerator.kt:179 */
  235    366   
    }
         367  +
    /* ServiceErrorGenerator.kt:174 */
  236    368   
}
         369  +
/* ServiceErrorGenerator.kt:202 */
  237    370   
impl From<crate::operation::no_input_and_no_output::NoInputAndNoOutputError> for Error {
         371  +
    /* ServiceErrorGenerator.kt:203 */
  238    372   
    fn from(err: crate::operation::no_input_and_no_output::NoInputAndNoOutputError) -> Self {
         373  +
        /* ServiceErrorGenerator.kt:204 */
  239    374   
        match err {
         375  +
            /* ServiceErrorGenerator.kt:212 */
  240    376   
            crate::operation::no_input_and_no_output::NoInputAndNoOutputError::Unhandled(inner) => Error::Unhandled(inner),
         377  +
            /* ServiceErrorGenerator.kt:204 */
  241    378   
        }
         379  +
        /* ServiceErrorGenerator.kt:203 */
  242    380   
    }
         381  +
    /* ServiceErrorGenerator.kt:202 */
  243    382   
}
         383  +
/* ServiceErrorGenerator.kt:174 */
  244    384   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::no_input_and_output::NoInputAndOutputError, R>> for Error
  245    385   
where
  246    386   
    R: Send + Sync + std::fmt::Debug + 'static,
  247    387   
{
         388  +
    /* ServiceErrorGenerator.kt:179 */
  248    389   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::no_input_and_output::NoInputAndOutputError, R>) -> Self {
         390  +
        /* ServiceErrorGenerator.kt:184 */
  249    391   
        match err {
         392  +
            /* ServiceErrorGenerator.kt:185 */
  250    393   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         394  +
            /* ServiceErrorGenerator.kt:186 */
  251    395   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  252    396   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  253    397   
                source: err.into(),
  254    398   
            }),
         399  +
            /* ServiceErrorGenerator.kt:184 */
  255    400   
        }
         401  +
        /* ServiceErrorGenerator.kt:179 */
  256    402   
    }
         403  +
    /* ServiceErrorGenerator.kt:174 */
  257    404   
}
         405  +
/* ServiceErrorGenerator.kt:202 */
  258    406   
impl From<crate::operation::no_input_and_output::NoInputAndOutputError> for Error {
         407  +
    /* ServiceErrorGenerator.kt:203 */
  259    408   
    fn from(err: crate::operation::no_input_and_output::NoInputAndOutputError) -> Self {
         409  +
        /* ServiceErrorGenerator.kt:204 */
  260    410   
        match err {
         411  +
            /* ServiceErrorGenerator.kt:212 */
  261    412   
            crate::operation::no_input_and_output::NoInputAndOutputError::Unhandled(inner) => Error::Unhandled(inner),
         413  +
            /* ServiceErrorGenerator.kt:204 */
  262    414   
        }
         415  +
        /* ServiceErrorGenerator.kt:203 */
  263    416   
    }
         417  +
    /* ServiceErrorGenerator.kt:202 */
  264    418   
}
         419  +
/* ServiceErrorGenerator.kt:174 */
  265    420   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::operation_with_defaults::OperationWithDefaultsError, R>> for Error
  266    421   
where
  267    422   
    R: Send + Sync + std::fmt::Debug + 'static,
  268    423   
{
         424  +
    /* ServiceErrorGenerator.kt:179 */
  269    425   
    fn from(
  270    426   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::operation_with_defaults::OperationWithDefaultsError, R>,
  271    427   
    ) -> Self {
         428  +
        /* ServiceErrorGenerator.kt:184 */
  272    429   
        match err {
         430  +
            /* ServiceErrorGenerator.kt:185 */
  273    431   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         432  +
            /* ServiceErrorGenerator.kt:186 */
  274    433   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  275    434   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  276    435   
                source: err.into(),
  277    436   
            }),
         437  +
            /* ServiceErrorGenerator.kt:184 */
  278    438   
        }
         439  +
        /* ServiceErrorGenerator.kt:179 */
  279    440   
    }
         441  +
    /* ServiceErrorGenerator.kt:174 */
  280    442   
}
         443  +
/* ServiceErrorGenerator.kt:202 */
  281    444   
impl From<crate::operation::operation_with_defaults::OperationWithDefaultsError> for Error {
         445  +
    /* ServiceErrorGenerator.kt:203 */
  282    446   
    fn from(err: crate::operation::operation_with_defaults::OperationWithDefaultsError) -> Self {
         447  +
        /* ServiceErrorGenerator.kt:204 */
  283    448   
        match err {
         449  +
            /* ServiceErrorGenerator.kt:212 */
  284    450   
            crate::operation::operation_with_defaults::OperationWithDefaultsError::Unhandled(inner) => Error::Unhandled(inner),
         451  +
            /* ServiceErrorGenerator.kt:204 */
  285    452   
        }
         453  +
        /* ServiceErrorGenerator.kt:203 */
  286    454   
    }
         455  +
    /* ServiceErrorGenerator.kt:202 */
  287    456   
}
         457  +
/* ServiceErrorGenerator.kt:174 */
  288    458   
impl<R>
  289    459   
    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::operation_with_nested_structure::OperationWithNestedStructureError, R>>
  290    460   
    for Error
  291    461   
where
  292    462   
    R: Send + Sync + std::fmt::Debug + 'static,
  293    463   
{
         464  +
    /* ServiceErrorGenerator.kt:179 */
  294    465   
    fn from(
  295    466   
        err: ::aws_smithy_runtime_api::client::result::SdkError<
  296    467   
            crate::operation::operation_with_nested_structure::OperationWithNestedStructureError,
  297    468   
            R,
  298    469   
        >,
  299    470   
    ) -> Self {
         471  +
        /* ServiceErrorGenerator.kt:184 */
  300    472   
        match err {
         473  +
            /* ServiceErrorGenerator.kt:185 */
  301    474   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         475  +
            /* ServiceErrorGenerator.kt:186 */
  302    476   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  303    477   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  304    478   
                source: err.into(),
  305    479   
            }),
         480  +
            /* ServiceErrorGenerator.kt:184 */
  306    481   
        }
         482  +
        /* ServiceErrorGenerator.kt:179 */
  307    483   
    }
         484  +
    /* ServiceErrorGenerator.kt:174 */
  308    485   
}
         486  +
/* ServiceErrorGenerator.kt:202 */
  309    487   
impl From<crate::operation::operation_with_nested_structure::OperationWithNestedStructureError> for Error {
         488  +
    /* ServiceErrorGenerator.kt:203 */
  310    489   
    fn from(err: crate::operation::operation_with_nested_structure::OperationWithNestedStructureError) -> Self {
         490  +
        /* ServiceErrorGenerator.kt:204 */
  311    491   
        match err {
         492  +
            /* ServiceErrorGenerator.kt:212 */
  312    493   
            crate::operation::operation_with_nested_structure::OperationWithNestedStructureError::Unhandled(inner) => Error::Unhandled(inner),
         494  +
            /* ServiceErrorGenerator.kt:204 */
  313    495   
        }
         496  +
        /* ServiceErrorGenerator.kt:203 */
  314    497   
    }
         498  +
    /* ServiceErrorGenerator.kt:202 */
  315    499   
}
         500  +
/* ServiceErrorGenerator.kt:174 */
  316    501   
impl<R>
  317    502   
    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::operation_with_required_members::OperationWithRequiredMembersError, R>>
  318    503   
    for Error
  319    504   
where
  320    505   
    R: Send + Sync + std::fmt::Debug + 'static,
  321    506   
{
         507  +
    /* ServiceErrorGenerator.kt:179 */
  322    508   
    fn from(
  323    509   
        err: ::aws_smithy_runtime_api::client::result::SdkError<
  324    510   
            crate::operation::operation_with_required_members::OperationWithRequiredMembersError,
  325    511   
            R,
  326    512   
        >,
  327    513   
    ) -> Self {
         514  +
        /* ServiceErrorGenerator.kt:184 */
  328    515   
        match err {
         516  +
            /* ServiceErrorGenerator.kt:185 */
  329    517   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         518  +
            /* ServiceErrorGenerator.kt:186 */
  330    519   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  331    520   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  332    521   
                source: err.into(),
  333    522   
            }),
         523  +
            /* ServiceErrorGenerator.kt:184 */
  334    524   
        }
         525  +
        /* ServiceErrorGenerator.kt:179 */
  335    526   
    }
         527  +
    /* ServiceErrorGenerator.kt:174 */
  336    528   
}
         529  +
/* ServiceErrorGenerator.kt:202 */
  337    530   
impl From<crate::operation::operation_with_required_members::OperationWithRequiredMembersError> for Error {
         531  +
    /* ServiceErrorGenerator.kt:203 */
  338    532   
    fn from(err: crate::operation::operation_with_required_members::OperationWithRequiredMembersError) -> Self {
         533  +
        /* ServiceErrorGenerator.kt:204 */
  339    534   
        match err {
         535  +
            /* ServiceErrorGenerator.kt:212 */
  340    536   
            crate::operation::operation_with_required_members::OperationWithRequiredMembersError::Unhandled(inner) => Error::Unhandled(inner),
         537  +
            /* ServiceErrorGenerator.kt:204 */
  341    538   
        }
         539  +
        /* ServiceErrorGenerator.kt:203 */
  342    540   
    }
         541  +
    /* ServiceErrorGenerator.kt:202 */
  343    542   
}
         543  +
/* ServiceErrorGenerator.kt:174 */
  344    544   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_with_content_encoding::PutWithContentEncodingError, R>>
  345    545   
    for Error
  346    546   
where
  347    547   
    R: Send + Sync + std::fmt::Debug + 'static,
  348    548   
{
         549  +
    /* ServiceErrorGenerator.kt:179 */
  349    550   
    fn from(
  350    551   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_with_content_encoding::PutWithContentEncodingError, R>,
  351    552   
    ) -> Self {
         553  +
        /* ServiceErrorGenerator.kt:184 */
  352    554   
        match err {
         555  +
            /* ServiceErrorGenerator.kt:185 */
  353    556   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         557  +
            /* ServiceErrorGenerator.kt:186 */
  354    558   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  355    559   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  356    560   
                source: err.into(),
  357    561   
            }),
         562  +
            /* ServiceErrorGenerator.kt:184 */
  358    563   
        }
         564  +
        /* ServiceErrorGenerator.kt:179 */
  359    565   
    }
         566  +
    /* ServiceErrorGenerator.kt:174 */
  360    567   
}
         568  +
/* ServiceErrorGenerator.kt:202 */
  361    569   
impl From<crate::operation::put_with_content_encoding::PutWithContentEncodingError> for Error {
         570  +
    /* ServiceErrorGenerator.kt:203 */
  362    571   
    fn from(err: crate::operation::put_with_content_encoding::PutWithContentEncodingError) -> Self {
         572  +
        /* ServiceErrorGenerator.kt:204 */
  363    573   
        match err {
         574  +
            /* ServiceErrorGenerator.kt:212 */
  364    575   
            crate::operation::put_with_content_encoding::PutWithContentEncodingError::Unhandled(inner) => Error::Unhandled(inner),
         576  +
            /* ServiceErrorGenerator.kt:204 */
  365    577   
        }
         578  +
        /* ServiceErrorGenerator.kt:203 */
  366    579   
    }
         580  +
    /* ServiceErrorGenerator.kt:202 */
  367    581   
}
         582  +
/* ServiceErrorGenerator.kt:174 */
  368    583   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::simple_scalar_properties::SimpleScalarPropertiesError, R>> for Error
  369    584   
where
  370    585   
    R: Send + Sync + std::fmt::Debug + 'static,
  371    586   
{
         587  +
    /* ServiceErrorGenerator.kt:179 */
  372    588   
    fn from(
  373    589   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::simple_scalar_properties::SimpleScalarPropertiesError, R>,
  374    590   
    ) -> Self {
         591  +
        /* ServiceErrorGenerator.kt:184 */
  375    592   
        match err {
         593  +
            /* ServiceErrorGenerator.kt:185 */
  376    594   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         595  +
            /* ServiceErrorGenerator.kt:186 */
  377    596   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  378    597   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  379    598   
                source: err.into(),
  380    599   
            }),
         600  +
            /* ServiceErrorGenerator.kt:184 */
  381    601   
        }
         602  +
        /* ServiceErrorGenerator.kt:179 */
  382    603   
    }
         604  +
    /* ServiceErrorGenerator.kt:174 */
  383    605   
}
         606  +
/* ServiceErrorGenerator.kt:202 */
  384    607   
impl From<crate::operation::simple_scalar_properties::SimpleScalarPropertiesError> for Error {
         608  +
    /* ServiceErrorGenerator.kt:203 */
  385    609   
    fn from(err: crate::operation::simple_scalar_properties::SimpleScalarPropertiesError) -> Self {
         610  +
        /* ServiceErrorGenerator.kt:204 */
  386    611   
        match err {
         612  +
            /* ServiceErrorGenerator.kt:212 */
  387    613   
            crate::operation::simple_scalar_properties::SimpleScalarPropertiesError::Unhandled(inner) => Error::Unhandled(inner),
         614  +
            /* ServiceErrorGenerator.kt:204 */
  388    615   
        }
         616  +
        /* ServiceErrorGenerator.kt:203 */
  389    617   
    }
         618  +
    /* ServiceErrorGenerator.kt:202 */
  390    619   
}
         620  +
/* ServiceErrorGenerator.kt:115 */
  391    621   
impl ::std::error::Error for Error {
         622  +
    /* ServiceErrorGenerator.kt:116 */
  392    623   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         624  +
        /* ServiceErrorGenerator.kt:117 */
  393    625   
        match self {
  394         -
            Error::ComplexError(inner) => inner.source(),
  395         -
            Error::FooError(inner) => inner.source(),
  396         -
            Error::InvalidGreeting(inner) => inner.source(),
  397         -
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
         626  +
            /* ServiceErrorGenerator.kt:119 */ Error::ComplexError(inner) => inner.source(),
         627  +
            /* ServiceErrorGenerator.kt:119 */ Error::FooError(inner) => inner.source(),
         628  +
            /* ServiceErrorGenerator.kt:119 */ Error::InvalidGreeting(inner) => inner.source(),
         629  +
            /* ServiceErrorGenerator.kt:121 */
         630  +
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source), /* ServiceErrorGenerator.kt:117 */
  398    631   
        }
         632  +
        /* ServiceErrorGenerator.kt:116 */
  399    633   
    }
         634  +
    /* ServiceErrorGenerator.kt:115 */
  400    635   
}

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

@@ -18,18 +134,145 @@
   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 Sample Json 1.0 Protocol Service.
          56  +
/// /* FluentClientDocs.kt:24 */Client for calling Sample Json 1.0 Protocol 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 = json_rpc10::Config::builder()
   72     75   
///     .endpoint_url("http://localhost:1234")
   73     76   
///     .build();
   74     77   
/// let client = json_rpc10::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 [`EndpointWithHostLabelOperation`](crate::operation::endpoint_with_host_label_operation) operation has
   84     87   
/// a [`Client::endpoint_with_host_label_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.endpoint_with_host_label_operation()
   90     93   
///     .label("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 Sample Json 1.0 Protocol Service.
         103  +
/// /* ClientRustModule.kt:121 */Configuration for Sample Json 1.0 Protocol 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   
  114         -
/// Data structures used by operation inputs/outputs.
         118  +
/// /* ClientRustModule.kt:121 */Data structures used by operation inputs/outputs.
  115    119   
pub mod types;
  116    120   
         121  +
/* RustModule.kt:172 */
  117    122   
mod auth_plugin;
  118    123   
         124  +
/* RustModule.kt:172 */
  119    125   
mod client_request_compression;
  120    126   
  121         -
/// All operations that this crate can perform.
         127  +
/// /* ClientRustModule.kt:121 */All operations that this crate can perform.
  122    128   
pub mod operation;
  123    129   
  124    130   
pub(crate) mod protocol_serde;
  125    131   
         132  +
/* RustModule.kt:172 */
  126    133   
mod sdk_feature_tracker;
  127    134   
         135  +
/* RustModule.kt:172 */
  128    136   
mod serialization_settings;
  129    137   
         138  +
/* RustModule.kt:172 */
  130    139   
mod serde_util;
  131    140   
         141  +
/* RustModule.kt:172 */
  132    142   
mod json_errors;
  133    143   
         144  +
/* FluentClientDecorator.kt:76 */
  134    145   
pub use client::Client;

tmp-codegen-diff/codegen-client-test/json_rpc10/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/json_rpc10/rust-client-codegen/src/operation.rs

@@ -1,1 +43,43 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Types for the `ContentTypeParameters` operation.
           2  +
/* CodegenDelegator.kt:51 */
           3  +
/// /* CodegenDelegator.kt:51 */Types for the `ContentTypeParameters` operation.
    4      4   
pub mod content_type_parameters;
    5      5   
    6         -
/// Types for the `EmptyInputAndEmptyOutput` operation.
           6  +
/// /* CodegenDelegator.kt:51 */Types for the `EmptyInputAndEmptyOutput` operation.
    7      7   
pub mod empty_input_and_empty_output;
    8      8   
    9         -
/// Types for the `EndpointOperation` operation.
           9  +
/// /* CodegenDelegator.kt:51 */Types for the `EndpointOperation` operation.
   10     10   
pub mod endpoint_operation;
   11     11   
   12         -
/// Types for the `EndpointWithHostLabelOperation` operation.
          12  +
/// /* CodegenDelegator.kt:51 */Types for the `EndpointWithHostLabelOperation` operation.
   13     13   
pub mod endpoint_with_host_label_operation;
   14     14   
   15         -
/// Types for the `GreetingWithErrors` operation.
          15  +
/// /* CodegenDelegator.kt:51 */Types for the `GreetingWithErrors` operation.
   16     16   
pub mod greeting_with_errors;
   17     17   
   18         -
/// Types for the `HostWithPathOperation` operation.
          18  +
/// /* CodegenDelegator.kt:51 */Types for the `HostWithPathOperation` operation.
   19     19   
pub mod host_with_path_operation;
   20     20   
   21         -
/// Types for the `JsonUnions` operation.
          21  +
/// /* CodegenDelegator.kt:51 */Types for the `JsonUnions` operation.
   22     22   
pub mod json_unions;
   23     23   
   24         -
/// Types for the `NoInputAndNoOutput` operation.
          24  +
/// /* CodegenDelegator.kt:51 */Types for the `NoInputAndNoOutput` operation.
   25     25   
pub mod no_input_and_no_output;
   26     26   
   27         -
/// Types for the `NoInputAndOutput` operation.
          27  +
/// /* CodegenDelegator.kt:51 */Types for the `NoInputAndOutput` operation.
   28     28   
pub mod no_input_and_output;
   29     29   
   30         -
/// Types for the `OperationWithDefaults` operation.
          30  +
/// /* CodegenDelegator.kt:51 */Types for the `OperationWithDefaults` operation.
   31     31   
pub mod operation_with_defaults;
   32     32   
   33         -
/// Types for the `OperationWithNestedStructure` operation.
          33  +
/// /* CodegenDelegator.kt:51 */Types for the `OperationWithNestedStructure` operation.
   34     34   
pub mod operation_with_nested_structure;
   35     35   
   36         -
/// Types for the `OperationWithRequiredMembers` operation.
          36  +
/// /* CodegenDelegator.kt:51 */Types for the `OperationWithRequiredMembers` operation.
   37     37   
pub mod operation_with_required_members;
   38     38   
   39         -
/// Types for the `PutWithContentEncoding` operation.
          39  +
/// /* CodegenDelegator.kt:51 */Types for the `PutWithContentEncoding` operation.
   40     40   
pub mod put_with_content_encoding;
   41     41   
   42         -
/// Types for the `SimpleScalarProperties` operation.
          42  +
/// /* CodegenDelegator.kt:51 */Types for the `SimpleScalarProperties` operation.
   43     43   
pub mod simple_scalar_properties;

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

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

@@ -1,1 +50,94 @@
    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 ContentTypeParametersInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct ContentTypeParametersInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub value: ::std::option::Option<i32>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl ContentTypeParametersInput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn value(&self) -> ::std::option::Option<i32> {
          20  +
        /* StructureGenerator.kt:168 */
   12     21   
        self.value
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl ContentTypeParametersInput {
   16         -
    /// Creates a new builder-style object to manufacture [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          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 ContentTypeParametersInputBuilder {
   26         -
    pub(crate) value: ::std::option::Option<i32>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) value: ::std::option::Option<i32>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl ContentTypeParametersInputBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* BuilderGenerator.kt:291 */
   30     53   
    pub fn value(mut self, input: i32) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.value = ::std::option::Option::Some(input);
          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_value(mut self, input: ::std::option::Option<i32>) -> Self {
          64  +
        /* BuilderGenerator.kt:315 */
   36     65   
        self.value = 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_value(&self) -> &::std::option::Option<i32> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.value
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(
   45     80   
        self,
   46     81   
    ) -> ::std::result::Result<crate::operation::content_type_parameters::ContentTypeParametersInput, ::aws_smithy_types::error::operation::BuildError>
   47     82   
    {
   48         -
        ::std::result::Result::Ok(crate::operation::content_type_parameters::ContentTypeParametersInput { value: self.value })
          83  +
        /* BuilderGenerator.kt:254 */
          84  +
        ::std::result::Result::Ok(
          85  +
            /* BuilderGenerator.kt:477 */
          86  +
            crate::operation::content_type_parameters::ContentTypeParametersInput {
          87  +
                /* BuilderGenerator.kt:481 */ value: self.value,
          88  +
                /* BuilderGenerator.kt:477 */
          89  +
            }, /* BuilderGenerator.kt:254 */
          90  +
        )
          91  +
        /* BuilderGenerator.kt:253 */
   49     92   
    }
          93  +
    /* BuilderGenerator.kt:355 */
   50     94   
}

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

@@ -1,1 +22,39 @@
    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 ContentTypeParametersOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct ContentTypeParametersOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl ContentTypeParametersOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct ContentTypeParametersOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct ContentTypeParametersOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl ContentTypeParametersOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::content_type_parameters::ContentTypeParametersOutput {
   20         -
        crate::operation::content_type_parameters::ContentTypeParametersOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

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

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