Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/http_request_with_labels/_http_request_with_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 HttpRequestWithLabelsOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct HttpRequestWithLabelsOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl HttpRequestWithLabelsOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`HttpRequestWithLabelsOutput`](crate::operation::http_request_with_labels::HttpRequestWithLabelsOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`HttpRequestWithLabelsOutput`](crate::operation::http_request_with_labels::HttpRequestWithLabelsOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::http_request_with_labels::builders::HttpRequestWithLabelsOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::http_request_with_labels::builders::HttpRequestWithLabelsOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`HttpRequestWithLabelsOutput`](crate::operation::http_request_with_labels::HttpRequestWithLabelsOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`HttpRequestWithLabelsOutput`](crate::operation::http_request_with_labels::HttpRequestWithLabelsOutput).
          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 HttpRequestWithLabelsOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct HttpRequestWithLabelsOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl HttpRequestWithLabelsOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`HttpRequestWithLabelsOutput`](crate::operation::http_request_with_labels::HttpRequestWithLabelsOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`HttpRequestWithLabelsOutput`](crate::operation::http_request_with_labels::HttpRequestWithLabelsOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::http_request_with_labels::HttpRequestWithLabelsOutput {
   20         -
        crate::operation::http_request_with_labels::HttpRequestWithLabelsOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::http_request_with_labels::HttpRequestWithLabelsOutput {
          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_labels/builders.rs

@@ -1,1 +223,277 @@
    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_labels::_http_request_with_labels_output::HttpRequestWithLabelsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::http_request_with_labels::_http_request_with_labels_input::HttpRequestWithLabelsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::http_request_with_labels::builders::HttpRequestWithLabelsInputBuilder {
    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_labels::HttpRequestWithLabelsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::http_request_with_labels::HttpRequestWithLabelsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.http_request_with_labels();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `HttpRequestWithLabels`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `HttpRequestWithLabels`.
   24     27   
///
   25         -
/// The example tests how requests are serialized when there's no input payload but there are HTTP labels.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The example tests how requests are serialized when there's no input payload but there are HTTP labels.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct HttpRequestWithLabelsFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::http_request_with_labels::builders::HttpRequestWithLabelsInputBuilder,
   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_request_with_labels::HttpRequestWithLabelsOutput,
   35     41   
        crate::operation::http_request_with_labels::HttpRequestWithLabelsError,
   36     42   
    > for HttpRequestWithLabelsFluentBuilder
   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_request_with_labels::HttpRequestWithLabelsOutput,
   44     50   
            crate::operation::http_request_with_labels::HttpRequestWithLabelsError,
   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 HttpRequestWithLabelsFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `HttpRequestWithLabelsFluentBuilder`.
   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 HttpRequestWithLabels as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::http_request_with_labels::builders::HttpRequestWithLabelsInputBuilder {
   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_request_with_labels::HttpRequestWithLabelsOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::http_request_with_labels::HttpRequestWithLabelsError,
   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_request_with_labels::HttpRequestWithLabels::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_request_with_labels::HttpRequestWithLabels::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_request_with_labels::HttpRequestWithLabelsOutput,
   97    107   
        crate::operation::http_request_with_labels::HttpRequestWithLabelsError,
   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 string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.string(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_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_string(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_string(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_string()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:498 */
  125    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* FluentBuilderGenerator.kt:500 */
  126    145   
    pub fn short(mut self, input: i16) -> Self {
  127    146   
        self.inner = self.inner.short(input);
  128    147   
        self
  129    148   
    }
         149  +
    /* FluentBuilderGenerator.kt:498 */
  130    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* FluentBuilderGenerator.kt:500 */
  131    152   
    pub fn set_short(mut self, input: ::std::option::Option<i16>) -> Self {
  132    153   
        self.inner = self.inner.set_short(input);
  133    154   
        self
  134    155   
    }
         156  +
    /* FluentBuilderGenerator.kt:518 */
  135    157   
    #[allow(missing_docs)] // documentation missing in model
         158  +
                           /* FluentBuilderGenerator.kt:520 */
  136    159   
    pub fn get_short(&self) -> &::std::option::Option<i16> {
  137    160   
        self.inner.get_short()
  138    161   
    }
         162  +
    /* FluentBuilderGenerator.kt:498 */
  139    163   
    #[allow(missing_docs)] // documentation missing in model
         164  +
                           /* FluentBuilderGenerator.kt:500 */
  140    165   
    pub fn integer(mut self, input: i32) -> Self {
  141    166   
        self.inner = self.inner.integer(input);
  142    167   
        self
  143    168   
    }
         169  +
    /* FluentBuilderGenerator.kt:498 */
  144    170   
    #[allow(missing_docs)] // documentation missing in model
         171  +
                           /* FluentBuilderGenerator.kt:500 */
  145    172   
    pub fn set_integer(mut self, input: ::std::option::Option<i32>) -> Self {
  146    173   
        self.inner = self.inner.set_integer(input);
  147    174   
        self
  148    175   
    }
         176  +
    /* FluentBuilderGenerator.kt:518 */
  149    177   
    #[allow(missing_docs)] // documentation missing in model
         178  +
                           /* FluentBuilderGenerator.kt:520 */
  150    179   
    pub fn get_integer(&self) -> &::std::option::Option<i32> {
  151    180   
        self.inner.get_integer()
  152    181   
    }
         182  +
    /* FluentBuilderGenerator.kt:498 */
  153    183   
    #[allow(missing_docs)] // documentation missing in model
         184  +
                           /* FluentBuilderGenerator.kt:500 */
  154    185   
    pub fn long(mut self, input: i64) -> Self {
  155    186   
        self.inner = self.inner.long(input);
  156    187   
        self
  157    188   
    }
         189  +
    /* FluentBuilderGenerator.kt:498 */
  158    190   
    #[allow(missing_docs)] // documentation missing in model
         191  +
                           /* FluentBuilderGenerator.kt:500 */
  159    192   
    pub fn set_long(mut self, input: ::std::option::Option<i64>) -> Self {
  160    193   
        self.inner = self.inner.set_long(input);
  161    194   
        self
  162    195   
    }
         196  +
    /* FluentBuilderGenerator.kt:518 */
  163    197   
    #[allow(missing_docs)] // documentation missing in model
         198  +
                           /* FluentBuilderGenerator.kt:520 */
  164    199   
    pub fn get_long(&self) -> &::std::option::Option<i64> {
  165    200   
        self.inner.get_long()
  166    201   
    }
         202  +
    /* FluentBuilderGenerator.kt:498 */
  167    203   
    #[allow(missing_docs)] // documentation missing in model
         204  +
                           /* FluentBuilderGenerator.kt:500 */
  168    205   
    pub fn float(mut self, input: f32) -> Self {
  169    206   
        self.inner = self.inner.float(input);
  170    207   
        self
  171    208   
    }
         209  +
    /* FluentBuilderGenerator.kt:498 */
  172    210   
    #[allow(missing_docs)] // documentation missing in model
         211  +
                           /* FluentBuilderGenerator.kt:500 */
  173    212   
    pub fn set_float(mut self, input: ::std::option::Option<f32>) -> Self {
  174    213   
        self.inner = self.inner.set_float(input);
  175    214   
        self
  176    215   
    }
         216  +
    /* FluentBuilderGenerator.kt:518 */
  177    217   
    #[allow(missing_docs)] // documentation missing in model
         218  +
                           /* FluentBuilderGenerator.kt:520 */
  178    219   
    pub fn get_float(&self) -> &::std::option::Option<f32> {
  179    220   
        self.inner.get_float()
  180    221   
    }
         222  +
    /* FluentBuilderGenerator.kt:498 */
  181    223   
    #[allow(missing_docs)] // documentation missing in model
         224  +
                           /* FluentBuilderGenerator.kt:500 */
  182    225   
    pub fn double(mut self, input: f64) -> Self {
  183    226   
        self.inner = self.inner.double(input);
  184    227   
        self
  185    228   
    }
         229  +
    /* FluentBuilderGenerator.kt:498 */
  186    230   
    #[allow(missing_docs)] // documentation missing in model
         231  +
                           /* FluentBuilderGenerator.kt:500 */
  187    232   
    pub fn set_double(mut self, input: ::std::option::Option<f64>) -> Self {
  188    233   
        self.inner = self.inner.set_double(input);
  189    234   
        self
  190    235   
    }
         236  +
    /* FluentBuilderGenerator.kt:518 */
  191    237   
    #[allow(missing_docs)] // documentation missing in model
         238  +
                           /* FluentBuilderGenerator.kt:520 */
  192    239   
    pub fn get_double(&self) -> &::std::option::Option<f64> {
  193    240   
        self.inner.get_double()
  194    241   
    }
  195         -
    /// Serialized in the path as true or false.
         242  +
    /// /* FluentBuilderGenerator.kt:498 */Serialized in the path as true or false.
         243  +
    /* FluentBuilderGenerator.kt:500 */
  196    244   
    pub fn boolean(mut self, input: bool) -> Self {
  197    245   
        self.inner = self.inner.boolean(input);
  198    246   
        self
  199    247   
    }
  200         -
    /// Serialized in the path as true or false.
         248  +
    /// /* FluentBuilderGenerator.kt:498 */Serialized in the path as true or false.
         249  +
    /* FluentBuilderGenerator.kt:500 */
  201    250   
    pub fn set_boolean(mut self, input: ::std::option::Option<bool>) -> Self {
  202    251   
        self.inner = self.inner.set_boolean(input);
  203    252   
        self
  204    253   
    }
  205         -
    /// Serialized in the path as true or false.
         254  +
    /// /* FluentBuilderGenerator.kt:518 */Serialized in the path as true or false.
         255  +
    /* FluentBuilderGenerator.kt:520 */
  206    256   
    pub fn get_boolean(&self) -> &::std::option::Option<bool> {
  207    257   
        self.inner.get_boolean()
  208    258   
    }
  209         -
    /// Note that this member has no format, so it's serialized as an RFC 3399 date-time.
         259  +
    /// /* FluentBuilderGenerator.kt:498 */Note that this member has no format, so it's serialized as an RFC 3399 date-time.
         260  +
    /* FluentBuilderGenerator.kt:500 */
  210    261   
    pub fn timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  211    262   
        self.inner = self.inner.timestamp(input);
  212    263   
        self
  213    264   
    }
  214         -
    /// Note that this member has no format, so it's serialized as an RFC 3399 date-time.
         265  +
    /// /* FluentBuilderGenerator.kt:498 */Note that this member has no format, so it's serialized as an RFC 3399 date-time.
         266  +
    /* FluentBuilderGenerator.kt:500 */
  215    267   
    pub fn set_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  216    268   
        self.inner = self.inner.set_timestamp(input);
  217    269   
        self
  218    270   
    }
  219         -
    /// Note that this member has no format, so it's serialized as an RFC 3399 date-time.
         271  +
    /// /* FluentBuilderGenerator.kt:518 */Note that this member has no format, so it's serialized as an RFC 3399 date-time.
         272  +
    /* FluentBuilderGenerator.kt:520 */
  220    273   
    pub fn get_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  221    274   
        self.inner.get_timestamp()
  222    275   
    }
         276  +
    /* FluentBuilderGenerator.kt:282 */
  223    277   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/http_request_with_labels_and_timestamp_format.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 `HttpRequestWithLabelsAndTimestampFormat`.
           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 HttpRequestWithLabelsAndTimestampFormat;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl HttpRequestWithLabelsAndTimestampFormat {
    7         -
    /// Creates a new `HttpRequestWithLabelsAndTimestampFormat`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `HttpRequestWithLabelsAndTimestampFormat`
          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_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatError,
   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 HttpRequestWithLabelsAndTimestampFormat {
   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("HttpRequestWithLabelsAndTimestampFormat");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            HttpRequestWithLabelsAndTimestampFormatRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            HttpRequestWithLabelsAndTimestampFormatResponseDeserializer,
  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   
            "HttpRequestWithLabelsAndTimestampFormat",
  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("HttpRequestWithLabelsAndTimestampFormat")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(HttpRequestWithLabelsAndTimestampFormatEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatError,
  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 HttpRequestWithLabelsAndTimestampFormatResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpRequestWithLabelsAndTimestampFormatResponseDeserializer {
  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_and_timestamp_format::de_http_request_with_labels_and_timestamp_format_http_error(
  151    163   
                status, headers, body,
  152    164   
            )
  153    165   
        } else {
  154    166   
            crate::protocol_serde::shape_http_request_with_labels_and_timestamp_format::de_http_request_with_labels_and_timestamp_format_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 HttpRequestWithLabelsAndTimestampFormatRequestSerializer;
  163    176   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpRequestWithLabelsAndTimestampFormatRequestSerializer {
  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
@@ -250,263 +461,537 @@
  270    283   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  271    284   
            }
  272    285   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  273    286   
            builder
  274    287   
        };
  275    288   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  276    289   
  277    290   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  278    291   
    }
  279    292   
}
         293  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  280    294   
#[derive(Debug)]
  281    295   
struct HttpRequestWithLabelsAndTimestampFormatEndpointParamsInterceptor;
  282    296   
  283    297   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpRequestWithLabelsAndTimestampFormatEndpointParamsInterceptor {
  284    298   
    fn name(&self) -> &'static str {
  285    299   
        "HttpRequestWithLabelsAndTimestampFormatEndpointParamsInterceptor"
  286    300   
    }
  287    301   
  288    302   
    fn read_before_execution(
  289    303   
        &self,
  290    304   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  291    305   
            '_,
  292    306   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  293    307   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  294    308   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  295    309   
        >,
  296    310   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  297    311   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  298    312   
        let _input = context
  299    313   
            .input()
  300    314   
            .downcast_ref::<HttpRequestWithLabelsAndTimestampFormatInput>()
  301    315   
            .ok_or("failed to downcast to HttpRequestWithLabelsAndTimestampFormatInput")?;
  302    316   
  303    317   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  304    318   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  305    319   
        })?;
  306    320   
        cfg.interceptor_state()
  307    321   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  308    322   
        ::std::result::Result::Ok(())
  309    323   
    }
  310    324   
}
  311    325   
  312    326   
// The get_* functions below are generated from JMESPath expressions in the
  313    327   
// operationContextParams trait. They target the operation's input shape.
  314    328   
         329  +
/* RustType.kt:516 */
  315    330   
#[allow(unreachable_code, unused_variables)]
         331  +
/* RustType.kt:516 */
  316    332   
#[cfg(test)]
         333  +
/* ProtocolTestGenerator.kt:98 */
  317    334   
mod http_request_with_labels_and_timestamp_format_test {
  318    335   
  319    336   
    /// Serializes different timestamp formats in URI labels
  320    337   
    /// Test ID: RestJsonHttpRequestWithLabelsAndTimestampFormat
  321    338   
    #[::tokio::test]
  322    339   
    #[::tracing_test::traced_test]
  323    340   
    async fn rest_json_http_request_with_labels_and_timestamp_format_request() {
  324    341   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  325    342   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  326    343   
  327    344   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  328    345   
        let result = client
  329    346   
            .http_request_with_labels_and_timestamp_format()
  330    347   
            .set_member_epoch_seconds(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  331    348   
                1576540098, 0_f64,
  332    349   
            )))
  333    350   
            .set_member_http_date(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  334    351   
                1576540098, 0_f64,
  335    352   
            )))
  336    353   
            .set_member_date_time(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  337    354   
                1576540098, 0_f64,
  338    355   
            )))
  339    356   
            .set_default_format(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  340    357   
                1576540098, 0_f64,
  341    358   
            )))
  342    359   
            .set_target_epoch_seconds(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  343    360   
                1576540098, 0_f64,
  344    361   
            )))
  345    362   
            .set_target_http_date(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  346    363   
                1576540098, 0_f64,
  347    364   
            )))
  348    365   
            .set_target_date_time(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  349    366   
                1576540098, 0_f64,
  350    367   
            )))
  351    368   
            .send()
  352    369   
            .await;
  353    370   
        let _ = dbg!(result);
  354    371   
        let http_request = request_receiver.expect_request();
  355    372   
        let body = http_request.body().bytes().expect("body should be strict");
  356    373   
        // No body.
  357    374   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  358    375   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  359    376   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  360    377   
        ::pretty_assertions::assert_eq!(uri.path(), "/HttpRequestWithLabelsAndTimestampFormat/1576540098/Mon%2C%2016%20Dec%202019%2023%3A48%3A18%20GMT/2019-12-16T23%3A48%3A18Z/2019-12-16T23%3A48%3A18Z/1576540098/Mon%2C%2016%20Dec%202019%2023%3A48%3A18%20GMT/2019-12-16T23%3A48%3A18Z", "path was incorrect");
  361    378   
    }
         379  +
         380  +
    /* ProtocolTestGenerator.kt:98 */
  362    381   
}
  363    382   
         383  +
