Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/http_prefix_headers_in_response.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 `HttpPrefixHeadersInResponse`.
           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 HttpPrefixHeadersInResponse;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl HttpPrefixHeadersInResponse {
    7         -
    /// Creates a new `HttpPrefixHeadersInResponse`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `HttpPrefixHeadersInResponse`
          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::http_prefix_headers_in_response::HttpPrefixHeadersInResponseInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +388,464 @@
   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 HttpPrefixHeadersInResponse {
   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("HttpPrefixHeadersInResponse");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            HttpPrefixHeadersInResponseRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            HttpPrefixHeadersInResponseResponseDeserializer,
  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   
            "HttpPrefixHeadersInResponse",
  111    122   
            "Rest Json Protocol",
  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("HttpPrefixHeadersInResponse")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(HttpPrefixHeadersInResponseEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseError,
  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 HttpPrefixHeadersInResponseResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpPrefixHeadersInResponseResponseDeserializer {
  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_http_prefix_headers_in_response::de_http_prefix_headers_in_response_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_http_prefix_headers_in_response::de_http_prefix_headers_in_response_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 HttpPrefixHeadersInResponseRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpPrefixHeadersInResponseRequestSerializer {
  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::http_prefix_headers_in_response::HttpPrefixHeadersInResponseInput>()
  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::http_prefix_headers_in_response::HttpPrefixHeadersInResponseInput,
  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, "/HttpPrefixHeadersResponse").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::http_prefix_headers_in_response::HttpPrefixHeadersInResponseInput,
  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("GET").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder
  193    206   
        };
  194    207   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  195    208   
  196    209   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  197    210   
    }
  198    211   
}
         212  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  199    213   
#[derive(Debug)]
  200    214   
struct HttpPrefixHeadersInResponseEndpointParamsInterceptor;
  201    215   
  202    216   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpPrefixHeadersInResponseEndpointParamsInterceptor {
  203    217   
    fn name(&self) -> &'static str {
  204    218   
        "HttpPrefixHeadersInResponseEndpointParamsInterceptor"
  205    219   
    }
  206    220   
  207    221   
    fn read_before_execution(
  208    222   
        &self,
  209    223   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  210    224   
            '_,
  211    225   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  212    226   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  213    227   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  214    228   
        >,
  215    229   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  216    230   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  217    231   
        let _input = context
  218    232   
            .input()
  219    233   
            .downcast_ref::<HttpPrefixHeadersInResponseInput>()
  220    234   
            .ok_or("failed to downcast to HttpPrefixHeadersInResponseInput")?;
  221    235   
  222    236   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  223    237   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  224    238   
        })?;
  225    239   
        cfg.interceptor_state()
  226    240   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  227    241   
        ::std::result::Result::Ok(())
  228    242   
    }
  229    243   
}
  230    244   
  231    245   
// The get_* functions below are generated from JMESPath expressions in the
  232    246   
// operationContextParams trait. They target the operation's input shape.
  233    247   
         248  +
/* RustType.kt:516 */
  234    249   
#[allow(unreachable_code, unused_variables)]
         250  +
/* RustType.kt:516 */
  235    251   
#[cfg(test)]
         252  +
/* ProtocolTestGenerator.kt:98 */
  236    253   
mod http_prefix_headers_in_response_test {
  237    254   
  238    255   
    /// (de)serializes all response headers
  239    256   
    /// Test ID: HttpPrefixHeadersResponse
  240    257   
    #[::tokio::test]
  241    258   
    #[::tracing_test::traced_test]
  242    259   
    async fn http_prefix_headers_response_response() {
  243    260   
        let expected_output = crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseOutput::builder()
  244    261   
            .set_prefix_headers(::std::option::Option::Some({
  245    262   
                let mut ret = ::std::collections::HashMap::new();
  246    263   
                ret.insert("X-Foo".to_owned().to_ascii_lowercase(), "Foo".to_owned());
  247    264   
                ret.insert("Hello".to_owned().to_ascii_lowercase(), "Hello".to_owned());
  248    265   
                ret
  249    266   
            }))
  250    267   
            .build();
  251    268   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
  252    269   
            ::http::response::Builder::new()
  253    270   
                .header("Hello", "Hello")
  254    271   
                .header("X-Foo", "Foo")
  255    272   
                .status(200)
  256    273   
                .body(::aws_smithy_types::body::SdkBody::from(vec![]))
  257    274   
                .unwrap(),
  258    275   
        )
  259    276   
        .unwrap();
  260    277   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  261    278   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  262    279   
  263    280   
        let op = crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponse::new();
  264    281   
        let config = op.config().expect("the operation has config");
  265    282   
        let de = config
  266    283   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  267    284   
            .expect("the config must have a deserializer");
  268    285   
  269    286   
        let parsed = de.deserialize_streaming(&mut http_response);
  270    287   
        let parsed = parsed.unwrap_or_else(|| {
  271    288   
            let http_response = http_response.map(|body| {
  272    289   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  273    290   
                    body.bytes().unwrap(),
  274    291   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
  275    292   
                )))
  276    293   
            });
  277    294   
            de.deserialize_nonstreaming(&http_response)
  278    295   
        });
  279    296   
        let parsed = parsed
  280    297   
            .expect("should be successful response")
  281    298   
            .downcast::<crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseOutput>()
  282    299   
            .unwrap();
  283    300   
        ::pretty_assertions::assert_eq!(
  284    301   
            parsed.prefix_headers,
  285    302   
            expected_output.prefix_headers,
  286    303   
            "Unexpected value for `prefix_headers`"
  287    304   
        );
  288    305   
    }
         306  +
         307  +
    /* ProtocolTestGenerator.kt:98 */
  289    308   
}
  290    309   
         310  +
/* OperationErrorGenerator.kt:79 */
  291    311   
/// Error type for the `HttpPrefixHeadersInResponseError` operation.
         312  +
/* RustType.kt:516 */
  292    313   
#[non_exhaustive]
         314  +
/* RustType.kt:516 */
  293    315   
#[derive(::std::fmt::Debug)]
  294         -
pub enum HttpPrefixHeadersInResponseError {
         316  +
pub /* OperationErrorGenerator.kt:81 */ enum HttpPrefixHeadersInResponseError {
         317  +
    /* OperationErrorGenerator.kt:88 */
  295    318   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  296    319   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  297    320   
    variable wildcard pattern and check `.code()`:
  298    321   
     \
  299    322   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  300    323   
     \
  301    324   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HttpPrefixHeadersInResponseError) for what information is available for the error.")]
  302    325   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         326  +
    /* OperationErrorGenerator.kt:81 */
  303    327   
}
         328  +
/* OperationErrorGenerator.kt:218 */
  304    329   
impl HttpPrefixHeadersInResponseError {
         330  +
    /* OperationErrorGenerator.kt:219 */
  305    331   
    /// Creates the `HttpPrefixHeadersInResponseError::Unhandled` variant from any error type.
  306    332   
    pub fn unhandled(
  307    333   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  308    334   
    ) -> Self {
  309    335   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  310    336   
            source: err.into(),
  311    337   
            meta: ::std::default::Default::default(),
  312    338   
        })
  313    339   
    }
  314    340   
  315    341   
    /// Creates the `HttpPrefixHeadersInResponseError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  316    342   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  317    343   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  318    344   
            source: err.clone().into(),
  319    345   
            meta: err,
  320    346   
        })
  321    347   
    }
  322         -
    ///
         348  +
    /// /* OperationErrorGenerator.kt:236 */
  323    349   
    /// Returns error metadata, which includes the error code, message,
  324    350   
    /// request ID, and potentially additional information.
  325    351   
    ///
         352  +
    /* OperationErrorGenerator.kt:242 */
  326    353   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         354  +
        /* OperationErrorGenerator.kt:243 */
  327    355   
        match self {
  328         -
            Self::Unhandled(e) => &e.meta,
         356  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         357  +
            /* OperationErrorGenerator.kt:243 */
  329    358   
        }
         359  +
        /* OperationErrorGenerator.kt:242 */
  330    360   
    }
         361  +
    /* OperationErrorGenerator.kt:218 */
  331    362   
}
         363  +
/* OperationErrorGenerator.kt:269 */
  332    364   
impl ::std::error::Error for HttpPrefixHeadersInResponseError {
         365  +
    /* OperationErrorGenerator.kt:270 */
  333    366   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         367  +
        /* OperationErrorGenerator.kt:318 */
  334    368   
        match self {
  335         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         369  +
            /* OperationErrorGenerator.kt:326 */
         370  +
            Self::Unhandled(_inner) => {
         371  +
                /* OperationErrorGenerator.kt:279 */
         372  +
                ::std::option::Option::Some(&*_inner.source)
         373  +
                /* OperationErrorGenerator.kt:326 */
         374  +
            } /* OperationErrorGenerator.kt:318 */
  336    375   
        }
         376  +
        /* OperationErrorGenerator.kt:270 */
  337    377   
    }
         378  +
    /* OperationErrorGenerator.kt:269 */
  338    379   
}
         380  +
/* OperationErrorGenerator.kt:133 */
  339    381   
impl ::std::fmt::Display for HttpPrefixHeadersInResponseError {
         382  +
    /* OperationErrorGenerator.kt:134 */
  340    383   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         384  +
        /* OperationErrorGenerator.kt:318 */
  341    385   
        match self {
         386  +
            /* OperationErrorGenerator.kt:326 */
  342    387   
            Self::Unhandled(_inner) => {
         388  +
                /* OperationErrorGenerator.kt:139 */
  343    389   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  344    390   
                    write!(f, "unhandled error ({code})")
  345    391   
                } else {
  346    392   
                    f.write_str("unhandled error")
  347    393   
                }
  348         -
            }
         394  +
                /* OperationErrorGenerator.kt:326 */
         395  +
            } /* OperationErrorGenerator.kt:318 */
  349    396   
        }
         397  +
        /* OperationErrorGenerator.kt:134 */
  350    398   
    }
         399  +
    /* OperationErrorGenerator.kt:133 */
  351    400   
}
         401  +
/* OperationErrorGenerator.kt:182 */
  352    402   
impl ::aws_smithy_types::retry::ProvideErrorKind for HttpPrefixHeadersInResponseError {
         403  +
    /* OperationErrorGenerator.kt:186 */
  353    404   
    fn code(&self) -> ::std::option::Option<&str> {
         405  +
        /* OperationErrorGenerator.kt:187 */
  354    406   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         407  +
        /* OperationErrorGenerator.kt:186 */
  355    408   
    }
         409  +
    /* OperationErrorGenerator.kt:190 */
  356    410   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         411  +
        /* OperationErrorGenerator.kt:197 */
  357    412   
        ::std::option::Option::None
         413  +
        /* OperationErrorGenerator.kt:190 */
  358    414   
    }
         415  +
    /* OperationErrorGenerator.kt:182 */
  359    416   
}
         417  +
/* OperationErrorGenerator.kt:163 */
  360    418   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HttpPrefixHeadersInResponseError {
         419  +
    /* OperationErrorGenerator.kt:164 */
  361    420   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         421  +
        /* OperationErrorGenerator.kt:318 */
  362    422   
        match self {
  363         -
            Self::Unhandled(_inner) => &_inner.meta,
         423  +
            /* OperationErrorGenerator.kt:326 */
         424  +
            Self::Unhandled(_inner) => {
         425  +
                /* OperationErrorGenerator.kt:168 */
         426  +
                &_inner.meta
         427  +
                /* OperationErrorGenerator.kt:326 */
         428  +
            } /* OperationErrorGenerator.kt:318 */
  364    429   
        }
         430  +
        /* OperationErrorGenerator.kt:164 */
  365    431   
    }
         432  +
    /* OperationErrorGenerator.kt:163 */
  366    433   
}
         434  +
