Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +15,19 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* FluentClientGenerator.kt:187 */
    2      3   
impl super::Client {
           4  +
    /* FluentClientGenerator.kt:221 */
    3      5   
    /// Constructs a fluent builder for the [`SingleMemberStructOperation`](crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationFluentBuilder) operation.
    4      6   
    ///
    5      7   
    /// - The fluent builder is configurable:
    6      8   
    ///   - [`message(impl Into<String>)`](crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationFluentBuilder::message) / [`set_message(Option<String>)`](crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationFluentBuilder::set_message):<br>required: **false**<br>(undocumented)<br>
    7      9   
    /// - On success, responds with [`SingleMemberStructOperationOutput`](crate::operation::single_member_struct_operation::SingleMemberStructOperationOutput) with field(s):
    8     10   
    ///   - [`message(Option<String>)`](crate::operation::single_member_struct_operation::SingleMemberStructOperationOutput::message): (undocumented)
    9     11   
    /// - On failure, responds with [`SdkError<SingleMemberStructOperationError>`](crate::operation::single_member_struct_operation::SingleMemberStructOperationError)
          12  +
    /* FluentClientGenerator.kt:234 */
   10     13   
    pub fn single_member_struct_operation(
   11     14   
        &self,
   12     15   
    ) -> crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationFluentBuilder {
   13     16   
        crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationFluentBuilder::new(self.handle.clone())
   14     17   
    }
          18  +
    /* FluentClientGenerator.kt:187 */
   15     19   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/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 rpcv2cbor_extras service client.
           2  +
/* ServiceConfigGenerator.kt:409 */
           3  +
/// /* ServiceConfigGenerator.kt:409 */Configuration for a rpcv2cbor_extras 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 rpcv2cbor_extras::config::Config;
@@ -179,217 +461,511 @@
  199    237   
    /// let mut builder = rpcv2cbor_extras::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 rpcv2cbor_extras::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 = rpcv2cbor_extras::Config::builder().endpoint_resolver(resolver).build();
  257    297   
    /// let client = rpcv2cbor_extras::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 rpcv2cbor_extras::config::Config;
  279    321   
    /// use rpcv2cbor_extras::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 rpcv2cbor_extras::config::{Builder, Config};
  294    336   
    /// use rpcv2cbor_extras::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 rpcv2cbor_extras::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 rpcv2cbor_extras::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 rpcv2cbor_extras::config::Config;
  369    415   
    /// use rpcv2cbor_extras::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 rpcv2cbor_extras::config::{Builder, Config};
  392    438   
    /// use rpcv2cbor_extras::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 = rpcv2cbor_extras::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 +1140,1239 @@
  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())
  949   1024   
                .with_name("rpcv2cbor_extras::config::Config")
  950   1025   
                .freeze(),
  951   1026   
            cloneable: layer,
  952   1027   
            runtime_components: self.runtime_components,
  953   1028   
            runtime_plugins: self.runtime_plugins,
  954   1029   
            behavior_version: self.behavior_version,
        1030  +
            /* ServiceConfigGenerator.kt:567 */
  955   1031   
        }
        1032  +
        /* ServiceConfigGenerator.kt:557 */
  956   1033   
    }
        1034  +
    /* ServiceConfigGenerator.kt:492 */
  957   1035   
}
        1036  +
/* ServiceRuntimePluginGenerator.kt:116 */
  958   1037   
#[derive(::std::fmt::Debug)]
  959   1038   
pub(crate) struct ServiceRuntimePlugin {
  960   1039   
    config: ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer>,
  961   1040   
    runtime_components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  962   1041   
}
  963   1042   
  964   1043   
impl ServiceRuntimePlugin {
  965   1044   
    pub fn new(_service_config: crate::config::Config) -> Self {
  966   1045   
        let config = {
  967   1046   
            let mut cfg = ::aws_smithy_types::config_bag::Layer::new("RpcV2CborService");
  968   1047   
            cfg.store_put(::aws_smithy_runtime::client::orchestrator::AuthSchemeAndEndpointOrchestrationV2);
  969   1048   
            ::std::option::Option::Some(cfg.freeze())
  970   1049   
        };
  971   1050   
        let mut runtime_components = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ServiceRuntimePlugin");
  972   1051   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::rpc_v2_cbor::RpcV2CborFeatureTrackerInterceptor::new());
  973   1052   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
  974   1053   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
  975   1054   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
  976   1055   
        Self { config, runtime_components }
  977   1056   
    }
  978   1057   
}
  979   1058   
  980   1059   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
  981   1060   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
  982   1061   
        self.config.clone()
  983   1062   
    }
  984   1063   
  985   1064   
    fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {
  986   1065   
        ::aws_smithy_runtime_api::client::runtime_plugin::Order::Defaults
  987   1066   
    }
  988   1067   
  989   1068   
    fn runtime_components(
  990   1069   
        &self,
  991   1070   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  992   1071   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  993   1072   
        ::std::borrow::Cow::Borrowed(&self.runtime_components)
  994   1073   
    }
  995   1074   
}
  996   1075   
  997   1076   
/// Cross-operation shared-state singletons
  998   1077   
        1078  +
/* ConfigOverrideRuntimePluginGenerator.kt:42 */
  999   1079   
/// A plugin that enables configuration for a single operation invocation
 1000   1080   
///
 1001   1081   
/// The `config` method will return a `FrozenLayer` by storing values from `config_override`.
 1002   1082   
/// In the case of default values requested, they will be obtained from `client_config`.
 1003   1083   
#[derive(Debug)]
 1004   1084   
pub(crate) struct ConfigOverrideRuntimePlugin {
 1005   1085   
    pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer,
 1006   1086   
    pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1007   1087   
}
 1008   1088   
 1009   1089   
impl ConfigOverrideRuntimePlugin {
 1010   1090   
    #[allow(dead_code)] // unused when a service does not provide any operations
 1011   1091   
    pub(crate) fn new(
 1012   1092   
        config_override: Builder,
 1013   1093   
        initial_config: ::aws_smithy_types::config_bag::FrozenLayer,
 1014   1094   
        initial_components: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1015   1095   
    ) -> Self {
 1016   1096   
        let mut layer = config_override.config;
 1017   1097   
        let mut components = config_override.runtime_components;
 1018   1098   
        #[allow(unused_mut)]
 1019   1099   
        let mut resolver =
 1020   1100   
            ::aws_smithy_runtime::client::config_override::Resolver::overrid(initial_config, initial_components, &mut layer, &mut components);
 1021   1101   
 1022   1102   
        let _ = resolver;
 1023   1103   
        Self {
 1024   1104   
            config: ::aws_smithy_types::config_bag::Layer::from(layer)
 1025   1105   
                .with_name("rpcv2cbor_extras::config::ConfigOverrideRuntimePlugin")
 1026   1106   
                .freeze(),
 1027   1107   
            components,
 1028   1108   
        }
 1029   1109   
    }
 1030   1110   
}
 1031   1111   
 1032   1112   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ConfigOverrideRuntimePlugin {
 1033   1113   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
 1034   1114   
        Some(self.config.clone())
 1035   1115   
    }
 1036   1116   
 1037   1117   
    fn runtime_components(
 1038   1118   
        &self,
 1039   1119   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1040   1120   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
 1041   1121   
        ::std::borrow::Cow::Borrowed(&self.components)
 1042   1122   
    }
 1043   1123   
}
 1044   1124   
        1125  +
/* ClientRuntimeTypesReExportGenerator.kt:24 */
 1045   1126   
pub use ::aws_smithy_runtime::client::identity::IdentityCache;
 1046   1127   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1047   1128   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1048   1129   
        1130  +
/* ResiliencyConfigCustomization.kt:318 */
 1049   1131   
pub use ::aws_smithy_async::rt::sleep::Sleep;
 1050   1132   
        1133  +
/* FluentClientGenerator.kt:261 */
 1051   1134   
pub(crate) fn base_client_runtime_plugins(mut config: crate::Config) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
 1052   1135   
    let mut configured_plugins = ::std::vec::Vec::new();
 1053   1136   
    ::std::mem::swap(&mut config.runtime_plugins, &mut configured_plugins);
 1054   1137   
    #[cfg(feature = "behavior-version-latest")]
 1055   1138   
    {
 1056   1139   
        if config.behavior_version.is_none() {
 1057   1140   
            config.behavior_version = Some(::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion::latest());
 1058   1141   
        }
 1059   1142   
    }
 1060   1143   
 1061   1144   
    let default_retry_partition = "rpcv2cborservice";
 1062   1145   
 1063   1146   
    let scope = "rpcv2cbor_extras";
 1064   1147   
 1065   1148   
    let mut plugins = ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins::new()
 1066   1149   
                        // defaults
 1067   1150   
                        .with_client_plugins(::aws_smithy_runtime::client::defaults::default_plugins(
 1068   1151   
                            ::aws_smithy_runtime::client::defaults::DefaultPluginParams::new()
 1069   1152   
                                .with_retry_partition_name(default_retry_partition)
 1070   1153   
                                .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."))
 1071   1154   
                        ))
 1072   1155   
                        // user config
 1073   1156   
                        .with_client_plugin(
 1074   1157   
                            ::aws_smithy_runtime_api::client::runtime_plugin::StaticRuntimePlugin::new()
 1075   1158   
                                .with_config(config.config.clone())
 1076   1159   
                                .with_runtime_components(config.runtime_components.clone())
 1077   1160   
                        )
 1078   1161   
                        // codegen config
 1079   1162   
                        .with_client_plugin(crate::config::ServiceRuntimePlugin::new(config.clone()))
 1080   1163   
                        .with_client_plugin(::aws_smithy_runtime::client::auth::no_auth::NoAuthRuntimePlugin::new())
 1081   1164   
                        .with_client_plugin(
 1082   1165   
                            ::aws_smithy_runtime::client::metrics::MetricsRuntimePlugin::builder()
 1083   1166   
                                .with_scope(scope)
 1084   1167   
                                .with_time_source(config.runtime_components.time_source().unwrap_or_default())
 1085   1168   
                                .build()
 1086   1169   
                                .expect("All required fields have been set")
 1087   1170   
                        );
 1088   1171   
 1089   1172   
    for plugin in configured_plugins {
 1090   1173   
        plugins = plugins.with_client_plugin(plugin);
 1091   1174   
    }
 1092   1175   
    plugins
 1093   1176   
}
 1094   1177   
        1178  +
/* ClientReExports.kt:17 */
 1095   1179   
pub use ::aws_smithy_types::config_bag::FrozenLayer;
 1096   1180   
        1181  +
/* ClientReExports.kt:17 */
 1097   1182   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder;
 1098   1183   
        1184  +
/* ClientReExports.kt:17 */
 1099   1185   
pub use ::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin;
 1100   1186   
        1187  +
/* ClientReExports.kt:17 */
 1101   1188   
pub use ::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion;
 1102   1189   
        1190  +
/* ClientReExports.kt:17 */
 1103   1191   
pub use ::aws_smithy_runtime_api::client::stalled_stream_protection::StalledStreamProtectionConfig;
 1104   1192   
        1193  +
/* ClientReExports.kt:17 */
 1105   1194   
pub use ::aws_smithy_runtime_api::client::http::SharedHttpClient;
 1106   1195   
        1196  +
/* ClientReExports.kt:17 */
 1107   1197   
pub use ::aws_smithy_async::rt::sleep::SharedAsyncSleep;
 1108   1198   
        1199  +
/* ClientReExports.kt:17 */
 1109   1200   
pub use ::aws_smithy_runtime_api::client::identity::SharedIdentityCache;
 1110   1201   
        1202  +
/* ClientReExports.kt:17 */
 1111   1203   
pub use ::aws_smithy_runtime_api::client::interceptors::SharedInterceptor;
 1112   1204   
        1205  +
/* ClientReExports.kt:17 */
 1113   1206   
pub use ::aws_smithy_runtime_api::client::http::HttpClient;
 1114   1207   
        1208  +
/* ClientReExports.kt:17 */
 1115   1209   
pub use ::aws_smithy_runtime_api::shared::IntoShared;
 1116   1210   
        1211  +
