Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

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

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

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

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

@@ -1,1 +139,163 @@
    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::test_payload_blob::_test_payload_blob_output::TestPayloadBlobOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::test_payload_blob::_test_payload_blob_input::TestPayloadBlobInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::test_payload_blob::builders::TestPayloadBlobInputBuilder {
    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::test_payload_blob::TestPayloadBlobOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::test_payload_blob::TestPayloadBlobError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.test_payload_blob();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `TestPayloadBlob`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `TestPayloadBlob`.
   24     27   
///
   25         -
/// This example operation serializes a payload targeting a blob. The Blob shape is not structured content and we cannot make assumptions about what data will be sent. This test ensures only a generic "Content-Type: application/octet-stream" header is used, and that we are not treating an empty body as an empty JSON document.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This example operation serializes a payload targeting a blob. The Blob shape is not structured content and we cannot make assumptions about what data will be sent. This test ensures only a generic "Content-Type: application/octet-stream" header is used, and that we are not treating an empty body as an empty JSON document.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct TestPayloadBlobFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::test_payload_blob::builders::TestPayloadBlobInputBuilder,
   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::test_payload_blob::TestPayloadBlobOutput,
   35     41   
        crate::operation::test_payload_blob::TestPayloadBlobError,
   36     42   
    > for TestPayloadBlobFluentBuilder
   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::test_payload_blob::TestPayloadBlobOutput,
   44     50   
            crate::operation::test_payload_blob::TestPayloadBlobError,
   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 TestPayloadBlobFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `TestPayloadBlobFluentBuilder`.
   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 TestPayloadBlob as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::test_payload_blob::builders::TestPayloadBlobInputBuilder {
   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::test_payload_blob::TestPayloadBlobOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::test_payload_blob::TestPayloadBlobError,
   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::test_payload_blob::TestPayloadBlob::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::test_payload_blob::TestPayloadBlob::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::test_payload_blob::TestPayloadBlobOutput,
   97    107   
        crate::operation::test_payload_blob::TestPayloadBlobError,
   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 content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.content_type(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_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_content_type(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_content_type(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_content_type()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:498 */
  125    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* FluentBuilderGenerator.kt:500 */
  126    145   
    pub fn data(mut self, input: ::aws_smithy_types::Blob) -> Self {
  127    146   
        self.inner = self.inner.data(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_data(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
  132    153   
        self.inner = self.inner.set_data(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_data(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
  137    160   
        self.inner.get_data()
  138    161   
    }
         162  +
    /* FluentBuilderGenerator.kt:282 */
  139    163   
}

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

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

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

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

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

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

@@ -1,1 +139,163 @@
    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::test_payload_structure::_test_payload_structure_output::TestPayloadStructureOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::test_payload_structure::_test_payload_structure_input::TestPayloadStructureInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::test_payload_structure::builders::TestPayloadStructureInputBuilder {
    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::test_payload_structure::TestPayloadStructureOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::test_payload_structure::TestPayloadStructureError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.test_payload_structure();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `TestPayloadStructure`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `TestPayloadStructure`.
   24     27   
///
   25         -
/// This example operation serializes a payload targeting a structure. This enforces the same requirements as TestBodyStructure but with the body specified by the @httpPayload trait.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This example operation serializes a payload targeting a structure. This enforces the same requirements as TestBodyStructure but with the body specified by the @httpPayload trait.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct TestPayloadStructureFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::test_payload_structure::builders::TestPayloadStructureInputBuilder,
   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::test_payload_structure::TestPayloadStructureOutput,
   35     41   
        crate::operation::test_payload_structure::TestPayloadStructureError,
   36     42   
    > for TestPayloadStructureFluentBuilder
   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::test_payload_structure::TestPayloadStructureOutput,
   44     50   
            crate::operation::test_payload_structure::TestPayloadStructureError,
   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 TestPayloadStructureFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `TestPayloadStructureFluentBuilder`.
   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 TestPayloadStructure as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::test_payload_structure::builders::TestPayloadStructureInputBuilder {
   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::test_payload_structure::TestPayloadStructureOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::test_payload_structure::TestPayloadStructureError,
   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::test_payload_structure::TestPayloadStructure::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::test_payload_structure::TestPayloadStructure::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::test_payload_structure::TestPayloadStructureOutput,
   97    107   
        crate::operation::test_payload_structure::TestPayloadStructureError,
   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 test_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.test_id(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_test_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_test_id(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_test_id(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_test_id()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:498 */
  125    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* FluentBuilderGenerator.kt:500 */
  126    145   
    pub fn payload_config(mut self, input: crate::types::PayloadConfig) -> Self {
  127    146   
        self.inner = self.inner.payload_config(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_payload_config(mut self, input: ::std::option::Option<crate::types::PayloadConfig>) -> Self {
  132    153   
        self.inner = self.inner.set_payload_config(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_payload_config(&self) -> &::std::option::Option<crate::types::PayloadConfig> {
  137    160   
        self.inner.get_payload_config()
  138    161   
    }
         162  +
    /* FluentBuilderGenerator.kt:282 */
  139    163   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/test_post_no_input_no_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 `TestPostNoInputNoPayload`.
           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 TestPostNoInputNoPayload;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl TestPostNoInputNoPayload {
    7         -
    /// Creates a new `TestPostNoInputNoPayload`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `TestPostNoInputNoPayload`
          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::test_post_no_input_no_payload::TestPostNoInputNoPayloadInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +358,434 @@
   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 TestPostNoInputNoPayload {
   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("TestPostNoInputNoPayload");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            TestPostNoInputNoPayloadRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            TestPostNoInputNoPayloadResponseDeserializer,
  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   
            "TestPostNoInputNoPayload",
  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("TestPostNoInputNoPayload")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(TestPostNoInputNoPayloadEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadError,
  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 TestPostNoInputNoPayloadResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for TestPostNoInputNoPayloadResponseDeserializer {
  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_test_post_no_input_no_payload::de_test_post_no_input_no_payload_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_test_post_no_input_no_payload::de_test_post_no_input_no_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 TestPostNoInputNoPayloadRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for TestPostNoInputNoPayloadRequestSerializer {
  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::test_post_no_input_no_payload::TestPostNoInputNoPayloadInput>()
  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::test_post_no_input_no_payload::TestPostNoInputNoPayloadInput,
  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, "/no_input_no_payload").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::test_post_no_input_no_payload::TestPostNoInputNoPayloadInput,
  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
  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 TestPostNoInputNoPayloadEndpointParamsInterceptor;
  201    215   
  202    216   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for TestPostNoInputNoPayloadEndpointParamsInterceptor {
  203    217   
    fn name(&self) -> &'static str {
  204    218   
        "TestPostNoInputNoPayloadEndpointParamsInterceptor"
  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::<TestPostNoInputNoPayloadInput>()
  220    234   
            .ok_or("failed to downcast to TestPostNoInputNoPayloadInput")?;
  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 test_post_no_input_no_payload_test {
  237    254   
  238    255   
    /// Serializes a POST request for an operation with no input, and therefore no modeled body
  239    256   
    /// Test ID: RestJsonHttpPostWithNoInput
  240    257   
    #[::tokio::test]
  241    258   
    #[::tracing_test::traced_test]
  242    259   
    async fn rest_json_http_post_with_no_input_request() {
  243    260   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  244    261   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  245    262   
  246    263   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  247    264   
        let result = client.test_post_no_input_no_payload().send().await;
  248    265   
        let _ = dbg!(result);
  249    266   
        let http_request = request_receiver.expect_request();
  250    267   
        let forbidden_headers = &["Content-Type"];
  251    268   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::forbid_headers(http_request.headers(), forbidden_headers));
  252    269   
        let body = http_request.body().bytes().expect("body should be strict");
  253    270   
        // No body.
  254    271   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  255    272   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  256    273   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  257    274   
        ::pretty_assertions::assert_eq!(uri.path(), "/no_input_no_payload", "path was incorrect");
  258    275   
    }
         276  +
         277  +
    /* ProtocolTestGenerator.kt:98 */
  259    278   
}
  260    279   
         280  +
/* OperationErrorGenerator.kt:79 */
  261    281   
/// Error type for the `TestPostNoInputNoPayloadError` operation.
         282  +
/* RustType.kt:516 */
  262    283   
#[non_exhaustive]
         284  +
/* RustType.kt:516 */
  263    285   
#[derive(::std::fmt::Debug)]
  264         -
pub enum TestPostNoInputNoPayloadError {
         286  +
pub /* OperationErrorGenerator.kt:81 */ enum TestPostNoInputNoPayloadError {
         287  +
    /* OperationErrorGenerator.kt:88 */
  265    288   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  266    289   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  267    290   
    variable wildcard pattern and check `.code()`:
  268    291   
     \
  269    292   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  270    293   
     \
  271    294   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-TestPostNoInputNoPayloadError) for what information is available for the error.")]
  272    295   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         296  +
    /* OperationErrorGenerator.kt:81 */
  273    297   
}
         298  +
/* OperationErrorGenerator.kt:218 */
  274    299   
impl TestPostNoInputNoPayloadError {
         300  +
    /* OperationErrorGenerator.kt:219 */
  275    301   
    /// Creates the `TestPostNoInputNoPayloadError::Unhandled` variant from any error type.
  276    302   
    pub fn unhandled(
  277    303   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  278    304   
    ) -> Self {
  279    305   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  280    306   
            source: err.into(),
  281    307   
            meta: ::std::default::Default::default(),
  282    308   
        })
  283    309   
    }
  284    310   
  285    311   
    /// Creates the `TestPostNoInputNoPayloadError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  286    312   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  287    313   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  288    314   
            source: err.clone().into(),
  289    315   
            meta: err,
  290    316   
        })
  291    317   
    }
  292         -
    ///
         318  +
    /// /* OperationErrorGenerator.kt:236 */
  293    319   
    /// Returns error metadata, which includes the error code, message,
  294    320   
    /// request ID, and potentially additional information.
  295    321   
    ///
         322  +
    /* OperationErrorGenerator.kt:242 */
  296    323   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         324  +
        /* OperationErrorGenerator.kt:243 */
  297    325   
        match self {
  298         -
            Self::Unhandled(e) => &e.meta,
         326  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         327  +
            /* OperationErrorGenerator.kt:243 */
  299    328   
        }
         329  +
        /* OperationErrorGenerator.kt:242 */
  300    330   
    }
         331  +
    /* OperationErrorGenerator.kt:218 */
  301    332   
}
         333  +
/* OperationErrorGenerator.kt:269 */
  302    334   
impl ::std::error::Error for TestPostNoInputNoPayloadError {
         335  +
    /* OperationErrorGenerator.kt:270 */
  303    336   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         337  +
        /* OperationErrorGenerator.kt:318 */
  304    338   
        match self {
  305         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         339  +
            /* OperationErrorGenerator.kt:326 */
         340  +
            Self::Unhandled(_inner) => {
         341  +
                /* OperationErrorGenerator.kt:279 */
         342  +
                ::std::option::Option::Some(&*_inner.source)
         343  +
                /* OperationErrorGenerator.kt:326 */
         344  +
            } /* OperationErrorGenerator.kt:318 */
  306    345   
        }
         346  +
        /* OperationErrorGenerator.kt:270 */
  307    347   
    }
         348  +
    /* OperationErrorGenerator.kt:269 */
  308    349   
}
         350  +
/* OperationErrorGenerator.kt:133 */
  309    351   
impl ::std::fmt::Display for TestPostNoInputNoPayloadError {
         352  +
    /* OperationErrorGenerator.kt:134 */
  310    353   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         354  +
        /* OperationErrorGenerator.kt:318 */
  311    355   
        match self {
         356  +
            /* OperationErrorGenerator.kt:326 */
  312    357   
            Self::Unhandled(_inner) => {
         358  +
                /* OperationErrorGenerator.kt:139 */
  313    359   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  314    360   
                    write!(f, "unhandled error ({code})")
  315    361   
                } else {
  316    362   
                    f.write_str("unhandled error")
  317    363   
                }
         364  +
                /* OperationErrorGenerator.kt:326 */
         365  +
            } /* OperationErrorGenerator.kt:318 */
  318    366   
        }
         367  +
        /* OperationErrorGenerator.kt:134 */
  319    368   
    }
  320         -
    }
         369  +
    /* OperationErrorGenerator.kt:133 */
  321    370   
}
         371  +
/* OperationErrorGenerator.kt:182 */
  322    372   
impl ::aws_smithy_types::retry::ProvideErrorKind for TestPostNoInputNoPayloadError {
         373  +
    /* OperationErrorGenerator.kt:186 */
  323    374   
    fn code(&self) -> ::std::option::Option<&str> {
         375  +
        /* OperationErrorGenerator.kt:187 */
  324    376   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         377  +
        /* OperationErrorGenerator.kt:186 */
  325    378   
    }
         379  +
    /* OperationErrorGenerator.kt:190 */
  326    380   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         381  +
        /* OperationErrorGenerator.kt:197 */
  327    382   
        ::std::option::Option::None
         383  +
        /* OperationErrorGenerator.kt:190 */
  328    384   
    }
         385  +
    /* OperationErrorGenerator.kt:182 */
  329    386   
}
         387  +
/* OperationErrorGenerator.kt:163 */
  330    388   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for TestPostNoInputNoPayloadError {
         389  +
    /* OperationErrorGenerator.kt:164 */
  331    390   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         391  +
        /* OperationErrorGenerator.kt:318 */
  332    392   
        match self {
  333         -
            Self::Unhandled(_inner) => &_inner.meta,
         393  +
            /* OperationErrorGenerator.kt:326 */
         394  +
            Self::Unhandled(_inner) => {
         395  +
                /* OperationErrorGenerator.kt:168 */
         396  +
                &_inner.meta
         397  +
                /* OperationErrorGenerator.kt:326 */
         398  +
            } /* OperationErrorGenerator.kt:318 */
  334    399   
        }
         400  +
        /* OperationErrorGenerator.kt:164 */
  335    401   
    }
         402  +
    /* OperationErrorGenerator.kt:163 */
  336    403   
}
         404  +
/* OperationErrorGenerator.kt:109 */
  337    405   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for TestPostNoInputNoPayloadError {
         406  +
    /* OperationErrorGenerator.kt:110 */
  338    407   
    fn create_unhandled_error(
  339    408   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  340    409   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  341    410   
    ) -> Self {
         411  +
        /* OperationErrorGenerator.kt:121 */
  342    412   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  343    413   
            source,
  344    414   
            meta: meta.unwrap_or_default(),
  345    415   
        })
         416  +
        /* OperationErrorGenerator.kt:110 */
  346    417   
    }
         418  +
    /* OperationErrorGenerator.kt:109 */
  347    419   
}
  348    420   
         421  +
/* CodegenDelegator.kt:255 */
  349    422   
pub use crate::operation::test_post_no_input_no_payload::_test_post_no_input_no_payload_output::TestPostNoInputNoPayloadOutput;
  350    423   
         424  +
/* CodegenDelegator.kt:255 */
  351    425   
pub use crate::operation::test_post_no_input_no_payload::_test_post_no_input_no_payload_input::TestPostNoInputNoPayloadInput;
  352    426   
         427  +
/* RustModule.kt:172 */
  353    428   
mod _test_post_no_input_no_payload_input;
  354    429   
         430  +
/* RustModule.kt:172 */
  355    431   
mod _test_post_no_input_no_payload_output;
  356    432   
  357         -
/// Builders
         433  +
/// /* CodegenDelegator.kt:51 */Builders
  358    434   
pub mod builders;

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/test_post_no_input_no_payload/_test_post_no_input_no_payload_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 TestPostNoInputNoPayloadOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct TestPostNoInputNoPayloadOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub test_id: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl TestPostNoInputNoPayloadOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn test_id(&self) -> ::std::option::Option<&str> {
          20  +
        /* StructureGenerator.kt:169 */
   12     21   
        self.test_id.as_deref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl TestPostNoInputNoPayloadOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`TestPostNoInputNoPayloadOutput`](crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TestPostNoInputNoPayloadOutput`](crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::test_post_no_input_no_payload::builders::TestPostNoInputNoPayloadOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::test_post_no_input_no_payload::builders::TestPostNoInputNoPayloadOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`TestPostNoInputNoPayloadOutput`](crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`TestPostNoInputNoPayloadOutput`](crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput).
          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 TestPostNoInputNoPayloadOutputBuilder {
   26         -
    pub(crate) test_id: ::std::option::Option<::std::string::String>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) test_id: ::std::option::Option<::std::string::String>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl TestPostNoInputNoPayloadOutputBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* BuilderGenerator.kt:291 */
   30     53   
    pub fn test_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.test_id = ::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_test_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          64  +
        /* BuilderGenerator.kt:315 */
   36     65   
        self.test_id = 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_test_id(&self) -> &::std::option::Option<::std::string::String> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.test_id
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`TestPostNoInputNoPayloadOutput`](crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TestPostNoInputNoPayloadOutput`](crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(self) -> crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput {
   45         -
        crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput { test_id: self.test_id }
          80  +
        /* BuilderGenerator.kt:477 */
          81  +
        crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput {
          82  +
            /* BuilderGenerator.kt:481 */ test_id: self.test_id,
          83  +
            /* BuilderGenerator.kt:477 */
   46     84   
        }
          85  +
        /* BuilderGenerator.kt:253 */
          86  +
    }
          87  +
    /* BuilderGenerator.kt:355 */
   47     88   
}

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

@@ -1,1 +111,123 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::test_post_no_input_no_payload::_test_post_no_input_no_payload_output::TestPostNoInputNoPayloadOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::test_post_no_input_no_payload::_test_post_no_input_no_payload_input::TestPostNoInputNoPayloadInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::test_post_no_input_no_payload::builders::TestPostNoInputNoPayloadInputBuilder {
    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::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.test_post_no_input_no_payload();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `TestPostNoInputNoPayload`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `TestPostNoInputNoPayload`.
   24     27   
///
   25         -
/// This example POST operation has no input and serializes a request without a HTTP body. These tests are to ensure we do not attach a body or related headers (Content-Type) to a POST operation with no modeled input.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This example POST operation has no input and serializes a request without a HTTP body. These tests are to ensure we do not attach a body or related headers (Content-Type) to a POST operation with no modeled input.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct TestPostNoInputNoPayloadFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::test_post_no_input_no_payload::builders::TestPostNoInputNoPayloadInputBuilder,
   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::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput,
   35     41   
        crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadError,
   36     42   
    > for TestPostNoInputNoPayloadFluentBuilder
   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::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput,
   44     50   
            crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadError,
   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 TestPostNoInputNoPayloadFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `TestPostNoInputNoPayloadFluentBuilder`.
   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 TestPostNoInputNoPayload as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::test_post_no_input_no_payload::builders::TestPostNoInputNoPayloadInputBuilder {
   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::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadError,
   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::test_post_no_input_no_payload::TestPostNoInputNoPayload::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::test_post_no_input_no_payload::TestPostNoInputNoPayload::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::test_post_no_input_no_payload::TestPostNoInputNoPayloadOutput,
   97    107   
        crate::operation::test_post_no_input_no_payload::TestPostNoInputNoPayloadError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
         122  +
    /* FluentBuilderGenerator.kt:282 */
  111    123   
}

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/test_post_no_payload/_test_post_no_payload_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 TestPostNoPayloadOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct TestPostNoPayloadOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub test_id: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl TestPostNoPayloadOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn test_id(&self) -> ::std::option::Option<&str> {
          20  +
        /* StructureGenerator.kt:169 */
   12     21   
        self.test_id.as_deref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl TestPostNoPayloadOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`TestPostNoPayloadOutput`](crate::operation::test_post_no_payload::TestPostNoPayloadOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TestPostNoPayloadOutput`](crate::operation::test_post_no_payload::TestPostNoPayloadOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::test_post_no_payload::builders::TestPostNoPayloadOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::test_post_no_payload::builders::TestPostNoPayloadOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`TestPostNoPayloadOutput`](crate::operation::test_post_no_payload::TestPostNoPayloadOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`TestPostNoPayloadOutput`](crate::operation::test_post_no_payload::TestPostNoPayloadOutput).
          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 TestPostNoPayloadOutputBuilder {
   26         -
    pub(crate) test_id: ::std::option::Option<::std::string::String>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) test_id: ::std::option::Option<::std::string::String>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl TestPostNoPayloadOutputBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* BuilderGenerator.kt:291 */
   30     53   
    pub fn test_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          54  +
        /* BuilderGenerator.kt:292 */
   31     55   
        self.test_id = ::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_test_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          64  +
        /* BuilderGenerator.kt:315 */
   36     65   
        self.test_id = 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_test_id(&self) -> &::std::option::Option<::std::string::String> {
          73  +
        /* BuilderGenerator.kt:337 */
   41     74   
        &self.test_id
          75  +
        /* BuilderGenerator.kt:336 */
   42     76   
    }
   43         -
    /// Consumes the builder and constructs a [`TestPostNoPayloadOutput`](crate::operation::test_post_no_payload::TestPostNoPayloadOutput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TestPostNoPayloadOutput`](crate::operation::test_post_no_payload::TestPostNoPayloadOutput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(self) -> crate::operation::test_post_no_payload::TestPostNoPayloadOutput {
   45         -
        crate::operation::test_post_no_payload::TestPostNoPayloadOutput { test_id: self.test_id }
          80  +
        /* BuilderGenerator.kt:477 */
          81  +
        crate::operation::test_post_no_payload::TestPostNoPayloadOutput {
          82  +
            /* BuilderGenerator.kt:481 */ test_id: self.test_id,
          83  +
            /* BuilderGenerator.kt:477 */
   46     84   
        }
          85  +
        /* BuilderGenerator.kt:253 */
          86  +
    }
          87  +
    /* BuilderGenerator.kt:355 */
   47     88   
}

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

@@ -1,1 +125,143 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::test_post_no_payload::_test_post_no_payload_output::TestPostNoPayloadOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::test_post_no_payload::_test_post_no_payload_input::TestPostNoPayloadInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::test_post_no_payload::builders::TestPostNoPayloadInputBuilder {
    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::test_post_no_payload::TestPostNoPayloadOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::test_post_no_payload::TestPostNoPayloadError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.test_post_no_payload();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `TestPostNoPayload`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `TestPostNoPayload`.
   24     27   
///
   25         -
/// This example POST operation serializes a request without a modeled HTTP body. These tests are to ensure we do not attach a body or related headers (Content-Type) to a POST operation with no modeled payload.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This example POST operation serializes a request without a modeled HTTP body. These tests are to ensure we do not attach a body or related headers (Content-Type) to a POST operation with no modeled payload.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct TestPostNoPayloadFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::test_post_no_payload::builders::TestPostNoPayloadInputBuilder,
   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::test_post_no_payload::TestPostNoPayloadOutput,
   35     41   
        crate::operation::test_post_no_payload::TestPostNoPayloadError,
   36     42   
    > for TestPostNoPayloadFluentBuilder
   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::test_post_no_payload::TestPostNoPayloadOutput,
   44     50   
            crate::operation::test_post_no_payload::TestPostNoPayloadError,
   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 TestPostNoPayloadFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `TestPostNoPayloadFluentBuilder`.
   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 TestPostNoPayload as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::test_post_no_payload::builders::TestPostNoPayloadInputBuilder {
   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::test_post_no_payload::TestPostNoPayloadOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::test_post_no_payload::TestPostNoPayloadError,
   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::test_post_no_payload::TestPostNoPayload::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::test_post_no_payload::TestPostNoPayload::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::test_post_no_payload::TestPostNoPayloadOutput,
   97    107   
        crate::operation::test_post_no_payload::TestPostNoPayloadError,
   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 test_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.test_id(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_test_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_test_id(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_test_id(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_test_id()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:282 */
  125    143   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/timestamp_format_headers.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 `TimestampFormatHeaders`.
           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 TimestampFormatHeaders;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl TimestampFormatHeaders {
    7         -
    /// Creates a new `TimestampFormatHeaders`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `TimestampFormatHeaders`
          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::timestamp_format_headers::TimestampFormatHeadersInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::timestamp_format_headers::TimestampFormatHeadersOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::timestamp_format_headers::TimestampFormatHeadersError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +266,283 @@
   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 TimestampFormatHeaders {
   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("TimestampFormatHeaders");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            TimestampFormatHeadersRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            TimestampFormatHeadersResponseDeserializer,
  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   
            "TimestampFormatHeaders",
  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("TimestampFormatHeaders")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(TimestampFormatHeadersEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::timestamp_format_headers::TimestampFormatHeadersError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::timestamp_format_headers::TimestampFormatHeadersError,
  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 TimestampFormatHeadersResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for TimestampFormatHeadersResponseDeserializer {
  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_timestamp_format_headers::de_timestamp_format_headers_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_timestamp_format_headers::de_timestamp_format_headers_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 TimestampFormatHeadersRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for TimestampFormatHeadersRequestSerializer {
  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::timestamp_format_headers::TimestampFormatHeadersInput>()
  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::timestamp_format_headers::TimestampFormatHeadersInput,
  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, "/TimestampFormatHeaders").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::timestamp_format_headers::TimestampFormatHeadersInput,
  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   
                let builder = crate::protocol_serde::shape_timestamp_format_headers::ser_timestamp_format_headers_headers(input, builder)?;
  190    203   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  191    204   
            }
  192    205   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  196    209   
  197    210   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  198    211   
    }
  199    212   
}
         213  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  200    214   
#[derive(Debug)]
  201    215   
struct TimestampFormatHeadersEndpointParamsInterceptor;
  202    216   
  203    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for TimestampFormatHeadersEndpointParamsInterceptor {
  204    218   
    fn name(&self) -> &'static str {
  205    219   
        "TimestampFormatHeadersEndpointParamsInterceptor"
  206    220   
    }
  207    221   
  208    222   
    fn read_before_execution(
  209    223   
        &self,
  210    224   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  211    225   
            '_,
  212    226   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  213    227   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  215    229   
        >,
  216    230   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  217    231   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  218    232   
        let _input = context
  219    233   
            .input()
  220    234   
            .downcast_ref::<TimestampFormatHeadersInput>()
  221    235   
            .ok_or("failed to downcast to TimestampFormatHeadersInput")?;
  222    236   
  223    237   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  224    238   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  225    239   
        })?;
  226    240   
        cfg.interceptor_state()
  227    241   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  228    242   
        ::std::result::Result::Ok(())
  229    243   
    }
  230    244   
}
  231    245   
  232    246   
// The get_* functions below are generated from JMESPath expressions in the
  233    247   
// operationContextParams trait. They target the operation's input shape.
  234    248   
         249  +
/* RustType.kt:516 */
  235    250   
#[allow(unreachable_code, unused_variables)]
         251  +
/* RustType.kt:516 */
  236    252   
#[cfg(test)]
         253  +
/* ProtocolTestGenerator.kt:98 */
  237    254   
mod timestamp_format_headers_test {
  238    255   
  239    256   
    /// Tests how timestamp request headers are serialized
  240    257   
    /// Test ID: RestJsonTimestampFormatHeaders
  241    258   
    #[::tokio::test]
  242    259   
    #[::tracing_test::traced_test]
  243    260   
    async fn rest_json_timestamp_format_headers_request() {
  244    261   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  245    262   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  246    263   
@@ -364,381 +493,569 @@
  384    401   
            parsed.target_http_date,
  385    402   
            expected_output.target_http_date,
  386    403   
            "Unexpected value for `target_http_date`"
  387    404   
        );
  388    405   
        ::pretty_assertions::assert_eq!(
  389    406   
            parsed.target_date_time,
  390    407   
            expected_output.target_date_time,
  391    408   
            "Unexpected value for `target_date_time`"
  392    409   
        );
  393    410   
    }
         411  +
         412  +
    /* ProtocolTestGenerator.kt:98 */
  394    413   
}
  395    414   
         415  +
/* OperationErrorGenerator.kt:79 */
  396    416   
/// Error type for the `TimestampFormatHeadersError` operation.
         417  +
/* RustType.kt:516 */
  397    418   
#[non_exhaustive]
         419  +
/* RustType.kt:516 */
  398    420   
#[derive(::std::fmt::Debug)]
  399         -
pub enum TimestampFormatHeadersError {
         421  +
pub /* OperationErrorGenerator.kt:81 */ enum TimestampFormatHeadersError {
         422  +
    /* OperationErrorGenerator.kt:88 */
  400    423   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  401    424   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  402    425   
    variable wildcard pattern and check `.code()`:
  403    426   
     \
  404    427   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  405    428   
     \
  406    429   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-TimestampFormatHeadersError) for what information is available for the error.")]
  407    430   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         431  +
    /* OperationErrorGenerator.kt:81 */
  408    432   
}
         433  +
/* OperationErrorGenerator.kt:218 */
  409    434   
impl TimestampFormatHeadersError {
         435  +
    /* OperationErrorGenerator.kt:219 */
  410    436   
    /// Creates the `TimestampFormatHeadersError::Unhandled` variant from any error type.
  411    437   
    pub fn unhandled(
  412    438   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  413    439   
    ) -> Self {
  414    440   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  415    441   
            source: err.into(),
  416    442   
            meta: ::std::default::Default::default(),
  417    443   
        })
  418    444   
    }
  419    445   
  420    446   
    /// Creates the `TimestampFormatHeadersError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  421    447   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  422    448   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  423    449   
            source: err.clone().into(),
  424    450   
            meta: err,
  425    451   
        })
  426    452   
    }
  427         -
    ///
         453  +
    /// /* OperationErrorGenerator.kt:236 */
  428    454   
    /// Returns error metadata, which includes the error code, message,
  429    455   
    /// request ID, and potentially additional information.
  430    456   
    ///
         457  +
    /* OperationErrorGenerator.kt:242 */
  431    458   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         459  +
        /* OperationErrorGenerator.kt:243 */
  432    460   
        match self {
  433         -
            Self::Unhandled(e) => &e.meta,
         461  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         462  +
            /* OperationErrorGenerator.kt:243 */
  434    463   
        }
         464  +
        /* OperationErrorGenerator.kt:242 */
  435    465   
    }
         466  +
    /* OperationErrorGenerator.kt:218 */
  436    467   
}
         468  +
/* OperationErrorGenerator.kt:269 */
  437    469   
impl ::std::error::Error for TimestampFormatHeadersError {
         470  +
    /* OperationErrorGenerator.kt:270 */
  438    471   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         472  +
        /* OperationErrorGenerator.kt:318 */
  439    473   
        match self {
  440         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         474  +
            /* OperationErrorGenerator.kt:326 */
         475  +
            Self::Unhandled(_inner) => {
         476  +
                /* OperationErrorGenerator.kt:279 */
         477  +
                ::std::option::Option::Some(&*_inner.source)
         478  +
                /* OperationErrorGenerator.kt:326 */
         479  +
            } /* OperationErrorGenerator.kt:318 */
  441    480   
        }
         481  +
        /* OperationErrorGenerator.kt:270 */
  442    482   
    }
         483  +
    /* OperationErrorGenerator.kt:269 */
  443    484   
}
         485  +
/* OperationErrorGenerator.kt:133 */
  444    486   
impl ::std::fmt::Display for TimestampFormatHeadersError {
         487  +
    /* OperationErrorGenerator.kt:134 */
  445    488   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         489  +
        /* OperationErrorGenerator.kt:318 */
  446    490   
        match self {
         491  +
            /* OperationErrorGenerator.kt:326 */
  447    492   
            Self::Unhandled(_inner) => {
         493  +
                /* OperationErrorGenerator.kt:139 */
  448    494   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  449    495   
                    write!(f, "unhandled error ({code})")
  450    496   
                } else {
  451    497   
                    f.write_str("unhandled error")
  452    498   
                }
         499  +
                /* OperationErrorGenerator.kt:326 */
         500  +
            } /* OperationErrorGenerator.kt:318 */
  453    501   
        }
         502  +
        /* OperationErrorGenerator.kt:134 */
  454    503   
    }
  455         -
    }
         504  +
    /* OperationErrorGenerator.kt:133 */
  456    505   
}
         506  +