/* OperationErrorGenerator.kt:109 */
  367    435   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HttpPrefixHeadersInResponseError {
         436  +
    /* OperationErrorGenerator.kt:110 */
  368    437   
    fn create_unhandled_error(
  369    438   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  370    439   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  371    440   
    ) -> Self {
         441  +
        /* OperationErrorGenerator.kt:121 */
  372    442   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  373    443   
            source,
  374    444   
            meta: meta.unwrap_or_default(),
  375    445   
        })
         446  +
        /* OperationErrorGenerator.kt:110 */
  376    447   
    }
         448  +
    /* OperationErrorGenerator.kt:109 */
  377    449   
}
  378    450   
         451  +
/* CodegenDelegator.kt:255 */
  379    452   
pub use crate::operation::http_prefix_headers_in_response::_http_prefix_headers_in_response_output::HttpPrefixHeadersInResponseOutput;
  380    453   
         454  +
/* CodegenDelegator.kt:255 */
  381    455   
pub use crate::operation::http_prefix_headers_in_response::_http_prefix_headers_in_response_input::HttpPrefixHeadersInResponseInput;
  382    456   
         457  +
/* RustModule.kt:172 */
  383    458   
mod _http_prefix_headers_in_response_input;
  384    459   
         460  +
/* RustModule.kt:172 */
  385    461   
mod _http_prefix_headers_in_response_output;
  386    462   
  387         -
/// Builders
         463  +
/// /* CodegenDelegator.kt:51 */Builders
  388    464   
pub mod builders;

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

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

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

@@ -1,1 +61,101 @@
    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 HttpPrefixHeadersInResponseOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct HttpPrefixHeadersInResponseOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub prefix_headers: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl HttpPrefixHeadersInResponseOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn prefix_headers(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.prefix_headers.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl HttpPrefixHeadersInResponseOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`HttpPrefixHeadersInResponseOutput`](crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`HttpPrefixHeadersInResponseOutput`](crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::http_prefix_headers_in_response::builders::HttpPrefixHeadersInResponseOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::http_prefix_headers_in_response::builders::HttpPrefixHeadersInResponseOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`HttpPrefixHeadersInResponseOutput`](crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`HttpPrefixHeadersInResponseOutput`](crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseOutput).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct HttpPrefixHeadersInResponseOutputBuilder {
          45  +
    /* BuilderGenerator.kt:275 */
   26     46   
    pub(crate) prefix_headers: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          47  +
    /* BuilderGenerator.kt:345 */
   27     48   
}
          49  +
/* BuilderGenerator.kt:355 */
   28     50   
impl HttpPrefixHeadersInResponseOutputBuilder {
   29         -
    /// Adds a key-value pair to `prefix_headers`.
          51  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `prefix_headers`.
          52  +
    /* BuilderGenerator.kt:437 */
   30     53   
    ///
   31         -
    /// To override the contents of this collection use [`set_prefix_headers`](Self::set_prefix_headers).
          54  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_prefix_headers`](Self::set_prefix_headers).
          55  +
    /* BuilderGenerator.kt:439 */
   32     56   
    ///
          57  +
    /* BuilderGenerator.kt:445 */
   33     58   
    pub fn prefix_headers(
   34     59   
        mut self,
   35     60   
        k: impl ::std::convert::Into<::std::string::String>,
   36     61   
        v: impl ::std::convert::Into<::std::string::String>,
   37     62   
    ) -> Self {
          63  +
        /* BuilderGenerator.kt:448 */
   38     64   
        let mut hash_map = self.prefix_headers.unwrap_or_default();
   39     65   
        hash_map.insert(k.into(), v.into());
   40     66   
        self.prefix_headers = ::std::option::Option::Some(hash_map);
   41     67   
        self
          68  +
        /* BuilderGenerator.kt:445 */
   42     69   
    }
          70  +
    /* BuilderGenerator.kt:312 */
   43     71   
    #[allow(missing_docs)] // documentation missing in model
          72  +
                           /* BuilderGenerator.kt:314 */
   44     73   
    pub fn set_prefix_headers(
   45     74   
        mut self,
   46     75   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
   47     76   
    ) -> Self {
          77  +
        /* BuilderGenerator.kt:315 */
   48     78   
        self.prefix_headers = input;
   49     79   
        self
          80  +
        /* BuilderGenerator.kt:314 */
   50     81   
    }
          82  +
    /* BuilderGenerator.kt:334 */
   51     83   
    #[allow(missing_docs)] // documentation missing in model
          84  +
                           /* BuilderGenerator.kt:336 */
   52     85   
    pub fn get_prefix_headers(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          86  +
        /* BuilderGenerator.kt:337 */
   53     87   
        &self.prefix_headers
          88  +
        /* BuilderGenerator.kt:336 */
   54     89   
    }
   55         -
    /// Consumes the builder and constructs a [`HttpPrefixHeadersInResponseOutput`](crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseOutput).
          90  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`HttpPrefixHeadersInResponseOutput`](crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseOutput).
          91  +
    /* BuilderGenerator.kt:253 */
   56     92   
    pub fn build(self) -> crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseOutput {
          93  +
        /* BuilderGenerator.kt:477 */
   57     94   
        crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseOutput {
   58         -
            prefix_headers: self.prefix_headers,
          95  +
            /* BuilderGenerator.kt:481 */ prefix_headers: self.prefix_headers,
          96  +
            /* BuilderGenerator.kt:477 */
   59     97   
        }
          98  +
        /* BuilderGenerator.kt:253 */
   60     99   
    }
         100  +
    /* BuilderGenerator.kt:355 */
   61    101   
}

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/http_request_with_float_labels.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 `HttpRequestWithFloatLabels`.
           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 HttpRequestWithFloatLabels;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl HttpRequestWithFloatLabels {
    7         -
    /// Creates a new `HttpRequestWithFloatLabels`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `HttpRequestWithFloatLabels`
          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::http_request_with_float_labels::HttpRequestWithFloatLabelsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +186,199 @@
   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 HttpRequestWithFloatLabels {
   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("HttpRequestWithFloatLabels");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            HttpRequestWithFloatLabelsRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            HttpRequestWithFloatLabelsResponseDeserializer,
  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   
            "HttpRequestWithFloatLabels",
  111    122   
            "Rest Json Protocol",
  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("HttpRequestWithFloatLabels")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(HttpRequestWithFloatLabelsEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsError,
  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 HttpRequestWithFloatLabelsResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpRequestWithFloatLabelsResponseDeserializer {
  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_http_request_with_float_labels::de_http_request_with_float_labels_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_http_request_with_float_labels::de_http_request_with_float_labels_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 HttpRequestWithFloatLabelsRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpRequestWithFloatLabelsRequestSerializer {
  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
@@ -193,206 +289,306 @@
  213    226   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  214    227   
            }
  215    228   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  216    229   
            builder
  217    230   
        };
  218    231   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  219    232   
  220    233   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  221    234   
    }
  222    235   
}
         236  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  223    237   
#[derive(Debug)]
  224    238   
struct HttpRequestWithFloatLabelsEndpointParamsInterceptor;
  225    239   
  226    240   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpRequestWithFloatLabelsEndpointParamsInterceptor {
  227    241   
    fn name(&self) -> &'static str {
  228    242   
        "HttpRequestWithFloatLabelsEndpointParamsInterceptor"
  229    243   
    }
  230    244   
  231    245   
    fn read_before_execution(
  232    246   
        &self,
  233    247   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  234    248   
            '_,
  235    249   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  236    250   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  237    251   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  238    252   
        >,
  239    253   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  240    254   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  241    255   
        let _input = context
  242    256   
            .input()
  243    257   
            .downcast_ref::<HttpRequestWithFloatLabelsInput>()
  244    258   
            .ok_or("failed to downcast to HttpRequestWithFloatLabelsInput")?;
  245    259   
  246    260   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  247    261   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  248    262   
        })?;
  249    263   
        cfg.interceptor_state()
  250    264   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  251    265   
        ::std::result::Result::Ok(())
  252    266   
    }
  253    267   
}
  254    268   
  255    269   
// The get_* functions below are generated from JMESPath expressions in the
  256    270   
// operationContextParams trait. They target the operation's input shape.
  257    271   
         272  +
/* RustType.kt:516 */
  258    273   
#[allow(unreachable_code, unused_variables)]
         274  +
/* RustType.kt:516 */
  259    275   
#[cfg(test)]
         276  +
/* ProtocolTestGenerator.kt:98 */
  260    277   
mod http_request_with_float_labels_test {
  261    278   
  262    279   
    /// Supports handling NaN float label values.
  263    280   
    /// Test ID: RestJsonSupportsNaNFloatLabels
  264    281   
    #[::tokio::test]
  265    282   
    #[::tracing_test::traced_test]
  266    283   
    async fn rest_json_supports_na_n_float_labels_request() {
  267    284   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  268    285   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  269    286   
@@ -318,335 +447,523 @@
  338    355   
            .await;
  339    356   
        let _ = dbg!(result);
  340    357   
        let http_request = request_receiver.expect_request();
  341    358   
        let body = http_request.body().bytes().expect("body should be strict");
  342    359   
        // No body.
  343    360   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  344    361   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  345    362   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  346    363   
        ::pretty_assertions::assert_eq!(uri.path(), "/FloatHttpLabels/-Infinity/-Infinity", "path was incorrect");
  347    364   
    }
         365  +
         366  +
    /* ProtocolTestGenerator.kt:98 */
  348    367   
}
  349    368   
         369  +
/* OperationErrorGenerator.kt:79 */
  350    370   
/// Error type for the `HttpRequestWithFloatLabelsError` operation.
         371  +
/* RustType.kt:516 */
  351    372   
#[non_exhaustive]
         373  +
/* RustType.kt:516 */
  352    374   
#[derive(::std::fmt::Debug)]
  353         -
pub enum HttpRequestWithFloatLabelsError {
         375  +
pub /* OperationErrorGenerator.kt:81 */ enum HttpRequestWithFloatLabelsError {
         376  +
    /* OperationErrorGenerator.kt:88 */
  354    377   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  355    378   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  356    379   
    variable wildcard pattern and check `.code()`:
  357    380   
     \
  358    381   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  359    382   
     \
  360    383   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HttpRequestWithFloatLabelsError) for what information is available for the error.")]
  361    384   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         385  +
    /* OperationErrorGenerator.kt:81 */
  362    386   
}
         387  +
/* OperationErrorGenerator.kt:218 */
  363    388   
impl HttpRequestWithFloatLabelsError {
         389  +
    /* OperationErrorGenerator.kt:219 */
  364    390   
    /// Creates the `HttpRequestWithFloatLabelsError::Unhandled` variant from any error type.
  365    391   
    pub fn unhandled(
  366    392   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  367    393   
    ) -> Self {
  368    394   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  369    395   
            source: err.into(),
  370    396   
            meta: ::std::default::Default::default(),
  371    397   
        })
  372    398   
    }
  373    399   
  374    400   
    /// Creates the `HttpRequestWithFloatLabelsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  375    401   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  376    402   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  377    403   
            source: err.clone().into(),
  378    404   
            meta: err,
  379    405   
        })
  380    406   
    }
  381         -
    ///
         407  +
    /// /* OperationErrorGenerator.kt:236 */
  382    408   
    /// Returns error metadata, which includes the error code, message,
  383    409   
    /// request ID, and potentially additional information.
  384    410   
    ///
         411  +
    /* OperationErrorGenerator.kt:242 */
  385    412   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         413  +
        /* OperationErrorGenerator.kt:243 */
  386    414   
        match self {
  387         -
            Self::Unhandled(e) => &e.meta,
         415  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         416  +
            /* OperationErrorGenerator.kt:243 */
  388    417   
        }
         418  +
        /* OperationErrorGenerator.kt:242 */
  389    419   
    }
         420  +
    /* OperationErrorGenerator.kt:218 */
  390    421   
}
         422  +