/* ClientReExports.kt:17 */
 1117   1212   
pub use ::aws_smithy_async::rt::sleep::AsyncSleep;
 1118   1213   
        1214  +
/* ClientReExports.kt:17 */
 1119   1215   
pub use ::aws_smithy_runtime_api::client::identity::ResolveCachedIdentity;
 1120   1216   
        1217  +
/* ClientReExports.kt:17 */
 1121   1218   
pub use ::aws_smithy_runtime_api::client::interceptors::Intercept;
 1122   1219   
        1220  +
/* ClientReExports.kt:17 */
 1123   1221   
pub use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
 1124   1222   
        1223  +
/* ClientReExports.kt:17 */
 1125   1224   
pub use ::aws_smithy_types::config_bag::Layer;
 1126   1225   
 1127         -
/// Types needed to configure endpoint resolution.
        1226  +
/// /* ClientRustModule.kt:121 */Types needed to configure endpoint resolution.
 1128   1227   
pub mod endpoint;
 1129   1228   
 1130         -
/// HTTP request and response types.
        1229  +
/// /* ClientRustModule.kt:121 */HTTP request and response types.
 1131   1230   
pub mod http;
 1132   1231   
 1133         -
/// Types needed to implement [`Intercept`](crate::config::Intercept).
        1232  +
/// /* ClientRustModule.kt:121 */Types needed to implement [`Intercept`](crate::config::Intercept).
 1134   1233   
pub mod interceptors;
 1135   1234   
 1136         -
/// Retry configuration.
        1235  +
/// /* ClientRustModule.kt:121 */Retry configuration.
 1137   1236   
pub mod retry;
 1138   1237   
 1139         -
/// Timeout configuration.
        1238  +
/// /* ClientRustModule.kt:121 */Timeout configuration.
 1140   1239   
pub mod timeout;

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

@@ -1,1 +178,276 @@
    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         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
           8  +
pub /* ServiceErrorGenerator.kt:257 */ enum Error {
           9  +
    /// /* ServiceErrorGenerator.kt:259 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
          10  +
    /* ServiceErrorGenerator.kt:262 */
    7     11   
    ValidationError(crate::types::error::ValidationError),
    8         -
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
          12  +
    /// /* ServiceErrorGenerator.kt:264 */An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
          13  +
    /* ServiceErrorGenerator.kt:320 */
    9     14   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
   10     15   
    variable wildcard pattern and check `.code()`:
   11     16   
     \
   12     17   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
   13     18   
     \
   14     19   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
   15         -
    Unhandled(crate::error::sealed_unhandled::Unhandled),
          20  +
    /* ServiceErrorGenerator.kt:266 */
          21  +
    Unhandled(crate::error::sealed_unhandled::Unhandled), /* ServiceErrorGenerator.kt:257 */
   16     22   
}
          23  +
/* ServiceErrorGenerator.kt:131 */
   17     24   
impl ::std::fmt::Display for Error {
          25  +
    /* ServiceErrorGenerator.kt:132 */
   18     26   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          27  +
        /* ServiceErrorGenerator.kt:133 */
   19     28   
        match self {
   20         -
            Error::ValidationError(inner) => inner.fmt(f),
          29  +
            /* ServiceErrorGenerator.kt:135 */ Error::ValidationError(inner) => inner.fmt(f),
          30  +
            /* ServiceErrorGenerator.kt:137 */
   21     31   
            Error::Unhandled(_) => {
   22     32   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
   23     33   
                    write!(f, "unhandled error ({code})")
   24     34   
                } else {
   25     35   
                    f.write_str("unhandled error")
   26     36   
                }
   27         -
            }
          37  +
            } /* ServiceErrorGenerator.kt:133 */
   28     38   
        }
          39  +
        /* ServiceErrorGenerator.kt:132 */
   29     40   
    }
          41  +
    /* ServiceErrorGenerator.kt:131 */
   30     42   
}
          43  +
/* ServiceErrorGenerator.kt:154 */
   31     44   
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
   32     45   
    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
   33     46   
        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   34     47   
            source: value.into(),
   35     48   
            meta: ::std::default::Default::default(),
   36     49   
        })
   37     50   
    }
   38     51   
}
          52  +
/* ServiceErrorGenerator.kt:223 */
   39     53   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
   40     54   
    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
   41     55   
        match self {
   42     56   
            Self::ValidationError(inner) => inner.meta(),
   43     57   
            Self::Unhandled(inner) => &inner.meta,
   44     58   
        }
   45     59   
    }
   46     60   
}
          61  +
/* ServiceErrorGenerator.kt:174 */
   47     62   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::complex_struct_operation::ComplexStructOperationError, R>> for Error
   48     63   
where
   49     64   
    R: Send + Sync + std::fmt::Debug + 'static,
   50     65   
{
          66  +
    /* ServiceErrorGenerator.kt:179 */
   51     67   
    fn from(
   52     68   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::complex_struct_operation::ComplexStructOperationError, R>,
   53     69   
    ) -> Self {
          70  +
        /* ServiceErrorGenerator.kt:184 */
   54     71   
        match err {
          72  +
            /* ServiceErrorGenerator.kt:185 */
   55     73   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
          74  +
            /* ServiceErrorGenerator.kt:186 */
   56     75   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   57     76   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
   58     77   
                source: err.into(),
   59     78   
            }),
          79  +
            /* ServiceErrorGenerator.kt:184 */
   60     80   
        }
          81  +
        /* ServiceErrorGenerator.kt:179 */
   61     82   
    }
          83  +
    /* ServiceErrorGenerator.kt:174 */
   62     84   
}
          85  +
/* ServiceErrorGenerator.kt:202 */
   63     86   
impl From<crate::operation::complex_struct_operation::ComplexStructOperationError> for Error {
          87  +
    /* ServiceErrorGenerator.kt:203 */
   64     88   
    fn from(err: crate::operation::complex_struct_operation::ComplexStructOperationError) -> Self {
          89  +
        /* ServiceErrorGenerator.kt:204 */
   65     90   
        match err {
          91  +
            /* ServiceErrorGenerator.kt:207 */
   66     92   
            crate::operation::complex_struct_operation::ComplexStructOperationError::ValidationError(inner) => Error::ValidationError(inner),
          93  +
            /* ServiceErrorGenerator.kt:212 */
   67     94   
            crate::operation::complex_struct_operation::ComplexStructOperationError::Unhandled(inner) => Error::Unhandled(inner),
          95  +
            /* ServiceErrorGenerator.kt:204 */
   68     96   
        }
          97  +
        /* ServiceErrorGenerator.kt:203 */
   69     98   
    }
          99  +
    /* ServiceErrorGenerator.kt:202 */
   70    100   
}
         101  +
/* ServiceErrorGenerator.kt:174 */
   71    102   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::empty_struct_operation::EmptyStructOperationError, R>> for Error
   72    103   
where
   73    104   
    R: Send + Sync + std::fmt::Debug + 'static,
   74    105   
{
         106  +
    /* ServiceErrorGenerator.kt:179 */
   75    107   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::empty_struct_operation::EmptyStructOperationError, R>) -> Self {
         108  +
        /* ServiceErrorGenerator.kt:184 */
   76    109   
        match err {
         110  +
            /* ServiceErrorGenerator.kt:185 */
   77    111   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         112  +
            /* ServiceErrorGenerator.kt:186 */
   78    113   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   79    114   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
   80    115   
                source: err.into(),
   81    116   
            }),
         117  +
            /* ServiceErrorGenerator.kt:184 */
   82    118   
        }
         119  +
        /* ServiceErrorGenerator.kt:179 */
   83    120   
    }
         121  +
    /* ServiceErrorGenerator.kt:174 */
   84    122   
}
         123  +
/* ServiceErrorGenerator.kt:202 */
   85    124   
impl From<crate::operation::empty_struct_operation::EmptyStructOperationError> for Error {
         125  +
    /* ServiceErrorGenerator.kt:203 */
   86    126   
    fn from(err: crate::operation::empty_struct_operation::EmptyStructOperationError) -> Self {
         127  +
        /* ServiceErrorGenerator.kt:204 */
   87    128   
        match err {
         129  +
            /* ServiceErrorGenerator.kt:212 */
   88    130   
            crate::operation::empty_struct_operation::EmptyStructOperationError::Unhandled(inner) => Error::Unhandled(inner),
         131  +
            /* ServiceErrorGenerator.kt:204 */
   89    132   
        }
         133  +
        /* ServiceErrorGenerator.kt:203 */
   90    134   
    }
         135  +
    /* ServiceErrorGenerator.kt:202 */
   91    136   
}
         137  +
/* ServiceErrorGenerator.kt:174 */
   92    138   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::error_serialization_operation::ErrorSerializationOperationError, R>>
   93    139   
    for Error
   94    140   
where
   95    141   
    R: Send + Sync + std::fmt::Debug + 'static,
   96    142   
{
         143  +
    /* ServiceErrorGenerator.kt:179 */
   97    144   
    fn from(
   98    145   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::error_serialization_operation::ErrorSerializationOperationError, R>,
   99    146   
    ) -> Self {
         147  +
        /* ServiceErrorGenerator.kt:184 */
  100    148   
        match err {
         149  +
            /* ServiceErrorGenerator.kt:185 */
  101    150   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         151  +
            /* ServiceErrorGenerator.kt:186 */
  102    152   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  103    153   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  104    154   
                source: err.into(),
  105    155   
            }),
         156  +
            /* ServiceErrorGenerator.kt:184 */
  106    157   
        }
         158  +
        /* ServiceErrorGenerator.kt:179 */
  107    159   
    }
         160  +
    /* ServiceErrorGenerator.kt:174 */
  108    161   
}
         162  +
/* ServiceErrorGenerator.kt:202 */
  109    163   
impl From<crate::operation::error_serialization_operation::ErrorSerializationOperationError> for Error {
         164  +
    /* ServiceErrorGenerator.kt:203 */
  110    165   
    fn from(err: crate::operation::error_serialization_operation::ErrorSerializationOperationError) -> Self {
         166  +
        /* ServiceErrorGenerator.kt:204 */
  111    167   
        match err {
         168  +
            /* ServiceErrorGenerator.kt:207 */
  112    169   
            crate::operation::error_serialization_operation::ErrorSerializationOperationError::ValidationError(inner) => {
  113    170   
                Error::ValidationError(inner)
  114    171   
            }
         172  +
            /* ServiceErrorGenerator.kt:212 */
  115    173   
            crate::operation::error_serialization_operation::ErrorSerializationOperationError::Unhandled(inner) => Error::Unhandled(inner),
         174  +
            /* ServiceErrorGenerator.kt:204 */
  116    175   
        }
         176  +
        /* ServiceErrorGenerator.kt:203 */
  117    177   
    }
         178  +
    /* ServiceErrorGenerator.kt:202 */
  118    179   
}
         180  +
/* ServiceErrorGenerator.kt:174 */
  119    181   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::simple_struct_operation::SimpleStructOperationError, R>> for Error
  120    182   
where
  121    183   
    R: Send + Sync + std::fmt::Debug + 'static,
  122    184   
{
         185  +
    /* ServiceErrorGenerator.kt:179 */
  123    186   
    fn from(
  124    187   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::simple_struct_operation::SimpleStructOperationError, R>,
  125    188   
    ) -> Self {
         189  +
        /* ServiceErrorGenerator.kt:184 */
  126    190   
        match err {
         191  +
            /* ServiceErrorGenerator.kt:185 */
  127    192   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         193  +
            /* ServiceErrorGenerator.kt:186 */
  128    194   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  129    195   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  130    196   
                source: err.into(),
  131    197   
            }),
         198  +
            /* ServiceErrorGenerator.kt:184 */
  132    199   
        }
         200  +
        /* ServiceErrorGenerator.kt:179 */
  133    201   
    }
         202  +
    /* ServiceErrorGenerator.kt:174 */
  134    203   
}
         204  +
/* ServiceErrorGenerator.kt:202 */
  135    205   