/* OperationErrorGenerator.kt:182 */
  457    507   
impl ::aws_smithy_types::retry::ProvideErrorKind for TimestampFormatHeadersError {
         508  +
    /* OperationErrorGenerator.kt:186 */
  458    509   
    fn code(&self) -> ::std::option::Option<&str> {
         510  +
        /* OperationErrorGenerator.kt:187 */
  459    511   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         512  +
        /* OperationErrorGenerator.kt:186 */
  460    513   
    }
         514  +
    /* OperationErrorGenerator.kt:190 */
  461    515   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         516  +
        /* OperationErrorGenerator.kt:197 */
  462    517   
        ::std::option::Option::None
         518  +
        /* OperationErrorGenerator.kt:190 */
  463    519   
    }
         520  +
    /* OperationErrorGenerator.kt:182 */
  464    521   
}
         522  +
/* OperationErrorGenerator.kt:163 */
  465    523   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for TimestampFormatHeadersError {
         524  +
    /* OperationErrorGenerator.kt:164 */
  466    525   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         526  +
        /* OperationErrorGenerator.kt:318 */
  467    527   
        match self {
  468         -
            Self::Unhandled(_inner) => &_inner.meta,
         528  +
            /* OperationErrorGenerator.kt:326 */
         529  +
            Self::Unhandled(_inner) => {
         530  +
                /* OperationErrorGenerator.kt:168 */
         531  +
                &_inner.meta
         532  +
                /* OperationErrorGenerator.kt:326 */
         533  +
            } /* OperationErrorGenerator.kt:318 */
  469    534   
        }
         535  +
        /* OperationErrorGenerator.kt:164 */
  470    536   
    }
         537  +
    /* OperationErrorGenerator.kt:163 */
  471    538   
}
         539  +