/* OperationErrorGenerator.kt:269 */
  391    423   
impl ::std::error::Error for HttpRequestWithFloatLabelsError {
         424  +
    /* OperationErrorGenerator.kt:270 */
  392    425   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         426  +
        /* OperationErrorGenerator.kt:318 */
  393    427   
        match self {
  394         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         428  +
            /* OperationErrorGenerator.kt:326 */
         429  +
            Self::Unhandled(_inner) => {
         430  +
                /* OperationErrorGenerator.kt:279 */
         431  +
                ::std::option::Option::Some(&*_inner.source)
         432  +
                /* OperationErrorGenerator.kt:326 */
         433  +
            } /* OperationErrorGenerator.kt:318 */
  395    434   
        }
         435  +
        /* OperationErrorGenerator.kt:270 */
  396    436   
    }
         437  +
    /* OperationErrorGenerator.kt:269 */
  397    438   
}
         439  +
/* OperationErrorGenerator.kt:133 */
  398    440   
impl ::std::fmt::Display for HttpRequestWithFloatLabelsError {
         441  +
    /* OperationErrorGenerator.kt:134 */
  399    442   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         443  +
        /* OperationErrorGenerator.kt:318 */
  400    444   
        match self {
         445  +
            /* OperationErrorGenerator.kt:326 */
  401    446   
            Self::Unhandled(_inner) => {
         447  +
                /* OperationErrorGenerator.kt:139 */
  402    448   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  403    449   
                    write!(f, "unhandled error ({code})")
  404    450   
                } else {
  405    451   
                    f.write_str("unhandled error")
  406    452   
                }
  407         -
            }
         453  +
                /* OperationErrorGenerator.kt:326 */
         454  +
            } /* OperationErrorGenerator.kt:318 */
  408    455   
        }
         456  +
        /* OperationErrorGenerator.kt:134 */
  409    457   
    }
         458  +
    /* OperationErrorGenerator.kt:133 */
  410    459   
}
         460  +
/* OperationErrorGenerator.kt:182 */
  411    461   
impl ::aws_smithy_types::retry::ProvideErrorKind for HttpRequestWithFloatLabelsError {
         462  +
    /* OperationErrorGenerator.kt:186 */
  412    463   
    fn code(&self) -> ::std::option::Option<&str> {
         464  +
        /* OperationErrorGenerator.kt:187 */
  413    465   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         466  +
        /* OperationErrorGenerator.kt:186 */
  414    467   
    }
         468  +
    /* OperationErrorGenerator.kt:190 */
  415    469   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         470  +
        /* OperationErrorGenerator.kt:197 */
  416    471   
        ::std::option::Option::None
         472  +
        /* OperationErrorGenerator.kt:190 */
  417    473   
    }
         474  +
    /* OperationErrorGenerator.kt:182 */
  418    475   
}
         476  +
/* OperationErrorGenerator.kt:163 */
  419    477   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HttpRequestWithFloatLabelsError {
         478  +
    /* OperationErrorGenerator.kt:164 */
  420    479   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         480  +
        /* OperationErrorGenerator.kt:318 */
  421    481   
        match self {
  422         -
            Self::Unhandled(_inner) => &_inner.meta,
         482  +
            /* OperationErrorGenerator.kt:326 */
         483  +
            Self::Unhandled(_inner) => {
         484  +
                /* OperationErrorGenerator.kt:168 */
         485  +
                &_inner.meta
         486  +
                /* OperationErrorGenerator.kt:326 */
         487  +
            } /* OperationErrorGenerator.kt:318 */
  423    488   
        }
         489  +
        /* OperationErrorGenerator.kt:164 */
  424    490   
    }
         491  +
    /* OperationErrorGenerator.kt:163 */
  425    492   
}
         493  +
/* OperationErrorGenerator.kt:109 */
  426    494   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HttpRequestWithFloatLabelsError {
         495  +
    /* OperationErrorGenerator.kt:110 */
  427    496   
    fn create_unhandled_error(
  428    497   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  429    498   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  430    499   
    ) -> Self {
         500  +
        /* OperationErrorGenerator.kt:121 */
  431    501   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  432    502   
            source,
  433    503   
            meta: meta.unwrap_or_default(),
  434    504   
        })
         505  +
        /* OperationErrorGenerator.kt:110 */
  435    506   
    }
         507  +
    /* OperationErrorGenerator.kt:109 */
  436    508   
}
  437    509   
         510  +
/* CodegenDelegator.kt:255 */
  438    511   
pub use crate::operation::http_request_with_float_labels::_http_request_with_float_labels_output::HttpRequestWithFloatLabelsOutput;
  439    512   
         513  +
/* CodegenDelegator.kt:255 */
  440    514   
pub use crate::operation::http_request_with_float_labels::_http_request_with_float_labels_input::HttpRequestWithFloatLabelsInput;
  441    515   
         516  +
/* RustModule.kt:172 */
  442    517   
mod _http_request_with_float_labels_input;
  443    518   
         519  +
/* RustModule.kt:172 */
  444    520   
mod _http_request_with_float_labels_output;
  445    521   
  446         -
/// Builders
         522  +
/// /* CodegenDelegator.kt:51 */Builders
  447    523   
pub mod builders;

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

@@ -1,1 +78,138 @@
    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 HttpRequestWithFloatLabelsInput {
    6         -
    #[allow(missing_docs)] // documentation missing in model
           8  +
pub /* StructureGenerator.kt:201 */ struct HttpRequestWithFloatLabelsInput {
           9  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    7     10   
    pub float: ::std::option::Option<f32>,
          11  +
    /* StructureGenerator.kt:231 */
    8     12   
    #[allow(missing_docs)] // documentation missing in model
    9     13   
    pub double: ::std::option::Option<f64>,
          14  +
    /* StructureGenerator.kt:201 */
   10     15   
}
          16  +
/* StructureGenerator.kt:135 */
   11     17   
impl HttpRequestWithFloatLabelsInput {
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
          20  +
                           /* StructureGenerator.kt:166 */
   13     21   
    pub fn float(&self) -> ::std::option::Option<f32> {
          22  +
        /* StructureGenerator.kt:168 */
   14     23   
        self.float
          24  +
        /* StructureGenerator.kt:166 */
   15     25   
    }
          26  +
    /* StructureGenerator.kt:231 */
   16     27   
    #[allow(missing_docs)] // documentation missing in model
          28  +
                           /* StructureGenerator.kt:166 */
   17     29   
    pub fn double(&self) -> ::std::option::Option<f64> {
          30  +
        /* StructureGenerator.kt:168 */
   18     31   
        self.double
          32  +
        /* StructureGenerator.kt:166 */
   19     33   
    }
          34  +
    /* StructureGenerator.kt:135 */
   20     35   
}
          36  +
/* ClientCodegenVisitor.kt:237 */
   21     37   
impl HttpRequestWithFloatLabelsInput {
   22         -
    /// Creates a new builder-style object to manufacture [`HttpRequestWithFloatLabelsInput`](crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsInput).
          38  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`HttpRequestWithFloatLabelsInput`](crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsInput).
          39  +
    /* BuilderGenerator.kt:175 */
   23     40   
    pub fn builder() -> crate::operation::http_request_with_float_labels::builders::HttpRequestWithFloatLabelsInputBuilder {
          41  +
        /* BuilderGenerator.kt:176 */
   24     42   
        crate::operation::http_request_with_float_labels::builders::HttpRequestWithFloatLabelsInputBuilder::default()
          43  +
        /* BuilderGenerator.kt:175 */
   25     44   
    }
          45  +
    /* ClientCodegenVisitor.kt:237 */
   26     46   
}
   27     47   
   28         -
/// A builder for [`HttpRequestWithFloatLabelsInput`](crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsInput).
          48  +
/// /* BuilderGenerator.kt:342 */A builder for [`HttpRequestWithFloatLabelsInput`](crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsInput).
          49  +
/* RustType.kt:516 */
   29     50   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          51  +
/* RustType.kt:516 */
   30     52   
#[non_exhaustive]
          53  +
/* BuilderGenerator.kt:345 */
   31     54   
pub struct HttpRequestWithFloatLabelsInputBuilder {
   32         -
    pub(crate) float: ::std::option::Option<f32>,
   33         -
    pub(crate) double: ::std::option::Option<f64>,
          55  +
    /* BuilderGenerator.kt:275 */ pub(crate) float: ::std::option::Option<f32>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) double: ::std::option::Option<f64>,
          57  +
    /* BuilderGenerator.kt:345 */
   34     58   
}
          59  +
/* BuilderGenerator.kt:355 */
   35     60   