impl From<crate::operation::simple_struct_operation::SimpleStructOperationError> for Error {
         206  +
    /* ServiceErrorGenerator.kt:203 */
  136    207   
    fn from(err: crate::operation::simple_struct_operation::SimpleStructOperationError) -> Self {
         208  +
        /* ServiceErrorGenerator.kt:204 */
  137    209   
        match err {
         210  +
            /* ServiceErrorGenerator.kt:207 */
  138    211   
            crate::operation::simple_struct_operation::SimpleStructOperationError::ValidationError(inner) => Error::ValidationError(inner),
         212  +
            /* ServiceErrorGenerator.kt:212 */
  139    213   
            crate::operation::simple_struct_operation::SimpleStructOperationError::Unhandled(inner) => Error::Unhandled(inner),
         214  +
            /* ServiceErrorGenerator.kt:204 */
  140    215   
        }
         216  +
        /* ServiceErrorGenerator.kt:203 */
  141    217   
    }
         218  +
    /* ServiceErrorGenerator.kt:202 */
  142    219   
}
         220  +
/* ServiceErrorGenerator.kt:174 */
  143    221   
impl<R>
  144    222   
    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::single_member_struct_operation::SingleMemberStructOperationError, R>>
  145    223   
    for Error
  146    224   
where
  147    225   
    R: Send + Sync + std::fmt::Debug + 'static,
  148    226   
{
         227  +
    /* ServiceErrorGenerator.kt:179 */
  149    228   
    fn from(
  150    229   
        err: ::aws_smithy_runtime_api::client::result::SdkError<
  151    230   
            crate::operation::single_member_struct_operation::SingleMemberStructOperationError,
  152    231   
            R,
  153    232   
        >,
  154    233   
    ) -> Self {
         234  +
        /* ServiceErrorGenerator.kt:184 */
  155    235   
        match err {
         236  +
            /* ServiceErrorGenerator.kt:185 */
  156    237   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         238  +
            /* ServiceErrorGenerator.kt:186 */
  157    239   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  158    240   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  159    241   
                source: err.into(),
  160    242   
            }),
         243  +
            /* ServiceErrorGenerator.kt:184 */
  161    244   
        }
         245  +
        /* ServiceErrorGenerator.kt:179 */
  162    246   
    }
         247  +
    /* ServiceErrorGenerator.kt:174 */
  163    248   
}
         249  +
/* ServiceErrorGenerator.kt:202 */
  164    250   
impl From<crate::operation::single_member_struct_operation::SingleMemberStructOperationError> for Error {
         251  +
    /* ServiceErrorGenerator.kt:203 */
  165    252   
    fn from(err: crate::operation::single_member_struct_operation::SingleMemberStructOperationError) -> Self {
         253  +
        /* ServiceErrorGenerator.kt:204 */
  166    254   
        match err {
         255  +
            /* ServiceErrorGenerator.kt:212 */
  167    256   
            crate::operation::single_member_struct_operation::SingleMemberStructOperationError::Unhandled(inner) => Error::Unhandled(inner),
         257  +
            /* ServiceErrorGenerator.kt:204 */
  168    258   
        }
         259  +
        /* ServiceErrorGenerator.kt:203 */
  169    260   
    }
         261  +
    /* ServiceErrorGenerator.kt:202 */
  170    262   
}
         263  +
/* ServiceErrorGenerator.kt:115 */
  171    264   
impl ::std::error::Error for Error {
         265  +
    /* ServiceErrorGenerator.kt:116 */
  172    266   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         267  +
        /* ServiceErrorGenerator.kt:117 */
  173    268   
        match self {
  174         -
            Error::ValidationError(inner) => inner.source(),
  175         -
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
         269  +
            /* ServiceErrorGenerator.kt:119 */ Error::ValidationError(inner) => inner.source(),
         270  +
            /* ServiceErrorGenerator.kt:121 */
         271  +
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source), /* ServiceErrorGenerator.kt:117 */
  176    272   
        }
         273  +
        /* ServiceErrorGenerator.kt:116 */
  177    274   
    }
         275  +
    /* ServiceErrorGenerator.kt:115 */
  178    276   
}

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

@@ -18,18 +132,142 @@
   38     38   
//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule
   39     39   
//! is the input, output, and error type for that API, as well as builders to construct each of those.
   40     40   
//!
   41     41   
//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the
   42     42   
//! client can return. Any other error type can be converted to this `Error` type via the
   43     43   
//! [`From`](std::convert::From) trait.
   44     44   
//!
   45     45   
//! The other modules within this crate are not required for normal usage.
   46     46   
   47     47   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
          48  +
/* ServiceErrorGenerator.kt:127 */
   48     49   
pub use error_meta::Error;
   49     50   
          51  +
/* RustType.kt:516 */
   50     52   
#[doc(inline)]
          53  +
/* ServiceGenerator.kt:63 */
   51     54   
pub use config::Config;
   52     55   
   53         -
/// Client for calling the service.
          56  +
/// /* FluentClientDocs.kt:24 */Client for calling the service.
   54     57   
///
   55     58   
/// ## Constructing a `Client`
   56     59   
///
   57     60   
/// A `Client` requires a config in order to be constructed. With the default set of Cargo features,
   58     61   
/// this config will only require an endpoint to produce a functioning client. However, some Smithy
   59     62   
/// features will require additional configuration. For example, `@auth` requires some kind of identity
   60     63   
/// or identity resolver to be configured. The config is used to customize various aspects of the client,
   61     64   
/// such as:
   62     65   
///
   63     66   
///   - [The underlying HTTP client](crate::config::Builder::http_client)
   64     67   
///   - [Retries](crate::config::Builder::retry_config)
   65     68   
///   - [Timeouts](crate::config::Builder::timeout_config)
   66     69   
///   - [... and more](crate::config::Builder)
   67     70   
///
   68     71   
/// Below is a minimal example of how to create a client:
   69     72   
///
   70     73   
/// ```rust,no_run
   71     74   
/// let config = rpcv2cbor_extras::Config::builder()
   72     75   
///     .endpoint_url("http://localhost:1234")
   73     76   
///     .build();
   74     77   
/// let client = rpcv2cbor_extras::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 [`ErrorSerializationOperation`](crate::operation::error_serialization_operation) operation has
   84     87   
/// a [`Client::error_serialization_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.error_serialization_operation()
   90     93   
///     .string("example")
   91     94   
///     .send()
   92     95   
///     .await;
   93     96   
/// ```
   94     97   
///
   95     98   
/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
   96     99   
/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
   97    100   
/// information.
   98    101   
pub mod client;
   99    102   
  100         -
/// Configuration for the service.
         103  +
/// /* ClientRustModule.kt:121 */Configuration for the service.
  101    104   
pub mod config;
  102    105   
  103         -
/// Common errors and error handling utilities.
         106  +
/// /* ClientRustModule.kt:121 */Common errors and error handling utilities.
  104    107   
pub mod error;
  105    108   
         109  +
/* RustModule.kt:172 */
  106    110   
mod error_meta;
  107    111   
  108         -
/// Information about this crate.
         112  +
/// /* ClientRustModule.kt:121 */Information about this crate.
  109    113   
pub mod meta;
  110    114   
  111         -
/// Primitives such as `Blob` or `DateTime` used by other types.
         115  +
/// /* ClientRustModule.kt:121 */Primitives such as `Blob` or `DateTime` used by other types.
  112    116   
pub mod primitives;
  113    117   
  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   
  119         -
/// All operations that this crate can perform.
         124  +
/// /* ClientRustModule.kt:121 */All operations that this crate can perform.
  120    125   
pub mod operation;
  121    126   
  122    127   
pub(crate) mod protocol_serde;
  123    128   
         129  +
/* RustModule.kt:172 */
  124    130   
mod sdk_feature_tracker;
  125    131   
         132  +
/* RustModule.kt:172 */
  126    133   
mod serialization_settings;
  127    134   
         135  +
/* RustModule.kt:172 */
  128    136   
mod cbor_errors;
  129    137   
         138  +
/* RustModule.kt:172 */
  130    139   
mod serde_util;
  131    140   
         141  +
/* FluentClientDecorator.kt:76 */
  132    142   
pub use client::Client;

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

@@ -1,1 +16,16 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Types for the `ComplexStructOperation` operation.
           2  +
/* CodegenDelegator.kt:51 */
           3  +
/// /* CodegenDelegator.kt:51 */Types for the `ComplexStructOperation` operation.
    4      4   
pub mod complex_struct_operation;
    5      5   
    6         -
/// Types for the `EmptyStructOperation` operation.
           6  +
/// /* CodegenDelegator.kt:51 */Types for the `EmptyStructOperation` operation.
    7      7   
pub mod empty_struct_operation;
    8      8   
    9         -
/// Types for the `ErrorSerializationOperation` operation.
           9  +
/// /* CodegenDelegator.kt:51 */Types for the `ErrorSerializationOperation` operation.
   10     10   
pub mod error_serialization_operation;
   11     11   
   12         -
/// Types for the `SimpleStructOperation` operation.
          12  +
/// /* CodegenDelegator.kt:51 */Types for the `SimpleStructOperation` operation.
   13     13   
pub mod simple_struct_operation;
   14     14   
   15         -
/// Types for the `SingleMemberStructOperation` operation.
          15  +
/// /* CodegenDelegator.kt:51 */Types for the `SingleMemberStructOperation` operation.
   16     16   
pub mod single_member_struct_operation;

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

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

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

@@ -1,1 +292,517 @@
    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 ComplexStructOperationInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct ComplexStructOperationInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub structure: ::std::option::Option<crate::types::SimpleStruct>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub empty_structure: ::std::option::Option<crate::types::EmptyStruct>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13     20   
    pub map: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
          21  +
    /* StructureGenerator.kt:231 */
   14     22   
    #[allow(missing_docs)] // documentation missing in model
   15     23   
    pub union: ::std::option::Option<crate::types::SimpleUnion>,
          24  +
    /* StructureGenerator.kt:231 */
   16     25   
    #[allow(missing_docs)] // documentation missing in model
   17     26   
    pub unit_union: ::std::option::Option<crate::types::UnitUnion>,
          27  +
    /* StructureGenerator.kt:231 */
   18     28   
    #[allow(missing_docs)] // documentation missing in model
   19     29   
    pub structure_list: ::std::option::Option<::std::vec::Vec<crate::types::SimpleStruct>>,
          30  +
    /* StructureGenerator.kt:231 */
   20     31   
    #[allow(missing_docs)] // documentation missing in model
   21     32   
    pub complex_list: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>>,
          33  +
    /* StructureGenerator.kt:231 */
   22     34   
    #[allow(missing_docs)] // documentation missing in model
   23     35   
    pub complex_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>,
          36  +
    /* StructureGenerator.kt:231 */
   24     37   
    #[allow(missing_docs)] // documentation missing in model
   25     38   
    pub complex_union: ::std::option::Option<::std::boxed::Box<crate::types::ComplexUnion>>,
          39  +
    /* StructureGenerator.kt:201 */
   26     40   
}
          41  +
/* StructureGenerator.kt:135 */
   27     42   