/* OperationErrorGenerator.kt:79 */
  364    384   
/// Error type for the `HttpRequestWithLabelsAndTimestampFormatError` operation.
         385  +
/* RustType.kt:516 */
  365    386   
#[non_exhaustive]
         387  +
/* RustType.kt:516 */
  366    388   
#[derive(::std::fmt::Debug)]
  367         -
pub enum HttpRequestWithLabelsAndTimestampFormatError {
         389  +
pub /* OperationErrorGenerator.kt:81 */ enum HttpRequestWithLabelsAndTimestampFormatError {
         390  +
    /* OperationErrorGenerator.kt:88 */
  368    391   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  369    392   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  370    393   
    variable wildcard pattern and check `.code()`:
  371    394   
     \
  372    395   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  373    396   
     \
  374    397   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HttpRequestWithLabelsAndTimestampFormatError) for what information is available for the error.")]
  375    398   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         399  +
    /* OperationErrorGenerator.kt:81 */
  376    400   
}
         401  +
/* OperationErrorGenerator.kt:218 */
  377    402   
impl HttpRequestWithLabelsAndTimestampFormatError {
         403  +
    /* OperationErrorGenerator.kt:219 */
  378    404   
    /// Creates the `HttpRequestWithLabelsAndTimestampFormatError::Unhandled` variant from any error type.
  379    405   
    pub fn unhandled(
  380    406   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  381    407   
    ) -> Self {
  382    408   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  383    409   
            source: err.into(),
  384    410   
            meta: ::std::default::Default::default(),
  385    411   
        })
  386    412   
    }
  387    413   
  388    414   
    /// Creates the `HttpRequestWithLabelsAndTimestampFormatError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  389    415   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  390    416   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  391    417   
            source: err.clone().into(),
  392    418   
            meta: err,
  393    419   
        })
  394    420   
    }
  395         -
    ///
         421  +
    /// /* OperationErrorGenerator.kt:236 */
  396    422   
    /// Returns error metadata, which includes the error code, message,
  397    423   
    /// request ID, and potentially additional information.
  398    424   
    ///
         425  +
    /* OperationErrorGenerator.kt:242 */
  399    426   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         427  +
        /* OperationErrorGenerator.kt:243 */
  400    428   
        match self {
  401         -
            Self::Unhandled(e) => &e.meta,
         429  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         430  +
            /* OperationErrorGenerator.kt:243 */
  402    431   
        }
         432  +
        /* OperationErrorGenerator.kt:242 */
  403    433   
    }
         434  +
    /* OperationErrorGenerator.kt:218 */
  404    435   
}
         436  +