impl HttpRequestWithFloatLabelsInputBuilder {
          61  +
    /* BuilderGenerator.kt:286 */
   36     62   
    #[allow(missing_docs)] // documentation missing in model
   37         -
    /// This field is required.
          63  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          64  +
    /* BuilderGenerator.kt:291 */
   38     65   
    pub fn float(mut self, input: f32) -> Self {
          66  +
        /* BuilderGenerator.kt:292 */
   39     67   
        self.float = ::std::option::Option::Some(input);
          68  +
        /* BuilderGenerator.kt:293 */
   40     69   
        self
          70  +
        /* BuilderGenerator.kt:291 */
   41     71   
    }
          72  +
    /* BuilderGenerator.kt:312 */
   42     73   
    #[allow(missing_docs)] // documentation missing in model
          74  +
                           /* BuilderGenerator.kt:314 */
   43     75   
    pub fn set_float(mut self, input: ::std::option::Option<f32>) -> Self {
          76  +
        /* BuilderGenerator.kt:315 */
   44     77   
        self.float = input;
   45     78   
        self
          79  +
        /* BuilderGenerator.kt:314 */
   46     80   
    }
          81  +
    /* BuilderGenerator.kt:334 */
   47     82   
    #[allow(missing_docs)] // documentation missing in model
          83  +
                           /* BuilderGenerator.kt:336 */
   48     84   
    pub fn get_float(&self) -> &::std::option::Option<f32> {
          85  +
        /* BuilderGenerator.kt:337 */
   49     86   
        &self.float
          87  +
        /* BuilderGenerator.kt:336 */
   50     88   
    }
          89  +
    /* BuilderGenerator.kt:286 */
   51     90   
    #[allow(missing_docs)] // documentation missing in model
   52         -
    /// This field is required.
          91  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          92  +
    /* BuilderGenerator.kt:291 */
   53     93   
    pub fn double(mut self, input: f64) -> Self {
          94  +
        /* BuilderGenerator.kt:292 */
   54     95   
        self.double = ::std::option::Option::Some(input);
          96  +
        /* BuilderGenerator.kt:293 */
   55     97   
        self
          98  +
        /* BuilderGenerator.kt:291 */
   56     99   
    }
         100  +
    /* BuilderGenerator.kt:312 */
   57    101   
    #[allow(missing_docs)] // documentation missing in model
         102  +
                           /* BuilderGenerator.kt:314 */
   58    103   
    pub fn set_double(mut self, input: ::std::option::Option<f64>) -> Self {
         104  +
        /* BuilderGenerator.kt:315 */
   59    105   
        self.double = input;
   60    106   
        self
         107  +
        /* BuilderGenerator.kt:314 */
   61    108   
    }
         109  +
    /* BuilderGenerator.kt:334 */
   62    110   
    #[allow(missing_docs)] // documentation missing in model
         111  +
                           /* BuilderGenerator.kt:336 */
   63    112   
    pub fn get_double(&self) -> &::std::option::Option<f64> {
         113  +
        /* BuilderGenerator.kt:337 */
   64    114   
        &self.double
         115  +
        /* BuilderGenerator.kt:336 */
   65    116   
    }
   66         -
    /// Consumes the builder and constructs a [`HttpRequestWithFloatLabelsInput`](crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsInput).
         117  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`HttpRequestWithFloatLabelsInput`](crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsInput).
         118  +
    /* BuilderGenerator.kt:253 */
   67    119   
    pub fn build(
   68    120   
        self,
   69    121   
    ) -> ::std::result::Result<
   70    122   
        crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsInput,
   71    123   
        ::aws_smithy_types::error::operation::BuildError,
   72    124   
    > {
   73         -
        ::std::result::Result::Ok(crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsInput {
   74         -
            float: self.float,
   75         -
            double: self.double,
   76         -
        })
         125  +
        /* BuilderGenerator.kt:254 */
         126  +
        ::std::result::Result::Ok(
         127  +
            /* BuilderGenerator.kt:477 */
         128  +
            crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsInput {
         129  +
                /* BuilderGenerator.kt:481 */ float: self.float,
         130  +
                /* BuilderGenerator.kt:481 */
         131  +
                double: self.double,
         132  +
                /* BuilderGenerator.kt:477 */
         133  +
            }, /* BuilderGenerator.kt:254 */
         134  +
        )
         135  +
        /* BuilderGenerator.kt:253 */
   77    136   
    }
         137  +
    /* BuilderGenerator.kt:355 */
   78    138   
}

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

@@ -1,1 +22,39 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct HttpRequestWithFloatLabelsOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct HttpRequestWithFloatLabelsOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl HttpRequestWithFloatLabelsOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`HttpRequestWithFloatLabelsOutput`](crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`HttpRequestWithFloatLabelsOutput`](crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::http_request_with_float_labels::builders::HttpRequestWithFloatLabelsOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::http_request_with_float_labels::builders::HttpRequestWithFloatLabelsOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`HttpRequestWithFloatLabelsOutput`](crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`HttpRequestWithFloatLabelsOutput`](crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsOutput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct HttpRequestWithFloatLabelsOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct HttpRequestWithFloatLabelsOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl HttpRequestWithFloatLabelsOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`HttpRequestWithFloatLabelsOutput`](crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`HttpRequestWithFloatLabelsOutput`](crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsOutput {
   20         -
        crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/http_request_with_greedy_label_in_path.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 `HttpRequestWithGreedyLabelInPath`.
           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 HttpRequestWithGreedyLabelInPath;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl HttpRequestWithGreedyLabelInPath {
    7         -
    /// Creates a new `HttpRequestWithGreedyLabelInPath`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `HttpRequestWithGreedyLabelInPath`
          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::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +190,203 @@
   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 HttpRequestWithGreedyLabelInPath {
   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("HttpRequestWithGreedyLabelInPath");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            HttpRequestWithGreedyLabelInPathRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            HttpRequestWithGreedyLabelInPathResponseDeserializer,
  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   
            "HttpRequestWithGreedyLabelInPath",
  111    122   
            "Rest Json Protocol",
  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("HttpRequestWithGreedyLabelInPath")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(HttpRequestWithGreedyLabelInPathEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathError,
  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 HttpRequestWithGreedyLabelInPathResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpRequestWithGreedyLabelInPathResponseDeserializer {
  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_http_request_with_greedy_label_in_path::de_http_request_with_greedy_label_in_path_http_error(
  151    163   
                status, headers, body,
  152    164   
            )
  153    165   
        } else {
  154    166   
            crate::protocol_serde::shape_http_request_with_greedy_label_in_path::de_http_request_with_greedy_label_in_path_http_response(
  155    167   
                status, headers, body,
  156    168   
            )
  157    169   
        };
  158    170   
        crate::protocol_serde::type_erase_result(parse_result)
  159    171   
    }
  160    172   
}
         173  +
/* RequestSerializerGenerator.kt:67 */
  161    174   
#[derive(Debug)]
  162    175   
struct HttpRequestWithGreedyLabelInPathRequestSerializer;
  163    176   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpRequestWithGreedyLabelInPathRequestSerializer {
  164    177   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  165    178   
    fn serialize_input(
  166    179   
        &self,
  167    180   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  168    181   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  169    182   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  170    183   
        let input = input
@@ -196,209 +392,468 @@
  216    229   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  217    230   
            }
  218    231   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  219    232   
            builder
  220    233   
        };
  221    234   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  222    235   
  223    236   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  224    237   
    }
  225    238   
}
         239  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  226    240   
#[derive(Debug)]
  227    241   
struct HttpRequestWithGreedyLabelInPathEndpointParamsInterceptor;
  228    242   
  229    243   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpRequestWithGreedyLabelInPathEndpointParamsInterceptor {
  230    244   
    fn name(&self) -> &'static str {
  231    245   
        "HttpRequestWithGreedyLabelInPathEndpointParamsInterceptor"
  232    246   
    }
  233    247   
  234    248   
    fn read_before_execution(
  235    249   
        &self,
  236    250   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  237    251   
            '_,
  238    252   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  239    253   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  240    254   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  241    255   
        >,
  242    256   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  243    257   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  244    258   
        let _input = context
  245    259   
            .input()
  246    260   
            .downcast_ref::<HttpRequestWithGreedyLabelInPathInput>()
  247    261   
            .ok_or("failed to downcast to HttpRequestWithGreedyLabelInPathInput")?;
  248    262   
  249    263   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  250    264   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  251    265   
        })?;
  252    266   
        cfg.interceptor_state()
  253    267   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  254    268   
        ::std::result::Result::Ok(())
  255    269   
    }
  256    270   
}
  257    271   
  258    272   
// The get_* functions below are generated from JMESPath expressions in the
  259    273   
// operationContextParams trait. They target the operation's input shape.
  260    274   
         275  +
/* RustType.kt:516 */
  261    276   
#[allow(unreachable_code, unused_variables)]
         277  +
/* RustType.kt:516 */
  262    278   
#[cfg(test)]
         279  +
/* ProtocolTestGenerator.kt:98 */
  263    280   
mod http_request_with_greedy_label_in_path_test {
  264    281   
  265    282   
    /// Serializes greedy labels and normal labels
  266    283   
    /// Test ID: RestJsonHttpRequestWithGreedyLabelInPath
  267    284   
    #[::tokio::test]
  268    285   
    #[::tracing_test::traced_test]
  269    286   
    async fn rest_json_http_request_with_greedy_label_in_path_request() {
  270    287   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  271    288   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  272    289   
  273    290   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  274    291   
        let result = client
  275    292   
            .http_request_with_greedy_label_in_path()
  276    293   
            .set_foo(::std::option::Option::Some("hello/escape".to_owned()))
  277    294   
            .set_baz(::std::option::Option::Some("there/guy".to_owned()))
  278    295   
            .send()
  279    296   
            .await;
  280    297   
        let _ = dbg!(result);
  281    298   
        let http_request = request_receiver.expect_request();
  282    299   
        let body = http_request.body().bytes().expect("body should be strict");
  283    300   
        // No body.
  284    301   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  285    302   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  286    303   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  287    304   
        ::pretty_assertions::assert_eq!(
  288    305   
            uri.path(),
  289    306   
            "/HttpRequestWithGreedyLabelInPath/foo/hello%2Fescape/baz/there/guy",
  290    307   
            "path was incorrect"
  291    308   
        );
  292    309   
    }
         310  +
         311  +
    /* ProtocolTestGenerator.kt:98 */
  293    312   
}
  294    313   
         314  +
/* OperationErrorGenerator.kt:79 */
  295    315   
/// Error type for the `HttpRequestWithGreedyLabelInPathError` operation.
         316  +
/* RustType.kt:516 */
  296    317   
#[non_exhaustive]
         318  +
/* RustType.kt:516 */
  297    319   
#[derive(::std::fmt::Debug)]
  298         -
pub enum HttpRequestWithGreedyLabelInPathError {
         320  +
pub /* OperationErrorGenerator.kt:81 */ enum HttpRequestWithGreedyLabelInPathError {
         321  +
    /* OperationErrorGenerator.kt:88 */
  299    322   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  300    323   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  301    324   
    variable wildcard pattern and check `.code()`:
  302    325   
     \
  303    326   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  304    327   
     \
  305    328   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HttpRequestWithGreedyLabelInPathError) for what information is available for the error.")]
  306    329   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         330  +
    /* OperationErrorGenerator.kt:81 */
  307    331   
}
         332  +
/* OperationErrorGenerator.kt:218 */
  308    333   
impl HttpRequestWithGreedyLabelInPathError {
         334  +
    /* OperationErrorGenerator.kt:219 */
  309    335   
    /// Creates the `HttpRequestWithGreedyLabelInPathError::Unhandled` variant from any error type.
  310    336   
    pub fn unhandled(
  311    337   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  312    338   
    ) -> Self {
  313    339   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  314    340   
            source: err.into(),
  315    341   
            meta: ::std::default::Default::default(),
  316    342   
        })
  317    343   
    }
  318    344   
  319    345   
    /// Creates the `HttpRequestWithGreedyLabelInPathError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  320    346   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  321    347   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  322    348   
            source: err.clone().into(),
  323    349   
            meta: err,
  324    350   
        })
  325    351   
    }
  326         -
    ///
         352  +
    /// /* OperationErrorGenerator.kt:236 */
  327    353   
    /// Returns error metadata, which includes the error code, message,
  328    354   
    /// request ID, and potentially additional information.
  329    355   
    ///
         356  +
    /* OperationErrorGenerator.kt:242 */
  330    357   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         358  +
        /* OperationErrorGenerator.kt:243 */
  331    359   
        match self {
  332         -
            Self::Unhandled(e) => &e.meta,
         360  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         361  +
            /* OperationErrorGenerator.kt:243 */
  333    362   
        }
         363  +
        /* OperationErrorGenerator.kt:242 */
  334    364   
    }
         365  +
    /* OperationErrorGenerator.kt:218 */
  335    366   
}
         367  +
/* OperationErrorGenerator.kt:269 */
  336    368   
impl ::std::error::Error for HttpRequestWithGreedyLabelInPathError {
         369  +
    /* OperationErrorGenerator.kt:270 */
  337    370   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         371  +
        /* OperationErrorGenerator.kt:318 */
  338    372   
        match self {
  339         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         373  +
            /* OperationErrorGenerator.kt:326 */
         374  +
            Self::Unhandled(_inner) => {
         375  +
                /* OperationErrorGenerator.kt:279 */
         376  +
                ::std::option::Option::Some(&*_inner.source)
         377  +
                /* OperationErrorGenerator.kt:326 */
         378  +
            } /* OperationErrorGenerator.kt:318 */
  340    379   
        }
         380  +
        /* OperationErrorGenerator.kt:270 */
  341    381   
    }
         382  +
    /* OperationErrorGenerator.kt:269 */
  342    383   
}
         384  +
