Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/streaming_traits_with_media_type/_streaming_traits_with_media_type_input.rs

@@ -1,1 +76,141 @@
    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::fmt::Debug)]
    5         -
pub struct StreamingTraitsWithMediaTypeInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct StreamingTraitsWithMediaTypeInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub blob: ::aws_smithy_types::byte_stream::ByteStream,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl StreamingTraitsWithMediaTypeInput {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.foo.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn blob(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
          31  +
        /* StructureGenerator.kt:172 */
   18     32   
        &self.blob
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl StreamingTraitsWithMediaTypeInput {
   22         -
    /// Creates a new builder-style object to manufacture [`StreamingTraitsWithMediaTypeInput`](crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeInput).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`StreamingTraitsWithMediaTypeInput`](crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeInput).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::operation::streaming_traits_with_media_type::builders::StreamingTraitsWithMediaTypeInputBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::operation::streaming_traits_with_media_type::builders::StreamingTraitsWithMediaTypeInputBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`StreamingTraitsWithMediaTypeInput`](crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeInput).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`StreamingTraitsWithMediaTypeInput`](crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeInput).
          50  +
/* RustType.kt:516 */
   29     51   
#[derive(::std::default::Default, ::std::fmt::Debug)]
          52  +
/* RustType.kt:516 */
   30     53   
#[non_exhaustive]
          54  +
/* BuilderGenerator.kt:345 */
   31     55   
pub struct StreamingTraitsWithMediaTypeInputBuilder {
   32         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */
   33     58   
    pub(crate) blob: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
          59  +
    /* BuilderGenerator.kt:345 */
   34     60   
}
          61  +
/* BuilderGenerator.kt:355 */
   35     62   
impl StreamingTraitsWithMediaTypeInputBuilder {
          63  +
    /* BuilderGenerator.kt:286 */
   36     64   
    #[allow(missing_docs)] // documentation missing in model
          65  +
                           /* BuilderGenerator.kt:291 */
   37     66   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          67  +
        /* BuilderGenerator.kt:292 */
   38     68   
        self.foo = ::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_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          77  +
        /* BuilderGenerator.kt:315 */
   43     78   
        self.foo = 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_foo(&self) -> &::std::option::Option<::std::string::String> {
          86  +
        /* BuilderGenerator.kt:337 */
   48     87   
        &self.foo
          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 blob(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
          94  +
        /* BuilderGenerator.kt:292 */
   52     95   
        self.blob = ::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_blob(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
         104  +
        /* BuilderGenerator.kt:315 */
   57    105   
        self.blob = 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_blob(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
         113  +
        /* BuilderGenerator.kt:337 */
   62    114   
        &self.blob
         115  +
        /* BuilderGenerator.kt:336 */
   63    116   
    }
   64         -
    /// Consumes the builder and constructs a [`StreamingTraitsWithMediaTypeInput`](crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeInput).
         117  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`StreamingTraitsWithMediaTypeInput`](crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeInput).
         118  +
    /* BuilderGenerator.kt:253 */
   65    119   
    pub fn build(
   66    120   
        self,
   67    121   
    ) -> ::std::result::Result<
   68    122   
        crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeInput,
   69    123   
        ::aws_smithy_types::error::operation::BuildError,
   70    124   
    > {
   71         -
        ::std::result::Result::Ok(crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeInput {
   72         -
            foo: self.foo,
   73         -
            blob: self.blob.unwrap_or_default(),
   74         -
        })
         125  +
        /* BuilderGenerator.kt:254 */
         126  +
        ::std::result::Result::Ok(
         127  +
            /* BuilderGenerator.kt:477 */
         128  +
            crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeInput {
         129  +
                /* BuilderGenerator.kt:481 */ foo: self.foo,
         130  +
                /* BuilderGenerator.kt:481 */
         131  +
                blob: self
         132  +
                    .blob
         133  +
                    /* BuilderGenerator.kt:487 */
         134  +
                    .unwrap_or_default(),
         135  +
                /* BuilderGenerator.kt:477 */
         136  +
            }, /* BuilderGenerator.kt:254 */
         137  +
        )
         138  +
        /* BuilderGenerator.kt:253 */
   75    139   
    }
         140  +
    /* BuilderGenerator.kt:355 */
   76    141   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/streaming_traits_with_media_type/_streaming_traits_with_media_type_output.rs

@@ -1,1 +71,133 @@
    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::fmt::Debug)]
    5         -
pub struct StreamingTraitsWithMediaTypeOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct StreamingTraitsWithMediaTypeOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub blob: ::aws_smithy_types::byte_stream::ByteStream,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl StreamingTraitsWithMediaTypeOutput {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.foo.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn blob(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
          31  +
        /* StructureGenerator.kt:172 */
   18     32   
        &self.blob
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl StreamingTraitsWithMediaTypeOutput {
   22         -
    /// Creates a new builder-style object to manufacture [`StreamingTraitsWithMediaTypeOutput`](crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeOutput).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`StreamingTraitsWithMediaTypeOutput`](crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeOutput).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::operation::streaming_traits_with_media_type::builders::StreamingTraitsWithMediaTypeOutputBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::operation::streaming_traits_with_media_type::builders::StreamingTraitsWithMediaTypeOutputBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`StreamingTraitsWithMediaTypeOutput`](crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeOutput).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`StreamingTraitsWithMediaTypeOutput`](crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeOutput).
          50  +
/* RustType.kt:516 */
   29     51   
#[derive(::std::default::Default, ::std::fmt::Debug)]
          52  +
/* RustType.kt:516 */
   30     53   
#[non_exhaustive]
          54  +
/* BuilderGenerator.kt:345 */
   31     55   
pub struct StreamingTraitsWithMediaTypeOutputBuilder {
   32         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */
   33     58   
    pub(crate) blob: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
          59  +
    /* BuilderGenerator.kt:345 */
   34     60   
}
          61  +
/* BuilderGenerator.kt:355 */
   35     62   
impl StreamingTraitsWithMediaTypeOutputBuilder {
          63  +
    /* BuilderGenerator.kt:286 */
   36     64   
    #[allow(missing_docs)] // documentation missing in model
          65  +
                           /* BuilderGenerator.kt:291 */
   37     66   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          67  +
        /* BuilderGenerator.kt:292 */
   38     68   
        self.foo = ::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_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          77  +
        /* BuilderGenerator.kt:315 */
   43     78   
        self.foo = 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_foo(&self) -> &::std::option::Option<::std::string::String> {
          86  +
        /* BuilderGenerator.kt:337 */
   48     87   
        &self.foo
          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 blob(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
          94  +
        /* BuilderGenerator.kt:292 */
   52     95   
        self.blob = ::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_blob(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
         104  +
        /* BuilderGenerator.kt:315 */
   57    105   
        self.blob = 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_blob(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
         113  +
        /* BuilderGenerator.kt:337 */
   62    114   
        &self.blob
         115  +
        /* BuilderGenerator.kt:336 */
   63    116   
    }
   64         -
    /// Consumes the builder and constructs a [`StreamingTraitsWithMediaTypeOutput`](crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeOutput).
         117  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`StreamingTraitsWithMediaTypeOutput`](crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeOutput).
         118  +
    /* BuilderGenerator.kt:253 */
   65    119   
    pub fn build(self) -> crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeOutput {
         120  +
        /* BuilderGenerator.kt:477 */
   66    121   
        crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeOutput {
   67         -
            foo: self.foo,
   68         -
            blob: self.blob.unwrap_or_default(),
         122  +
            /* BuilderGenerator.kt:481 */ foo: self.foo,
         123  +
            /* BuilderGenerator.kt:481 */
         124  +
            blob: self
         125  +
                .blob
         126  +
                /* BuilderGenerator.kt:487 */
         127  +
                .unwrap_or_default(),
         128  +
            /* BuilderGenerator.kt:477 */
   69    129   
        }
         130  +
        /* BuilderGenerator.kt:253 */
   70    131   
    }
         132  +
    /* BuilderGenerator.kt:355 */
   71    133   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/streaming_traits_with_media_type/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::streaming_traits_with_media_type::_streaming_traits_with_media_type_output::StreamingTraitsWithMediaTypeOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::streaming_traits_with_media_type::_streaming_traits_with_media_type_input::StreamingTraitsWithMediaTypeInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::streaming_traits_with_media_type::builders::StreamingTraitsWithMediaTypeInputBuilder {
    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::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.streaming_traits_with_media_type();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `StreamingTraitsWithMediaType`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `StreamingTraitsWithMediaType`.
   24     27   
///
   25         -
/// This examples serializes a streaming media-typed blob shape in the request body. This examples uses a `@mediaType` trait on the payload to force a custom content-type to be serialized.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This examples serializes a streaming media-typed blob shape in the request body. This examples uses a `@mediaType` trait on the payload to force a custom content-type to be serialized.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct StreamingTraitsWithMediaTypeFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::streaming_traits_with_media_type::builders::StreamingTraitsWithMediaTypeInputBuilder,
   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::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeOutput,
   35     41   
        crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeError,
   36     42   
    > for StreamingTraitsWithMediaTypeFluentBuilder
   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::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeOutput,
   44     50   
            crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeError,
   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 StreamingTraitsWithMediaTypeFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `StreamingTraitsWithMediaTypeFluentBuilder`.
   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 StreamingTraitsWithMediaType as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::streaming_traits_with_media_type::builders::StreamingTraitsWithMediaTypeInputBuilder {
   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::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeError,
   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::streaming_traits_with_media_type::StreamingTraitsWithMediaType::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::streaming_traits_with_media_type::StreamingTraitsWithMediaType::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::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeOutput,
   97    107   
        crate::operation::streaming_traits_with_media_type::StreamingTraitsWithMediaTypeError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
         122  +
    /* FluentBuilderGenerator.kt:498 */
  111    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* FluentBuilderGenerator.kt:500 */
  112    125   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.foo(input.into());
  114    127   
        self
  115    128   
    }
         129  +
    /* FluentBuilderGenerator.kt:498 */
  116    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* FluentBuilderGenerator.kt:500 */
  117    132   
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_foo(input);
  119    134   
        self
  120    135   
    }
         136  +
    /* FluentBuilderGenerator.kt:518 */
  121    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* FluentBuilderGenerator.kt:520 */
  122    139   
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_foo()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:498 */
  125    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* FluentBuilderGenerator.kt:500 */
  126    145   
    pub fn blob(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
  127    146   
        self.inner = self.inner.blob(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_blob(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
  132    153   
        self.inner = self.inner.set_blob(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_blob(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
  137    160   
        self.inner.get_blob()
  138    161   
    }
         162  +
    /* FluentBuilderGenerator.kt:282 */
  139    163   
}

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/test_body_structure/_test_body_structure_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 TestBodyStructureInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct TestBodyStructureInput {
           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 test_config: ::std::option::Option<crate::types::TestConfig>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl TestBodyStructureInput {
          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 test_config(&self) -> ::std::option::Option<&crate::types::TestConfig> {
          31  +
        /* StructureGenerator.kt:170 */
   18     32   
        self.test_config.as_ref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl TestBodyStructureInput {
   22         -
    /// Creates a new builder-style object to manufacture [`TestBodyStructureInput`](crate::operation::test_body_structure::TestBodyStructureInput).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TestBodyStructureInput`](crate::operation::test_body_structure::TestBodyStructureInput).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::operation::test_body_structure::builders::TestBodyStructureInputBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::operation::test_body_structure::builders::TestBodyStructureInputBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`TestBodyStructureInput`](crate::operation::test_body_structure::TestBodyStructureInput).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`TestBodyStructureInput`](crate::operation::test_body_structure::TestBodyStructureInput).
          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 TestBodyStructureInputBuilder {
   32         -
    pub(crate) test_id: ::std::option::Option<::std::string::String>,
   33         -
    pub(crate) test_config: ::std::option::Option<crate::types::TestConfig>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) test_id: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) test_config: ::std::option::Option<crate::types::TestConfig>,
          58  +
    /* BuilderGenerator.kt:345 */
   34     59   
}
          60  +
/* BuilderGenerator.kt:355 */
   35     61   
impl TestBodyStructureInputBuilder {
          62  +
    /* BuilderGenerator.kt:286 */
   36     63   
    #[allow(missing_docs)] // documentation missing in model
          64  +
                           /* BuilderGenerator.kt:291 */
   37     65   
    pub fn test_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          66  +
        /* BuilderGenerator.kt:292 */
   38     67   
        self.test_id = ::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_test_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          76  +
        /* BuilderGenerator.kt:315 */
   43     77   
        self.test_id = 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_test_id(&self) -> &::std::option::Option<::std::string::String> {
          85  +
        /* BuilderGenerator.kt:337 */
   48     86   
        &self.test_id
          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 test_config(mut self, input: crate::types::TestConfig) -> Self {
          93  +
        /* BuilderGenerator.kt:292 */
   52     94   
        self.test_config = ::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_test_config(mut self, input: ::std::option::Option<crate::types::TestConfig>) -> Self {
         103  +
        /* BuilderGenerator.kt:315 */
   57    104   
        self.test_config = 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_test_config(&self) -> &::std::option::Option<crate::types::TestConfig> {
         112  +
        /* BuilderGenerator.kt:337 */
   62    113   
        &self.test_config
         114  +
        /* BuilderGenerator.kt:336 */
   63    115   
    }
   64         -
    /// Consumes the builder and constructs a [`TestBodyStructureInput`](crate::operation::test_body_structure::TestBodyStructureInput).
         116  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TestBodyStructureInput`](crate::operation::test_body_structure::TestBodyStructureInput).
         117  +
    /* BuilderGenerator.kt:253 */
   65    118   
    pub fn build(
   66    119   
        self,
   67    120   
    ) -> ::std::result::Result<crate::operation::test_body_structure::TestBodyStructureInput, ::aws_smithy_types::error::operation::BuildError> {
   68         -
        ::std::result::Result::Ok(crate::operation::test_body_structure::TestBodyStructureInput {
   69         -
            test_id: self.test_id,
   70         -
            test_config: self.test_config,
   71         -
        })
         121  +
        /* BuilderGenerator.kt:254 */
         122  +
        ::std::result::Result::Ok(
         123  +
            /* BuilderGenerator.kt:477 */
         124  +
            crate::operation::test_body_structure::TestBodyStructureInput {
         125  +
                /* BuilderGenerator.kt:481 */ test_id: self.test_id,
         126  +
                /* BuilderGenerator.kt:481 */
         127  +
                test_config: self.test_config,
         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_body_structure/_test_body_structure_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 TestBodyStructureOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct TestBodyStructureOutput {
           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 test_config: ::std::option::Option<crate::types::TestConfig>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl TestBodyStructureOutput {
          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 test_config(&self) -> ::std::option::Option<&crate::types::TestConfig> {
          31  +
        /* StructureGenerator.kt:170 */
   18     32   
        self.test_config.as_ref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl TestBodyStructureOutput {
   22         -
    /// Creates a new builder-style object to manufacture [`TestBodyStructureOutput`](crate::operation::test_body_structure::TestBodyStructureOutput).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TestBodyStructureOutput`](crate::operation::test_body_structure::TestBodyStructureOutput).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::operation::test_body_structure::builders::TestBodyStructureOutputBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::operation::test_body_structure::builders::TestBodyStructureOutputBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`TestBodyStructureOutput`](crate::operation::test_body_structure::TestBodyStructureOutput).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`TestBodyStructureOutput`](crate::operation::test_body_structure::TestBodyStructureOutput).
          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 TestBodyStructureOutputBuilder {
   32         -
    pub(crate) test_id: ::std::option::Option<::std::string::String>,
   33         -
    pub(crate) test_config: ::std::option::Option<crate::types::TestConfig>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) test_id: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) test_config: ::std::option::Option<crate::types::TestConfig>,
          58  +
    /* BuilderGenerator.kt:345 */
   34     59   
}
          60  +
/* BuilderGenerator.kt:355 */
   35     61   
impl TestBodyStructureOutputBuilder {
          62  +
    /* BuilderGenerator.kt:286 */
   36     63   
    #[allow(missing_docs)] // documentation missing in model
          64  +
                           /* BuilderGenerator.kt:291 */
   37     65   
    pub fn test_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          66  +
        /* BuilderGenerator.kt:292 */
   38     67   
        self.test_id = ::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_test_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          76  +
        /* BuilderGenerator.kt:315 */
   43     77   
        self.test_id = 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_test_id(&self) -> &::std::option::Option<::std::string::String> {
          85  +
        /* BuilderGenerator.kt:337 */
   48     86   
        &self.test_id
          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 test_config(mut self, input: crate::types::TestConfig) -> Self {
          93  +
        /* BuilderGenerator.kt:292 */
   52     94   
        self.test_config = ::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_test_config(mut self, input: ::std::option::Option<crate::types::TestConfig>) -> Self {
         103  +
        /* BuilderGenerator.kt:315 */
   57    104   
        self.test_config = 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_test_config(&self) -> &::std::option::Option<crate::types::TestConfig> {
         112  +
        /* BuilderGenerator.kt:337 */
   62    113   
        &self.test_config
         114  +
        /* BuilderGenerator.kt:336 */
   63    115   
    }
   64         -
    /// Consumes the builder and constructs a [`TestBodyStructureOutput`](crate::operation::test_body_structure::TestBodyStructureOutput).
         116  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TestBodyStructureOutput`](crate::operation::test_body_structure::TestBodyStructureOutput).
         117  +
    /* BuilderGenerator.kt:253 */
   65    118   
    pub fn build(self) -> crate::operation::test_body_structure::TestBodyStructureOutput {
         119  +
        /* BuilderGenerator.kt:477 */
   66    120   
        crate::operation::test_body_structure::TestBodyStructureOutput {
   67         -
            test_id: self.test_id,
         121  +
            /* BuilderGenerator.kt:481 */ test_id: self.test_id,
         122  +
            /* BuilderGenerator.kt:481 */
   68    123   
            test_config: self.test_config,
         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_body_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_body_structure::_test_body_structure_output::TestBodyStructureOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::test_body_structure::_test_body_structure_input::TestBodyStructureInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::test_body_structure::builders::TestBodyStructureInputBuilder {
    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_body_structure::TestBodyStructureOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::test_body_structure::TestBodyStructureError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.test_body_structure();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `TestBodyStructure`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `TestBodyStructure`.
   24     27   
///
   25         -
/// This example operation serializes a structure in the HTTP body. It should ensure Content-Type: application/json is used in all requests and that an "empty" body is an empty JSON document ({}).
          28  +
/// /* FluentBuilderGenerator.kt:130 */This example operation serializes a structure in the HTTP body. It should ensure Content-Type: application/json is used in all requests and that an "empty" body is 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 TestBodyStructureFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::test_body_structure::builders::TestBodyStructureInputBuilder,
   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_body_structure::TestBodyStructureOutput,
   35     41   
        crate::operation::test_body_structure::TestBodyStructureError,
   36     42   
    > for TestBodyStructureFluentBuilder
   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_body_structure::TestBodyStructureOutput,
   44     50   
            crate::operation::test_body_structure::TestBodyStructureError,
   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 TestBodyStructureFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `TestBodyStructureFluentBuilder`.
   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 TestBodyStructure as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::test_body_structure::builders::TestBodyStructureInputBuilder {
   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_body_structure::TestBodyStructureOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::test_body_structure::TestBodyStructureError,
   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_body_structure::TestBodyStructure::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_body_structure::TestBodyStructure::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_body_structure::TestBodyStructureOutput,
   97    107   
        crate::operation::test_body_structure::TestBodyStructureError,
   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 test_config(mut self, input: crate::types::TestConfig) -> Self {
  127    146   
        self.inner = self.inner.test_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_test_config(mut self, input: ::std::option::Option<crate::types::TestConfig>) -> Self {
  132    153   
        self.inner = self.inner.set_test_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_test_config(&self) -> &::std::option::Option<crate::types::TestConfig> {
  137    160   
        self.inner.get_test_config()
  138    161   
    }
         162  +
    /* FluentBuilderGenerator.kt:282 */
  139    163   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/test_get_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 `TestGetNoInputNoPayload`.
           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 TestGetNoInputNoPayload;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl TestGetNoInputNoPayload {
    7         -
    /// Creates a new `TestGetNoInputNoPayload`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `TestGetNoInputNoPayload`
          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_get_no_input_no_payload::TestGetNoInputNoPayloadInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadError,
   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 TestGetNoInputNoPayload {
   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("TestGetNoInputNoPayload");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            TestGetNoInputNoPayloadRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            TestGetNoInputNoPayloadResponseDeserializer,
  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   
            "TestGetNoInputNoPayload",
  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("TestGetNoInputNoPayload")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(TestGetNoInputNoPayloadEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadError,
  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 TestGetNoInputNoPayloadResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for TestGetNoInputNoPayloadResponseDeserializer {
  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_get_no_input_no_payload::de_test_get_no_input_no_payload_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_test_get_no_input_no_payload::de_test_get_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 TestGetNoInputNoPayloadRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for TestGetNoInputNoPayloadRequestSerializer {
  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_get_no_input_no_payload::TestGetNoInputNoPayloadInput>()
  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_get_no_input_no_payload::TestGetNoInputNoPayloadInput,
  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_get_no_input_no_payload::TestGetNoInputNoPayloadInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder
  193    206   
        };
  194    207   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  195    208   
  196    209   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  197    210   
    }
  198    211   
}
         212  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  199    213   
#[derive(Debug)]
  200    214   
struct TestGetNoInputNoPayloadEndpointParamsInterceptor;
  201    215   
  202    216   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for TestGetNoInputNoPayloadEndpointParamsInterceptor {
  203    217   
    fn name(&self) -> &'static str {
  204    218   
        "TestGetNoInputNoPayloadEndpointParamsInterceptor"
  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::<TestGetNoInputNoPayloadInput>()
  220    234   
            .ok_or("failed to downcast to TestGetNoInputNoPayloadInput")?;
  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_get_no_input_no_payload_test {
  237    254   
  238    255   
    /// Serializes a GET request for an operation with no input, and therefore no modeled body
  239    256   
    /// Test ID: RestJsonHttpGetWithNoInput
  240    257   
    #[::tokio::test]
  241    258   
    #[::tracing_test::traced_test]
  242    259   
    async fn rest_json_http_get_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_get_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", "Content-Length"];
  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(), "GET", "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 `TestGetNoInputNoPayloadError` operation.
         282  +
/* RustType.kt:516 */
  262    283   
#[non_exhaustive]
         284  +
/* RustType.kt:516 */
  263    285   
#[derive(::std::fmt::Debug)]
  264         -
pub enum TestGetNoInputNoPayloadError {
         286  +
pub /* OperationErrorGenerator.kt:81 */ enum TestGetNoInputNoPayloadError {
         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-TestGetNoInputNoPayloadError) 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 TestGetNoInputNoPayloadError {
         300  +
    /* OperationErrorGenerator.kt:219 */
  275    301   
    /// Creates the `TestGetNoInputNoPayloadError::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 `TestGetNoInputNoPayloadError::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 TestGetNoInputNoPayloadError {
         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 TestGetNoInputNoPayloadError {
         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   
                }
  318         -
            }
         364  +
                /* OperationErrorGenerator.kt:326 */
         365  +
            } /* OperationErrorGenerator.kt:318 */
  319    366   
        }
         367  +
        /* OperationErrorGenerator.kt:134 */
  320    368   
    }
         369  +
    /* OperationErrorGenerator.kt:133 */
  321    370   
}
         371  +
/* OperationErrorGenerator.kt:182 */
  322    372   
impl ::aws_smithy_types::retry::ProvideErrorKind for TestGetNoInputNoPayloadError {
         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 TestGetNoInputNoPayloadError {
         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 TestGetNoInputNoPayloadError {
         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_get_no_input_no_payload::_test_get_no_input_no_payload_output::TestGetNoInputNoPayloadOutput;
  350    423   
         424  +
/* CodegenDelegator.kt:255 */
  351    425   
pub use crate::operation::test_get_no_input_no_payload::_test_get_no_input_no_payload_input::TestGetNoInputNoPayloadInput;
  352    426   
         427  +
/* RustModule.kt:172 */
  353    428   
mod _test_get_no_input_no_payload_input;
  354    429   
         430  +
/* RustModule.kt:172 */
  355    431   
mod _test_get_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_get_no_input_no_payload/_test_get_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 TestGetNoInputNoPayloadInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct TestGetNoInputNoPayloadInput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl TestGetNoInputNoPayloadInput {
    7         -
    /// Creates a new builder-style object to manufacture [`TestGetNoInputNoPayloadInput`](crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadInput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TestGetNoInputNoPayloadInput`](crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadInput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::test_get_no_input_no_payload::builders::TestGetNoInputNoPayloadInputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::test_get_no_input_no_payload::builders::TestGetNoInputNoPayloadInputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`TestGetNoInputNoPayloadInput`](crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadInput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`TestGetNoInputNoPayloadInput`](crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadInput).
          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 TestGetNoInputNoPayloadInputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct TestGetNoInputNoPayloadInputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl TestGetNoInputNoPayloadInputBuilder {
   18         -
    /// Consumes the builder and constructs a [`TestGetNoInputNoPayloadInput`](crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadInput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TestGetNoInputNoPayloadInput`](crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadInput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(
   20     33   
        self,
   21     34   
    ) -> ::std::result::Result<
   22     35   
        crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadInput,
   23     36   
        ::aws_smithy_types::error::operation::BuildError,
   24     37   
    > {
   25         -
        ::std::result::Result::Ok(crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadInput {})
          38  +
        /* BuilderGenerator.kt:254 */
          39  +
        ::std::result::Result::Ok(
          40  +
            /* BuilderGenerator.kt:477 */
          41  +
            crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadInput {
          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_get_no_input_no_payload/_test_get_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 TestGetNoInputNoPayloadOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct TestGetNoInputNoPayloadOutput {
           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 TestGetNoInputNoPayloadOutput {
          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 TestGetNoInputNoPayloadOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`TestGetNoInputNoPayloadOutput`](crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TestGetNoInputNoPayloadOutput`](crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::test_get_no_input_no_payload::builders::TestGetNoInputNoPayloadOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::test_get_no_input_no_payload::builders::TestGetNoInputNoPayloadOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`TestGetNoInputNoPayloadOutput`](crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`TestGetNoInputNoPayloadOutput`](crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadOutput).
          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 TestGetNoInputNoPayloadOutputBuilder {
   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 TestGetNoInputNoPayloadOutputBuilder {
          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 [`TestGetNoInputNoPayloadOutput`](crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadOutput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TestGetNoInputNoPayloadOutput`](crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadOutput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(self) -> crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadOutput {
   45         -
        crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadOutput { test_id: self.test_id }
          80  +
        /* BuilderGenerator.kt:477 */
          81  +
        crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadOutput {
          82  +
            /* BuilderGenerator.kt:481 */ test_id: self.test_id,
          83  +
            /* BuilderGenerator.kt:477 */
          84  +
        }
          85  +
        /* BuilderGenerator.kt:253 */
   46     86   
    }
          87  +
    /* BuilderGenerator.kt:355 */
   47     88   
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/test_get_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_get_no_input_no_payload::_test_get_no_input_no_payload_output::TestGetNoInputNoPayloadOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::test_get_no_input_no_payload::_test_get_no_input_no_payload_input::TestGetNoInputNoPayloadInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::test_get_no_input_no_payload::builders::TestGetNoInputNoPayloadInputBuilder {
    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_get_no_input_no_payload::TestGetNoInputNoPayloadOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.test_get_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 `TestGetNoInputNoPayload`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `TestGetNoInputNoPayload`.
   24     27   
///
   25         -
/// This example GET 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-Length, Content-Type) to operations that semantically cannot produce an HTTP body.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This example GET 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-Length, Content-Type) to operations that semantically cannot produce an HTTP body.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct TestGetNoInputNoPayloadFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::test_get_no_input_no_payload::builders::TestGetNoInputNoPayloadInputBuilder,
   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_get_no_input_no_payload::TestGetNoInputNoPayloadOutput,
   35     41   
        crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadError,
   36     42   
    > for TestGetNoInputNoPayloadFluentBuilder
   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_get_no_input_no_payload::TestGetNoInputNoPayloadOutput,
   44     50   
            crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadError,
   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 TestGetNoInputNoPayloadFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `TestGetNoInputNoPayloadFluentBuilder`.
   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 TestGetNoInputNoPayload as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::test_get_no_input_no_payload::builders::TestGetNoInputNoPayloadInputBuilder {
   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_get_no_input_no_payload::TestGetNoInputNoPayloadOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadError,
   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_get_no_input_no_payload::TestGetNoInputNoPayload::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_get_no_input_no_payload::TestGetNoInputNoPayload::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_get_no_input_no_payload::TestGetNoInputNoPayloadOutput,
   97    107   
        crate::operation::test_get_no_input_no_payload::TestGetNoInputNoPayloadError,
   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_get_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 `TestGetNoPayload`.
           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 TestGetNoPayload;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl TestGetNoPayload {
    7         -
    /// Creates a new `TestGetNoPayload`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `TestGetNoPayload`
          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_get_no_payload::TestGetNoPayloadInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::test_get_no_payload::TestGetNoPayloadOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::test_get_no_payload::TestGetNoPayloadError,
   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 TestGetNoPayload {
   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("TestGetNoPayload");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            TestGetNoPayloadRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            TestGetNoPayloadResponseDeserializer,
  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   
            "TestGetNoPayload",
  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("TestGetNoPayload")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(TestGetNoPayloadEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::test_get_no_payload::TestGetNoPayloadError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::test_get_no_payload::TestGetNoPayloadError,
  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 TestGetNoPayloadResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for TestGetNoPayloadResponseDeserializer {
  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_get_no_payload::de_test_get_no_payload_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_test_get_no_payload::de_test_get_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 TestGetNoPayloadRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for TestGetNoPayloadRequestSerializer {
  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_get_no_payload::TestGetNoPayloadInput>()
  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_get_no_payload::TestGetNoPayloadInput,
  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_get_no_payload::TestGetNoPayloadInput,
  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_get_no_payload::ser_test_get_no_payload_headers(input, builder)?;
  190    203   
                ::std::result::Result::Ok(builder.method("GET").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 TestGetNoPayloadEndpointParamsInterceptor;
  202    216   
  203    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for TestGetNoPayloadEndpointParamsInterceptor {
  204    218   
    fn name(&self) -> &'static str {
  205    219   
        "TestGetNoPayloadEndpointParamsInterceptor"
  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::<TestGetNoPayloadInput>()
  221    235   
            .ok_or("failed to downcast to TestGetNoPayloadInput")?;
  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_get_no_payload_test {
  238    255   
  239    256   
    /// Serializes a GET request with no modeled body
  240    257   
    /// Test ID: RestJsonHttpGetWithNoModeledBody
  241    258   
    #[::tokio::test]
  242    259   
    #[::tracing_test::traced_test]
  243    260   
    async fn rest_json_http_get_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_get_no_payload().send().await;
  249    266   
        let _ = dbg!(result);
  250    267   
        let http_request = request_receiver.expect_request();
  251    268   
        let forbidden_headers = &["Content-Length", "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(), "GET", "method was incorrect");
  258    275   
        ::pretty_assertions::assert_eq!(uri.path(), "/no_payload", "path was incorrect");
  259    276   
    }
  260    277   
  261    278   
    /// Serializes a GET request with header member but no modeled body
  262    279   
    /// Test ID: RestJsonHttpGetWithHeaderMemberNoModeledBody
  263    280   
    #[::tokio::test]
  264    281   
    #[::tracing_test::traced_test]
  265    282   
    async fn rest_json_http_get_with_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_get_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-Length", "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(), "GET", "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 `TestGetNoPayloadError` operation.
         311  +
/* RustType.kt:516 */
  291    312   
#[non_exhaustive]
         313  +
/* RustType.kt:516 */
  292    314   
#[derive(::std::fmt::Debug)]
  293         -
pub enum TestGetNoPayloadError {
         315  +
pub /* OperationErrorGenerator.kt:81 */ enum TestGetNoPayloadError {
         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-TestGetNoPayloadError) 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 TestGetNoPayloadError {
         329  +
    /* OperationErrorGenerator.kt:219 */
  304    330   
    /// Creates the `TestGetNoPayloadError::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 `TestGetNoPayloadError::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 TestGetNoPayloadError {
         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 TestGetNoPayloadError {
         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   
                }
  347         -
            }
         393  +
                /* OperationErrorGenerator.kt:326 */
         394  +
            } /* OperationErrorGenerator.kt:318 */
  348    395   
        }
         396  +
        /* OperationErrorGenerator.kt:134 */
  349    397   
    }
         398  +
    /* OperationErrorGenerator.kt:133 */
  350    399   
}
         400  +
/* OperationErrorGenerator.kt:182 */
  351    401   
impl ::aws_smithy_types::retry::ProvideErrorKind for TestGetNoPayloadError {
         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 TestGetNoPayloadError {
         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 TestGetNoPayloadError {
         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_get_no_payload::_test_get_no_payload_output::TestGetNoPayloadOutput;
  379    452   
         453  +
/* CodegenDelegator.kt:255 */
  380    454   
pub use crate::operation::test_get_no_payload::_test_get_no_payload_input::TestGetNoPayloadInput;
  381    455   
         456  +
/* RustModule.kt:172 */
  382    457   
mod _test_get_no_payload_input;
  383    458   
         459  +
/* RustModule.kt:172 */
  384    460   
mod _test_get_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_get_no_payload/_test_get_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 TestGetNoPayloadInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct TestGetNoPayloadInput {
           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 TestGetNoPayloadInput {
          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 TestGetNoPayloadInput {
   16         -
    /// Creates a new builder-style object to manufacture [`TestGetNoPayloadInput`](crate::operation::test_get_no_payload::TestGetNoPayloadInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TestGetNoPayloadInput`](crate::operation::test_get_no_payload::TestGetNoPayloadInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::test_get_no_payload::builders::TestGetNoPayloadInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::test_get_no_payload::builders::TestGetNoPayloadInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`TestGetNoPayloadInput`](crate::operation::test_get_no_payload::TestGetNoPayloadInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`TestGetNoPayloadInput`](crate::operation::test_get_no_payload::TestGetNoPayloadInput).
          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 TestGetNoPayloadInputBuilder {
   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 TestGetNoPayloadInputBuilder {
          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 [`TestGetNoPayloadInput`](crate::operation::test_get_no_payload::TestGetNoPayloadInput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TestGetNoPayloadInput`](crate::operation::test_get_no_payload::TestGetNoPayloadInput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(
   45     80   
        self,
   46     81   
    ) -> ::std::result::Result<crate::operation::test_get_no_payload::TestGetNoPayloadInput, ::aws_smithy_types::error::operation::BuildError> {
   47         -
        ::std::result::Result::Ok(crate::operation::test_get_no_payload::TestGetNoPayloadInput { test_id: self.test_id })
          82  +
        /* BuilderGenerator.kt:254 */
          83  +
        ::std::result::Result::Ok(
          84  +
            /* BuilderGenerator.kt:477 */
          85  +
            crate::operation::test_get_no_payload::TestGetNoPayloadInput {
          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_get_no_payload/_test_get_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 TestGetNoPayloadOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct TestGetNoPayloadOutput {
           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 TestGetNoPayloadOutput {
          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 TestGetNoPayloadOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`TestGetNoPayloadOutput`](crate::operation::test_get_no_payload::TestGetNoPayloadOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TestGetNoPayloadOutput`](crate::operation::test_get_no_payload::TestGetNoPayloadOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::test_get_no_payload::builders::TestGetNoPayloadOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::test_get_no_payload::builders::TestGetNoPayloadOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`TestGetNoPayloadOutput`](crate::operation::test_get_no_payload::TestGetNoPayloadOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`TestGetNoPayloadOutput`](crate::operation::test_get_no_payload::TestGetNoPayloadOutput).
          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 TestGetNoPayloadOutputBuilder {
   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 TestGetNoPayloadOutputBuilder {
          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 [`TestGetNoPayloadOutput`](crate::operation::test_get_no_payload::TestGetNoPayloadOutput).
          77  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TestGetNoPayloadOutput`](crate::operation::test_get_no_payload::TestGetNoPayloadOutput).
          78  +
    /* BuilderGenerator.kt:253 */
   44     79   
    pub fn build(self) -> crate::operation::test_get_no_payload::TestGetNoPayloadOutput {
   45         -
        crate::operation::test_get_no_payload::TestGetNoPayloadOutput { test_id: self.test_id }
          80  +
        /* BuilderGenerator.kt:477 */
          81  +
        crate::operation::test_get_no_payload::TestGetNoPayloadOutput {
          82  +
            /* BuilderGenerator.kt:481 */ test_id: self.test_id,
          83  +
            /* BuilderGenerator.kt:477 */
          84  +
        }
          85  +
        /* BuilderGenerator.kt:253 */
   46     86   
    }
          87  +
    /* BuilderGenerator.kt:355 */
   47     88   
}

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