/* OperationErrorGenerator.kt:269 */
  405    437   
impl ::std::error::Error for HttpRequestWithLabelsAndTimestampFormatError {
         438  +
    /* OperationErrorGenerator.kt:270 */
  406    439   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         440  +
        /* OperationErrorGenerator.kt:318 */
  407    441   
        match self {
  408         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         442  +
            /* OperationErrorGenerator.kt:326 */
         443  +
            Self::Unhandled(_inner) => {
         444  +
                /* OperationErrorGenerator.kt:279 */
         445  +
                ::std::option::Option::Some(&*_inner.source)
         446  +
                /* OperationErrorGenerator.kt:326 */
         447  +
            } /* OperationErrorGenerator.kt:318 */
  409    448   
        }
         449  +
        /* OperationErrorGenerator.kt:270 */
  410    450   
    }
         451  +
    /* OperationErrorGenerator.kt:269 */
  411    452   
}
         453  +
/* OperationErrorGenerator.kt:133 */
  412    454   
impl ::std::fmt::Display for HttpRequestWithLabelsAndTimestampFormatError {
         455  +
    /* OperationErrorGenerator.kt:134 */
  413    456   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         457  +
        /* OperationErrorGenerator.kt:318 */
  414    458   
        match self {
         459  +
            /* OperationErrorGenerator.kt:326 */
  415    460   
            Self::Unhandled(_inner) => {
         461  +
                /* OperationErrorGenerator.kt:139 */
  416    462   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  417    463   
                    write!(f, "unhandled error ({code})")
  418    464   
                } else {
  419    465   
                    f.write_str("unhandled error")
  420    466   
                }
  421         -
            }
         467  +
                /* OperationErrorGenerator.kt:326 */
         468  +
            } /* OperationErrorGenerator.kt:318 */
  422    469   
        }
         470  +
        /* OperationErrorGenerator.kt:134 */
  423    471   
    }
         472  +
    /* OperationErrorGenerator.kt:133 */
  424    473   
}
         474  +
/* OperationErrorGenerator.kt:182 */
  425    475   
impl ::aws_smithy_types::retry::ProvideErrorKind for HttpRequestWithLabelsAndTimestampFormatError {
         476  +
    /* OperationErrorGenerator.kt:186 */
  426    477   
    fn code(&self) -> ::std::option::Option<&str> {
         478  +
        /* OperationErrorGenerator.kt:187 */
  427    479   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         480  +
        /* OperationErrorGenerator.kt:186 */
  428    481   
    }
         482  +
    /* OperationErrorGenerator.kt:190 */
  429    483   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         484  +
        /* OperationErrorGenerator.kt:197 */
  430    485   
        ::std::option::Option::None
         486  +
        /* OperationErrorGenerator.kt:190 */
  431    487   
    }
         488  +
    /* OperationErrorGenerator.kt:182 */
  432    489   
}
         490  +
/* OperationErrorGenerator.kt:163 */
  433    491   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HttpRequestWithLabelsAndTimestampFormatError {
         492  +
    /* OperationErrorGenerator.kt:164 */
  434    493   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         494  +
        /* OperationErrorGenerator.kt:318 */
  435    495   
        match self {
  436         -
            Self::Unhandled(_inner) => &_inner.meta,
         496  +
            /* OperationErrorGenerator.kt:326 */
         497  +
            Self::Unhandled(_inner) => {
         498  +
                /* OperationErrorGenerator.kt:168 */
         499  +
                &_inner.meta
         500  +
                /* OperationErrorGenerator.kt:326 */
         501  +
            } /* OperationErrorGenerator.kt:318 */
  437    502   
        }
         503  +
        /* OperationErrorGenerator.kt:164 */
  438    504   
    }
         505  +
    /* OperationErrorGenerator.kt:163 */
  439    506   
}
         507  +
/* OperationErrorGenerator.kt:109 */
  440    508   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HttpRequestWithLabelsAndTimestampFormatError {
         509  +
    /* OperationErrorGenerator.kt:110 */
  441    510   
    fn create_unhandled_error(
  442    511   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  443    512   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  444    513   
    ) -> Self {
         514  +
        /* OperationErrorGenerator.kt:121 */
  445    515   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  446    516   
            source,
  447    517   
            meta: meta.unwrap_or_default(),
  448    518   
        })
         519  +
        /* OperationErrorGenerator.kt:110 */
  449    520   
    }
         521  +
    /* OperationErrorGenerator.kt:109 */
  450    522   
}
  451    523   
         524  +
/* CodegenDelegator.kt:255 */
  452    525   
pub use crate::operation::http_request_with_labels_and_timestamp_format::_http_request_with_labels_and_timestamp_format_output::HttpRequestWithLabelsAndTimestampFormatOutput;
  453    526   
         527  +
/* CodegenDelegator.kt:255 */
  454    528   
pub use crate::operation::http_request_with_labels_and_timestamp_format::_http_request_with_labels_and_timestamp_format_input::HttpRequestWithLabelsAndTimestampFormatInput;
  455    529   
         530  +
/* RustModule.kt:172 */
  456    531   
mod _http_request_with_labels_and_timestamp_format_input;
  457    532   
         533  +
/* RustModule.kt:172 */
  458    534   
mod _http_request_with_labels_and_timestamp_format_output;
  459    535   
  460         -
/// Builders
         536  +
/// /* CodegenDelegator.kt:51 */Builders
  461    537   
pub mod builders;

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

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

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

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

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