/* OperationErrorGenerator.kt:133 */
  343    385   
impl ::std::fmt::Display for HttpRequestWithGreedyLabelInPathError {
         386  +
    /* OperationErrorGenerator.kt:134 */
  344    387   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         388  +
        /* OperationErrorGenerator.kt:318 */
  345    389   
        match self {
         390  +
            /* OperationErrorGenerator.kt:326 */
  346    391   
            Self::Unhandled(_inner) => {
         392  +
                /* OperationErrorGenerator.kt:139 */
  347    393   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  348    394   
                    write!(f, "unhandled error ({code})")
  349    395   
                } else {
  350    396   
                    f.write_str("unhandled error")
  351    397   
                }
  352         -
            }
         398  +
                /* OperationErrorGenerator.kt:326 */
         399  +
            } /* OperationErrorGenerator.kt:318 */
  353    400   
        }
         401  +
        /* OperationErrorGenerator.kt:134 */
  354    402   
    }
         403  +
    /* OperationErrorGenerator.kt:133 */
  355    404   
}
         405  +
/* OperationErrorGenerator.kt:182 */
  356    406   
impl ::aws_smithy_types::retry::ProvideErrorKind for HttpRequestWithGreedyLabelInPathError {
         407  +
    /* OperationErrorGenerator.kt:186 */
  357    408   
    fn code(&self) -> ::std::option::Option<&str> {
         409  +
        /* OperationErrorGenerator.kt:187 */
  358    410   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         411  +
        /* OperationErrorGenerator.kt:186 */
  359    412   
    }
         413  +
    /* OperationErrorGenerator.kt:190 */
  360    414   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         415  +
        /* OperationErrorGenerator.kt:197 */
  361    416   
        ::std::option::Option::None
         417  +
        /* OperationErrorGenerator.kt:190 */
  362    418   
    }
         419  +
    /* OperationErrorGenerator.kt:182 */
  363    420   
}
         421  +
/* OperationErrorGenerator.kt:163 */
  364    422   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HttpRequestWithGreedyLabelInPathError {
         423  +
    /* OperationErrorGenerator.kt:164 */
  365    424   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         425  +
        /* OperationErrorGenerator.kt:318 */
  366    426   
        match self {
  367         -
            Self::Unhandled(_inner) => &_inner.meta,
         427  +
            /* OperationErrorGenerator.kt:326 */
         428  +
            Self::Unhandled(_inner) => {
         429  +
                /* OperationErrorGenerator.kt:168 */
         430  +
                &_inner.meta
         431  +
                /* OperationErrorGenerator.kt:326 */
         432  +
            } /* OperationErrorGenerator.kt:318 */
  368    433   
        }
         434  +
        /* OperationErrorGenerator.kt:164 */
  369    435   
    }
         436  +
    /* OperationErrorGenerator.kt:163 */
  370    437   
}
         438  +
/* OperationErrorGenerator.kt:109 */
  371    439   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HttpRequestWithGreedyLabelInPathError {
         440  +
    /* OperationErrorGenerator.kt:110 */
  372    441   
    fn create_unhandled_error(
  373    442   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  374    443   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  375    444   
    ) -> Self {
         445  +
        /* OperationErrorGenerator.kt:121 */
  376    446   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  377    447   
            source,
  378    448   
            meta: meta.unwrap_or_default(),
  379    449   
        })
         450  +
        /* OperationErrorGenerator.kt:110 */
  380    451   
    }
         452  +
    /* OperationErrorGenerator.kt:109 */
  381    453   
}
  382    454   
         455  +
/* CodegenDelegator.kt:255 */
  383    456   
pub use crate::operation::http_request_with_greedy_label_in_path::_http_request_with_greedy_label_in_path_output::HttpRequestWithGreedyLabelInPathOutput;
  384    457   
         458  +
/* CodegenDelegator.kt:255 */
  385    459   
pub use crate::operation::http_request_with_greedy_label_in_path::_http_request_with_greedy_label_in_path_input::HttpRequestWithGreedyLabelInPathInput;
  386    460   
         461  +
/* RustModule.kt:172 */
  387    462   
mod _http_request_with_greedy_label_in_path_input;
  388    463   
         464  +
/* RustModule.kt:172 */
  389    465   
mod _http_request_with_greedy_label_in_path_output;
  390    466   
  391         -
/// Builders
         467  +
/// /* CodegenDelegator.kt:51 */Builders
  392    468   
pub mod builders;

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

@@ -1,1 +80,139 @@
    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 HttpRequestWithGreedyLabelInPathInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct HttpRequestWithGreedyLabelInPathInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub baz: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl HttpRequestWithGreedyLabelInPathInput {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.foo.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn baz(&self) -> ::std::option::Option<&str> {
          31  +
        /* StructureGenerator.kt:169 */
   18     32   
        self.baz.as_deref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl HttpRequestWithGreedyLabelInPathInput {
   22         -
    /// Creates a new builder-style object to manufacture [`HttpRequestWithGreedyLabelInPathInput`](crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathInput).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`HttpRequestWithGreedyLabelInPathInput`](crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathInput).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::operation::http_request_with_greedy_label_in_path::builders::HttpRequestWithGreedyLabelInPathInputBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::operation::http_request_with_greedy_label_in_path::builders::HttpRequestWithGreedyLabelInPathInputBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`HttpRequestWithGreedyLabelInPathInput`](crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathInput).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`HttpRequestWithGreedyLabelInPathInput`](crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathInput).
          50  +
/* RustType.kt:516 */
   29     51   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          52  +
/* RustType.kt:516 */
   30     53   
#[non_exhaustive]
          54  +
/* BuilderGenerator.kt:345 */
   31     55   
pub struct HttpRequestWithGreedyLabelInPathInputBuilder {
   32         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
   33         -
    pub(crate) baz: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) baz: ::std::option::Option<::std::string::String>,
          58  +
    /* BuilderGenerator.kt:345 */
   34     59   
}
          60  +
/* BuilderGenerator.kt:355 */
   35     61   
impl HttpRequestWithGreedyLabelInPathInputBuilder {
          62  +
    /* BuilderGenerator.kt:286 */
   36     63   
    #[allow(missing_docs)] // documentation missing in model
   37         -
    /// This field is required.
          64  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          65  +
    /* BuilderGenerator.kt:291 */
   38     66   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          67  +
        /* BuilderGenerator.kt:292 */
   39     68   
        self.foo = ::std::option::Option::Some(input.into());
          69  +
        /* BuilderGenerator.kt:293 */
   40     70   
        self
          71  +
        /* BuilderGenerator.kt:291 */
   41     72   
    }
          73  +
    /* BuilderGenerator.kt:312 */
   42     74   
    #[allow(missing_docs)] // documentation missing in model
          75  +
                           /* BuilderGenerator.kt:314 */
   43     76   
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          77  +
        /* BuilderGenerator.kt:315 */
   44     78   
        self.foo = input;
   45     79   
        self
          80  +
        /* BuilderGenerator.kt:314 */
   46     81   
    }
          82  +
    /* BuilderGenerator.kt:334 */
   47     83   
    #[allow(missing_docs)] // documentation missing in model
          84  +
                           /* BuilderGenerator.kt:336 */
   48     85   
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
          86  +
        /* BuilderGenerator.kt:337 */
   49     87   
        &self.foo
          88  +
        /* BuilderGenerator.kt:336 */
   50     89   
    }
          90  +
    /* BuilderGenerator.kt:286 */
   51     91   
    #[allow(missing_docs)] // documentation missing in model
   52         -
    /// This field is required.
          92  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          93  +
    /* BuilderGenerator.kt:291 */
   53     94   
    pub fn baz(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          95  +
        /* BuilderGenerator.kt:292 */
   54     96   
        self.baz = ::std::option::Option::Some(input.into());
          97  +
        /* BuilderGenerator.kt:293 */
   55     98   
        self
          99  +
        /* BuilderGenerator.kt:291 */
   56    100   
    }
         101  +
    /* BuilderGenerator.kt:312 */
   57    102   
    #[allow(missing_docs)] // documentation missing in model
         103  +
                           /* BuilderGenerator.kt:314 */
   58    104   
    pub fn set_baz(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         105  +
        /* BuilderGenerator.kt:315 */
   59    106   
        self.baz = input;
   60    107   
        self
         108  +
        /* BuilderGenerator.kt:314 */
   61    109   
    }
         110  +
    /* BuilderGenerator.kt:334 */
   62    111   
    #[allow(missing_docs)] // documentation missing in model
         112  +
                           /* BuilderGenerator.kt:336 */
   63    113   
    pub fn get_baz(&self) -> &::std::option::Option<::std::string::String> {
         114  +
        /* BuilderGenerator.kt:337 */
   64    115   
        &self.baz
         116  +
        /* BuilderGenerator.kt:336 */
   65    117   
    }
   66         -
    /// Consumes the builder and constructs a [`HttpRequestWithGreedyLabelInPathInput`](crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathInput).
         118  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`HttpRequestWithGreedyLabelInPathInput`](crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathInput).
         119  +
    /* BuilderGenerator.kt:253 */
   67    120   
    pub fn build(
   68    121   
        self,
   69    122   
    ) -> ::std::result::Result<
   70    123   
        crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathInput,
   71    124   
        ::aws_smithy_types::error::operation::BuildError,
   72    125   
    > {
         126  +
        /* BuilderGenerator.kt:254 */
   73    127   
        ::std::result::Result::Ok(
         128  +
            /* BuilderGenerator.kt:477 */
   74    129   
            crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathInput {
   75         -
                foo: self.foo,
         130  +
                /* BuilderGenerator.kt:481 */ foo: self.foo,
         131  +
                /* BuilderGenerator.kt:481 */
   76    132   
                baz: self.baz,
   77         -
            },
         133  +
                /* BuilderGenerator.kt:477 */
         134  +
            }, /* BuilderGenerator.kt:254 */
   78    135   
        )
         136  +
        /* BuilderGenerator.kt:253 */
   79    137   
    }
         138  +
    /* BuilderGenerator.kt:355 */
   80    139   
}

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