impl ComplexStructOperationInput {
          43  +
    /* StructureGenerator.kt:231 */
   28     44   
    #[allow(missing_docs)] // documentation missing in model
          45  +
                           /* StructureGenerator.kt:166 */
   29     46   
    pub fn structure(&self) -> ::std::option::Option<&crate::types::SimpleStruct> {
          47  +
        /* StructureGenerator.kt:170 */
   30     48   
        self.structure.as_ref()
          49  +
        /* StructureGenerator.kt:166 */
   31     50   
    }
          51  +
    /* StructureGenerator.kt:231 */
   32     52   
    #[allow(missing_docs)] // documentation missing in model
          53  +
                           /* StructureGenerator.kt:166 */
   33     54   
    pub fn empty_structure(&self) -> ::std::option::Option<&crate::types::EmptyStruct> {
          55  +
        /* StructureGenerator.kt:170 */
   34     56   
        self.empty_structure.as_ref()
          57  +
        /* StructureGenerator.kt:166 */
   35     58   
    }
          59  +
    /* StructureGenerator.kt:231 */
   36     60   
    #[allow(missing_docs)] // documentation missing in model
   37         -
    ///
   38         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.list.is_none()`.
          61  +
    /// /* StructureGenerator.kt:162 */
          62  +
    /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.list.is_none()`.
          63  +
    /* StructureGenerator.kt:166 */
   39     64   
    pub fn list(&self) -> &[::std::string::String] {
   40         -
        self.list.as_deref().unwrap_or_default()
          65  +
        /* StructureGenerator.kt:169 */
          66  +
        self.list
          67  +
            .as_deref()
          68  +
            /* StructureGenerator.kt:175 */
          69  +
            .unwrap_or_default()
          70  +
        /* StructureGenerator.kt:166 */
   41     71   
    }
          72  +
    /* StructureGenerator.kt:231 */
   42     73   
    #[allow(missing_docs)] // documentation missing in model
          74  +
                           /* StructureGenerator.kt:166 */
   43     75   
    pub fn map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, i32>> {
          76  +
        /* StructureGenerator.kt:170 */
   44     77   
        self.map.as_ref()
          78  +
        /* StructureGenerator.kt:166 */
   45     79   
    }
          80  +
    /* StructureGenerator.kt:231 */
   46     81   
    #[allow(missing_docs)] // documentation missing in model
          82  +
                           /* StructureGenerator.kt:166 */
   47     83   
    pub fn union(&self) -> ::std::option::Option<&crate::types::SimpleUnion> {
          84  +
        /* StructureGenerator.kt:170 */
   48     85   
        self.union.as_ref()
          86  +
        /* StructureGenerator.kt:166 */
   49     87   
    }
          88  +
    /* StructureGenerator.kt:231 */
   50     89   
    #[allow(missing_docs)] // documentation missing in model
          90  +
                           /* StructureGenerator.kt:166 */
   51     91   
    pub fn unit_union(&self) -> ::std::option::Option<&crate::types::UnitUnion> {
          92  +
        /* StructureGenerator.kt:170 */
   52     93   
        self.unit_union.as_ref()
          94  +
        /* StructureGenerator.kt:166 */
   53     95   
    }
          96  +
    /* StructureGenerator.kt:231 */
   54     97   
    #[allow(missing_docs)] // documentation missing in model
   55         -
    ///
   56         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.structure_list.is_none()`.
          98  +
    /// /* StructureGenerator.kt:162 */
          99  +
    /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.structure_list.is_none()`.
         100  +
    /* StructureGenerator.kt:166 */
   57    101   
    pub fn structure_list(&self) -> &[crate::types::SimpleStruct] {
   58         -
        self.structure_list.as_deref().unwrap_or_default()
   59         -
    }
   60         -
    #[allow(missing_docs)] // documentation missing in model
   61         -
    ///
   62         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.complex_list.is_none()`.
         102  +
        /* StructureGenerator.kt:169 */
         103  +
        self.structure_list
         104  +
            .as_deref()
         105  +
            /* StructureGenerator.kt:175 */
         106  +
            .unwrap_or_default()
         107  +
        /* StructureGenerator.kt:166 */
         108  +
    }
         109  +
    /* StructureGenerator.kt:231 */
         110  +
    #[allow(missing_docs)] // documentation missing in model
         111  +
    /// /* StructureGenerator.kt:162 */
         112  +
    /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.complex_list.is_none()`.
         113  +
    /* StructureGenerator.kt:166 */
   63    114   
    pub fn complex_list(&self) -> &[::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>] {
   64         -
        self.complex_list.as_deref().unwrap_or_default()
         115  +
        /* StructureGenerator.kt:169 */
         116  +
        self.complex_list
         117  +
            .as_deref()
         118  +
            /* StructureGenerator.kt:175 */
         119  +
            .unwrap_or_default()
         120  +
        /* StructureGenerator.kt:166 */
   65    121   
    }
         122  +
    /* StructureGenerator.kt:231 */
   66    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* StructureGenerator.kt:166 */
   67    125   
    pub fn complex_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>> {
         126  +
        /* StructureGenerator.kt:170 */
   68    127   
        self.complex_map.as_ref()
         128  +
        /* StructureGenerator.kt:166 */
   69    129   
    }
         130  +
    /* StructureGenerator.kt:231 */
   70    131   
    #[allow(missing_docs)] // documentation missing in model
         132  +
                           /* StructureGenerator.kt:166 */
   71    133   
    pub fn complex_union(&self) -> ::std::option::Option<&crate::types::ComplexUnion> {
         134  +
        /* StructureGenerator.kt:169 */
   72    135   
        self.complex_union.as_deref()
         136  +
        /* StructureGenerator.kt:166 */
   73    137   
    }
         138  +
    /* StructureGenerator.kt:135 */
   74    139   
}
         140  +
/* ClientCodegenVisitor.kt:237 */
   75    141   