@@ -1,1 +213,267 @@
    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_labels_and_timestamp_format::_http_request_with_labels_and_timestamp_format_output::HttpRequestWithLabelsAndTimestampFormatOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::http_request_with_labels_and_timestamp_format::_http_request_with_labels_and_timestamp_format_input::HttpRequestWithLabelsAndTimestampFormatInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::http_request_with_labels_and_timestamp_format::builders::HttpRequestWithLabelsAndTimestampFormatInputBuilder {
    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_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.http_request_with_labels_and_timestamp_format();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `HttpRequestWithLabelsAndTimestampFormat`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `HttpRequestWithLabelsAndTimestampFormat`.
   24     27   
///
   25         -
/// The example tests how requests serialize different timestamp formats in the URI path.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The example tests how requests serialize different timestamp formats in the URI path.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct HttpRequestWithLabelsAndTimestampFormatFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::http_request_with_labels_and_timestamp_format::builders::HttpRequestWithLabelsAndTimestampFormatInputBuilder,
   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_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatOutput,
   35     41   
        crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatError,
   36     42   
    > for HttpRequestWithLabelsAndTimestampFormatFluentBuilder
   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_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatOutput,
   44     50   
            crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatError,
   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 HttpRequestWithLabelsAndTimestampFormatFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `HttpRequestWithLabelsAndTimestampFormatFluentBuilder`.
   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 HttpRequestWithLabelsAndTimestampFormat as a reference.
   60     69   
    pub fn as_input(
   61     70   
        &self,
   62     71   
    ) -> &crate::operation::http_request_with_labels_and_timestamp_format::builders::HttpRequestWithLabelsAndTimestampFormatInputBuilder {
   63     72   
        &self.inner
   64     73   
    }
          74  +
    /* FluentBuilderGenerator.kt:145 */
   65     75   
    /// Sends the request and returns the response.
   66     76   
    ///
   67     77   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   68     78   
    /// can be matched against.
   69     79   
    ///
   70     80   
    /// By default, any retryable failures will be retried twice. Retry behavior
   71     81   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   72     82   
    /// set when configuring the client.
   73     83   
    pub async fn send(
   74     84   
        self,
   75     85   
    ) -> ::std::result::Result<
   76     86   
        crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatOutput,
   77     87   
        ::aws_smithy_runtime_api::client::result::SdkError<
   78     88   
            crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatError,
   79     89   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   80     90   
        >,
   81     91   
    > {
   82     92   
        let input = self
   83     93   
            .inner
   84     94   
            .build()
   85     95   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   86     96   
        let runtime_plugins =
   87     97   
            crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormat::operation_runtime_plugins(
   88     98   
                self.handle.runtime_plugins.clone(),
   89     99   
                &self.handle.conf,
   90    100   
                self.config_override,
   91    101   
            );
   92    102   
        crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormat::orchestrate(&runtime_plugins, input)
   93    103   
            .await
   94    104   
    }
   95    105   
   96    106   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   97    107   
    pub fn customize(
   98    108   
        self,
   99    109   
    ) -> crate::client::customize::CustomizableOperation<
  100    110   
        crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatOutput,
  101    111   
        crate::operation::http_request_with_labels_and_timestamp_format::HttpRequestWithLabelsAndTimestampFormatError,
  102    112   
        Self,
  103    113   
    > {
  104    114   
        crate::client::customize::CustomizableOperation::new(self)
  105    115   
    }
         116  +
    /* FluentBuilderGenerator.kt:315 */
  106    117   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  107    118   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  108    119   
        self
  109    120   
    }
  110    121   
  111    122   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  112    123   
        self.config_override = config_override;
  113    124   
        self
  114    125   
    }
         126  +
    /* FluentBuilderGenerator.kt:498 */
  115    127   
    #[allow(missing_docs)] // documentation missing in model
         128  +
                           /* FluentBuilderGenerator.kt:500 */
  116    129   
    pub fn member_epoch_seconds(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  117    130   
        self.inner = self.inner.member_epoch_seconds(input);
  118    131   
        self
  119    132   
    }
         133  +
    /* FluentBuilderGenerator.kt:498 */
  120    134   
    #[allow(missing_docs)] // documentation missing in model
         135  +
                           /* FluentBuilderGenerator.kt:500 */
  121    136   
    pub fn set_member_epoch_seconds(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  122    137   
        self.inner = self.inner.set_member_epoch_seconds(input);
  123    138   
        self
  124    139   
    }
         140  +
    /* FluentBuilderGenerator.kt:518 */
  125    141   
    #[allow(missing_docs)] // documentation missing in model
         142  +
                           /* FluentBuilderGenerator.kt:520 */
  126    143   
    pub fn get_member_epoch_seconds(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  127    144   
        self.inner.get_member_epoch_seconds()
  128    145   
    }
         146  +
    /* FluentBuilderGenerator.kt:498 */
  129    147   
    #[allow(missing_docs)] // documentation missing in model
         148  +
                           /* FluentBuilderGenerator.kt:500 */
  130    149   
    pub fn member_http_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  131    150   
        self.inner = self.inner.member_http_date(input);
  132    151   
        self
  133    152   
    }
         153  +
    /* FluentBuilderGenerator.kt:498 */
  134    154   
    #[allow(missing_docs)] // documentation missing in model
         155  +
                           /* FluentBuilderGenerator.kt:500 */
  135    156   
    pub fn set_member_http_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  136    157   
        self.inner = self.inner.set_member_http_date(input);
  137    158   
        self
  138    159   
    }
         160  +
    /* FluentBuilderGenerator.kt:518 */
  139    161   
    #[allow(missing_docs)] // documentation missing in model
         162  +
                           /* FluentBuilderGenerator.kt:520 */
  140    163   
    pub fn get_member_http_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  141    164   
        self.inner.get_member_http_date()
  142    165   
    }
         166  +
    /* FluentBuilderGenerator.kt:498 */
  143    167   
    #[allow(missing_docs)] // documentation missing in model
         168  +
                           /* FluentBuilderGenerator.kt:500 */
  144    169   
    pub fn member_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  145    170   
        self.inner = self.inner.member_date_time(input);
  146    171   
        self
  147    172   
    }
         173  +
    /* FluentBuilderGenerator.kt:498 */
  148    174   
    #[allow(missing_docs)] // documentation missing in model
         175  +
                           /* FluentBuilderGenerator.kt:500 */
  149    176   
    pub fn set_member_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  150    177   
        self.inner = self.inner.set_member_date_time(input);
  151    178   
        self
  152    179   
    }
         180  +
    /* FluentBuilderGenerator.kt:518 */
  153    181   
    #[allow(missing_docs)] // documentation missing in model
         182  +
                           /* FluentBuilderGenerator.kt:520 */
  154    183   
    pub fn get_member_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  155    184   
        self.inner.get_member_date_time()
  156    185   
    }
         186  +
    /* FluentBuilderGenerator.kt:498 */
  157    187   
    #[allow(missing_docs)] // documentation missing in model
         188  +
                           /* FluentBuilderGenerator.kt:500 */
  158    189   
    pub fn default_format(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  159    190   
        self.inner = self.inner.default_format(input);
  160    191   
        self
  161    192   
    }
         193  +
    /* FluentBuilderGenerator.kt:498 */
  162    194   
    #[allow(missing_docs)] // documentation missing in model
         195  +
                           /* FluentBuilderGenerator.kt:500 */
  163    196   
    pub fn set_default_format(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  164    197   
        self.inner = self.inner.set_default_format(input);
  165    198   
        self
  166    199   
    }
         200  +
    /* FluentBuilderGenerator.kt:518 */
  167    201   
    #[allow(missing_docs)] // documentation missing in model
         202  +
                           /* FluentBuilderGenerator.kt:520 */
  168    203   
    pub fn get_default_format(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  169    204   
        self.inner.get_default_format()
  170    205   
    }
         206  +
    /* FluentBuilderGenerator.kt:498 */
  171    207   
    #[allow(missing_docs)] // documentation missing in model
         208  +
                           /* FluentBuilderGenerator.kt:500 */
  172    209   
    pub fn target_epoch_seconds(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  173    210   
        self.inner = self.inner.target_epoch_seconds(input);
  174    211   
        self
  175    212   
    }
         213  +
    /* FluentBuilderGenerator.kt:498 */
  176    214   
    #[allow(missing_docs)] // documentation missing in model
         215  +
                           /* FluentBuilderGenerator.kt:500 */
  177    216   
    pub fn set_target_epoch_seconds(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  178    217   
        self.inner = self.inner.set_target_epoch_seconds(input);
  179    218   
        self
  180    219   
    }
         220  +
    /* FluentBuilderGenerator.kt:518 */
  181    221   
    #[allow(missing_docs)] // documentation missing in model
         222  +
                           /* FluentBuilderGenerator.kt:520 */
  182    223   
    pub fn get_target_epoch_seconds(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  183    224   
        self.inner.get_target_epoch_seconds()
  184    225   
    }
         226  +
    /* FluentBuilderGenerator.kt:498 */
  185    227   
    #[allow(missing_docs)] // documentation missing in model
         228  +
                           /* FluentBuilderGenerator.kt:500 */
  186    229   
    pub fn target_http_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  187    230   
        self.inner = self.inner.target_http_date(input);
  188    231   
        self
  189    232   
    }
         233  +
    /* FluentBuilderGenerator.kt:498 */
  190    234   
    #[allow(missing_docs)] // documentation missing in model
         235  +
                           /* FluentBuilderGenerator.kt:500 */
  191    236   
    pub fn set_target_http_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  192    237   
        self.inner = self.inner.set_target_http_date(input);
  193    238   
        self
  194    239   
    }
         240  +
    /* FluentBuilderGenerator.kt:518 */
  195    241   
    #[allow(missing_docs)] // documentation missing in model
         242  +
                           /* FluentBuilderGenerator.kt:520 */
  196    243   
    pub fn get_target_http_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  197    244   
        self.inner.get_target_http_date()
  198    245   
    }
         246  +
    /* FluentBuilderGenerator.kt:498 */
  199    247   
    #[allow(missing_docs)] // documentation missing in model
         248  +
                           /* FluentBuilderGenerator.kt:500 */
  200    249   
    pub fn target_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  201    250   
        self.inner = self.inner.target_date_time(input);
  202    251   
        self
  203    252   
    }
         253  +
    /* FluentBuilderGenerator.kt:498 */
  204    254   
    #[allow(missing_docs)] // documentation missing in model
         255  +
                           /* FluentBuilderGenerator.kt:500 */
  205    256   
    pub fn set_target_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
  206    257   
        self.inner = self.inner.set_target_date_time(input);
  207    258   
        self
  208    259   
    }
         260  +
    /* FluentBuilderGenerator.kt:518 */
  209    261   
    #[allow(missing_docs)] // documentation missing in model
         262  +
                           /* FluentBuilderGenerator.kt:520 */
  210    263   
    pub fn get_target_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
  211    264   
        self.inner.get_target_date_time()
  212    265   
    }
         266  +
    /* FluentBuilderGenerator.kt:282 */
  213    267   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/http_request_with_regex_literal.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 `HttpRequestWithRegexLiteral`.
           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 HttpRequestWithRegexLiteral;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl HttpRequestWithRegexLiteral {
    7         -
    /// Creates a new `HttpRequestWithRegexLiteral`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `HttpRequestWithRegexLiteral`
          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_regex_literal::HttpRequestWithRegexLiteralInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +371,447 @@
   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 HttpRequestWithRegexLiteral {
   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("HttpRequestWithRegexLiteral");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            HttpRequestWithRegexLiteralRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            HttpRequestWithRegexLiteralResponseDeserializer,
  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   
            "HttpRequestWithRegexLiteral",
  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("HttpRequestWithRegexLiteral")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(HttpRequestWithRegexLiteralEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralError,
  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 HttpRequestWithRegexLiteralResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpRequestWithRegexLiteralResponseDeserializer {
  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_regex_literal::de_http_request_with_regex_literal_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_http_request_with_regex_literal::de_http_request_with_regex_literal_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 HttpRequestWithRegexLiteralRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpRequestWithRegexLiteralRequestSerializer {
  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_request_with_regex_literal::HttpRequestWithRegexLiteralInput>()
  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_request_with_regex_literal::HttpRequestWithRegexLiteralInput,
  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   
                let input_1 = &_input.str;
  180    193   
                let input_1 = input_1
  181    194   
                    .as_ref()
  182    195   
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("str", "cannot be empty or unset"))?;
  183    196   
                let str = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  184    197   
                if str.is_empty() {
  185    198   
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  186    199   
                        "str",
  187    200   
                        "cannot be empty or unset",
  188    201   
                    ));
  189    202   
                }
  190    203   
                ::std::write!(output, "/ReDosLiteral/{str}/(a+)+", str = str).expect("formatting should succeed");
  191    204   
                ::std::result::Result::Ok(())
  192    205   
            }
  193    206   
            #[allow(clippy::unnecessary_wraps)]
  194    207   
            fn update_http_builder(
  195    208   
                input: &crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralInput,
  196    209   
                builder: ::http::request::Builder,
  197    210   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  198    211   
                let mut uri = ::std::string::String::new();
  199    212   
                uri_base(input, &mut uri)?;
  200    213   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  201    214   
            }
  202    215   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  203    216   
            builder
  204    217   
        };
  205    218   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  206    219   
  207    220   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  208    221   
    }
  209    222   
}
         223  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  210    224   
#[derive(Debug)]
  211    225   