@@ -1,1 +22,39 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct HttpRequestWithGreedyLabelInPathOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct HttpRequestWithGreedyLabelInPathOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl HttpRequestWithGreedyLabelInPathOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`HttpRequestWithGreedyLabelInPathOutput`](crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`HttpRequestWithGreedyLabelInPathOutput`](crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::http_request_with_greedy_label_in_path::builders::HttpRequestWithGreedyLabelInPathOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::http_request_with_greedy_label_in_path::builders::HttpRequestWithGreedyLabelInPathOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`HttpRequestWithGreedyLabelInPathOutput`](crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`HttpRequestWithGreedyLabelInPathOutput`](crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathOutput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct HttpRequestWithGreedyLabelInPathOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct HttpRequestWithGreedyLabelInPathOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl HttpRequestWithGreedyLabelInPathOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`HttpRequestWithGreedyLabelInPathOutput`](crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`HttpRequestWithGreedyLabelInPathOutput`](crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathOutput {
   20         -
        crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::http_request_with_greedy_label_in_path::HttpRequestWithGreedyLabelInPathOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/http_request_with_labels.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 `HttpRequestWithLabels`.
           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 HttpRequestWithLabels;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl HttpRequestWithLabels {
    7         -
    /// Creates a new `HttpRequestWithLabels`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `HttpRequestWithLabels`
          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::http_request_with_labels::HttpRequestWithLabelsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::http_request_with_labels::HttpRequestWithLabelsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::http_request_with_labels::HttpRequestWithLabelsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +186,199 @@
   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 HttpRequestWithLabels {
   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("HttpRequestWithLabels");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            HttpRequestWithLabelsRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            HttpRequestWithLabelsResponseDeserializer,
  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   
            "HttpRequestWithLabels",
  111    122   
            "Rest Json Protocol",
  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("HttpRequestWithLabels")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(HttpRequestWithLabelsEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::http_request_with_labels::HttpRequestWithLabelsError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::http_request_with_labels::HttpRequestWithLabelsError,
  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 HttpRequestWithLabelsResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpRequestWithLabelsResponseDeserializer {
  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_http_request_with_labels::de_http_request_with_labels_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_http_request_with_labels::de_http_request_with_labels_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 HttpRequestWithLabelsRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpRequestWithLabelsRequestSerializer {
  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
@@ -275,288 +371,388 @@
  295    308   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  296    309   
            }
  297    310   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  298    311   
            builder
  299    312   
        };
  300    313   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  301    314   
  302    315   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  303    316   
    }
  304    317   
}
         318  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  305    319   
#[derive(Debug)]
  306    320   
struct HttpRequestWithLabelsEndpointParamsInterceptor;
  307    321   
  308    322   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpRequestWithLabelsEndpointParamsInterceptor {
  309    323   
    fn name(&self) -> &'static str {
  310    324   
        "HttpRequestWithLabelsEndpointParamsInterceptor"
  311    325   
    }
  312    326   
  313    327   
    fn read_before_execution(
  314    328   
        &self,
  315    329   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  316    330   
            '_,
  317    331   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  318    332   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  319    333   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  320    334   
        >,
  321    335   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  322    336   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  323    337   
        let _input = context
  324    338   
            .input()
  325    339   
            .downcast_ref::<HttpRequestWithLabelsInput>()
  326    340   
            .ok_or("failed to downcast to HttpRequestWithLabelsInput")?;
  327    341   
  328    342   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  329    343   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  330    344   
        })?;
  331    345   
        cfg.interceptor_state()
  332    346   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  333    347   
        ::std::result::Result::Ok(())
  334    348   
    }
  335    349   
}
  336    350   
  337    351   
// The get_* functions below are generated from JMESPath expressions in the
  338    352   
// operationContextParams trait. They target the operation's input shape.
  339    353   
         354  +
/* RustType.kt:516 */
  340    355   
#[allow(unreachable_code, unused_variables)]
         356  +
/* RustType.kt:516 */
  341    357   
#[cfg(test)]
         358  +
/* ProtocolTestGenerator.kt:98 */
  342    359   
mod http_request_with_labels_test {
  343    360   
  344    361   
    /// Sends a GET request that uses URI label bindings
  345    362   
    /// Test ID: RestJsonInputWithHeadersAndAllParams
  346    363   
    #[::tokio::test]
  347    364   
    #[::tracing_test::traced_test]
  348    365   
    async fn rest_json_input_with_headers_and_all_params_request() {
  349    366   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  350    367   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  351    368   
@@ -383,400 +512,588 @@
  403    420   
            .await;
  404    421   
        let _ = dbg!(result);
  405    422   
        let http_request = request_receiver.expect_request();
  406    423   
        let body = http_request.body().bytes().expect("body should be strict");
  407    424   
        // No body.
  408    425   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  409    426   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  410    427   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  411    428   
        ::pretty_assertions::assert_eq!(uri.path(), "/HttpRequestWithLabels/%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9/1/2/3/4.1/5.1/true/2019-12-16T23%3A48%3A18Z", "path was incorrect");
  412    429   
    }
         430  +
         431  +
    /* ProtocolTestGenerator.kt:98 */
  413    432   
}
  414    433   
         434  +
/* OperationErrorGenerator.kt:79 */
  415    435   
/// Error type for the `HttpRequestWithLabelsError` operation.
         436  +
/* RustType.kt:516 */
  416    437   
#[non_exhaustive]
         438  +
/* RustType.kt:516 */
  417    439   
#[derive(::std::fmt::Debug)]
  418         -
pub enum HttpRequestWithLabelsError {
         440  +
pub /* OperationErrorGenerator.kt:81 */ enum HttpRequestWithLabelsError {
         441  +
    /* OperationErrorGenerator.kt:88 */
  419    442   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  420    443   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  421    444   
    variable wildcard pattern and check `.code()`:
  422    445   
     \
  423    446   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  424    447   
     \
  425    448   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HttpRequestWithLabelsError) for what information is available for the error.")]
  426    449   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         450  +
    /* OperationErrorGenerator.kt:81 */
  427    451   
}
         452  +
/* OperationErrorGenerator.kt:218 */
  428    453   
impl HttpRequestWithLabelsError {
         454  +
    /* OperationErrorGenerator.kt:219 */
  429    455   
    /// Creates the `HttpRequestWithLabelsError::Unhandled` variant from any error type.
  430    456   
    pub fn unhandled(
  431    457   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  432    458   
    ) -> Self {
  433    459   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  434    460   
            source: err.into(),
  435    461   
            meta: ::std::default::Default::default(),
  436    462   
        })
  437    463   
    }
  438    464   
  439    465   
    /// Creates the `HttpRequestWithLabelsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  440    466   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  441    467   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  442    468   
            source: err.clone().into(),
  443    469   
            meta: err,
  444    470   
        })
  445    471   
    }
  446         -
    ///
         472  +
    /// /* OperationErrorGenerator.kt:236 */
  447    473   
    /// Returns error metadata, which includes the error code, message,
  448    474   
    /// request ID, and potentially additional information.
  449    475   
    ///
         476  +
    /* OperationErrorGenerator.kt:242 */
  450    477   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         478  +
        /* OperationErrorGenerator.kt:243 */
  451    479   
        match self {
  452         -
            Self::Unhandled(e) => &e.meta,
         480  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         481  +
            /* OperationErrorGenerator.kt:243 */
  453    482   
        }
         483  +
        /* OperationErrorGenerator.kt:242 */
  454    484   
    }
         485  +
    /* OperationErrorGenerator.kt:218 */
  455    486   
}
         487  +
/* OperationErrorGenerator.kt:269 */
  456    488   
impl ::std::error::Error for HttpRequestWithLabelsError {
         489  +
    /* OperationErrorGenerator.kt:270 */
  457    490   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         491  +
        /* OperationErrorGenerator.kt:318 */
  458    492   
        match self {
  459         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         493  +
            /* OperationErrorGenerator.kt:326 */
         494  +
            Self::Unhandled(_inner) => {
         495  +
                /* OperationErrorGenerator.kt:279 */
         496  +
                ::std::option::Option::Some(&*_inner.source)
         497  +
                /* OperationErrorGenerator.kt:326 */
         498  +
            } /* OperationErrorGenerator.kt:318 */
  460    499   
        }
         500  +
        /* OperationErrorGenerator.kt:270 */
  461    501   
    }
         502  +
    /* OperationErrorGenerator.kt:269 */
  462    503   
}
         504  +
/* OperationErrorGenerator.kt:133 */
  463    505   
impl ::std::fmt::Display for HttpRequestWithLabelsError {
         506  +
    /* OperationErrorGenerator.kt:134 */
  464    507   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         508  +
        /* OperationErrorGenerator.kt:318 */
  465    509   
        match self {
         510  +
            /* OperationErrorGenerator.kt:326 */
  466    511   
            Self::Unhandled(_inner) => {
         512  +
                /* OperationErrorGenerator.kt:139 */
  467    513   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  468    514   
                    write!(f, "unhandled error ({code})")
  469    515   
                } else {
  470    516   
                    f.write_str("unhandled error")
  471    517   
                }
  472         -
            }
         518  +
                /* OperationErrorGenerator.kt:326 */
         519  +
            } /* OperationErrorGenerator.kt:318 */
  473    520   
        }
         521  +
        /* OperationErrorGenerator.kt:134 */
  474    522   
    }
         523  +
    /* OperationErrorGenerator.kt:133 */
  475    524   
}
         525  +
/* OperationErrorGenerator.kt:182 */
  476    526   
impl ::aws_smithy_types::retry::ProvideErrorKind for HttpRequestWithLabelsError {
         527  +
    /* OperationErrorGenerator.kt:186 */
  477    528   
    fn code(&self) -> ::std::option::Option<&str> {
         529  +
        /* OperationErrorGenerator.kt:187 */
  478    530   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         531  +
        /* OperationErrorGenerator.kt:186 */
  479    532   
    }
         533  +
    /* OperationErrorGenerator.kt:190 */
  480    534   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         535  +
        /* OperationErrorGenerator.kt:197 */
  481    536   
        ::std::option::Option::None
         537  +
        /* OperationErrorGenerator.kt:190 */
  482    538   
    }
         539  +
    /* OperationErrorGenerator.kt:182 */
  483    540   
}
         541  +
/* OperationErrorGenerator.kt:163 */
  484    542   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HttpRequestWithLabelsError {
         543  +
    /* OperationErrorGenerator.kt:164 */
  485    544   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         545  +
        /* OperationErrorGenerator.kt:318 */
  486    546   
        match self {
  487         -
            Self::Unhandled(_inner) => &_inner.meta,
         547  +
            /* OperationErrorGenerator.kt:326 */
         548  +
            Self::Unhandled(_inner) => {
         549  +
                /* OperationErrorGenerator.kt:168 */
         550  +
                &_inner.meta
         551  +
                /* OperationErrorGenerator.kt:326 */
         552  +
            } /* OperationErrorGenerator.kt:318 */
  488    553   
        }
         554  +
        /* OperationErrorGenerator.kt:164 */
  489    555   
    }
         556  +
    /* OperationErrorGenerator.kt:163 */
  490    557   
}
         558  +
/* OperationErrorGenerator.kt:109 */
  491    559   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HttpRequestWithLabelsError {
         560  +
    /* OperationErrorGenerator.kt:110 */
  492    561   
    fn create_unhandled_error(
  493    562   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  494    563   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  495    564   
    ) -> Self {
         565  +
        /* OperationErrorGenerator.kt:121 */
  496    566   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  497    567   
            source,
  498    568   
            meta: meta.unwrap_or_default(),
  499    569   
        })
         570  +
        /* OperationErrorGenerator.kt:110 */
  500    571   
    }
         572  +
    /* OperationErrorGenerator.kt:109 */
  501    573   
}
  502    574   
         575  +
/* CodegenDelegator.kt:255 */
  503    576   
pub use crate::operation::http_request_with_labels::_http_request_with_labels_output::HttpRequestWithLabelsOutput;
  504    577   
         578  +
/* CodegenDelegator.kt:255 */
  505    579   
pub use crate::operation::http_request_with_labels::_http_request_with_labels_input::HttpRequestWithLabelsInput;
  506    580   
         581  +
/* RustModule.kt:172 */
  507    582   
mod _http_request_with_labels_input;
  508    583   
         584  +
/* RustModule.kt:172 */
  509    585   
mod _http_request_with_labels_output;
  510    586   
  511         -
/// Builders
         587  +
/// /* CodegenDelegator.kt:51 */Builders
  512    588   