impl ComplexStructOperationInput {
   76         -
    /// Creates a new builder-style object to manufacture [`ComplexStructOperationInput`](crate::operation::complex_struct_operation::ComplexStructOperationInput).
         142  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ComplexStructOperationInput`](crate::operation::complex_struct_operation::ComplexStructOperationInput).
         143  +
    /* BuilderGenerator.kt:175 */
   77    144   
    pub fn builder() -> crate::operation::complex_struct_operation::builders::ComplexStructOperationInputBuilder {
         145  +
        /* BuilderGenerator.kt:176 */
   78    146   
        crate::operation::complex_struct_operation::builders::ComplexStructOperationInputBuilder::default()
         147  +
        /* BuilderGenerator.kt:175 */
   79    148   
    }
         149  +
    /* ClientCodegenVisitor.kt:237 */
   80    150   
}
   81    151   
   82         -
/// A builder for [`ComplexStructOperationInput`](crate::operation::complex_struct_operation::ComplexStructOperationInput).
         152  +
/// /* BuilderGenerator.kt:342 */A builder for [`ComplexStructOperationInput`](crate::operation::complex_struct_operation::ComplexStructOperationInput).
         153  +
/* RustType.kt:516 */
   83    154   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         155  +
/* RustType.kt:516 */
   84    156   
#[non_exhaustive]
         157  +
/* BuilderGenerator.kt:345 */
   85    158   
pub struct ComplexStructOperationInputBuilder {
   86         -
    pub(crate) structure: ::std::option::Option<crate::types::SimpleStruct>,
   87         -
    pub(crate) empty_structure: ::std::option::Option<crate::types::EmptyStruct>,
   88         -
    pub(crate) list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
   89         -
    pub(crate) map: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
   90         -
    pub(crate) union: ::std::option::Option<crate::types::SimpleUnion>,
   91         -
    pub(crate) unit_union: ::std::option::Option<crate::types::UnitUnion>,
   92         -
    pub(crate) structure_list: ::std::option::Option<::std::vec::Vec<crate::types::SimpleStruct>>,
         159  +
    /* BuilderGenerator.kt:275 */ pub(crate) structure: ::std::option::Option<crate::types::SimpleStruct>,
         160  +
    /* BuilderGenerator.kt:275 */ pub(crate) empty_structure: ::std::option::Option<crate::types::EmptyStruct>,
         161  +
    /* BuilderGenerator.kt:275 */ pub(crate) list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         162  +
    /* BuilderGenerator.kt:275 */ pub(crate) map: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
         163  +
    /* BuilderGenerator.kt:275 */ pub(crate) union: ::std::option::Option<crate::types::SimpleUnion>,
         164  +
    /* BuilderGenerator.kt:275 */ pub(crate) unit_union: ::std::option::Option<crate::types::UnitUnion>,
         165  +
    /* BuilderGenerator.kt:275 */ pub(crate) structure_list: ::std::option::Option<::std::vec::Vec<crate::types::SimpleStruct>>,
         166  +
    /* BuilderGenerator.kt:275 */
   93    167   
    pub(crate) complex_list: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>>,
         168  +
    /* BuilderGenerator.kt:275 */
   94    169   
    pub(crate) complex_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>,
         170  +
    /* BuilderGenerator.kt:275 */
   95    171   
    pub(crate) complex_union: ::std::option::Option<::std::boxed::Box<crate::types::ComplexUnion>>,
         172  +
    /* BuilderGenerator.kt:345 */
   96    173   
}
         174  +
/* BuilderGenerator.kt:355 */
   97    175   
impl ComplexStructOperationInputBuilder {
         176  +
    /* BuilderGenerator.kt:286 */
   98    177   
    #[allow(missing_docs)] // documentation missing in model
         178  +
                           /* BuilderGenerator.kt:291 */
   99    179   
    pub fn structure(mut self, input: crate::types::SimpleStruct) -> Self {
         180  +
        /* BuilderGenerator.kt:292 */
  100    181   
        self.structure = ::std::option::Option::Some(input);
         182  +
        /* BuilderGenerator.kt:293 */
  101    183   
        self
         184  +
        /* BuilderGenerator.kt:291 */
  102    185   
    }
         186  +
    /* BuilderGenerator.kt:312 */
  103    187   
    #[allow(missing_docs)] // documentation missing in model
         188  +
                           /* BuilderGenerator.kt:314 */
  104    189   
    pub fn set_structure(mut self, input: ::std::option::Option<crate::types::SimpleStruct>) -> Self {
         190  +
        /* BuilderGenerator.kt:315 */
  105    191   
        self.structure = input;
  106    192   
        self
         193  +
        /* BuilderGenerator.kt:314 */
  107    194   
    }
         195  +
    /* BuilderGenerator.kt:334 */
  108    196   
    #[allow(missing_docs)] // documentation missing in model
         197  +
                           /* BuilderGenerator.kt:336 */
  109    198   
    pub fn get_structure(&self) -> &::std::option::Option<crate::types::SimpleStruct> {
         199  +
        /* BuilderGenerator.kt:337 */
  110    200   
        &self.structure
         201  +
        /* BuilderGenerator.kt:336 */
  111    202   
    }
         203  +
    /* BuilderGenerator.kt:286 */
  112    204   
    #[allow(missing_docs)] // documentation missing in model
         205  +
                           /* BuilderGenerator.kt:291 */
  113    206   
    pub fn empty_structure(mut self, input: crate::types::EmptyStruct) -> Self {
         207  +
        /* BuilderGenerator.kt:292 */
  114    208   
        self.empty_structure = ::std::option::Option::Some(input);
         209  +
        /* BuilderGenerator.kt:293 */
  115    210   
        self
         211  +
        /* BuilderGenerator.kt:291 */
  116    212   
    }
         213  +
    /* BuilderGenerator.kt:312 */
  117    214   
    #[allow(missing_docs)] // documentation missing in model
         215  +
                           /* BuilderGenerator.kt:314 */
  118    216   
    pub fn set_empty_structure(mut self, input: ::std::option::Option<crate::types::EmptyStruct>) -> Self {
         217  +
        /* BuilderGenerator.kt:315 */
  119    218   
        self.empty_structure = input;
  120    219   
        self
         220  +
        /* BuilderGenerator.kt:314 */
  121    221   
    }
         222  +
    /* BuilderGenerator.kt:334 */
  122    223   
    #[allow(missing_docs)] // documentation missing in model
         224  +
                           /* BuilderGenerator.kt:336 */
  123    225   
    pub fn get_empty_structure(&self) -> &::std::option::Option<crate::types::EmptyStruct> {
         226  +
        /* BuilderGenerator.kt:337 */
  124    227   
        &self.empty_structure
         228  +
        /* BuilderGenerator.kt:336 */
  125    229   
    }
  126         -
    /// Appends an item to `list`.
         230  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `list`.
         231  +
    /* BuilderGenerator.kt:411 */
  127    232   
    ///
  128         -
    /// To override the contents of this collection use [`set_list`](Self::set_list).
         233  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_list`](Self::set_list).
         234  +
    /* BuilderGenerator.kt:413 */
  129    235   
    ///
         236  +
    /* BuilderGenerator.kt:418 */
  130    237   
    pub fn list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         238  +
        /* BuilderGenerator.kt:419 */
  131    239   
        let mut v = self.list.unwrap_or_default();
  132    240   
        v.push(input.into());
  133    241   
        self.list = ::std::option::Option::Some(v);
  134    242   
        self
         243  +
        /* BuilderGenerator.kt:418 */
  135    244   
    }
         245  +
    /* BuilderGenerator.kt:312 */
  136    246   
    #[allow(missing_docs)] // documentation missing in model
         247  +
                           /* BuilderGenerator.kt:314 */
  137    248   
    pub fn set_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         249  +
        /* BuilderGenerator.kt:315 */
  138    250   
        self.list = input;
  139    251   
        self
         252  +
        /* BuilderGenerator.kt:314 */
  140    253   
    }
         254  +
    /* BuilderGenerator.kt:334 */
  141    255   
    #[allow(missing_docs)] // documentation missing in model
         256  +
                           /* BuilderGenerator.kt:336 */
  142    257   
    pub fn get_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         258  +
        /* BuilderGenerator.kt:337 */
  143    259   
        &self.list
         260  +
        /* BuilderGenerator.kt:336 */
  144    261   
    }
  145         -
    /// Adds a key-value pair to `map`.
         262  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `map`.
         263  +
    /* BuilderGenerator.kt:437 */
  146    264   
    ///
  147         -
    /// To override the contents of this collection use [`set_map`](Self::set_map).
         265  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_map`](Self::set_map).
         266  +
    /* BuilderGenerator.kt:439 */
  148    267   
    ///
         268  +
    /* BuilderGenerator.kt:445 */
  149    269   
    pub fn map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: i32) -> Self {
         270  +
        /* BuilderGenerator.kt:448 */
  150    271   
        let mut hash_map = self.map.unwrap_or_default();
  151    272   
        hash_map.insert(k.into(), v);
  152    273   
        self.map = ::std::option::Option::Some(hash_map);
  153    274   
        self
         275  +
        /* BuilderGenerator.kt:445 */
  154    276   
    }
         277  +
    /* BuilderGenerator.kt:312 */
  155    278   
    #[allow(missing_docs)] // documentation missing in model
         279  +
                           /* BuilderGenerator.kt:314 */
  156    280   
    pub fn set_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>) -> Self {
         281  +
        /* BuilderGenerator.kt:315 */
  157    282   
        self.map = input;
  158    283   
        self
         284  +
        /* BuilderGenerator.kt:314 */
  159    285   
    }
         286  +
    /* BuilderGenerator.kt:334 */
  160    287   
    #[allow(missing_docs)] // documentation missing in model
         288  +
                           /* BuilderGenerator.kt:336 */
  161    289   
    pub fn get_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, i32>> {
         290  +
        /* BuilderGenerator.kt:337 */
  162    291   
        &self.map
         292  +
        /* BuilderGenerator.kt:336 */
  163    293   
    }
         294  +
    /* BuilderGenerator.kt:286 */
  164    295   
    #[allow(missing_docs)] // documentation missing in model
         296  +
                           /* BuilderGenerator.kt:291 */
  165    297   
    pub fn union(mut self, input: crate::types::SimpleUnion) -> Self {
         298  +
        /* BuilderGenerator.kt:292 */
  166    299   
        self.union = ::std::option::Option::Some(input);
         300  +
        /* BuilderGenerator.kt:293 */
  167    301   
        self
         302  +
        /* BuilderGenerator.kt:291 */
  168    303   
    }
         304  +
    /* BuilderGenerator.kt:312 */
  169    305   
    #[allow(missing_docs)] // documentation missing in model
         306  +
                           /* BuilderGenerator.kt:314 */
  170    307   
    pub fn set_union(mut self, input: ::std::option::Option<crate::types::SimpleUnion>) -> Self {
         308  +
        /* BuilderGenerator.kt:315 */
  171    309   
        self.union = input;
  172    310   
        self
         311  +
        /* BuilderGenerator.kt:314 */
  173    312   
    }
         313  +
    /* BuilderGenerator.kt:334 */
  174    314   
    #[allow(missing_docs)] // documentation missing in model
         315  +
                           /* BuilderGenerator.kt:336 */
  175    316   
    pub fn get_union(&self) -> &::std::option::Option<crate::types::SimpleUnion> {
         317  +
        /* BuilderGenerator.kt:337 */
  176    318   
        &self.union
         319  +
        /* BuilderGenerator.kt:336 */
  177    320   
    }
         321  +
    /* BuilderGenerator.kt:286 */
  178    322   
    #[allow(missing_docs)] // documentation missing in model
         323  +
                           /* BuilderGenerator.kt:291 */
  179    324   
    pub fn unit_union(mut self, input: crate::types::UnitUnion) -> Self {
         325  +
        /* BuilderGenerator.kt:292 */
  180    326   
        self.unit_union = ::std::option::Option::Some(input);
         327  +
        /* BuilderGenerator.kt:293 */
  181    328   
        self
         329  +
        /* BuilderGenerator.kt:291 */
  182    330   
    }
         331  +
    /* BuilderGenerator.kt:312 */
  183    332   
    #[allow(missing_docs)] // documentation missing in model
         333  +
                           /* BuilderGenerator.kt:314 */
  184    334   
    pub fn set_unit_union(mut self, input: ::std::option::Option<crate::types::UnitUnion>) -> Self {
         335  +
        /* BuilderGenerator.kt:315 */
  185    336   
        self.unit_union = input;
  186    337   
        self
         338  +
        /* BuilderGenerator.kt:314 */
  187    339   
    }
         340  +
    /* BuilderGenerator.kt:334 */
  188    341   
    #[allow(missing_docs)] // documentation missing in model
         342  +
                           /* BuilderGenerator.kt:336 */
  189    343   
    pub fn get_unit_union(&self) -> &::std::option::Option<crate::types::UnitUnion> {
         344  +
        /* BuilderGenerator.kt:337 */
  190    345   
        &self.unit_union
         346  +
        /* BuilderGenerator.kt:336 */
  191    347   
    }
  192         -
    /// Appends an item to `structure_list`.
         348  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `structure_list`.
         349  +
    /* BuilderGenerator.kt:411 */
  193    350   
    ///
  194         -
    /// To override the contents of this collection use [`set_structure_list`](Self::set_structure_list).
         351  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_structure_list`](Self::set_structure_list).
         352  +
    /* BuilderGenerator.kt:413 */
  195    353   
    ///
         354  +
    /* BuilderGenerator.kt:418 */
  196    355   
    pub fn structure_list(mut self, input: crate::types::SimpleStruct) -> Self {
         356  +
        /* BuilderGenerator.kt:419 */
  197    357   
        let mut v = self.structure_list.unwrap_or_default();
  198    358   
        v.push(input);
  199    359   
        self.structure_list = ::std::option::Option::Some(v);
  200    360   
        self
         361  +
        /* BuilderGenerator.kt:418 */
  201    362   
    }
         363  +
    /* BuilderGenerator.kt:312 */
  202    364   
    #[allow(missing_docs)] // documentation missing in model
         365  +
                           /* BuilderGenerator.kt:314 */
  203    366   
    pub fn set_structure_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SimpleStruct>>) -> Self {
         367  +
        /* BuilderGenerator.kt:315 */
  204    368   
        self.structure_list = input;
  205    369   
        self
         370  +
        /* BuilderGenerator.kt:314 */
  206    371   
    }
         372  +
    /* BuilderGenerator.kt:334 */
  207    373   
    #[allow(missing_docs)] // documentation missing in model
         374  +
                           /* BuilderGenerator.kt:336 */
  208    375   
    pub fn get_structure_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SimpleStruct>> {
         376  +
        /* BuilderGenerator.kt:337 */
  209    377   
        &self.structure_list
         378  +
        /* BuilderGenerator.kt:336 */
  210    379   
    }
  211         -
    /// Appends an item to `complex_list`.
         380  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `complex_list`.
         381  +
    /* BuilderGenerator.kt:411 */
  212    382   
    ///
  213         -
    /// To override the contents of this collection use [`set_complex_list`](Self::set_complex_list).
         383  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_complex_list`](Self::set_complex_list).
         384  +
    /* BuilderGenerator.kt:413 */
  214    385   
    ///
         386  +
    /* BuilderGenerator.kt:418 */
  215    387   
    pub fn complex_list(mut self, input: ::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>) -> Self {
         388  +
        /* BuilderGenerator.kt:419 */
  216    389   
        let mut v = self.complex_list.unwrap_or_default();
  217    390   
        v.push(input);
  218    391   
        self.complex_list = ::std::option::Option::Some(v);
  219    392   
        self
         393  +
        /* BuilderGenerator.kt:418 */
  220    394   
    }
         395  +
    /* BuilderGenerator.kt:312 */
  221    396   
    #[allow(missing_docs)] // documentation missing in model
         397  +
                           /* BuilderGenerator.kt:314 */
  222    398   
    pub fn set_complex_list(
  223    399   
        mut self,
  224    400   
        input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>>,
  225    401   
    ) -> Self {
         402  +
        /* BuilderGenerator.kt:315 */
  226    403   
        self.complex_list = input;
  227    404   
        self
         405  +
        /* BuilderGenerator.kt:314 */
  228    406   
    }
         407  +
    /* BuilderGenerator.kt:334 */
  229    408   
    #[allow(missing_docs)] // documentation missing in model
         409  +
                           /* BuilderGenerator.kt:336 */
  230    410   
    pub fn get_complex_list(
  231    411   
        &self,
  232    412   
    ) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>> {
         413  +
        /* BuilderGenerator.kt:337 */
  233    414   
        &self.complex_list
         415  +
        /* BuilderGenerator.kt:336 */
  234    416   
    }
  235         -
    /// Adds a key-value pair to `complex_map`.
         417  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `complex_map`.
         418  +
    /* BuilderGenerator.kt:437 */
  236    419   
    ///
  237         -
    /// To override the contents of this collection use [`set_complex_map`](Self::set_complex_map).
         420  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_complex_map`](Self::set_complex_map).
         421  +
    /* BuilderGenerator.kt:439 */
  238    422   
    ///
         423  +
    /* BuilderGenerator.kt:445 */
  239    424   
    pub fn complex_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ComplexUnion) -> Self {
         425  +
        /* BuilderGenerator.kt:448 */
  240    426   
        let mut hash_map = self.complex_map.unwrap_or_default();
  241    427   
        hash_map.insert(k.into(), v);
  242    428   
        self.complex_map = ::std::option::Option::Some(hash_map);
  243    429   
        self
         430  +
        /* BuilderGenerator.kt:445 */
  244    431   
    }
         432  +
    /* BuilderGenerator.kt:312 */
  245    433   
    #[allow(missing_docs)] // documentation missing in model
         434  +
                           /* BuilderGenerator.kt:314 */
  246    435   
    pub fn set_complex_map(
  247    436   
        mut self,
  248    437   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>,
  249    438   
    ) -> Self {
         439  +
        /* BuilderGenerator.kt:315 */
  250    440   
        self.complex_map = input;
  251    441   
        self
         442  +
        /* BuilderGenerator.kt:314 */
  252    443   
    }
         444  +
    /* BuilderGenerator.kt:334 */
  253    445   
    #[allow(missing_docs)] // documentation missing in model
         446  +
                           /* BuilderGenerator.kt:336 */
  254    447   
    pub fn get_complex_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>> {
         448  +
        /* BuilderGenerator.kt:337 */
  255    449   
        &self.complex_map
         450  +
        /* BuilderGenerator.kt:336 */
  256    451   
    }
         452  +
    /* BuilderGenerator.kt:286 */
  257    453   
    #[allow(missing_docs)] // documentation missing in model
  258         -
    /// This field is required.
         454  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         455  +
    /* BuilderGenerator.kt:291 */
  259    456   
    pub fn complex_union(mut self, input: impl ::std::convert::Into<::std::boxed::Box<crate::types::ComplexUnion>>) -> Self {
         457  +
        /* BuilderGenerator.kt:292 */
  260    458   
        self.complex_union = ::std::option::Option::Some(input.into());
         459  +
        /* BuilderGenerator.kt:293 */
  261    460   
        self
         461  +
        /* BuilderGenerator.kt:291 */
  262    462   
    }
         463  +
    /* BuilderGenerator.kt:312 */
  263    464   
    #[allow(missing_docs)] // documentation missing in model
         465  +
                           /* BuilderGenerator.kt:314 */
  264    466   
    pub fn set_complex_union(mut self, input: ::std::option::Option<::std::boxed::Box<crate::types::ComplexUnion>>) -> Self {
         467  +
        /* BuilderGenerator.kt:315 */
  265    468   
        self.complex_union = input;
  266    469   
        self
         470  +
        /* BuilderGenerator.kt:314 */
  267    471   
    }
         472  +
    /* BuilderGenerator.kt:334 */
  268    473   
    #[allow(missing_docs)] // documentation missing in model
         474  +
                           /* BuilderGenerator.kt:336 */
  269    475   
    pub fn get_complex_union(&self) -> &::std::option::Option<::std::boxed::Box<crate::types::ComplexUnion>> {
         476  +
        /* BuilderGenerator.kt:337 */
  270    477   
        &self.complex_union
         478  +
        /* BuilderGenerator.kt:336 */
  271    479   
    }
  272         -
    /// Consumes the builder and constructs a [`ComplexStructOperationInput`](crate::operation::complex_struct_operation::ComplexStructOperationInput).
         480  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ComplexStructOperationInput`](crate::operation::complex_struct_operation::ComplexStructOperationInput).
         481  +
    /* BuilderGenerator.kt:253 */
  273    482   
    pub fn build(
  274    483   
        self,
  275    484   
    ) -> ::std::result::Result<
  276    485   
        crate::operation::complex_struct_operation::ComplexStructOperationInput,
  277    486   
        ::aws_smithy_types::error::operation::BuildError,
  278    487   
    > {
  279         -
        ::std::result::Result::Ok(crate::operation::complex_struct_operation::ComplexStructOperationInput {
  280         -
            structure: self.structure,
  281         -
            empty_structure: self.empty_structure,
  282         -
            list: self.list,
  283         -
            map: self.map,
  284         -
            union: self.union,
  285         -
            unit_union: self.unit_union,
  286         -
            structure_list: self.structure_list,
  287         -
            complex_list: self.complex_list,
  288         -
            complex_map: self.complex_map,
  289         -
            complex_union: self.complex_union,
  290         -
        })
  291         -
    }
         488  +
        /* BuilderGenerator.kt:254 */
         489  +
        ::std::result::Result::Ok(
         490  +
            /* BuilderGenerator.kt:477 */
         491  +
            crate::operation::complex_struct_operation::ComplexStructOperationInput {
         492  +
                /* BuilderGenerator.kt:481 */ structure: self.structure,
         493  +
                /* BuilderGenerator.kt:481 */
         494  +
                empty_structure: self.empty_structure,
         495  +
                /* BuilderGenerator.kt:481 */
         496  +
                list: self.list,
         497  +
                /* BuilderGenerator.kt:481 */
         498  +
                map: self.map,
         499  +
                /* BuilderGenerator.kt:481 */
         500  +
                union: self.union,
         501  +
                /* BuilderGenerator.kt:481 */
         502  +
                unit_union: self.unit_union,
         503  +
                /* BuilderGenerator.kt:481 */
         504  +
                structure_list: self.structure_list,
         505  +
                /* BuilderGenerator.kt:481 */
         506  +
                complex_list: self.complex_list,
         507  +
                /* BuilderGenerator.kt:481 */
         508  +
                complex_map: self.complex_map,
         509  +
                /* BuilderGenerator.kt:481 */
         510  +
                complex_union: self.complex_union,
         511  +
                /* BuilderGenerator.kt:477 */
         512  +
            }, /* BuilderGenerator.kt:254 */
         513  +
        )
         514  +
        /* BuilderGenerator.kt:253 */
         515  +
    }
         516  +
    /* BuilderGenerator.kt:355 */
  292    517   
}

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

@@ -1,1 +311,526 @@
    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 ComplexStructOperationOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct ComplexStructOperationOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub structure: ::std::option::Option<crate::types::SimpleStruct>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub empty_structure: ::std::option::Option<crate::types::EmptyStruct>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13     20   
    pub map: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
          21  +
    /* StructureGenerator.kt:231 */
   14     22   
    #[allow(missing_docs)] // documentation missing in model
   15     23   
    pub union: ::std::option::Option<crate::types::SimpleUnion>,
          24  +
    /* StructureGenerator.kt:231 */
   16     25   
    #[allow(missing_docs)] // documentation missing in model
   17     26   
    pub unit_union: ::std::option::Option<crate::types::UnitUnion>,
          27  +
    /* StructureGenerator.kt:231 */
   18     28   
    #[allow(missing_docs)] // documentation missing in model
   19     29   
    pub structure_list: ::std::option::Option<::std::vec::Vec<crate::types::SimpleStruct>>,
          30  +
    /* StructureGenerator.kt:231 */
   20     31   
    #[allow(missing_docs)] // documentation missing in model
   21     32   
    pub complex_list: ::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>,
          33  +
    /* StructureGenerator.kt:231 */
   22     34   
    #[allow(missing_docs)] // documentation missing in model
   23     35   
    pub complex_map: ::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>,
          36  +
    /* StructureGenerator.kt:231 */
   24     37   
    #[allow(missing_docs)] // documentation missing in model
   25     38   
    pub complex_union: ::std::boxed::Box<crate::types::ComplexUnion>,
          39  +
    /* StructureGenerator.kt:201 */
   26     40   
}
          41  +
/* StructureGenerator.kt:135 */
   27     42   
impl ComplexStructOperationOutput {
          43  +
    /* StructureGenerator.kt:231 */
   28     44   
    #[allow(missing_docs)] // documentation missing in model
          45  +
                           /* StructureGenerator.kt:166 */
   29     46   
    pub fn structure(&self) -> ::std::option::Option<&crate::types::SimpleStruct> {
          47  +
        /* StructureGenerator.kt:170 */
   30     48   
        self.structure.as_ref()
          49  +
        /* StructureGenerator.kt:166 */
   31     50   
    }
          51  +
    /* StructureGenerator.kt:231 */
   32     52   
    #[allow(missing_docs)] // documentation missing in model
          53  +
                           /* StructureGenerator.kt:166 */
   33     54   
    pub fn empty_structure(&self) -> ::std::option::Option<&crate::types::EmptyStruct> {
          55  +
        /* StructureGenerator.kt:170 */
   34     56   
        self.empty_structure.as_ref()
          57  +
        /* StructureGenerator.kt:166 */
   35     58   
    }
          59  +
    /* StructureGenerator.kt:231 */
   36     60   
    #[allow(missing_docs)] // documentation missing in model
   37         -
    ///
   38         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.list.is_none()`.
          61  +
    /// /* StructureGenerator.kt:162 */
          62  +
    /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.list.is_none()`.
          63  +
    /* StructureGenerator.kt:166 */
   39     64   
    pub fn list(&self) -> &[::std::string::String] {
   40         -
        self.list.as_deref().unwrap_or_default()
          65  +
        /* StructureGenerator.kt:169 */
          66  +
        self.list
          67  +
            .as_deref()
          68  +
            /* StructureGenerator.kt:175 */
          69  +
            .unwrap_or_default()
          70  +
        /* StructureGenerator.kt:166 */
   41     71   
    }
          72  +
    /* StructureGenerator.kt:231 */
   42     73   
    #[allow(missing_docs)] // documentation missing in model
          74  +
                           /* StructureGenerator.kt:166 */
   43     75   
    pub fn map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, i32>> {
          76  +
        /* StructureGenerator.kt:170 */
   44     77   
        self.map.as_ref()
          78  +
        /* StructureGenerator.kt:166 */
   45     79   
    }
          80  +
    /* StructureGenerator.kt:231 */
   46     81   
    #[allow(missing_docs)] // documentation missing in model
          82  +
                           /* StructureGenerator.kt:166 */
   47     83   
    pub fn union(&self) -> ::std::option::Option<&crate::types::SimpleUnion> {
          84  +
        /* StructureGenerator.kt:170 */
   48     85   
        self.union.as_ref()
          86  +
        /* StructureGenerator.kt:166 */
   49     87   
    }
          88  +
    /* StructureGenerator.kt:231 */
   50     89   
    #[allow(missing_docs)] // documentation missing in model
          90  +
                           /* StructureGenerator.kt:166 */
   51     91   
    pub fn unit_union(&self) -> ::std::option::Option<&crate::types::UnitUnion> {
          92  +
        /* StructureGenerator.kt:170 */
   52     93   
        self.unit_union.as_ref()
          94  +
        /* StructureGenerator.kt:166 */
   53     95   
    }
          96  +
    /* StructureGenerator.kt:231 */
   54     97   
    #[allow(missing_docs)] // documentation missing in model
   55         -
    ///
   56         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.structure_list.is_none()`.
          98  +
    /// /* StructureGenerator.kt:162 */
          99  +
    /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.structure_list.is_none()`.
         100  +
    /* StructureGenerator.kt:166 */
   57    101   
    pub fn structure_list(&self) -> &[crate::types::SimpleStruct] {
   58         -
        self.structure_list.as_deref().unwrap_or_default()
         102  +
        /* StructureGenerator.kt:169 */
         103  +
        self.structure_list
         104  +
            .as_deref()
         105  +
            /* StructureGenerator.kt:175 */
         106  +
            .unwrap_or_default()
         107  +
        /* StructureGenerator.kt:166 */
   59    108   
    }
         109  +
    /* StructureGenerator.kt:231 */
   60    110   
    #[allow(missing_docs)] // documentation missing in model
         111  +
                           /* StructureGenerator.kt:166 */
   61    112   
    pub fn complex_list(&self) -> &[::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>] {
         113  +
        /* StructureGenerator.kt:171 */
   62    114   
        use std::ops::Deref;
   63    115   
        self.complex_list.deref()
         116  +
        /* StructureGenerator.kt:166 */
   64    117   
    }
         118  +
    /* StructureGenerator.kt:231 */
   65    119   
    #[allow(missing_docs)] // documentation missing in model
         120  +
                           /* StructureGenerator.kt:166 */
   66    121   
    pub fn complex_map(&self) -> &::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion> {
         122  +
        /* StructureGenerator.kt:172 */
   67    123   
        &self.complex_map
         124  +
        /* StructureGenerator.kt:166 */
   68    125   
    }
         126  +
    /* StructureGenerator.kt:231 */
   69    127   
    #[allow(missing_docs)] // documentation missing in model
         128  +
                           /* StructureGenerator.kt:166 */
   70    129   
    pub fn complex_union(&self) -> &crate::types::ComplexUnion {
         130  +
        /* StructureGenerator.kt:171 */
   71    131   
        use std::ops::Deref;
   72    132   
        self.complex_union.deref()
         133  +
        /* StructureGenerator.kt:166 */
   73    134   
    }
         135  +
    /* StructureGenerator.kt:135 */
   74    136   
}
         137  +
/* ClientCodegenVisitor.kt:237 */
   75    138   
impl ComplexStructOperationOutput {
   76         -
    /// Creates a new builder-style object to manufacture [`ComplexStructOperationOutput`](crate::operation::complex_struct_operation::ComplexStructOperationOutput).
         139  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ComplexStructOperationOutput`](crate::operation::complex_struct_operation::ComplexStructOperationOutput).
         140  +
    /* BuilderGenerator.kt:175 */
   77    141   
    pub fn builder() -> crate::operation::complex_struct_operation::builders::ComplexStructOperationOutputBuilder {
         142  +
        /* BuilderGenerator.kt:176 */
   78    143   
        crate::operation::complex_struct_operation::builders::ComplexStructOperationOutputBuilder::default()
         144  +
        /* BuilderGenerator.kt:175 */
   79    145   
    }
         146  +
    /* ClientCodegenVisitor.kt:237 */
   80    147   
}
   81    148   
   82         -