struct HttpRequestWithRegexLiteralEndpointParamsInterceptor;
  212    226   
  213    227   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpRequestWithRegexLiteralEndpointParamsInterceptor {
  214    228   
    fn name(&self) -> &'static str {
  215    229   
        "HttpRequestWithRegexLiteralEndpointParamsInterceptor"
  216    230   
    }
  217    231   
  218    232   
    fn read_before_execution(
  219    233   
        &self,
  220    234   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  221    235   
            '_,
  222    236   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  223    237   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  224    238   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  225    239   
        >,
  226    240   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  227    241   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  228    242   
        let _input = context
  229    243   
            .input()
  230    244   
            .downcast_ref::<HttpRequestWithRegexLiteralInput>()
  231    245   
            .ok_or("failed to downcast to HttpRequestWithRegexLiteralInput")?;
  232    246   
  233    247   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  234    248   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  235    249   
        })?;
  236    250   
        cfg.interceptor_state()
  237    251   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  238    252   
        ::std::result::Result::Ok(())
  239    253   
    }
  240    254   
}
  241    255   
  242    256   
// The get_* functions below are generated from JMESPath expressions in the
  243    257   
// operationContextParams trait. They target the operation's input shape.
  244    258   
         259  +
/* RustType.kt:516 */
  245    260   
#[allow(unreachable_code, unused_variables)]
         261  +
/* RustType.kt:516 */
  246    262   
#[cfg(test)]
         263  +
/* ProtocolTestGenerator.kt:98 */
  247    264   
mod http_request_with_regex_literal_test {
  248    265   
  249    266   
    /// Path matching is not broken by regex expressions in literal segments
  250    267   
    /// Test ID: RestJsonToleratesRegexCharsInSegments
  251    268   
    #[::tokio::test]
  252    269   
    #[::tracing_test::traced_test]
  253    270   
    async fn rest_json_tolerates_regex_chars_in_segments_request() {
  254    271   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  255    272   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  256    273   
  257    274   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  258    275   
        let result = client
  259    276   
            .http_request_with_regex_literal()
  260    277   
            .set_str(::std::option::Option::Some("abc".to_owned()))
  261    278   
            .send()
  262    279   
            .await;
  263    280   
        let _ = dbg!(result);
  264    281   
        let http_request = request_receiver.expect_request();
  265    282   
        let body = http_request.body().bytes().expect("body should be strict");
  266    283   
        // No body.
  267    284   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  268    285   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  269    286   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  270    287   
        ::pretty_assertions::assert_eq!(uri.path(), "/ReDosLiteral/abc/(a+)+", "path was incorrect");
  271    288   
    }
         289  +
         290  +
    /* ProtocolTestGenerator.kt:98 */
  272    291   
}
  273    292   
         293  +
/* OperationErrorGenerator.kt:79 */
  274    294   
/// Error type for the `HttpRequestWithRegexLiteralError` operation.
         295  +
/* RustType.kt:516 */
  275    296   
#[non_exhaustive]
         297  +
/* RustType.kt:516 */
  276    298   
#[derive(::std::fmt::Debug)]
  277         -
pub enum HttpRequestWithRegexLiteralError {
         299  +
pub /* OperationErrorGenerator.kt:81 */ enum HttpRequestWithRegexLiteralError {
         300  +
    /* OperationErrorGenerator.kt:88 */
  278    301   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  279    302   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  280    303   
    variable wildcard pattern and check `.code()`:
  281    304   
     \
  282    305   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  283    306   
     \
  284    307   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HttpRequestWithRegexLiteralError) for what information is available for the error.")]
  285    308   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         309  +
    /* OperationErrorGenerator.kt:81 */
  286    310   
}
         311  +
/* OperationErrorGenerator.kt:218 */
  287    312   
impl HttpRequestWithRegexLiteralError {
         313  +
    /* OperationErrorGenerator.kt:219 */
  288    314   
    /// Creates the `HttpRequestWithRegexLiteralError::Unhandled` variant from any error type.
  289    315   
    pub fn unhandled(
  290    316   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  291    317   
    ) -> Self {
  292    318   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  293    319   
            source: err.into(),
  294    320   
            meta: ::std::default::Default::default(),
  295    321   
        })
  296    322   
    }
  297    323   
  298    324   
    /// Creates the `HttpRequestWithRegexLiteralError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  299    325   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  300    326   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  301    327   
            source: err.clone().into(),
  302    328   
            meta: err,
  303    329   
        })
  304    330   
    }
  305         -
    ///
         331  +
    /// /* OperationErrorGenerator.kt:236 */
  306    332   
    /// Returns error metadata, which includes the error code, message,
  307    333   
    /// request ID, and potentially additional information.
  308    334   
    ///
         335  +
    /* OperationErrorGenerator.kt:242 */
  309    336   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         337  +
        /* OperationErrorGenerator.kt:243 */
  310    338   
        match self {
  311         -
            Self::Unhandled(e) => &e.meta,
         339  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         340  +
            /* OperationErrorGenerator.kt:243 */
  312    341   
        }
         342  +
        /* OperationErrorGenerator.kt:242 */
  313    343   
    }
         344  +
    /* OperationErrorGenerator.kt:218 */
  314    345   
}
         346  +
/* OperationErrorGenerator.kt:269 */
  315    347   
impl ::std::error::Error for HttpRequestWithRegexLiteralError {
         348  +
    /* OperationErrorGenerator.kt:270 */
  316    349   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         350  +
        /* OperationErrorGenerator.kt:318 */
  317    351   
        match self {
  318         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         352  +
            /* OperationErrorGenerator.kt:326 */
         353  +
            Self::Unhandled(_inner) => {
         354  +
                /* OperationErrorGenerator.kt:279 */
         355  +
                ::std::option::Option::Some(&*_inner.source)
         356  +
                /* OperationErrorGenerator.kt:326 */
         357  +
            } /* OperationErrorGenerator.kt:318 */
  319    358   
        }
         359  +
        /* OperationErrorGenerator.kt:270 */
  320    360   
    }
         361  +
    /* OperationErrorGenerator.kt:269 */
  321    362   
}
         363  +
/* OperationErrorGenerator.kt:133 */
  322    364   
impl ::std::fmt::Display for HttpRequestWithRegexLiteralError {
         365  +
    /* OperationErrorGenerator.kt:134 */
  323    366   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         367  +
        /* OperationErrorGenerator.kt:318 */
  324    368   
        match self {
         369  +
            /* OperationErrorGenerator.kt:326 */
  325    370   
            Self::Unhandled(_inner) => {
         371  +
                /* OperationErrorGenerator.kt:139 */
  326    372   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  327    373   
                    write!(f, "unhandled error ({code})")
  328    374   
                } else {
  329    375   
                    f.write_str("unhandled error")
  330    376   
                }
  331         -
            }
         377  +
                /* OperationErrorGenerator.kt:326 */
         378  +
            } /* OperationErrorGenerator.kt:318 */
  332    379   
        }
         380  +
        /* OperationErrorGenerator.kt:134 */
  333    381   
    }
         382  +
    /* OperationErrorGenerator.kt:133 */
  334    383   
}
         384  +
/* OperationErrorGenerator.kt:182 */
  335    385   
impl ::aws_smithy_types::retry::ProvideErrorKind for HttpRequestWithRegexLiteralError {
         386  +
    /* OperationErrorGenerator.kt:186 */
  336    387   
    fn code(&self) -> ::std::option::Option<&str> {
         388  +
        /* OperationErrorGenerator.kt:187 */
  337    389   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         390  +
        /* OperationErrorGenerator.kt:186 */
  338    391   
    }
         392  +
    /* OperationErrorGenerator.kt:190 */
  339    393   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         394  +
        /* OperationErrorGenerator.kt:197 */
  340    395   
        ::std::option::Option::None
         396  +
        /* OperationErrorGenerator.kt:190 */
  341    397   
    }
         398  +
    /* OperationErrorGenerator.kt:182 */
  342    399   
}
         400  +
/* OperationErrorGenerator.kt:163 */
  343    401   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HttpRequestWithRegexLiteralError {
         402  +
    /* OperationErrorGenerator.kt:164 */
  344    403   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         404  +
        /* OperationErrorGenerator.kt:318 */
  345    405   
        match self {
  346         -
            Self::Unhandled(_inner) => &_inner.meta,
         406  +
            /* OperationErrorGenerator.kt:326 */
         407  +
            Self::Unhandled(_inner) => {
         408  +
                /* OperationErrorGenerator.kt:168 */
         409  +
                &_inner.meta
         410  +
                /* OperationErrorGenerator.kt:326 */
         411  +
            } /* OperationErrorGenerator.kt:318 */
  347    412   
        }
         413  +
        /* OperationErrorGenerator.kt:164 */
  348    414   
    }
         415  +
    /* OperationErrorGenerator.kt:163 */
  349    416   
}
         417  +
/* OperationErrorGenerator.kt:109 */
  350    418   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HttpRequestWithRegexLiteralError {
         419  +
    /* OperationErrorGenerator.kt:110 */
  351    420   
    fn create_unhandled_error(
  352    421   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  353    422   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  354    423   
    ) -> Self {
         424  +
        /* OperationErrorGenerator.kt:121 */
  355    425   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  356    426   
            source,
  357    427   
            meta: meta.unwrap_or_default(),
  358    428   
        })
         429  +
        /* OperationErrorGenerator.kt:110 */
  359    430   
    }
         431  +
    /* OperationErrorGenerator.kt:109 */
  360    432   
}
  361    433   
         434  +
/* CodegenDelegator.kt:255 */
  362    435   
pub use crate::operation::http_request_with_regex_literal::_http_request_with_regex_literal_output::HttpRequestWithRegexLiteralOutput;
  363    436   
         437  +
/* CodegenDelegator.kt:255 */
  364    438   
pub use crate::operation::http_request_with_regex_literal::_http_request_with_regex_literal_input::HttpRequestWithRegexLiteralInput;
  365    439   
         440  +
/* RustModule.kt:172 */
  366    441   
mod _http_request_with_regex_literal_input;
  367    442   
         443  +
/* RustModule.kt:172 */
  368    444   
mod _http_request_with_regex_literal_output;
  369    445   
  370         -
/// Builders
         446  +
/// /* CodegenDelegator.kt:51 */Builders
  371    447   