pub mod builders;

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

@@ -1,1 +214,374 @@
    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 HttpRequestWithLabelsInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct HttpRequestWithLabelsInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub string: ::std::option::Option<::std::string::String>,
    8         -
    #[allow(missing_docs)] // documentation missing in model
          12  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    9     13   
    pub short: ::std::option::Option<i16>,
   10         -
    #[allow(missing_docs)] // documentation missing in model
          14  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   11     15   
    pub integer: ::std::option::Option<i32>,
   12         -
    #[allow(missing_docs)] // documentation missing in model
          16  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   13     17   
    pub long: ::std::option::Option<i64>,
   14         -
    #[allow(missing_docs)] // documentation missing in model
          18  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   15     19   
    pub float: ::std::option::Option<f32>,
   16         -
    #[allow(missing_docs)] // documentation missing in model
          20  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   17     21   
    pub double: ::std::option::Option<f64>,
   18         -
    /// Serialized in the path as true or false.
          22  +
    /// /* StructureGenerator.kt:231 */Serialized in the path as true or false.
   19     23   
    pub boolean: ::std::option::Option<bool>,
   20         -
    /// Note that this member has no format, so it's serialized as an RFC 3399 date-time.
          24  +
    /// /* StructureGenerator.kt:231 */Note that this member has no format, so it's serialized as an RFC 3399 date-time.
   21     25   
    pub timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
          26  +
    /* StructureGenerator.kt:201 */
   22     27   
}
          28  +
/* StructureGenerator.kt:135 */
   23     29   
impl HttpRequestWithLabelsInput {
          30  +
    /* StructureGenerator.kt:231 */
   24     31   
    #[allow(missing_docs)] // documentation missing in model
          32  +
                           /* StructureGenerator.kt:166 */
   25     33   
    pub fn string(&self) -> ::std::option::Option<&str> {
          34  +
        /* StructureGenerator.kt:169 */
   26     35   
        self.string.as_deref()
          36  +
        /* StructureGenerator.kt:166 */
   27     37   
    }
          38  +
    /* StructureGenerator.kt:231 */
   28     39   
    #[allow(missing_docs)] // documentation missing in model
          40  +
                           /* StructureGenerator.kt:166 */
   29     41   
    pub fn short(&self) -> ::std::option::Option<i16> {
          42  +
        /* StructureGenerator.kt:168 */
   30     43   
        self.short
          44  +
        /* StructureGenerator.kt:166 */
   31     45   
    }
          46  +
    /* StructureGenerator.kt:231 */
   32     47   
    #[allow(missing_docs)] // documentation missing in model
          48  +
                           /* StructureGenerator.kt:166 */
   33     49   
    pub fn integer(&self) -> ::std::option::Option<i32> {
          50  +
        /* StructureGenerator.kt:168 */
   34     51   
        self.integer
          52  +
        /* StructureGenerator.kt:166 */
   35     53   
    }
          54  +
    /* StructureGenerator.kt:231 */
   36     55   
    #[allow(missing_docs)] // documentation missing in model
          56  +
                           /* StructureGenerator.kt:166 */
   37     57   
    pub fn long(&self) -> ::std::option::Option<i64> {
          58  +
        /* StructureGenerator.kt:168 */
   38     59   
        self.long
          60  +
        /* StructureGenerator.kt:166 */
   39     61   
    }
          62  +
    /* StructureGenerator.kt:231 */
   40     63   
    #[allow(missing_docs)] // documentation missing in model
          64  +
                           /* StructureGenerator.kt:166 */
   41     65   
    pub fn float(&self) -> ::std::option::Option<f32> {
          66  +
        /* StructureGenerator.kt:168 */
   42     67   
        self.float
          68  +
        /* StructureGenerator.kt:166 */
   43     69   
    }
          70  +
    /* StructureGenerator.kt:231 */
   44     71   
    #[allow(missing_docs)] // documentation missing in model
          72  +
                           /* StructureGenerator.kt:166 */
   45     73   
    pub fn double(&self) -> ::std::option::Option<f64> {
          74  +
        /* StructureGenerator.kt:168 */
   46     75   
        self.double
          76  +
        /* StructureGenerator.kt:166 */
   47     77   
    }
   48         -
    /// Serialized in the path as true or false.
          78  +
    /// /* StructureGenerator.kt:231 */Serialized in the path as true or false.
          79  +
    /* StructureGenerator.kt:166 */
   49     80   
    pub fn boolean(&self) -> ::std::option::Option<bool> {
          81  +
        /* StructureGenerator.kt:168 */
   50     82   
        self.boolean
          83  +
        /* StructureGenerator.kt:166 */
   51     84   
    }
   52         -
    /// Note that this member has no format, so it's serialized as an RFC 3399 date-time.
          85  +
    /// /* StructureGenerator.kt:231 */Note that this member has no format, so it's serialized as an RFC 3399 date-time.
          86  +
    /* StructureGenerator.kt:166 */
   53     87   
    pub fn timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          88  +
        /* StructureGenerator.kt:170 */
   54     89   
        self.timestamp.as_ref()
          90  +
        /* StructureGenerator.kt:166 */
   55     91   
    }
          92  +
    /* StructureGenerator.kt:135 */
   56     93   
}
          94  +
/* ClientCodegenVisitor.kt:237 */
   57     95   
impl HttpRequestWithLabelsInput {
   58         -
    /// Creates a new builder-style object to manufacture [`HttpRequestWithLabelsInput`](crate::operation::http_request_with_labels::HttpRequestWithLabelsInput).
          96  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`HttpRequestWithLabelsInput`](crate::operation::http_request_with_labels::HttpRequestWithLabelsInput).
          97  +
    /* BuilderGenerator.kt:175 */
   59     98   
    pub fn builder() -> crate::operation::http_request_with_labels::builders::HttpRequestWithLabelsInputBuilder {
          99  +
        /* BuilderGenerator.kt:176 */
   60    100   
        crate::operation::http_request_with_labels::builders::HttpRequestWithLabelsInputBuilder::default()
         101  +
        /* BuilderGenerator.kt:175 */
   61    102   
    }
         103  +
    /* ClientCodegenVisitor.kt:237 */
   62    104   
}
   63    105   
   64         -
/// A builder for [`HttpRequestWithLabelsInput`](crate::operation::http_request_with_labels::HttpRequestWithLabelsInput).
         106  +
/// /* BuilderGenerator.kt:342 */A builder for [`HttpRequestWithLabelsInput`](crate::operation::http_request_with_labels::HttpRequestWithLabelsInput).
         107  +
/* RustType.kt:516 */
   65    108   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         109  +
/* RustType.kt:516 */
   66    110   
#[non_exhaustive]
         111  +
/* BuilderGenerator.kt:345 */
   67    112   
pub struct HttpRequestWithLabelsInputBuilder {
   68         -
    pub(crate) string: ::std::option::Option<::std::string::String>,
   69         -
    pub(crate) short: ::std::option::Option<i16>,
   70         -
    pub(crate) integer: ::std::option::Option<i32>,
   71         -
    pub(crate) long: ::std::option::Option<i64>,
   72         -
    pub(crate) float: ::std::option::Option<f32>,
   73         -
    pub(crate) double: ::std::option::Option<f64>,
   74         -
    pub(crate) boolean: ::std::option::Option<bool>,
   75         -
    pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
         113  +
    /* BuilderGenerator.kt:275 */ pub(crate) string: ::std::option::Option<::std::string::String>,
         114  +
    /* BuilderGenerator.kt:275 */ pub(crate) short: ::std::option::Option<i16>,
         115  +
    /* BuilderGenerator.kt:275 */ pub(crate) integer: ::std::option::Option<i32>,
         116  +
    /* BuilderGenerator.kt:275 */ pub(crate) long: ::std::option::Option<i64>,
         117  +
    /* BuilderGenerator.kt:275 */ pub(crate) float: ::std::option::Option<f32>,
         118  +
    /* BuilderGenerator.kt:275 */ pub(crate) double: ::std::option::Option<f64>,
         119  +
    /* BuilderGenerator.kt:275 */ pub(crate) boolean: ::std::option::Option<bool>,
         120  +
    /* BuilderGenerator.kt:275 */ pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
         121  +
    /* BuilderGenerator.kt:345 */
   76    122   
}
         123  +
/* BuilderGenerator.kt:355 */
   77    124   