/// A builder for [`ComplexStructOperationOutput`](crate::operation::complex_struct_operation::ComplexStructOperationOutput).
         149  +
/// /* BuilderGenerator.kt:342 */A builder for [`ComplexStructOperationOutput`](crate::operation::complex_struct_operation::ComplexStructOperationOutput).
         150  +
/* RustType.kt:516 */
   83    151   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         152  +
/* RustType.kt:516 */
   84    153   
#[non_exhaustive]
         154  +
/* BuilderGenerator.kt:345 */
   85    155   
pub struct ComplexStructOperationOutputBuilder {
   86         -
    pub(crate) structure: ::std::option::Option<crate::types::SimpleStruct>,
   87         -
    pub(crate) empty_structure: ::std::option::Option<crate::types::EmptyStruct>,
   88         -
    pub(crate) list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
   89         -
    pub(crate) map: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
   90         -
    pub(crate) union: ::std::option::Option<crate::types::SimpleUnion>,
   91         -
    pub(crate) unit_union: ::std::option::Option<crate::types::UnitUnion>,
   92         -
    pub(crate) structure_list: ::std::option::Option<::std::vec::Vec<crate::types::SimpleStruct>>,
         156  +
    /* BuilderGenerator.kt:275 */ pub(crate) structure: ::std::option::Option<crate::types::SimpleStruct>,
         157  +
    /* BuilderGenerator.kt:275 */ pub(crate) empty_structure: ::std::option::Option<crate::types::EmptyStruct>,
         158  +
    /* BuilderGenerator.kt:275 */ pub(crate) list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         159  +
    /* BuilderGenerator.kt:275 */ pub(crate) map: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
         160  +
    /* BuilderGenerator.kt:275 */ pub(crate) union: ::std::option::Option<crate::types::SimpleUnion>,
         161  +
    /* BuilderGenerator.kt:275 */ pub(crate) unit_union: ::std::option::Option<crate::types::UnitUnion>,
         162  +
    /* BuilderGenerator.kt:275 */ pub(crate) structure_list: ::std::option::Option<::std::vec::Vec<crate::types::SimpleStruct>>,
         163  +
    /* BuilderGenerator.kt:275 */
   93    164   
    pub(crate) complex_list: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>>,
         165  +
    /* BuilderGenerator.kt:275 */
   94    166   
    pub(crate) complex_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>,
         167  +
    /* BuilderGenerator.kt:275 */
   95    168   
    pub(crate) complex_union: ::std::option::Option<::std::boxed::Box<crate::types::ComplexUnion>>,
         169  +
    /* BuilderGenerator.kt:345 */
   96    170   
}
         171  +