/* OperationErrorGenerator.kt:109 */
  472    540   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for TimestampFormatHeadersError {
         541  +
    /* OperationErrorGenerator.kt:110 */
  473    542   
    fn create_unhandled_error(
  474    543   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  475    544   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  476    545   
    ) -> Self {
         546  +
        /* OperationErrorGenerator.kt:121 */
  477    547   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  478    548   
            source,
  479    549   
            meta: meta.unwrap_or_default(),
  480    550   
        })
         551  +
        /* OperationErrorGenerator.kt:110 */
  481    552   
    }
         553  +
    /* OperationErrorGenerator.kt:109 */
  482    554   
}
  483    555   
         556  +
/* CodegenDelegator.kt:255 */
  484    557   
pub use crate::operation::timestamp_format_headers::_timestamp_format_headers_output::TimestampFormatHeadersOutput;
  485    558   
         559  +
/* CodegenDelegator.kt:255 */
  486    560   
pub use crate::operation::timestamp_format_headers::_timestamp_format_headers_input::TimestampFormatHeadersInput;
  487    561   
         562  +
/* RustModule.kt:172 */
  488    563   
mod _timestamp_format_headers_input;
  489    564   
         565  +
/* RustModule.kt:172 */
  490    566   
mod _timestamp_format_headers_output;
  491    567   
  492         -
/// Builders
         568  +
/// /* CodegenDelegator.kt:51 */Builders
  493    569   
pub mod builders;