impl HttpRequestWithLabelsInputBuilder {
         125  +
    /* BuilderGenerator.kt:286 */
   78    126   
    #[allow(missing_docs)] // documentation missing in model
   79         -
    /// This field is required.
         127  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         128  +
    /* BuilderGenerator.kt:291 */
   80    129   
    pub fn string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         130  +
        /* BuilderGenerator.kt:292 */
   81    131   
        self.string = ::std::option::Option::Some(input.into());
         132  +
        /* BuilderGenerator.kt:293 */
   82    133   
        self
         134  +
        /* BuilderGenerator.kt:291 */
   83    135   
    }
         136  +
    /* BuilderGenerator.kt:312 */
   84    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* BuilderGenerator.kt:314 */
   85    139   
    pub fn set_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         140  +
        /* BuilderGenerator.kt:315 */
   86    141   
        self.string = input;
   87    142   
        self
         143  +
        /* BuilderGenerator.kt:314 */
   88    144   
    }
         145  +
    /* BuilderGenerator.kt:334 */
   89    146   
    #[allow(missing_docs)] // documentation missing in model
         147  +
                           /* BuilderGenerator.kt:336 */
   90    148   
    pub fn get_string(&self) -> &::std::option::Option<::std::string::String> {
         149  +
        /* BuilderGenerator.kt:337 */
   91    150   
        &self.string
         151  +
        /* BuilderGenerator.kt:336 */
   92    152   
    }
         153  +
    /* BuilderGenerator.kt:286 */
   93    154   
    #[allow(missing_docs)] // documentation missing in model
   94         -
    /// This field is required.
         155  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         156  +
    /* BuilderGenerator.kt:291 */
   95    157   
    pub fn short(mut self, input: i16) -> Self {
         158  +
        /* BuilderGenerator.kt:292 */
   96    159   
        self.short = ::std::option::Option::Some(input);
         160  +
        /* BuilderGenerator.kt:293 */
   97    161   
        self
         162  +
        /* BuilderGenerator.kt:291 */
   98    163   
    }
         164  +
    /* BuilderGenerator.kt:312 */
   99    165   
    #[allow(missing_docs)] // documentation missing in model
         166  +
                           /* BuilderGenerator.kt:314 */
  100    167   
    pub fn set_short(mut self, input: ::std::option::Option<i16>) -> Self {
         168  +
        /* BuilderGenerator.kt:315 */
  101    169   
        self.short = input;
  102    170   
        self
         171  +
        /* BuilderGenerator.kt:314 */
  103    172   
    }
         173  +
    /* BuilderGenerator.kt:334 */
  104    174   
    #[allow(missing_docs)] // documentation missing in model
         175  +
                           /* BuilderGenerator.kt:336 */
  105    176   
    pub fn get_short(&self) -> &::std::option::Option<i16> {
         177  +
        /* BuilderGenerator.kt:337 */
  106    178   
        &self.short
         179  +
        /* BuilderGenerator.kt:336 */
  107    180   
    }
         181  +
    /* BuilderGenerator.kt:286 */
  108    182   
    #[allow(missing_docs)] // documentation missing in model
  109         -
    /// This field is required.
         183  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         184  +
    /* BuilderGenerator.kt:291 */
  110    185   
    pub fn integer(mut self, input: i32) -> Self {
         186  +
        /* BuilderGenerator.kt:292 */
  111    187   
        self.integer = ::std::option::Option::Some(input);
         188  +
        /* BuilderGenerator.kt:293 */
  112    189   
        self
         190  +
        /* BuilderGenerator.kt:291 */
  113    191   
    }
         192  +
    /* BuilderGenerator.kt:312 */
  114    193   
    #[allow(missing_docs)] // documentation missing in model
         194  +
                           /* BuilderGenerator.kt:314 */
  115    195   
    pub fn set_integer(mut self, input: ::std::option::Option<i32>) -> Self {
         196  +
        /* BuilderGenerator.kt:315 */
  116    197   
        self.integer = input;
  117    198   
        self
         199  +
        /* BuilderGenerator.kt:314 */
  118    200   
    }
         201  +
    /* BuilderGenerator.kt:334 */
  119    202   
    #[allow(missing_docs)] // documentation missing in model
         203  +
                           /* BuilderGenerator.kt:336 */
  120    204   
    pub fn get_integer(&self) -> &::std::option::Option<i32> {
         205  +
        /* BuilderGenerator.kt:337 */
  121    206   
        &self.integer
         207  +
        /* BuilderGenerator.kt:336 */
  122    208   
    }
         209  +
    /* BuilderGenerator.kt:286 */
  123    210   
    #[allow(missing_docs)] // documentation missing in model
  124         -
    /// This field is required.
         211  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         212  +
    /* BuilderGenerator.kt:291 */
  125    213   
    pub fn long(mut self, input: i64) -> Self {
         214  +
        /* BuilderGenerator.kt:292 */
  126    215   
        self.long = ::std::option::Option::Some(input);
         216  +
        /* BuilderGenerator.kt:293 */
  127    217   
        self
         218  +
        /* BuilderGenerator.kt:291 */
  128    219   
    }
         220  +
    /* BuilderGenerator.kt:312 */
  129    221   
    #[allow(missing_docs)] // documentation missing in model
         222  +
                           /* BuilderGenerator.kt:314 */
  130    223   
    pub fn set_long(mut self, input: ::std::option::Option<i64>) -> Self {
         224  +
        /* BuilderGenerator.kt:315 */
  131    225   
        self.long = input;
  132    226   
        self
         227  +
        /* BuilderGenerator.kt:314 */
  133    228   
    }
         229  +
    /* BuilderGenerator.kt:334 */
  134    230   
    #[allow(missing_docs)] // documentation missing in model
         231  +
                           /* BuilderGenerator.kt:336 */
  135    232   
    pub fn get_long(&self) -> &::std::option::Option<i64> {
         233  +
        /* BuilderGenerator.kt:337 */
  136    234   
        &self.long
         235  +
        /* BuilderGenerator.kt:336 */
  137    236   
    }
         237  +
    /* BuilderGenerator.kt:286 */
  138    238   
    #[allow(missing_docs)] // documentation missing in model
  139         -
    /// This field is required.
         239  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         240  +
    /* BuilderGenerator.kt:291 */
  140    241   
    pub fn float(mut self, input: f32) -> Self {
         242  +
        /* BuilderGenerator.kt:292 */
  141    243   
        self.float = ::std::option::Option::Some(input);
         244  +
        /* BuilderGenerator.kt:293 */
  142    245   
        self
         246  +
        /* BuilderGenerator.kt:291 */
  143    247   
    }
         248  +
    /* BuilderGenerator.kt:312 */
  144    249   
    #[allow(missing_docs)] // documentation missing in model
         250  +
                           /* BuilderGenerator.kt:314 */
  145    251   
    pub fn set_float(mut self, input: ::std::option::Option<f32>) -> Self {
         252  +
        /* BuilderGenerator.kt:315 */
  146    253   
        self.float = input;
  147    254   
        self
         255  +
        /* BuilderGenerator.kt:314 */
  148    256   
    }
         257  +
    /* BuilderGenerator.kt:334 */
  149    258   
    #[allow(missing_docs)] // documentation missing in model
         259  +
                           /* BuilderGenerator.kt:336 */
  150    260   
    pub fn get_float(&self) -> &::std::option::Option<f32> {
         261  +
        /* BuilderGenerator.kt:337 */
  151    262   
        &self.float
         263  +
        /* BuilderGenerator.kt:336 */
  152    264   
    }
         265  +
    /* BuilderGenerator.kt:286 */
  153    266   
    #[allow(missing_docs)] // documentation missing in model
  154         -
    /// This field is required.
         267  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         268  +
    /* BuilderGenerator.kt:291 */
  155    269   
    pub fn double(mut self, input: f64) -> Self {
         270  +
        /* BuilderGenerator.kt:292 */
  156    271   
        self.double = ::std::option::Option::Some(input);
         272  +
        /* BuilderGenerator.kt:293 */
  157    273   
        self
         274  +
        /* BuilderGenerator.kt:291 */
  158    275   
    }
         276  +
    /* BuilderGenerator.kt:312 */
  159    277   
    #[allow(missing_docs)] // documentation missing in model
         278  +
                           /* BuilderGenerator.kt:314 */
  160    279   
    pub fn set_double(mut self, input: ::std::option::Option<f64>) -> Self {
         280  +
        /* BuilderGenerator.kt:315 */
  161    281   
        self.double = input;
  162    282   
        self
         283  +
        /* BuilderGenerator.kt:314 */
  163    284   
    }
         285  +
    /* BuilderGenerator.kt:334 */
  164    286   
    #[allow(missing_docs)] // documentation missing in model
         287  +
                           /* BuilderGenerator.kt:336 */
  165    288   
    pub fn get_double(&self) -> &::std::option::Option<f64> {
         289  +
        /* BuilderGenerator.kt:337 */
  166    290   
        &self.double
         291  +
        /* BuilderGenerator.kt:336 */
  167    292   
    }
  168         -
    /// Serialized in the path as true or false.
  169         -
    /// This field is required.
         293  +
    /// /* BuilderGenerator.kt:286 */Serialized in the path as true or false.
         294  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         295  +
    /* BuilderGenerator.kt:291 */
  170    296   
    pub fn boolean(mut self, input: bool) -> Self {
         297  +
        /* BuilderGenerator.kt:292 */
  171    298   
        self.boolean = ::std::option::Option::Some(input);
         299  +
        /* BuilderGenerator.kt:293 */
  172    300   
        self
         301  +
        /* BuilderGenerator.kt:291 */
  173    302   
    }
  174         -
    /// Serialized in the path as true or false.
         303  +
    /// /* BuilderGenerator.kt:312 */Serialized in the path as true or false.
         304  +
    /* BuilderGenerator.kt:314 */
  175    305   
    pub fn set_boolean(mut self, input: ::std::option::Option<bool>) -> Self {
         306  +
        /* BuilderGenerator.kt:315 */
  176    307   
        self.boolean = input;
  177    308   
        self
         309  +
        /* BuilderGenerator.kt:314 */
  178    310   
    }
  179         -
    /// Serialized in the path as true or false.
         311  +
    /// /* BuilderGenerator.kt:334 */Serialized in the path as true or false.
         312  +
    /* BuilderGenerator.kt:336 */
  180    313   
    pub fn get_boolean(&self) -> &::std::option::Option<bool> {
         314  +
        /* BuilderGenerator.kt:337 */
  181    315   
        &self.boolean
         316  +
        /* BuilderGenerator.kt:336 */
  182    317   
    }
  183         -
    /// Note that this member has no format, so it's serialized as an RFC 3399 date-time.
  184         -
    /// This field is required.
         318  +
    /// /* BuilderGenerator.kt:286 */Note that this member has no format, so it's serialized as an RFC 3399 date-time.
         319  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         320  +
    /* BuilderGenerator.kt:291 */
  185    321   
    pub fn timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         322  +
        /* BuilderGenerator.kt:292 */
  186    323   
        self.timestamp = ::std::option::Option::Some(input);
         324  +
        /* BuilderGenerator.kt:293 */
  187    325   
        self
         326  +
        /* BuilderGenerator.kt:291 */
  188    327   
    }
  189         -
    /// Note that this member has no format, so it's serialized as an RFC 3399 date-time.
         328  +
    /// /* BuilderGenerator.kt:312 */Note that this member has no format, so it's serialized as an RFC 3399 date-time.
         329  +
    /* BuilderGenerator.kt:314 */
  190    330   
    pub fn set_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         331  +
        /* BuilderGenerator.kt:315 */
  191    332   
        self.timestamp = input;
  192    333   
        self
         334  +
        /* BuilderGenerator.kt:314 */
  193    335   
    }
  194         -
    /// Note that this member has no format, so it's serialized as an RFC 3399 date-time.
         336  +
    /// /* BuilderGenerator.kt:334 */Note that this member has no format, so it's serialized as an RFC 3399 date-time.
         337  +
    /* BuilderGenerator.kt:336 */
  195    338   
    pub fn get_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         339  +
        /* BuilderGenerator.kt:337 */
  196    340   
        &self.timestamp
         341  +
        /* BuilderGenerator.kt:336 */
  197    342   
    }
  198         -
    /// Consumes the builder and constructs a [`HttpRequestWithLabelsInput`](crate::operation::http_request_with_labels::HttpRequestWithLabelsInput).
         343  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`HttpRequestWithLabelsInput`](crate::operation::http_request_with_labels::HttpRequestWithLabelsInput).
         344  +
    /* BuilderGenerator.kt:253 */
  199    345   
    pub fn build(
  200    346   
        self,
  201    347   
    ) -> ::std::result::Result<crate::operation::http_request_with_labels::HttpRequestWithLabelsInput, ::aws_smithy_types::error::operation::BuildError>
  202    348   
    {
  203         -
        ::std::result::Result::Ok(crate::operation::http_request_with_labels::HttpRequestWithLabelsInput {
  204         -
            string: self.string,
  205         -
            short: self.short,
  206         -
            integer: self.integer,
  207         -
            long: self.long,
  208         -
            float: self.float,
  209         -
            double: self.double,
  210         -
            boolean: self.boolean,
  211         -
            timestamp: self.timestamp,
  212         -
        })
  213         -
    }
         349  +
        /* BuilderGenerator.kt:254 */
         350  +
        ::std::result::Result::Ok(
         351  +
            /* BuilderGenerator.kt:477 */
         352  +
            crate::operation::http_request_with_labels::HttpRequestWithLabelsInput {
         353  +
                /* BuilderGenerator.kt:481 */ string: self.string,
         354  +
                /* BuilderGenerator.kt:481 */
         355  +
                short: self.short,
         356  +
                /* BuilderGenerator.kt:481 */
         357  +
                integer: self.integer,
         358  +
                /* BuilderGenerator.kt:481 */
         359  +
                long: self.long,
         360  +
                /* BuilderGenerator.kt:481 */
         361  +
                float: self.float,
         362  +
                /* BuilderGenerator.kt:481 */
         363  +
                double: self.double,
         364  +
                /* BuilderGenerator.kt:481 */
         365  +
                boolean: self.boolean,
         366  +
                /* BuilderGenerator.kt:481 */
         367  +
                timestamp: self.timestamp,
         368  +
                /* BuilderGenerator.kt:477 */
         369  +
            }, /* BuilderGenerator.kt:254 */
         370  +
        )
         371  +
        /* BuilderGenerator.kt:253 */
         372  +
    }
         373  +
    /* BuilderGenerator.kt:355 */
  214    374   
}