pub mod builders;

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

@@ -1,1 +53,97 @@
    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 HttpRequestWithRegexLiteralInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct HttpRequestWithRegexLiteralInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub str: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl HttpRequestWithRegexLiteralInput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn str(&self) -> ::std::option::Option<&str> {
          20  +
        /* StructureGenerator.kt:169 */
   12     21   
        self.str.as_deref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl HttpRequestWithRegexLiteralInput {
   16         -
    /// Creates a new builder-style object to manufacture [`HttpRequestWithRegexLiteralInput`](crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`HttpRequestWithRegexLiteralInput`](crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::http_request_with_regex_literal::builders::HttpRequestWithRegexLiteralInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::http_request_with_regex_literal::builders::HttpRequestWithRegexLiteralInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`HttpRequestWithRegexLiteralInput`](crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`HttpRequestWithRegexLiteralInput`](crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralInput).
          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 HttpRequestWithRegexLiteralInputBuilder {
   26         -
    pub(crate) str: ::std::option::Option<::std::string::String>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) str: ::std::option::Option<::std::string::String>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl HttpRequestWithRegexLiteralInputBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
   30         -
    /// This field is required.
          52  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          53  +
    /* BuilderGenerator.kt:291 */
   31     54   
    pub fn str(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          55  +
        /* BuilderGenerator.kt:292 */
   32     56   
        self.str = ::std::option::Option::Some(input.into());
          57  +
        /* BuilderGenerator.kt:293 */
   33     58   
        self
          59  +
        /* BuilderGenerator.kt:291 */
   34     60   
    }
          61  +
    /* BuilderGenerator.kt:312 */
   35     62   
    #[allow(missing_docs)] // documentation missing in model
          63  +
                           /* BuilderGenerator.kt:314 */
   36     64   
    pub fn set_str(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          65  +
        /* BuilderGenerator.kt:315 */
   37     66   
        self.str = input;
   38     67   
        self
          68  +
        /* BuilderGenerator.kt:314 */
   39     69   
    }
          70  +
    /* BuilderGenerator.kt:334 */
   40     71   
    #[allow(missing_docs)] // documentation missing in model
          72  +
                           /* BuilderGenerator.kt:336 */
   41     73   
    pub fn get_str(&self) -> &::std::option::Option<::std::string::String> {
          74  +
        /* BuilderGenerator.kt:337 */
   42     75   
        &self.str
          76  +
        /* BuilderGenerator.kt:336 */
   43     77   
    }
   44         -
    /// Consumes the builder and constructs a [`HttpRequestWithRegexLiteralInput`](crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralInput).
          78  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`HttpRequestWithRegexLiteralInput`](crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralInput).
          79  +
    /* BuilderGenerator.kt:253 */
   45     80   
    pub fn build(
   46     81   
        self,
   47     82   
    ) -> ::std::result::Result<
   48     83   
        crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralInput,
   49     84   
        ::aws_smithy_types::error::operation::BuildError,
   50     85   
    > {
   51         -
        ::std::result::Result::Ok(crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralInput { str: self.str })
          86  +
        /* BuilderGenerator.kt:254 */
          87  +
        ::std::result::Result::Ok(
          88  +
            /* BuilderGenerator.kt:477 */
          89  +
            crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralInput {
          90  +
                /* BuilderGenerator.kt:481 */ str: self.str,
          91  +
                /* BuilderGenerator.kt:477 */
          92  +
            }, /* BuilderGenerator.kt:254 */
          93  +
        )
          94  +
        /* BuilderGenerator.kt:253 */
   52     95   
    }
          96  +
    /* BuilderGenerator.kt:355 */
   53     97   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/http_request_with_regex_literal/_http_request_with_regex_literal_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 HttpRequestWithRegexLiteralOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct HttpRequestWithRegexLiteralOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl HttpRequestWithRegexLiteralOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`HttpRequestWithRegexLiteralOutput`](crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`HttpRequestWithRegexLiteralOutput`](crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::http_request_with_regex_literal::builders::HttpRequestWithRegexLiteralOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::http_request_with_regex_literal::builders::HttpRequestWithRegexLiteralOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`HttpRequestWithRegexLiteralOutput`](crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`HttpRequestWithRegexLiteralOutput`](crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralOutput).
          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 HttpRequestWithRegexLiteralOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct HttpRequestWithRegexLiteralOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl HttpRequestWithRegexLiteralOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`HttpRequestWithRegexLiteralOutput`](crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`HttpRequestWithRegexLiteralOutput`](crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralOutput {
   20         -
        crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralOutput {
          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_regex_literal/builders.rs

@@ -1,1 +124,142 @@
    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_regex_literal::_http_request_with_regex_literal_output::HttpRequestWithRegexLiteralOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::http_request_with_regex_literal::_http_request_with_regex_literal_input::HttpRequestWithRegexLiteralInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::http_request_with_regex_literal::builders::HttpRequestWithRegexLiteralInputBuilder {
    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_regex_literal::HttpRequestWithRegexLiteralOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.http_request_with_regex_literal();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `HttpRequestWithRegexLiteral`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `HttpRequestWithRegexLiteral`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct HttpRequestWithRegexLiteralFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::http_request_with_regex_literal::builders::HttpRequestWithRegexLiteralInputBuilder,
   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_regex_literal::HttpRequestWithRegexLiteralOutput,
   34     40   
        crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralError,
   35     41   
    > for HttpRequestWithRegexLiteralFluentBuilder
   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_regex_literal::HttpRequestWithRegexLiteralOutput,
   43     49   
            crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralError,
   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 HttpRequestWithRegexLiteralFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `HttpRequestWithRegexLiteralFluentBuilder`.
   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 HttpRequestWithRegexLiteral as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::http_request_with_regex_literal::builders::HttpRequestWithRegexLiteralInputBuilder {
   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_regex_literal::HttpRequestWithRegexLiteralOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralError,
   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_regex_literal::HttpRequestWithRegexLiteral::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_regex_literal::HttpRequestWithRegexLiteral::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_regex_literal::HttpRequestWithRegexLiteralOutput,
   96    106   
        crate::operation::http_request_with_regex_literal::HttpRequestWithRegexLiteralError,
   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 str(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  112    125   
        self.inner = self.inner.str(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_str(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  117    132   
        self.inner = self.inner.set_str(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_str(&self) -> &::std::option::Option<::std::string::String> {
  122    139   
        self.inner.get_str()
  123    140   
    }
         141  +
    /* FluentBuilderGenerator.kt:282 */
  124    142   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/http_response_code.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 `HttpResponseCode`.
           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 HttpResponseCode;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl HttpResponseCode {
    7         -
    /// Creates a new `HttpResponseCode`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `HttpResponseCode`
          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_response_code::HttpResponseCodeInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::http_response_code::HttpResponseCodeOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::http_response_code::HttpResponseCodeError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +265,282 @@
   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 HttpResponseCode {
   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("HttpResponseCode");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            HttpResponseCodeRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            HttpResponseCodeResponseDeserializer,
  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   
            "HttpResponseCode",
  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("HttpResponseCode")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(HttpResponseCodeEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::http_response_code::HttpResponseCodeError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::http_response_code::HttpResponseCodeError,
  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 HttpResponseCodeResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpResponseCodeResponseDeserializer {
  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_response_code::de_http_response_code_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_http_response_code::de_http_response_code_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 HttpResponseCodeRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpResponseCodeRequestSerializer {
  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_response_code::HttpResponseCodeInput>()
  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_response_code::HttpResponseCodeInput,
  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, "/HttpResponseCode").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_response_code::HttpResponseCodeInput,
  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("PUT").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 HttpResponseCodeEndpointParamsInterceptor;
  201    215   
  202    216   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpResponseCodeEndpointParamsInterceptor {
  203    217   
    fn name(&self) -> &'static str {
  204    218   
        "HttpResponseCodeEndpointParamsInterceptor"
  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::<HttpResponseCodeInput>()
  220    234   
            .ok_or("failed to downcast to HttpResponseCodeInput")?;
  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_response_code_test {
  237    254   
  238    255   
    /// Binds the http response code to an output structure. Note that
  239    256   
    /// even though all members are bound outside of the payload, an
  240    257   
    /// empty JSON object is serialized in the response. However,
  241    258   
    /// clients should be able to handle an empty JSON object or an
  242    259   
    /// empty payload without failing to deserialize a response.
  243    260   
    /// Test ID: RestJsonHttpResponseCode
  244    261   
    #[::tokio::test]
  245    262   
    #[::tracing_test::traced_test]
@@ -296,313 +425,501 @@
  316    333   
                )))
  317    334   
            });
  318    335   
            de.deserialize_nonstreaming(&http_response)
  319    336   
        });
  320    337   
        let parsed = parsed
  321    338   
            .expect("should be successful response")
  322    339   
            .downcast::<crate::operation::http_response_code::HttpResponseCodeOutput>()
  323    340   
            .unwrap();
  324    341   
        ::pretty_assertions::assert_eq!(parsed.status, expected_output.status, "Unexpected value for `status`");
  325    342   
    }
         343  +
         344  +
    /* ProtocolTestGenerator.kt:98 */
  326    345   
}
  327    346   
         347  +
/* OperationErrorGenerator.kt:79 */
  328    348   
/// Error type for the `HttpResponseCodeError` operation.
         349  +
/* RustType.kt:516 */
  329    350   
#[non_exhaustive]
         351  +
/* RustType.kt:516 */
  330    352   
#[derive(::std::fmt::Debug)]
  331         -
pub enum HttpResponseCodeError {
         353  +
pub /* OperationErrorGenerator.kt:81 */ enum HttpResponseCodeError {
         354  +
    /* OperationErrorGenerator.kt:88 */
  332    355   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  333    356   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  334    357   
    variable wildcard pattern and check `.code()`:
  335    358   
     \
  336    359   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  337    360   
     \
  338    361   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HttpResponseCodeError) for what information is available for the error.")]
  339    362   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         363  +
    /* OperationErrorGenerator.kt:81 */
  340    364   
}
         365  +
/* OperationErrorGenerator.kt:218 */
  341    366   
impl HttpResponseCodeError {
         367  +
    /* OperationErrorGenerator.kt:219 */
  342    368   
    /// Creates the `HttpResponseCodeError::Unhandled` variant from any error type.
  343    369   
    pub fn unhandled(
  344    370   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  345    371   
    ) -> Self {
  346    372   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  347    373   
            source: err.into(),
  348    374   
            meta: ::std::default::Default::default(),
  349    375   
        })
  350    376   
    }
  351    377   
  352    378   
    /// Creates the `HttpResponseCodeError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  353    379   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  354    380   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  355    381   
            source: err.clone().into(),
  356    382   
            meta: err,
  357    383   
        })
  358    384   
    }
  359         -
    ///
         385  +
    /// /* OperationErrorGenerator.kt:236 */
  360    386   
    /// Returns error metadata, which includes the error code, message,
  361    387   
    /// request ID, and potentially additional information.
  362    388   
    ///
         389  +
    /* OperationErrorGenerator.kt:242 */
  363    390   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         391  +
        /* OperationErrorGenerator.kt:243 */
  364    392   
        match self {
  365         -
            Self::Unhandled(e) => &e.meta,
         393  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         394  +
            /* OperationErrorGenerator.kt:243 */
  366    395   
        }
         396  +
        /* OperationErrorGenerator.kt:242 */
  367    397   
    }
         398  +
    /* OperationErrorGenerator.kt:218 */
  368    399   
}
         400  +