/* BuilderGenerator.kt:355 */
   97    172   
impl ComplexStructOperationOutputBuilder {
         173  +
    /* BuilderGenerator.kt:286 */
   98    174   
    #[allow(missing_docs)] // documentation missing in model
         175  +
                           /* BuilderGenerator.kt:291 */
   99    176   
    pub fn structure(mut self, input: crate::types::SimpleStruct) -> Self {
         177  +
        /* BuilderGenerator.kt:292 */
  100    178   
        self.structure = ::std::option::Option::Some(input);
         179  +
        /* BuilderGenerator.kt:293 */
  101    180   
        self
         181  +
        /* BuilderGenerator.kt:291 */
  102    182   
    }
         183  +
    /* BuilderGenerator.kt:312 */
  103    184   
    #[allow(missing_docs)] // documentation missing in model
         185  +
                           /* BuilderGenerator.kt:314 */
  104    186   
    pub fn set_structure(mut self, input: ::std::option::Option<crate::types::SimpleStruct>) -> Self {
         187  +
        /* BuilderGenerator.kt:315 */
  105    188   
        self.structure = input;
  106    189   
        self
         190  +
        /* BuilderGenerator.kt:314 */
  107    191   
    }
         192  +
    /* BuilderGenerator.kt:334 */
  108    193   
    #[allow(missing_docs)] // documentation missing in model
         194  +
                           /* BuilderGenerator.kt:336 */
  109    195   
    pub fn get_structure(&self) -> &::std::option::Option<crate::types::SimpleStruct> {
         196  +
        /* BuilderGenerator.kt:337 */
  110    197   
        &self.structure
         198  +
        /* BuilderGenerator.kt:336 */
  111    199   
    }
         200  +
    /* BuilderGenerator.kt:286 */
  112    201   
    #[allow(missing_docs)] // documentation missing in model
         202  +
                           /* BuilderGenerator.kt:291 */
  113    203   
    pub fn empty_structure(mut self, input: crate::types::EmptyStruct) -> Self {
         204  +
        /* BuilderGenerator.kt:292 */
  114    205   
        self.empty_structure = ::std::option::Option::Some(input);
         206  +
        /* BuilderGenerator.kt:293 */
  115    207   
        self
         208  +
        /* BuilderGenerator.kt:291 */
  116    209   
    }
         210  +
    /* BuilderGenerator.kt:312 */
  117    211   
    #[allow(missing_docs)] // documentation missing in model
         212  +
                           /* BuilderGenerator.kt:314 */
  118    213   
    pub fn set_empty_structure(mut self, input: ::std::option::Option<crate::types::EmptyStruct>) -> Self {
         214  +
        /* BuilderGenerator.kt:315 */
  119    215   
        self.empty_structure = input;
  120    216   
        self
         217  +
        /* BuilderGenerator.kt:314 */
  121    218   
    }
         219  +
    /* BuilderGenerator.kt:334 */
  122    220   
    #[allow(missing_docs)] // documentation missing in model
         221  +
                           /* BuilderGenerator.kt:336 */
  123    222   
    pub fn get_empty_structure(&self) -> &::std::option::Option<crate::types::EmptyStruct> {
         223  +
        /* BuilderGenerator.kt:337 */
  124    224   
        &self.empty_structure
         225  +
        /* BuilderGenerator.kt:336 */
  125    226   
    }
  126         -
    /// Appends an item to `list`.
         227  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `list`.
         228  +
    /* BuilderGenerator.kt:411 */
  127    229   
    ///
  128         -
    /// To override the contents of this collection use [`set_list`](Self::set_list).
         230  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_list`](Self::set_list).
         231  +
    /* BuilderGenerator.kt:413 */
  129    232   
    ///
         233  +
    /* BuilderGenerator.kt:418 */
  130    234   
    pub fn list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         235  +
        /* BuilderGenerator.kt:419 */
  131    236   
        let mut v = self.list.unwrap_or_default();
  132    237   
        v.push(input.into());
  133    238   
        self.list = ::std::option::Option::Some(v);
  134    239   
        self
         240  +
        /* BuilderGenerator.kt:418 */
  135    241   
    }
         242  +
    /* BuilderGenerator.kt:312 */
  136    243   
    #[allow(missing_docs)] // documentation missing in model
         244  +
                           /* BuilderGenerator.kt:314 */
  137    245   
    pub fn set_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         246  +
        /* BuilderGenerator.kt:315 */
  138    247   
        self.list = input;
  139    248   
        self
         249  +
        /* BuilderGenerator.kt:314 */
  140    250   
    }
         251  +
    /* BuilderGenerator.kt:334 */
  141    252   
    #[allow(missing_docs)] // documentation missing in model
         253  +
                           /* BuilderGenerator.kt:336 */
  142    254   
    pub fn get_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         255  +
        /* BuilderGenerator.kt:337 */
  143    256   
        &self.list
         257  +
        /* BuilderGenerator.kt:336 */
  144    258   
    }
  145         -
    /// Adds a key-value pair to `map`.
         259  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `map`.
         260  +
    /* BuilderGenerator.kt:437 */
  146    261   
    ///
  147         -
    /// To override the contents of this collection use [`set_map`](Self::set_map).
         262  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_map`](Self::set_map).
         263  +
    /* BuilderGenerator.kt:439 */
  148    264   
    ///
         265  +
    /* BuilderGenerator.kt:445 */
  149    266   
    pub fn map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: i32) -> Self {
         267  +
        /* BuilderGenerator.kt:448 */
  150    268   
        let mut hash_map = self.map.unwrap_or_default();
  151    269   
        hash_map.insert(k.into(), v);
  152    270   
        self.map = ::std::option::Option::Some(hash_map);
  153    271   
        self
         272  +
        /* BuilderGenerator.kt:445 */
  154    273   
    }
         274  +
    /* BuilderGenerator.kt:312 */
  155    275   
    #[allow(missing_docs)] // documentation missing in model
         276  +
                           /* BuilderGenerator.kt:314 */
  156    277   
    pub fn set_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>) -> Self {
         278  +
        /* BuilderGenerator.kt:315 */
  157    279   
        self.map = input;
  158    280   
        self
         281  +
        /* BuilderGenerator.kt:314 */
  159    282   
    }
         283  +
    /* BuilderGenerator.kt:334 */
  160    284   
    #[allow(missing_docs)] // documentation missing in model
         285  +
                           /* BuilderGenerator.kt:336 */
  161    286   
    pub fn get_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, i32>> {
         287  +
        /* BuilderGenerator.kt:337 */
  162    288   
        &self.map
         289  +
        /* BuilderGenerator.kt:336 */
  163    290   
    }
         291  +
    /* BuilderGenerator.kt:286 */
  164    292   
    #[allow(missing_docs)] // documentation missing in model
         293  +
                           /* BuilderGenerator.kt:291 */
  165    294   
    pub fn union(mut self, input: crate::types::SimpleUnion) -> Self {
         295  +
        /* BuilderGenerator.kt:292 */
  166    296   
        self.union = ::std::option::Option::Some(input);
         297  +
        /* BuilderGenerator.kt:293 */
  167    298   
        self
         299  +
        /* BuilderGenerator.kt:291 */
  168    300   
    }
         301  +
    /* BuilderGenerator.kt:312 */
  169    302   
    #[allow(missing_docs)] // documentation missing in model
         303  +
                           /* BuilderGenerator.kt:314 */
  170    304   
    pub fn set_union(mut self, input: ::std::option::Option<crate::types::SimpleUnion>) -> Self {
         305  +
        /* BuilderGenerator.kt:315 */
  171    306   
        self.union = input;
  172    307   
        self
         308  +
        /* BuilderGenerator.kt:314 */
  173    309   
    }
         310  +
    /* BuilderGenerator.kt:334 */
  174    311   
    #[allow(missing_docs)] // documentation missing in model
         312  +
                           /* BuilderGenerator.kt:336 */
  175    313   
    pub fn get_union(&self) -> &::std::option::Option<crate::types::SimpleUnion> {
         314  +
        /* BuilderGenerator.kt:337 */
  176    315   
        &self.union
         316  +
        /* BuilderGenerator.kt:336 */
  177    317   
    }
         318  +
    /* BuilderGenerator.kt:286 */
  178    319   
    #[allow(missing_docs)] // documentation missing in model
         320  +
                           /* BuilderGenerator.kt:291 */
  179    321   
    pub fn unit_union(mut self, input: crate::types::UnitUnion) -> Self {
         322  +
        /* BuilderGenerator.kt:292 */
  180    323   
        self.unit_union = ::std::option::Option::Some(input);
         324  +
        /* BuilderGenerator.kt:293 */
  181    325   
        self
         326  +
        /* BuilderGenerator.kt:291 */
  182    327   
    }
         328  +
    /* BuilderGenerator.kt:312 */
  183    329   
    #[allow(missing_docs)] // documentation missing in model
         330  +
                           /* BuilderGenerator.kt:314 */
  184    331   
    pub fn set_unit_union(mut self, input: ::std::option::Option<crate::types::UnitUnion>) -> Self {
         332  +
        /* BuilderGenerator.kt:315 */
  185    333   
        self.unit_union = input;
  186    334   
        self
         335  +
        /* BuilderGenerator.kt:314 */
  187    336   
    }
         337  +
    /* BuilderGenerator.kt:334 */
  188    338   
    #[allow(missing_docs)] // documentation missing in model
         339  +
                           /* BuilderGenerator.kt:336 */
  189    340   
    pub fn get_unit_union(&self) -> &::std::option::Option<crate::types::UnitUnion> {
         341  +
        /* BuilderGenerator.kt:337 */
  190    342   
        &self.unit_union
         343  +
        /* BuilderGenerator.kt:336 */
  191    344   
    }
  192         -
    /// Appends an item to `structure_list`.
         345  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `structure_list`.
         346  +
    /* BuilderGenerator.kt:411 */
  193    347   
    ///
  194         -
    /// To override the contents of this collection use [`set_structure_list`](Self::set_structure_list).
         348  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_structure_list`](Self::set_structure_list).
         349  +
    /* BuilderGenerator.kt:413 */
  195    350   
    ///
         351  +
    /* BuilderGenerator.kt:418 */
  196    352   
    pub fn structure_list(mut self, input: crate::types::SimpleStruct) -> Self {
         353  +
        /* BuilderGenerator.kt:419 */
  197    354   
        let mut v = self.structure_list.unwrap_or_default();
  198    355   
        v.push(input);
  199    356   
        self.structure_list = ::std::option::Option::Some(v);
  200    357   
        self
         358  +
        /* BuilderGenerator.kt:418 */
  201    359   
    }
         360  +
    /* BuilderGenerator.kt:312 */
  202    361   
    #[allow(missing_docs)] // documentation missing in model
         362  +
                           /* BuilderGenerator.kt:314 */
  203    363   
    pub fn set_structure_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SimpleStruct>>) -> Self {
         364  +
        /* BuilderGenerator.kt:315 */
  204    365   
        self.structure_list = input;
  205    366   
        self
         367  +
        /* BuilderGenerator.kt:314 */
  206    368   
    }
         369  +
    /* BuilderGenerator.kt:334 */
  207    370   
    #[allow(missing_docs)] // documentation missing in model
         371  +
                           /* BuilderGenerator.kt:336 */
  208    372   
    pub fn get_structure_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SimpleStruct>> {
         373  +
        /* BuilderGenerator.kt:337 */
  209    374   
        &self.structure_list
         375  +
        /* BuilderGenerator.kt:336 */
  210    376   
    }
  211         -
    /// Appends an item to `complex_list`.
         377  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `complex_list`.
         378  +
    /* BuilderGenerator.kt:411 */
  212    379   
    ///
  213         -
    /// To override the contents of this collection use [`set_complex_list`](Self::set_complex_list).
         380  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_complex_list`](Self::set_complex_list).
         381  +
    /* BuilderGenerator.kt:413 */
  214    382   
    ///
         383  +
    /* BuilderGenerator.kt:418 */
  215    384   
    pub fn complex_list(mut self, input: ::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>) -> Self {
         385  +
        /* BuilderGenerator.kt:419 */
  216    386   
        let mut v = self.complex_list.unwrap_or_default();
  217    387   
        v.push(input);
  218    388   
        self.complex_list = ::std::option::Option::Some(v);
  219    389   
        self
         390  +
        /* BuilderGenerator.kt:418 */
  220    391   
    }
         392  +
    /* BuilderGenerator.kt:312 */
  221    393   
    #[allow(missing_docs)] // documentation missing in model
         394  +
                           /* BuilderGenerator.kt:314 */
  222    395   
    pub fn set_complex_list(
  223    396   
        mut self,
  224    397   
        input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>>,
  225    398   
    ) -> Self {
         399  +
        /* BuilderGenerator.kt:315 */
  226    400   
        self.complex_list = input;
  227    401   
        self
         402  +
        /* BuilderGenerator.kt:314 */
  228    403   
    }
         404  +
    /* BuilderGenerator.kt:334 */
  229    405   
    #[allow(missing_docs)] // documentation missing in model
         406  +
                           /* BuilderGenerator.kt:336 */
  230    407   
    pub fn get_complex_list(
  231    408   
        &self,
  232    409   
    ) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>> {
         410  +
        /* BuilderGenerator.kt:337 */
  233    411   
        &self.complex_list
         412  +
        /* BuilderGenerator.kt:336 */
  234    413   
    }
  235         -
    /// Adds a key-value pair to `complex_map`.
         414  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `complex_map`.
         415  +
    /* BuilderGenerator.kt:437 */
  236    416   
    ///
  237         -
    /// To override the contents of this collection use [`set_complex_map`](Self::set_complex_map).
         417  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_complex_map`](Self::set_complex_map).
         418  +
    /* BuilderGenerator.kt:439 */
  238    419   
    ///
         420  +
    /* BuilderGenerator.kt:445 */
  239    421   
    pub fn complex_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ComplexUnion) -> Self {
         422  +
        /* BuilderGenerator.kt:448 */
  240    423   
        let mut hash_map = self.complex_map.unwrap_or_default();
  241    424   
        hash_map.insert(k.into(), v);
  242    425   
        self.complex_map = ::std::option::Option::Some(hash_map);
  243    426   
        self
         427  +
        /* BuilderGenerator.kt:445 */
  244    428   
    }
         429  +
    /* BuilderGenerator.kt:312 */
  245    430   
    #[allow(missing_docs)] // documentation missing in model
         431  +
                           /* BuilderGenerator.kt:314 */
  246    432   
    pub fn set_complex_map(
  247    433   
        mut self,
  248    434   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>>,
  249    435   
    ) -> Self {
         436  +
        /* BuilderGenerator.kt:315 */
  250    437   
        self.complex_map = input;
  251    438   
        self
         439  +
        /* BuilderGenerator.kt:314 */
  252    440   
    }
         441  +
    /* BuilderGenerator.kt:334 */
  253    442   
    #[allow(missing_docs)] // documentation missing in model
         443  +
                           /* BuilderGenerator.kt:336 */
  254    444   
    pub fn get_complex_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ComplexUnion>> {
         445  +
        /* BuilderGenerator.kt:337 */
  255    446   
        &self.complex_map
         447  +
        /* BuilderGenerator.kt:336 */
  256    448   
    }
         449  +
    /* BuilderGenerator.kt:286 */
  257    450   
    #[allow(missing_docs)] // documentation missing in model
  258         -
    /// This field is required.
         451  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         452  +
    /* BuilderGenerator.kt:291 */
  259    453   
    pub fn complex_union(mut self, input: impl ::std::convert::Into<::std::boxed::Box<crate::types::ComplexUnion>>) -> Self {
         454  +
        /* BuilderGenerator.kt:292 */
  260    455   
        self.complex_union = ::std::option::Option::Some(input.into());
         456  +
        /* BuilderGenerator.kt:293 */
  261    457   
        self
         458  +
        /* BuilderGenerator.kt:291 */
  262    459   
    }
         460  +
    /* BuilderGenerator.kt:312 */
  263    461   
    #[allow(missing_docs)] // documentation missing in model
         462  +
                           /* BuilderGenerator.kt:314 */
  264    463   
    pub fn set_complex_union(mut self, input: ::std::option::Option<::std::boxed::Box<crate::types::ComplexUnion>>) -> Self {
         464  +
        /* BuilderGenerator.kt:315 */
  265    465   
        self.complex_union = input;
  266    466   
        self
         467  +
        /* BuilderGenerator.kt:314 */
  267    468   
    }
         469  +
    /* BuilderGenerator.kt:334 */
  268    470   
    #[allow(missing_docs)] // documentation missing in model
         471  +
                           /* BuilderGenerator.kt:336 */
  269    472   
    pub fn get_complex_union(&self) -> &::std::option::Option<::std::boxed::Box<crate::types::ComplexUnion>> {
         473  +
        /* BuilderGenerator.kt:337 */
  270    474   
        &self.complex_union
  271         -
    }
  272         -
    /// Consumes the builder and constructs a [`ComplexStructOperationOutput`](crate::operation::complex_struct_operation::ComplexStructOperationOutput).
  273         -
    /// This method will fail if any of the following fields are not set:
  274         -
    /// - [`complex_list`](crate::operation::complex_struct_operation::builders::ComplexStructOperationOutputBuilder::complex_list)
  275         -
    /// - [`complex_map`](crate::operation::complex_struct_operation::builders::ComplexStructOperationOutputBuilder::complex_map)
  276         -
    /// - [`complex_union`](crate::operation::complex_struct_operation::builders::ComplexStructOperationOutputBuilder::complex_union)
         475  +
        /* BuilderGenerator.kt:336 */
         476  +
    }
         477  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ComplexStructOperationOutput`](crate::operation::complex_struct_operation::ComplexStructOperationOutput).
         478  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         479  +
    /// /* BuilderGenerator.kt:246 */- [`complex_list`](crate::operation::complex_struct_operation::builders::ComplexStructOperationOutputBuilder::complex_list)
         480  +
    /// /* BuilderGenerator.kt:246 */- [`complex_map`](crate::operation::complex_struct_operation::builders::ComplexStructOperationOutputBuilder::complex_map)
         481  +
    /// /* BuilderGenerator.kt:246 */- [`complex_union`](crate::operation::complex_struct_operation::builders::ComplexStructOperationOutputBuilder::complex_union)
         482  +
    /* BuilderGenerator.kt:253 */
  277    483   
    pub fn build(
  278    484   
        self,
  279    485   
    ) -> ::std::result::Result<
  280    486   
        crate::operation::complex_struct_operation::ComplexStructOperationOutput,
  281    487   
        ::aws_smithy_types::error::operation::BuildError,
  282    488   
    > {
  283         -
        ::std::result::Result::Ok(crate::operation::complex_struct_operation::ComplexStructOperationOutput {
  284         -
            structure: self.structure,
  285         -
            empty_structure: self.empty_structure,
  286         -
            list: self.list,
  287         -
            map: self.map,
  288         -
            union: self.union,
  289         -
            unit_union: self.unit_union,
  290         -
            structure_list: self.structure_list,
  291         -
            complex_list: self.complex_list.ok_or_else(|| {
  292         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  293         -
                    "complex_list",
  294         -
                    "complex_list was not specified but it is required when building ComplexStructOperationOutput",
  295         -
                )
  296         -
            })?,
  297         -
            complex_map: self.complex_map.ok_or_else(|| {
  298         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  299         -
                    "complex_map",
  300         -
                    "complex_map was not specified but it is required when building ComplexStructOperationOutput",
  301         -
                )
  302         -
            })?,
  303         -
            complex_union: self.complex_union.ok_or_else(|| {
  304         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  305         -
                    "complex_union",
  306         -
                    "complex_union was not specified but it is required when building ComplexStructOperationOutput",
  307         -
                )
  308         -
            })?,
  309         -
        })
  310         -
    }
         489  +
        /* BuilderGenerator.kt:254 */
         490  +
        ::std::result::Result::Ok(
         491  +
            /* BuilderGenerator.kt:477 */crate::operation::complex_struct_operation::ComplexStructOperationOutput {
         492  +
                /* BuilderGenerator.kt:481 */structure: self.structure
         493  +
                ,
         494  +
                /* BuilderGenerator.kt:481 */empty_structure: self.empty_structure
         495  +
                ,
         496  +
                /* BuilderGenerator.kt:481 */list: self.list
         497  +
                ,
         498  +
                /* BuilderGenerator.kt:481 */map: self.map
         499  +
                ,
         500  +
                /* BuilderGenerator.kt:481 */union: self.union
         501  +
                ,
         502  +
                /* BuilderGenerator.kt:481 */unit_union: self.unit_union
         503  +
                ,
         504  +
                /* BuilderGenerator.kt:481 */structure_list: self.structure_list
         505  +
                ,
         506  +
                /* BuilderGenerator.kt:481 */complex_list: self.complex_list
         507  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         508  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("complex_list", "complex_list was not specified but it is required when building ComplexStructOperationOutput")
         509  +
                    /* BuilderGenerator.kt:494 */)?
         510  +
                ,
         511  +
                /* BuilderGenerator.kt:481 */complex_map: self.complex_map
         512  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         513  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("complex_map", "complex_map was not specified but it is required when building ComplexStructOperationOutput")
         514  +
                    /* BuilderGenerator.kt:494 */)?
         515  +
                ,
         516  +
                /* BuilderGenerator.kt:481 */complex_union: self.complex_union
         517  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         518  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("complex_union", "complex_union was not specified but it is required when building ComplexStructOperationOutput")
         519  +
                    /* BuilderGenerator.kt:494 */)?
         520  +
                ,
         521  +
            /* BuilderGenerator.kt:477 */}
         522  +
        /* BuilderGenerator.kt:254 */)
         523  +
        /* BuilderGenerator.kt:253 */
         524  +
    }
         525  +
    /* BuilderGenerator.kt:355 */
  311    526   
}