/* OperationErrorGenerator.kt:269 */
  369    401   
impl ::std::error::Error for HttpResponseCodeError {
         402  +
    /* OperationErrorGenerator.kt:270 */
  370    403   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         404  +
        /* OperationErrorGenerator.kt:318 */
  371    405   
        match self {
  372         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         406  +
            /* OperationErrorGenerator.kt:326 */
         407  +
            Self::Unhandled(_inner) => {
         408  +
                /* OperationErrorGenerator.kt:279 */
         409  +
                ::std::option::Option::Some(&*_inner.source)
         410  +
                /* OperationErrorGenerator.kt:326 */
         411  +
            } /* OperationErrorGenerator.kt:318 */
  373    412   
        }
         413  +
        /* OperationErrorGenerator.kt:270 */
  374    414   
    }
         415  +
    /* OperationErrorGenerator.kt:269 */
  375    416   
}
         417  +
/* OperationErrorGenerator.kt:133 */
  376    418   
impl ::std::fmt::Display for HttpResponseCodeError {
         419  +
    /* OperationErrorGenerator.kt:134 */
  377    420   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         421  +
        /* OperationErrorGenerator.kt:318 */
  378    422   
        match self {
         423  +
            /* OperationErrorGenerator.kt:326 */
  379    424   
            Self::Unhandled(_inner) => {
         425  +
                /* OperationErrorGenerator.kt:139 */
  380    426   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  381    427   
                    write!(f, "unhandled error ({code})")
  382    428   
                } else {
  383    429   
                    f.write_str("unhandled error")
  384    430   
                }
  385         -
            }
         431  +
                /* OperationErrorGenerator.kt:326 */
         432  +
            } /* OperationErrorGenerator.kt:318 */
  386    433   
        }
         434  +
        /* OperationErrorGenerator.kt:134 */
  387    435   
    }
         436  +
    /* OperationErrorGenerator.kt:133 */
  388    437   
}
         438  +
/* OperationErrorGenerator.kt:182 */
  389    439   
impl ::aws_smithy_types::retry::ProvideErrorKind for HttpResponseCodeError {
         440  +
    /* OperationErrorGenerator.kt:186 */
  390    441   
    fn code(&self) -> ::std::option::Option<&str> {
         442  +
        /* OperationErrorGenerator.kt:187 */
  391    443   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         444  +
        /* OperationErrorGenerator.kt:186 */
  392    445   
    }
         446  +
    /* OperationErrorGenerator.kt:190 */
  393    447   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         448  +
        /* OperationErrorGenerator.kt:197 */
  394    449   
        ::std::option::Option::None
         450  +
        /* OperationErrorGenerator.kt:190 */
  395    451   
    }
         452  +
    /* OperationErrorGenerator.kt:182 */
  396    453   
}
         454  +
/* OperationErrorGenerator.kt:163 */
  397    455   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HttpResponseCodeError {
         456  +
    /* OperationErrorGenerator.kt:164 */
  398    457   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         458  +
        /* OperationErrorGenerator.kt:318 */
  399    459   
        match self {
  400         -
            Self::Unhandled(_inner) => &_inner.meta,
         460  +
            /* OperationErrorGenerator.kt:326 */
         461  +
            Self::Unhandled(_inner) => {
         462  +
                /* OperationErrorGenerator.kt:168 */
         463  +
                &_inner.meta
         464  +
                /* OperationErrorGenerator.kt:326 */
         465  +
            } /* OperationErrorGenerator.kt:318 */
  401    466   
        }
         467  +
        /* OperationErrorGenerator.kt:164 */
  402    468   
    }
         469  +
    /* OperationErrorGenerator.kt:163 */
  403    470   
}
         471  +
/* OperationErrorGenerator.kt:109 */
  404    472   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HttpResponseCodeError {
         473  +
    /* OperationErrorGenerator.kt:110 */
  405    474   
    fn create_unhandled_error(
  406    475   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  407    476   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  408    477   
    ) -> Self {
         478  +
        /* OperationErrorGenerator.kt:121 */
  409    479   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  410    480   
            source,
  411    481   
            meta: meta.unwrap_or_default(),
  412    482   
        })
         483  +
        /* OperationErrorGenerator.kt:110 */
  413    484   
    }
         485  +
    /* OperationErrorGenerator.kt:109 */
  414    486   
}
  415    487   
         488  +
/* CodegenDelegator.kt:255 */
  416    489   
pub use crate::operation::http_response_code::_http_response_code_output::HttpResponseCodeOutput;
  417    490   
         491  +
/* CodegenDelegator.kt:255 */
  418    492   
pub use crate::operation::http_response_code::_http_response_code_input::HttpResponseCodeInput;
  419    493   
         494  +
/* RustModule.kt:172 */
  420    495   
mod _http_response_code_input;
  421    496   
         497  +
/* RustModule.kt:172 */
  422    498   
mod _http_response_code_output;
  423    499   
  424         -
/// Builders
         500  +
/// /* CodegenDelegator.kt:51 */Builders
  425    501   
pub mod builders;

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

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

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

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

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

@@ -1,1 +110,122 @@
    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_response_code::_http_response_code_output::HttpResponseCodeOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::http_response_code::_http_response_code_input::HttpResponseCodeInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::http_response_code::builders::HttpResponseCodeInputBuilder {
    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_response_code::HttpResponseCodeOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::http_response_code::HttpResponseCodeError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.http_response_code();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `HttpResponseCode`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `HttpResponseCode`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct HttpResponseCodeFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::http_response_code::builders::HttpResponseCodeInputBuilder,
   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_response_code::HttpResponseCodeOutput,
   34     40   
        crate::operation::http_response_code::HttpResponseCodeError,
   35     41   
    > for HttpResponseCodeFluentBuilder
   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_response_code::HttpResponseCodeOutput,
   43     49   
            crate::operation::http_response_code::HttpResponseCodeError,
   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 HttpResponseCodeFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `HttpResponseCodeFluentBuilder`.
   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 HttpResponseCode as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::http_response_code::builders::HttpResponseCodeInputBuilder {
   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_response_code::HttpResponseCodeOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::http_response_code::HttpResponseCodeError,
   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_response_code::HttpResponseCode::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_response_code::HttpResponseCode::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_response_code::HttpResponseCodeOutput,
   96    106   
        crate::operation::http_response_code::HttpResponseCodeError,
   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:282 */
  110    122   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/http_string_payload.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 `HttpStringPayload`.
           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 HttpStringPayload;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl HttpStringPayload {
    7         -
    /// Creates a new `HttpStringPayload`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `HttpStringPayload`
          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_string_payload::HttpStringPayloadInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::http_string_payload::HttpStringPayloadOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::http_string_payload::HttpStringPayloadError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +271,288 @@
   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 HttpStringPayload {
   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("HttpStringPayload");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            HttpStringPayloadRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            HttpStringPayloadResponseDeserializer,
  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   
            "HttpStringPayload",
  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("HttpStringPayload")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(HttpStringPayloadEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::http_string_payload::HttpStringPayloadError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::http_string_payload::HttpStringPayloadError,
  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 HttpStringPayloadResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpStringPayloadResponseDeserializer {
  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_string_payload::de_http_string_payload_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_http_string_payload::de_http_string_payload_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 HttpStringPayloadRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpStringPayloadRequestSerializer {
  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_string_payload::HttpStringPayloadInput>()
  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_string_payload::HttpStringPayloadInput,
  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, "/StringPayload").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_string_payload::HttpStringPayloadInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "text/plain");
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_http_string_payload_input::ser_payload_http_payload(
  196    209   
            input.payload,
  197    210   
        )?);
  198    211   
        if let Some(content_length) = body.content_length() {
  199    212   
            let content_length = content_length.to_string();
  200    213   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  201    214   
        }
  202    215   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  203    216   
    }
  204    217   
}
         218  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  205    219   
#[derive(Debug)]
  206    220   
struct HttpStringPayloadEndpointParamsInterceptor;
  207    221   
  208    222   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpStringPayloadEndpointParamsInterceptor {
  209    223   
    fn name(&self) -> &'static str {
  210    224   
        "HttpStringPayloadEndpointParamsInterceptor"
  211    225   
    }
  212    226   
  213    227   
    fn read_before_execution(
  214    228   
        &self,
  215    229   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  216    230   
            '_,
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  218    232   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  219    233   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  220    234   
        >,
  221    235   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  222    236   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  223    237   
        let _input = context
  224    238   
            .input()
  225    239   
            .downcast_ref::<HttpStringPayloadInput>()
  226    240   
            .ok_or("failed to downcast to HttpStringPayloadInput")?;
  227    241   
  228    242   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  229    243   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  230    244   
        })?;
  231    245   
        cfg.interceptor_state()
  232    246   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  233    247   
        ::std::result::Result::Ok(())
  234    248   
    }
  235    249   
}
  236    250   
  237    251   
// The get_* functions below are generated from JMESPath expressions in the
  238    252   
// operationContextParams trait. They target the operation's input shape.
  239    253   
         254  +
/* RustType.kt:516 */
  240    255   
#[allow(unreachable_code, unused_variables)]
         256  +
/* RustType.kt:516 */
  241    257   
#[cfg(test)]
         258  +
/* ProtocolTestGenerator.kt:98 */
  242    259   
mod http_string_payload_test {
  243    260   
  244    261   
    /// Test ID: RestJsonStringPayloadRequest
  245    262   
    #[::tokio::test]
  246    263   
    #[::tracing_test::traced_test]
  247    264   
    async fn rest_json_string_payload_request_request() {
  248    265   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  249    266   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  250    267   
  251    268   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
@@ -283,300 +412,488 @@
  303    320   
                )))
  304    321   
            });
  305    322   
            de.deserialize_nonstreaming(&http_response)
  306    323   
        });
  307    324   
        let parsed = parsed
  308    325   
            .expect("should be successful response")
  309    326   
            .downcast::<crate::operation::http_string_payload::HttpStringPayloadOutput>()
  310    327   
            .unwrap();
  311    328   
        ::pretty_assertions::assert_eq!(parsed.payload, expected_output.payload, "Unexpected value for `payload`");
  312    329   
    }
         330  +
         331  +
    /* ProtocolTestGenerator.kt:98 */
  313    332   
}
  314    333   
         334  +
/* OperationErrorGenerator.kt:79 */
  315    335   
/// Error type for the `HttpStringPayloadError` operation.
         336  +
/* RustType.kt:516 */
  316    337   
#[non_exhaustive]
         338  +
/* RustType.kt:516 */
  317    339   
#[derive(::std::fmt::Debug)]
  318         -
pub enum HttpStringPayloadError {
         340  +
pub /* OperationErrorGenerator.kt:81 */ enum HttpStringPayloadError {
         341  +
    /* OperationErrorGenerator.kt:88 */
  319    342   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  320    343   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  321    344   
    variable wildcard pattern and check `.code()`:
  322    345   
     \
  323    346   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  324    347   
     \
  325    348   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HttpStringPayloadError) for what information is available for the error.")]
  326    349   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         350  +
    /* OperationErrorGenerator.kt:81 */
  327    351   
}
         352  +
/* OperationErrorGenerator.kt:218 */
  328    353   
impl HttpStringPayloadError {
         354  +
    /* OperationErrorGenerator.kt:219 */
  329    355   
    /// Creates the `HttpStringPayloadError::Unhandled` variant from any error type.
  330    356   
    pub fn unhandled(
  331    357   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  332    358   
    ) -> Self {
  333    359   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  334    360   
            source: err.into(),
  335    361   
            meta: ::std::default::Default::default(),
  336    362   
        })
  337    363   
    }
  338    364   
  339    365   
    /// Creates the `HttpStringPayloadError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  340    366   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  341    367   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  342    368   
            source: err.clone().into(),
  343    369   
            meta: err,
  344    370   
        })
  345    371   
    }
  346         -
    ///
         372  +
    /// /* OperationErrorGenerator.kt:236 */
  347    373   
    /// Returns error metadata, which includes the error code, message,
  348    374   
    /// request ID, and potentially additional information.
  349    375   
    ///
         376  +
    /* OperationErrorGenerator.kt:242 */
  350    377   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         378  +
        /* OperationErrorGenerator.kt:243 */
  351    379   
        match self {
  352         -
            Self::Unhandled(e) => &e.meta,
         380  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         381  +
            /* OperationErrorGenerator.kt:243 */
  353    382   
        }
         383  +
        /* OperationErrorGenerator.kt:242 */
  354    384   
    }
         385  +
    /* OperationErrorGenerator.kt:218 */
  355    386   
}
         387  +
/* OperationErrorGenerator.kt:269 */
  356    388   
impl ::std::error::Error for HttpStringPayloadError {
         389  +
    /* OperationErrorGenerator.kt:270 */
  357    390   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         391  +
        /* OperationErrorGenerator.kt:318 */
  358    392   
        match self {
  359         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         393  +
            /* OperationErrorGenerator.kt:326 */
         394  +
            Self::Unhandled(_inner) => {
         395  +
                /* OperationErrorGenerator.kt:279 */
         396  +
                ::std::option::Option::Some(&*_inner.source)
         397  +
                /* OperationErrorGenerator.kt:326 */
         398  +
            } /* OperationErrorGenerator.kt:318 */
  360    399   
        }
         400  +
        /* OperationErrorGenerator.kt:270 */
  361    401   
    }
         402  +
    /* OperationErrorGenerator.kt:269 */
  362    403   
}
         404  +
/* OperationErrorGenerator.kt:133 */
  363    405   
impl ::std::fmt::Display for HttpStringPayloadError {
         406  +
    /* OperationErrorGenerator.kt:134 */
  364    407   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         408  +
        /* OperationErrorGenerator.kt:318 */
  365    409   
        match self {
         410  +
            /* OperationErrorGenerator.kt:326 */
  366    411   
            Self::Unhandled(_inner) => {
         412  +
                /* OperationErrorGenerator.kt:139 */
  367    413   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  368    414   
                    write!(f, "unhandled error ({code})")
  369    415   
                } else {
  370    416   
                    f.write_str("unhandled error")
  371    417   
                }
  372         -
            }
         418  +
                /* OperationErrorGenerator.kt:326 */
         419  +
            } /* OperationErrorGenerator.kt:318 */
  373    420   
        }
         421  +
        /* OperationErrorGenerator.kt:134 */
  374    422   
    }
         423  +
    /* OperationErrorGenerator.kt:133 */
  375    424   
}
         425  +
/* OperationErrorGenerator.kt:182 */
  376    426   
impl ::aws_smithy_types::retry::ProvideErrorKind for HttpStringPayloadError {
         427  +
    /* OperationErrorGenerator.kt:186 */
  377    428   
    fn code(&self) -> ::std::option::Option<&str> {
         429  +
        /* OperationErrorGenerator.kt:187 */
  378    430   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         431  +
        /* OperationErrorGenerator.kt:186 */
  379    432   
    }
         433  +
    /* OperationErrorGenerator.kt:190 */
  380    434   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         435  +
        /* OperationErrorGenerator.kt:197 */
  381    436   
        ::std::option::Option::None
         437  +
        /* OperationErrorGenerator.kt:190 */
  382    438   
    }
         439  +
    /* OperationErrorGenerator.kt:182 */
  383    440   
}
         441  +
/* OperationErrorGenerator.kt:163 */
  384    442   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HttpStringPayloadError {
         443  +
    /* OperationErrorGenerator.kt:164 */
  385    444   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         445  +
        /* OperationErrorGenerator.kt:318 */
  386    446   
        match self {
  387         -
            Self::Unhandled(_inner) => &_inner.meta,
         447  +
            /* OperationErrorGenerator.kt:326 */
         448  +
            Self::Unhandled(_inner) => {
         449  +
                /* OperationErrorGenerator.kt:168 */
         450  +
                &_inner.meta
         451  +
                /* OperationErrorGenerator.kt:326 */
         452  +
            } /* OperationErrorGenerator.kt:318 */
  388    453   
        }
         454  +
        /* OperationErrorGenerator.kt:164 */
  389    455   
    }
         456  +
    /* OperationErrorGenerator.kt:163 */
  390    457   
}
         458  +
/* OperationErrorGenerator.kt:109 */
  391    459   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HttpStringPayloadError {
         460  +
    /* OperationErrorGenerator.kt:110 */
  392    461   
    fn create_unhandled_error(
  393    462   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  394    463   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  395    464   
    ) -> Self {
         465  +
        /* OperationErrorGenerator.kt:121 */
  396    466   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  397    467   
            source,
  398    468   
            meta: meta.unwrap_or_default(),
  399    469   
        })
         470  +
        /* OperationErrorGenerator.kt:110 */
  400    471   
    }
         472  +
    /* OperationErrorGenerator.kt:109 */
  401    473   
}
  402    474   
         475  +
/* CodegenDelegator.kt:255 */
  403    476   
pub use crate::operation::http_string_payload::_http_string_payload_output::HttpStringPayloadOutput;
  404    477   
         478  +
/* CodegenDelegator.kt:255 */
  405    479   
pub use crate::operation::http_string_payload::_http_string_payload_input::HttpStringPayloadInput;
  406    480   
         481  +
/* RustModule.kt:172 */
  407    482   
mod _http_string_payload_input;
  408    483   
         484  +
/* RustModule.kt:172 */
  409    485   
mod _http_string_payload_output;
  410    486   
  411         -
/// Builders
         487  +
/// /* CodegenDelegator.kt:51 */Builders
  412    488   
pub mod builders;

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

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