Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/capture_pokemon/_capture_pokemon_input.rs

@@ -1,1 +115,174 @@
    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 CapturePokemonInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct CapturePokemonInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub events: ::aws_smithy_http::event_stream::EventStreamSender<
    8     12   
        crate::types::AttemptCapturingPokemonEvent,
    9     13   
        crate::types::error::AttemptCapturingPokemonEventError,
   10     14   
    >,
          15  +
    /* StructureGenerator.kt:231 */
   11     16   
    #[allow(missing_docs)] // documentation missing in model
   12     17   
    pub region: ::std::option::Option<::std::string::String>,
          18  +
    /* StructureGenerator.kt:201 */
   13     19   
}
          20  +
/* StructureGenerator.kt:135 */
   14     21   
impl CapturePokemonInput {
          22  +
    /* StructureGenerator.kt:231 */
   15     23   
    #[allow(missing_docs)] // documentation missing in model
          24  +
                           /* StructureGenerator.kt:166 */
   16     25   
    pub fn events(
   17     26   
        &self,
   18     27   
    ) -> &::aws_smithy_http::event_stream::EventStreamSender<
   19     28   
        crate::types::AttemptCapturingPokemonEvent,
   20     29   
        crate::types::error::AttemptCapturingPokemonEventError,
   21     30   
    > {
          31  +
        /* StructureGenerator.kt:172 */
   22     32   
        &self.events
          33  +
        /* StructureGenerator.kt:166 */
   23     34   
    }
          35  +
    /* StructureGenerator.kt:231 */
   24     36   
    #[allow(missing_docs)] // documentation missing in model
          37  +
                           /* StructureGenerator.kt:166 */
   25     38   
    pub fn region(&self) -> ::std::option::Option<&str> {
          39  +
        /* StructureGenerator.kt:169 */
   26     40   
        self.region.as_deref()
          41  +
        /* StructureGenerator.kt:166 */
   27     42   
    }
          43  +
    /* StructureGenerator.kt:135 */
   28     44   
}
          45  +
/* ClientCodegenVisitor.kt:237 */
   29     46   
impl CapturePokemonInput {
   30         -
    /// Creates a new builder-style object to manufacture [`CapturePokemonInput`](crate::operation::capture_pokemon::CapturePokemonInput).
          47  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`CapturePokemonInput`](crate::operation::capture_pokemon::CapturePokemonInput).
          48  +
    /* BuilderGenerator.kt:175 */
   31     49   
    pub fn builder() -> crate::operation::capture_pokemon::builders::CapturePokemonInputBuilder {
          50  +
        /* BuilderGenerator.kt:176 */
   32     51   
        crate::operation::capture_pokemon::builders::CapturePokemonInputBuilder::default()
          52  +
        /* BuilderGenerator.kt:175 */
   33     53   
    }
          54  +
    /* ClientCodegenVisitor.kt:237 */
   34     55   
}
   35     56   
   36         -
/// A builder for [`CapturePokemonInput`](crate::operation::capture_pokemon::CapturePokemonInput).
          57  +
/// /* BuilderGenerator.kt:342 */A builder for [`CapturePokemonInput`](crate::operation::capture_pokemon::CapturePokemonInput).
          58  +
/* RustType.kt:516 */
   37     59   
#[derive(::std::default::Default, ::std::fmt::Debug)]
          60  +
/* RustType.kt:516 */
   38     61   
#[non_exhaustive]
          62  +
/* BuilderGenerator.kt:345 */
   39     63   
pub struct CapturePokemonInputBuilder {
          64  +
    /* BuilderGenerator.kt:275 */
   40     65   
    pub(crate) events: ::std::option::Option<
   41     66   
        ::aws_smithy_http::event_stream::EventStreamSender<
   42     67   
            crate::types::AttemptCapturingPokemonEvent,
   43     68   
            crate::types::error::AttemptCapturingPokemonEventError,
   44     69   
        >,
   45     70   
    >,
   46         -
    pub(crate) region: ::std::option::Option<::std::string::String>,
          71  +
    /* BuilderGenerator.kt:275 */ pub(crate) region: ::std::option::Option<::std::string::String>,
          72  +
    /* BuilderGenerator.kt:345 */
   47     73   
}
          74  +
/* BuilderGenerator.kt:355 */
   48     75   
impl CapturePokemonInputBuilder {
          76  +
    /* BuilderGenerator.kt:286 */
   49     77   
    #[allow(missing_docs)] // documentation missing in model
          78  +
                           /* BuilderGenerator.kt:291 */
   50     79   
    pub fn events(
   51     80   
        mut self,
   52     81   
        input: ::aws_smithy_http::event_stream::EventStreamSender<
   53     82   
            crate::types::AttemptCapturingPokemonEvent,
   54     83   
            crate::types::error::AttemptCapturingPokemonEventError,
   55     84   
        >,
   56     85   
    ) -> Self {
          86  +
        /* BuilderGenerator.kt:292 */
   57     87   
        self.events = ::std::option::Option::Some(input);
          88  +
        /* BuilderGenerator.kt:293 */
   58     89   
        self
          90  +
        /* BuilderGenerator.kt:291 */
   59     91   
    }
          92  +
    /* BuilderGenerator.kt:312 */
   60     93   
    #[allow(missing_docs)] // documentation missing in model
          94  +
                           /* BuilderGenerator.kt:314 */
   61     95   
    pub fn set_events(
   62     96   
        mut self,
   63     97   
        input: ::std::option::Option<
   64     98   
            ::aws_smithy_http::event_stream::EventStreamSender<
   65     99   
                crate::types::AttemptCapturingPokemonEvent,
   66    100   
                crate::types::error::AttemptCapturingPokemonEventError,
   67    101   
            >,
   68    102   
        >,
   69    103   
    ) -> Self {
         104  +
        /* BuilderGenerator.kt:315 */
   70    105   
        self.events = input;
   71    106   
        self
         107  +
        /* BuilderGenerator.kt:314 */
   72    108   
    }
         109  +
    /* BuilderGenerator.kt:334 */
   73    110   
    #[allow(missing_docs)] // documentation missing in model
         111  +
                           /* BuilderGenerator.kt:336 */
   74    112   
    pub fn get_events(
   75    113   
        &self,
   76    114   
    ) -> &::std::option::Option<
   77    115   
        ::aws_smithy_http::event_stream::EventStreamSender<
   78    116   
            crate::types::AttemptCapturingPokemonEvent,
   79    117   
            crate::types::error::AttemptCapturingPokemonEventError,
   80    118   
        >,
   81    119   
    > {
         120  +
        /* BuilderGenerator.kt:337 */
   82    121   
        &self.events
         122  +
        /* BuilderGenerator.kt:336 */
   83    123   
    }
         124  +
    /* BuilderGenerator.kt:286 */
   84    125   
    #[allow(missing_docs)] // documentation missing in model
   85         -
    /// This field is required.
         126  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         127  +
    /* BuilderGenerator.kt:291 */
   86    128   
    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         129  +
        /* BuilderGenerator.kt:292 */
   87    130   
        self.region = ::std::option::Option::Some(input.into());
         131  +
        /* BuilderGenerator.kt:293 */
   88    132   
        self
         133  +
        /* BuilderGenerator.kt:291 */
   89    134   
    }
         135  +
    /* BuilderGenerator.kt:312 */
   90    136   
    #[allow(missing_docs)] // documentation missing in model
         137  +
                           /* BuilderGenerator.kt:314 */
   91    138   
    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         139  +
        /* BuilderGenerator.kt:315 */
   92    140   
        self.region = input;
   93    141   
        self
         142  +
        /* BuilderGenerator.kt:314 */
   94    143   
    }
         144  +
    /* BuilderGenerator.kt:334 */
   95    145   
    #[allow(missing_docs)] // documentation missing in model
         146  +
                           /* BuilderGenerator.kt:336 */
   96    147   
    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
         148  +
        /* BuilderGenerator.kt:337 */
   97    149   
        &self.region
         150  +
        /* BuilderGenerator.kt:336 */
   98    151   
    }
   99         -
    /// Consumes the builder and constructs a [`CapturePokemonInput`](crate::operation::capture_pokemon::CapturePokemonInput).
  100         -
    /// This method will fail if any of the following fields are not set:
  101         -
    /// - [`events`](crate::operation::capture_pokemon::builders::CapturePokemonInputBuilder::events)
         152  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`CapturePokemonInput`](crate::operation::capture_pokemon::CapturePokemonInput).
         153  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         154  +
    /// /* BuilderGenerator.kt:246 */- [`events`](crate::operation::capture_pokemon::builders::CapturePokemonInputBuilder::events)
         155  +
    /* BuilderGenerator.kt:253 */
  102    156   
    pub fn build(
  103    157   
        self,
  104    158   
    ) -> ::std::result::Result<crate::operation::capture_pokemon::CapturePokemonInput, ::aws_smithy_types::error::operation::BuildError> {
  105         -
        ::std::result::Result::Ok(crate::operation::capture_pokemon::CapturePokemonInput {
  106         -
            events: self.events.ok_or_else(|| {
  107         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  108         -
                    "events",
  109         -
                    "events was not specified but it is required when building CapturePokemonInput",
  110         -
                )
  111         -
            })?,
  112         -
            region: self.region,
  113         -
        })
         159  +
        /* BuilderGenerator.kt:254 */
         160  +
        ::std::result::Result::Ok(
         161  +
            /* BuilderGenerator.kt:477 */crate::operation::capture_pokemon::CapturePokemonInput {
         162  +
                /* BuilderGenerator.kt:481 */events: self.events
         163  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         164  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("events", "events was not specified but it is required when building CapturePokemonInput")
         165  +
                    /* BuilderGenerator.kt:494 */)?
         166  +
                ,
         167  +
                /* BuilderGenerator.kt:481 */region: self.region
         168  +
                ,
         169  +
            /* BuilderGenerator.kt:477 */}
         170  +
        /* BuilderGenerator.kt:254 */)
         171  +
        /* BuilderGenerator.kt:253 */
  114    172   
    }
         173  +
    /* BuilderGenerator.kt:355 */
  115    174   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/capture_pokemon/_capture_pokemon_output.rs

@@ -1,1 +74,114 @@
    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 CapturePokemonOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct CapturePokemonOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub events: crate::event_receiver::EventReceiver<crate::types::CapturePokemonEvents, crate::types::error::CapturePokemonEventsError>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl CapturePokemonOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn events(
   12     20   
        &self,
   13     21   
    ) -> &crate::event_receiver::EventReceiver<crate::types::CapturePokemonEvents, crate::types::error::CapturePokemonEventsError> {
          22  +
        /* StructureGenerator.kt:172 */
   14     23   
        &self.events
          24  +
        /* StructureGenerator.kt:166 */
   15     25   
    }
          26  +
    /* StructureGenerator.kt:135 */
   16     27   
}
          28  +
/* ClientCodegenVisitor.kt:237 */
   17     29   
impl CapturePokemonOutput {
   18         -
    /// Creates a new builder-style object to manufacture [`CapturePokemonOutput`](crate::operation::capture_pokemon::CapturePokemonOutput).
          30  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`CapturePokemonOutput`](crate::operation::capture_pokemon::CapturePokemonOutput).
          31  +
    /* BuilderGenerator.kt:175 */
   19     32   
    pub fn builder() -> crate::operation::capture_pokemon::builders::CapturePokemonOutputBuilder {
          33  +
        /* BuilderGenerator.kt:176 */
   20     34   
        crate::operation::capture_pokemon::builders::CapturePokemonOutputBuilder::default()
          35  +
        /* BuilderGenerator.kt:175 */
   21     36   
    }
          37  +
    /* ClientCodegenVisitor.kt:237 */
   22     38   
}
   23     39   
   24         -
/// A builder for [`CapturePokemonOutput`](crate::operation::capture_pokemon::CapturePokemonOutput).
          40  +
/// /* BuilderGenerator.kt:342 */A builder for [`CapturePokemonOutput`](crate::operation::capture_pokemon::CapturePokemonOutput).
          41  +
/* RustType.kt:516 */
   25     42   
#[derive(::std::default::Default, ::std::fmt::Debug)]
          43  +
/* RustType.kt:516 */
   26     44   
#[non_exhaustive]
          45  +
/* BuilderGenerator.kt:345 */
   27     46   
pub struct CapturePokemonOutputBuilder {
          47  +
    /* BuilderGenerator.kt:275 */
   28     48   
    pub(crate) events: ::std::option::Option<
   29     49   
        crate::event_receiver::EventReceiver<crate::types::CapturePokemonEvents, crate::types::error::CapturePokemonEventsError>,
   30     50   
    >,
          51  +
    /* BuilderGenerator.kt:345 */
   31     52   
}
          53  +
/* BuilderGenerator.kt:355 */
   32     54   
impl CapturePokemonOutputBuilder {
          55  +
    /* BuilderGenerator.kt:286 */
   33     56   
    #[allow(missing_docs)] // documentation missing in model
          57  +
                           /* BuilderGenerator.kt:291 */
   34     58   
    pub fn events(
   35     59   
        mut self,
   36     60   
        input: crate::event_receiver::EventReceiver<crate::types::CapturePokemonEvents, crate::types::error::CapturePokemonEventsError>,
   37     61   
    ) -> Self {
          62  +
        /* BuilderGenerator.kt:292 */
   38     63   
        self.events = ::std::option::Option::Some(input);
          64  +
        /* BuilderGenerator.kt:293 */
   39     65   
        self
          66  +
        /* BuilderGenerator.kt:291 */
   40     67   
    }
          68  +
    /* BuilderGenerator.kt:312 */
   41     69   
    #[allow(missing_docs)] // documentation missing in model
          70  +
                           /* BuilderGenerator.kt:314 */
   42     71   
    pub fn set_events(
   43     72   
        mut self,
   44     73   
        input: ::std::option::Option<
   45     74   
            crate::event_receiver::EventReceiver<crate::types::CapturePokemonEvents, crate::types::error::CapturePokemonEventsError>,
   46     75   
        >,
   47     76   
    ) -> Self {
          77  +
        /* BuilderGenerator.kt:315 */
   48     78   
        self.events = input;
   49     79   
        self
          80  +
        /* BuilderGenerator.kt:314 */
   50     81   
    }
          82  +
    /* BuilderGenerator.kt:334 */
   51     83   
    #[allow(missing_docs)] // documentation missing in model
          84  +
                           /* BuilderGenerator.kt:336 */
   52     85   
    pub fn get_events(
   53     86   
        &self,
   54     87   
    ) -> &::std::option::Option<
   55     88   
        crate::event_receiver::EventReceiver<crate::types::CapturePokemonEvents, crate::types::error::CapturePokemonEventsError>,
   56     89   
    > {
          90  +
        /* BuilderGenerator.kt:337 */
   57     91   
        &self.events
          92  +
        /* BuilderGenerator.kt:336 */
   58     93   
    }
   59         -
    /// Consumes the builder and constructs a [`CapturePokemonOutput`](crate::operation::capture_pokemon::CapturePokemonOutput).
   60         -
    /// This method will fail if any of the following fields are not set:
   61         -
    /// - [`events`](crate::operation::capture_pokemon::builders::CapturePokemonOutputBuilder::events)
          94  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`CapturePokemonOutput`](crate::operation::capture_pokemon::CapturePokemonOutput).
          95  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
          96  +
    /// /* BuilderGenerator.kt:246 */- [`events`](crate::operation::capture_pokemon::builders::CapturePokemonOutputBuilder::events)
          97  +
    /* BuilderGenerator.kt:253 */
   62     98   
    pub fn build(
   63     99   
        self,
   64    100   
    ) -> ::std::result::Result<crate::operation::capture_pokemon::CapturePokemonOutput, ::aws_smithy_types::error::operation::BuildError> {
   65         -
        ::std::result::Result::Ok(crate::operation::capture_pokemon::CapturePokemonOutput {
   66         -
            events: self.events.ok_or_else(|| {
   67         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   68         -
                    "events",
   69         -
                    "events was not specified but it is required when building CapturePokemonOutput",
   70         -
                )
   71         -
            })?,
   72         -
        })
         101  +
        /* BuilderGenerator.kt:254 */
         102  +
        ::std::result::Result::Ok(
         103  +
            /* BuilderGenerator.kt:477 */crate::operation::capture_pokemon::CapturePokemonOutput {
         104  +
                /* BuilderGenerator.kt:481 */events: self.events
         105  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         106  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("events", "events was not specified but it is required when building CapturePokemonOutput")
         107  +
                    /* BuilderGenerator.kt:494 */)?
         108  +
                ,
         109  +
            /* BuilderGenerator.kt:477 */}
         110  +
        /* BuilderGenerator.kt:254 */)
         111  +
        /* BuilderGenerator.kt:253 */
   73    112   
    }
         113  +
    /* BuilderGenerator.kt:355 */
   74    114   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/capture_pokemon/builders.rs

@@ -1,1 +160,184 @@
    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::capture_pokemon::_capture_pokemon_output::CapturePokemonOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::capture_pokemon::_capture_pokemon_input::CapturePokemonInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::capture_pokemon::builders::CapturePokemonInputBuilder {
    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::capture_pokemon::CapturePokemonOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::capture_pokemon::CapturePokemonError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.capture_pokemon();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `CapturePokemon`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `CapturePokemon`.
   24     27   
///
   25         -
/// Capture Pokémons via event streams.
          28  +
/// /* FluentBuilderGenerator.kt:130 */Capture Pokémons via event streams.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct CapturePokemonFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::capture_pokemon::builders::CapturePokemonInputBuilder,
   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::capture_pokemon::CapturePokemonOutput,
   35     41   
        crate::operation::capture_pokemon::CapturePokemonError,
   36     42   
    > for CapturePokemonFluentBuilder
   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::capture_pokemon::CapturePokemonOutput,
   44     50   
            crate::operation::capture_pokemon::CapturePokemonError,
   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 CapturePokemonFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `CapturePokemonFluentBuilder`.
   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 CapturePokemon as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::capture_pokemon::builders::CapturePokemonInputBuilder {
   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::capture_pokemon::CapturePokemonOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::capture_pokemon::CapturePokemonError,
   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::capture_pokemon::CapturePokemon::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::capture_pokemon::CapturePokemon::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::capture_pokemon::CapturePokemonOutput,
   97    107   
        crate::operation::capture_pokemon::CapturePokemonError,
   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 events(
  113    126   
        mut self,
  114    127   
        input: ::aws_smithy_http::event_stream::EventStreamSender<
  115    128   
            crate::types::AttemptCapturingPokemonEvent,
  116    129   
            crate::types::error::AttemptCapturingPokemonEventError,
  117    130   
        >,
  118    131   
    ) -> Self {
  119    132   
        self.inner = self.inner.events(input);
  120    133   
        self
  121    134   
    }
         135  +
    /* FluentBuilderGenerator.kt:498 */
  122    136   
    #[allow(missing_docs)] // documentation missing in model
         137  +
                           /* FluentBuilderGenerator.kt:500 */
  123    138   
    pub fn set_events(
  124    139   
        mut self,
  125    140   
        input: ::std::option::Option<
  126    141   
            ::aws_smithy_http::event_stream::EventStreamSender<
  127    142   
                crate::types::AttemptCapturingPokemonEvent,
  128    143   
                crate::types::error::AttemptCapturingPokemonEventError,
  129    144   
            >,
  130    145   
        >,
  131    146   
    ) -> Self {
  132    147   
        self.inner = self.inner.set_events(input);
  133    148   
        self
  134    149   
    }
         150  +
    /* FluentBuilderGenerator.kt:518 */
  135    151   
    #[allow(missing_docs)] // documentation missing in model
         152  +
                           /* FluentBuilderGenerator.kt:520 */
  136    153   
    pub fn get_events(
  137    154   
        &self,
  138    155   
    ) -> &::std::option::Option<
  139    156   
        ::aws_smithy_http::event_stream::EventStreamSender<
  140    157   
            crate::types::AttemptCapturingPokemonEvent,
  141    158   
            crate::types::error::AttemptCapturingPokemonEventError,
  142    159   
        >,
  143    160   
    > {
  144    161   
        self.inner.get_events()
  145    162   
    }
         163  +
    /* FluentBuilderGenerator.kt:498 */
  146    164   
    #[allow(missing_docs)] // documentation missing in model
         165  +
                           /* FluentBuilderGenerator.kt:500 */
  147    166   
    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  148    167   
        self.inner = self.inner.region(input.into());
  149    168   
        self
  150    169   
    }
         170  +
    /* FluentBuilderGenerator.kt:498 */
  151    171   
    #[allow(missing_docs)] // documentation missing in model
         172  +
                           /* FluentBuilderGenerator.kt:500 */
  152    173   
    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  153    174   
        self.inner = self.inner.set_region(input);
  154    175   
        self
  155    176   
    }
         177  +
    /* FluentBuilderGenerator.kt:518 */
  156    178   
    #[allow(missing_docs)] // documentation missing in model
         179  +
                           /* FluentBuilderGenerator.kt:520 */
  157    180   
    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
  158    181   
        self.inner.get_region()
  159    182   
    }
         183  +
    /* FluentBuilderGenerator.kt:282 */
  160    184   
}

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

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/check_health/_check_health_input.rs

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

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/check_health/_check_health_output.rs

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

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/check_health/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::check_health::_check_health_output::CheckHealthOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::check_health::_check_health_input::CheckHealthInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::check_health::builders::CheckHealthInputBuilder {
    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::check_health::CheckHealthOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::check_health::CheckHealthError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.check_health();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `CheckHealth`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `CheckHealth`.
   24     27   
///
   25         -
/// Health check operation, to check the service is up Not yet a deep check
          28  +
/// /* FluentBuilderGenerator.kt:130 */Health check operation, to check the service is up Not yet a deep check
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct CheckHealthFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::check_health::builders::CheckHealthInputBuilder,
   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::check_health::CheckHealthOutput,
   35     41   
        crate::operation::check_health::CheckHealthError,
   36     42   
    > for CheckHealthFluentBuilder
   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::check_health::CheckHealthOutput,
   44     50   
            crate::operation::check_health::CheckHealthError,
   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 CheckHealthFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `CheckHealthFluentBuilder`.
   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 CheckHealth as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::check_health::builders::CheckHealthInputBuilder {
   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::check_health::CheckHealthOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::check_health::CheckHealthError,
   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::check_health::CheckHealth::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::check_health::CheckHealth::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::check_health::CheckHealthOutput,
   97    107   
        crate::operation::check_health::CheckHealthError,
   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/pokemon-service-client/rust-client-codegen/src/operation/do_nothing.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 `DoNothing`.
           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 DoNothing;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl DoNothing {
    7         -
    /// Creates a new `DoNothing`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `DoNothing`
          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::do_nothing::DoNothingInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::do_nothing::DoNothingOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::do_nothing::DoNothingError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +323,394 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for DoNothing {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("DoNothing");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            DoNothingRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            DoNothingResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "DoNothing",
  105    116   
            "PokemonService",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("DoNothing")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(DoNothingEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::do_nothing::DoNothingError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::do_nothing::DoNothingError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct DoNothingResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DoNothingResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_do_nothing::de_do_nothing_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_do_nothing::de_do_nothing_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct DoNothingRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DoNothingRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input.downcast::<crate::operation::do_nothing::DoNothingInput>().expect("correct type");
  161    174   
        let _header_serialization_settings = _cfg
  162    175   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  163    176   
            .cloned()
  164    177   
            .unwrap_or_default();
  165    178   
        let mut request_builder = {
  166    179   
            fn uri_base(
  167    180   
                _input: &crate::operation::do_nothing::DoNothingInput,
  168    181   
                output: &mut ::std::string::String,
  169    182   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  170    183   
                use ::std::fmt::Write as _;
  171    184   
                ::std::write!(output, "/do-nothing").expect("formatting should succeed");
  172    185   
                ::std::result::Result::Ok(())
  173    186   
            }
  174    187   
            #[allow(clippy::unnecessary_wraps)]
  175    188   
            fn update_http_builder(
  176    189   
                input: &crate::operation::do_nothing::DoNothingInput,
  177    190   
                builder: ::http::request::Builder,
  178    191   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  179    192   
                let mut uri = ::std::string::String::new();
  180    193   
                uri_base(input, &mut uri)?;
  181    194   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  182    195   
            }
  183    196   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  184    197   
            builder
  185    198   
        };
  186    199   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  187    200   
  188    201   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  189    202   
    }
  190    203   
}
         204  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  191    205   
#[derive(Debug)]
  192    206   
struct DoNothingEndpointParamsInterceptor;
  193    207   
  194    208   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DoNothingEndpointParamsInterceptor {
  195    209   
    fn name(&self) -> &'static str {
  196    210   
        "DoNothingEndpointParamsInterceptor"
  197    211   
    }
  198    212   
  199    213   
    fn read_before_execution(
  200    214   
        &self,
  201    215   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  202    216   
            '_,
  203    217   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  204    218   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  205    219   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  206    220   
        >,
  207    221   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  208    222   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  209    223   
        let _input = context
  210    224   
            .input()
  211    225   
            .downcast_ref::<DoNothingInput>()
  212    226   
            .ok_or("failed to downcast to DoNothingInput")?;
  213    227   
  214    228   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  215    229   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  216    230   
        })?;
  217    231   
        cfg.interceptor_state()
  218    232   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  219    233   
        ::std::result::Result::Ok(())
  220    234   
    }
  221    235   
}
  222    236   
  223    237   
// The get_* functions below are generated from JMESPath expressions in the
  224    238   
// operationContextParams trait. They target the operation's input shape.
  225    239   
         240  +
/* OperationErrorGenerator.kt:79 */
  226    241   
/// Error type for the `DoNothingError` operation.
         242  +
/* RustType.kt:516 */
  227    243   
#[non_exhaustive]
         244  +
/* RustType.kt:516 */
  228    245   
#[derive(::std::fmt::Debug)]
  229         -
pub enum DoNothingError {
         246  +
pub /* OperationErrorGenerator.kt:81 */ enum DoNothingError {
         247  +
    /* OperationErrorGenerator.kt:88 */
  230    248   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  231    249   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  232    250   
    variable wildcard pattern and check `.code()`:
  233    251   
     \
  234    252   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  235    253   
     \
  236    254   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DoNothingError) for what information is available for the error.")]
  237    255   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         256  +
    /* OperationErrorGenerator.kt:81 */
  238    257   
}
         258  +
/* OperationErrorGenerator.kt:218 */
  239    259   
impl DoNothingError {
         260  +
    /* OperationErrorGenerator.kt:219 */
  240    261   
    /// Creates the `DoNothingError::Unhandled` variant from any error type.
  241    262   
    pub fn unhandled(
  242    263   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  243    264   
    ) -> Self {
  244    265   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  245    266   
            source: err.into(),
  246    267   
            meta: ::std::default::Default::default(),
  247    268   
        })
  248    269   
    }
  249    270   
  250    271   
    /// Creates the `DoNothingError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  251    272   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  252    273   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  253    274   
            source: err.clone().into(),
  254    275   
            meta: err,
  255    276   
        })
  256    277   
    }
  257         -
    ///
         278  +
    /// /* OperationErrorGenerator.kt:236 */
  258    279   
    /// Returns error metadata, which includes the error code, message,
  259    280   
    /// request ID, and potentially additional information.
  260    281   
    ///
         282  +
    /* OperationErrorGenerator.kt:242 */
  261    283   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         284  +
        /* OperationErrorGenerator.kt:243 */
  262    285   
        match self {
  263         -
            Self::Unhandled(e) => &e.meta,
         286  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         287  +
            /* OperationErrorGenerator.kt:243 */
  264    288   
        }
         289  +
        /* OperationErrorGenerator.kt:242 */
  265    290   
    }
         291  +
    /* OperationErrorGenerator.kt:218 */
  266    292   
}
         293  +
/* OperationErrorGenerator.kt:269 */
  267    294   
impl ::std::error::Error for DoNothingError {
         295  +
    /* OperationErrorGenerator.kt:270 */
  268    296   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         297  +
        /* OperationErrorGenerator.kt:318 */
  269    298   
        match self {
  270         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         299  +
            /* OperationErrorGenerator.kt:326 */
         300  +
            Self::Unhandled(_inner) => {
         301  +
                /* OperationErrorGenerator.kt:279 */
         302  +
                ::std::option::Option::Some(&*_inner.source)
         303  +
                /* OperationErrorGenerator.kt:326 */
         304  +
            } /* OperationErrorGenerator.kt:318 */
  271    305   
        }
         306  +
        /* OperationErrorGenerator.kt:270 */
  272    307   
    }
         308  +
    /* OperationErrorGenerator.kt:269 */
  273    309   
}
         310  +
/* OperationErrorGenerator.kt:133 */
  274    311   
impl ::std::fmt::Display for DoNothingError {
         312  +
    /* OperationErrorGenerator.kt:134 */
  275    313   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         314  +
        /* OperationErrorGenerator.kt:318 */
  276    315   
        match self {
         316  +
            /* OperationErrorGenerator.kt:326 */
  277    317   
            Self::Unhandled(_inner) => {
         318  +
                /* OperationErrorGenerator.kt:139 */
  278    319   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  279    320   
                    write!(f, "unhandled error ({code})")
  280    321   
                } else {
  281    322   
                    f.write_str("unhandled error")
  282    323   
                }
         324  +
                /* OperationErrorGenerator.kt:326 */
         325  +
            } /* OperationErrorGenerator.kt:318 */
  283    326   
        }
         327  +
        /* OperationErrorGenerator.kt:134 */
  284    328   
    }
  285         -
    }
         329  +
    /* OperationErrorGenerator.kt:133 */
  286    330   
}
         331  +
/* OperationErrorGenerator.kt:182 */
  287    332   
impl ::aws_smithy_types::retry::ProvideErrorKind for DoNothingError {
         333  +
    /* OperationErrorGenerator.kt:186 */
  288    334   
    fn code(&self) -> ::std::option::Option<&str> {
         335  +
        /* OperationErrorGenerator.kt:187 */
  289    336   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         337  +
        /* OperationErrorGenerator.kt:186 */
  290    338   
    }
         339  +
    /* OperationErrorGenerator.kt:190 */
  291    340   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         341  +
        /* OperationErrorGenerator.kt:197 */
  292    342   
        ::std::option::Option::None
         343  +
        /* OperationErrorGenerator.kt:190 */
  293    344   
    }
         345  +
    /* OperationErrorGenerator.kt:182 */
  294    346   
}
         347  +
/* OperationErrorGenerator.kt:163 */
  295    348   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DoNothingError {
         349  +
    /* OperationErrorGenerator.kt:164 */
  296    350   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         351  +
        /* OperationErrorGenerator.kt:318 */
  297    352   
        match self {
  298         -
            Self::Unhandled(_inner) => &_inner.meta,
         353  +
            /* OperationErrorGenerator.kt:326 */
         354  +
            Self::Unhandled(_inner) => {
         355  +
                /* OperationErrorGenerator.kt:168 */
         356  +
                &_inner.meta
         357  +
                /* OperationErrorGenerator.kt:326 */
         358  +
            } /* OperationErrorGenerator.kt:318 */
  299    359   
        }
         360  +
        /* OperationErrorGenerator.kt:164 */
  300    361   
    }
         362  +
    /* OperationErrorGenerator.kt:163 */
  301    363   
}
         364  +
/* OperationErrorGenerator.kt:109 */
  302    365   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DoNothingError {
         366  +
    /* OperationErrorGenerator.kt:110 */
  303    367   
    fn create_unhandled_error(
  304    368   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  305    369   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  306    370   
    ) -> Self {
         371  +
        /* OperationErrorGenerator.kt:121 */
  307    372   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  308    373   
            source,
  309    374   
            meta: meta.unwrap_or_default(),
  310    375   
        })
         376  +
        /* OperationErrorGenerator.kt:110 */
  311    377   
    }
         378  +
    /* OperationErrorGenerator.kt:109 */
  312    379   
}
  313    380   
         381  +
/* CodegenDelegator.kt:255 */
  314    382   
pub use crate::operation::do_nothing::_do_nothing_output::DoNothingOutput;
  315    383   
         384  +
/* CodegenDelegator.kt:255 */
  316    385   
pub use crate::operation::do_nothing::_do_nothing_input::DoNothingInput;
  317    386   
         387  +
/* RustModule.kt:172 */
  318    388   
mod _do_nothing_input;
  319    389   
         390  +
/* RustModule.kt:172 */
  320    391   
mod _do_nothing_output;
  321    392   
  322         -
/// Builders
         393  +
/// /* CodegenDelegator.kt:51 */Builders
  323    394   
pub mod builders;

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/do_nothing/_do_nothing_input.rs

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

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/do_nothing/_do_nothing_output.rs

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

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/do_nothing/builders.rs

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

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_pokemon_species.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 `GetPokemonSpecies`.
           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 GetPokemonSpecies;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl GetPokemonSpecies {
    7         -
    /// Creates a new `GetPokemonSpecies`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `GetPokemonSpecies`
          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::get_pokemon_species::GetPokemonSpeciesInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::get_pokemon_species::GetPokemonSpeciesOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::get_pokemon_species::GetPokemonSpeciesError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +356,475 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetPokemonSpecies {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetPokemonSpecies");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            GetPokemonSpeciesRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            GetPokemonSpeciesResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "GetPokemonSpecies",
  105    116   
            "PokemonService",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetPokemonSpecies")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(GetPokemonSpeciesEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::get_pokemon_species::GetPokemonSpeciesError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::get_pokemon_species::GetPokemonSpeciesError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct GetPokemonSpeciesResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetPokemonSpeciesResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_get_pokemon_species::de_get_pokemon_species_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_get_pokemon_species::de_get_pokemon_species_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct GetPokemonSpeciesRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetPokemonSpeciesRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input
  161    174   
            .downcast::<crate::operation::get_pokemon_species::GetPokemonSpeciesInput>()
  162    175   
            .expect("correct type");
  163    176   
        let _header_serialization_settings = _cfg
  164    177   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  165    178   
            .cloned()
  166    179   
            .unwrap_or_default();
  167    180   
        let mut request_builder = {
  168    181   
            fn uri_base(
  169    182   
                _input: &crate::operation::get_pokemon_species::GetPokemonSpeciesInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                let input_1 = &_input.name;
  174    187   
                let input_1 = input_1
  175    188   
                    .as_ref()
  176    189   
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("name", "cannot be empty or unset"))?;
  177    190   
                let name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  178    191   
                if name.is_empty() {
  179    192   
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  180    193   
                        "name",
  181    194   
                        "cannot be empty or unset",
  182    195   
                    ));
  183    196   
                }
  184    197   
                ::std::write!(output, "/pokemon-species/{name}", name = name).expect("formatting should succeed");
  185    198   
                ::std::result::Result::Ok(())
  186    199   
            }
  187    200   
            #[allow(clippy::unnecessary_wraps)]
  188    201   
            fn update_http_builder(
  189    202   
                input: &crate::operation::get_pokemon_species::GetPokemonSpeciesInput,
  190    203   
                builder: ::http::request::Builder,
  191    204   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  192    205   
                let mut uri = ::std::string::String::new();
  193    206   
                uri_base(input, &mut uri)?;
  194    207   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  195    208   
            }
  196    209   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  197    210   
            builder
  198    211   
        };
  199    212   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  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 GetPokemonSpeciesEndpointParamsInterceptor;
  206    220   
  207    221   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetPokemonSpeciesEndpointParamsInterceptor {
  208    222   
    fn name(&self) -> &'static str {
  209    223   
        "GetPokemonSpeciesEndpointParamsInterceptor"
  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::<GetPokemonSpeciesInput>()
  225    239   
            .ok_or("failed to downcast to GetPokemonSpeciesInput")?;
  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  +
/* OperationErrorGenerator.kt:79 */
  239    254   
/// Error type for the `GetPokemonSpeciesError` operation.
         255  +
/* RustType.kt:516 */
  240    256   
#[non_exhaustive]
         257  +
/* RustType.kt:516 */
  241    258   
#[derive(::std::fmt::Debug)]
  242         -
pub enum GetPokemonSpeciesError {
  243         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         259  +
pub /* OperationErrorGenerator.kt:81 */ enum GetPokemonSpeciesError {
         260  +
    /// /* OperationErrorGenerator.kt:83 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         261  +
    /* OperationErrorGenerator.kt:86 */
  244    262   
    ValidationError(crate::types::error::ValidationError),
         263  +
    /* OperationErrorGenerator.kt:83 */
  245    264   
    #[allow(missing_docs)] // documentation missing in model
         265  +
    /* OperationErrorGenerator.kt:86 */
  246    266   
    ResourceNotFoundError(crate::types::error::ResourceNotFoundError),
         267  +
    /* OperationErrorGenerator.kt:88 */
  247    268   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  248    269   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  249    270   
    variable wildcard pattern and check `.code()`:
  250    271   
     \
  251    272   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  252    273   
     \
  253    274   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetPokemonSpeciesError) for what information is available for the error.")]
  254    275   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         276  +
    /* OperationErrorGenerator.kt:81 */
  255    277   
}
         278  +
/* OperationErrorGenerator.kt:218 */
  256    279   
impl GetPokemonSpeciesError {
         280  +
    /* OperationErrorGenerator.kt:219 */
  257    281   
    /// Creates the `GetPokemonSpeciesError::Unhandled` variant from any error type.
  258    282   
    pub fn unhandled(
  259    283   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  260    284   
    ) -> Self {
  261    285   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  262    286   
            source: err.into(),
  263    287   
            meta: ::std::default::Default::default(),
  264    288   
        })
  265    289   
    }
  266    290   
  267    291   
    /// Creates the `GetPokemonSpeciesError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  268    292   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  269    293   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  270    294   
            source: err.clone().into(),
  271    295   
            meta: err,
  272    296   
        })
  273    297   
    }
  274         -
    ///
         298  +
    /// /* OperationErrorGenerator.kt:236 */
  275    299   
    /// Returns error metadata, which includes the error code, message,
  276    300   
    /// request ID, and potentially additional information.
  277    301   
    ///
         302  +
    /* OperationErrorGenerator.kt:242 */
  278    303   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         304  +
        /* OperationErrorGenerator.kt:243 */
  279    305   
        match self {
  280         -
            Self::ValidationError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         306  +
            /* OperationErrorGenerator.kt:246 */ Self::ValidationError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         307  +
            /* OperationErrorGenerator.kt:246 */
  281    308   
            Self::ResourceNotFoundError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  282         -
            Self::Unhandled(e) => &e.meta,
         309  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         310  +
            /* OperationErrorGenerator.kt:243 */
  283    311   
        }
         312  +
        /* OperationErrorGenerator.kt:242 */
  284    313   
    }
         314  +
    /* OperationErrorGenerator.kt:257 */
  285    315   
    /// Returns `true` if the error kind is `GetPokemonSpeciesError::ValidationError`.
         316  +
    /* OperationErrorGenerator.kt:258 */
  286    317   
    pub fn is_validation_error(&self) -> bool {
         318  +
        /* OperationErrorGenerator.kt:259 */
  287    319   
        matches!(self, Self::ValidationError(_))
         320  +
        /* OperationErrorGenerator.kt:258 */
  288    321   
    }
         322  +
    /* OperationErrorGenerator.kt:257 */
  289    323   
    /// Returns `true` if the error kind is `GetPokemonSpeciesError::ResourceNotFoundError`.
         324  +
    /* OperationErrorGenerator.kt:258 */
  290    325   
    pub fn is_resource_not_found_error(&self) -> bool {
         326  +
        /* OperationErrorGenerator.kt:259 */
  291    327   
        matches!(self, Self::ResourceNotFoundError(_))
         328  +
        /* OperationErrorGenerator.kt:258 */
  292    329   
    }
         330  +
    /* OperationErrorGenerator.kt:218 */
  293    331   
}
         332  +
/* OperationErrorGenerator.kt:269 */
  294    333   
impl ::std::error::Error for GetPokemonSpeciesError {
         334  +
    /* OperationErrorGenerator.kt:270 */
  295    335   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         336  +
        /* OperationErrorGenerator.kt:318 */
  296    337   
        match self {
  297         -
            Self::ValidationError(_inner) => ::std::option::Option::Some(_inner),
  298         -
            Self::ResourceNotFoundError(_inner) => ::std::option::Option::Some(_inner),
  299         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         338  +
            /* OperationErrorGenerator.kt:321 */
         339  +
            Self::ValidationError(_inner) =>
         340  +
            /* OperationErrorGenerator.kt:283 */
         341  +
            {
         342  +
                ::std::option::Option::Some(_inner)
         343  +
            }
         344  +
            ,
         345  +
            /* OperationErrorGenerator.kt:321 */
         346  +
            Self::ResourceNotFoundError(_inner) =>
         347  +
            /* OperationErrorGenerator.kt:283 */
         348  +
            {
         349  +
                ::std::option::Option::Some(_inner)
         350  +
            }
         351  +
            ,
         352  +
            /* OperationErrorGenerator.kt:326 */
         353  +
            Self::Unhandled(_inner) => {
         354  +
                /* OperationErrorGenerator.kt:279 */
         355  +
                ::std::option::Option::Some(&*_inner.source)
         356  +
                /* OperationErrorGenerator.kt:326 */
         357  +
            } /* OperationErrorGenerator.kt:318 */
  300    358   
        }
         359  +
        /* OperationErrorGenerator.kt:270 */
  301    360   
    }
         361  +
    /* OperationErrorGenerator.kt:269 */
  302    362   
}
         363  +
/* OperationErrorGenerator.kt:133 */
  303    364   
impl ::std::fmt::Display for GetPokemonSpeciesError {
         365  +
    /* OperationErrorGenerator.kt:134 */
  304    366   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         367  +
        /* OperationErrorGenerator.kt:318 */
  305    368   
        match self {
  306         -
            Self::ValidationError(_inner) => _inner.fmt(f),
  307         -
            Self::ResourceNotFoundError(_inner) => _inner.fmt(f),
         369  +
            /* OperationErrorGenerator.kt:321 */
         370  +
            Self::ValidationError(_inner) =>
         371  +
            /* OperationErrorGenerator.kt:151 */
         372  +
            {
         373  +
                _inner.fmt(f)
         374  +
            }
         375  +
            ,
         376  +
            /* OperationErrorGenerator.kt:321 */
         377  +
            Self::ResourceNotFoundError(_inner) =>
         378  +
            /* OperationErrorGenerator.kt:151 */
         379  +
            {
         380  +
                _inner.fmt(f)
         381  +
            }
         382  +
            ,
         383  +
            /* OperationErrorGenerator.kt:326 */
  308    384   
            Self::Unhandled(_inner) => {
         385  +
                /* OperationErrorGenerator.kt:139 */
  309    386   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  310    387   
                    write!(f, "unhandled error ({code})")
  311    388   
                } else {
  312    389   
                    f.write_str("unhandled error")
  313    390   
                }
         391  +
                /* OperationErrorGenerator.kt:326 */
         392  +
            } /* OperationErrorGenerator.kt:318 */
  314    393   
        }
         394  +
        /* OperationErrorGenerator.kt:134 */
  315    395   
    }
  316         -
    }
         396  +
    /* OperationErrorGenerator.kt:133 */
  317    397   
}
         398  +
/* OperationErrorGenerator.kt:182 */
  318    399   
impl ::aws_smithy_types::retry::ProvideErrorKind for GetPokemonSpeciesError {
         400  +
    /* OperationErrorGenerator.kt:186 */
  319    401   
    fn code(&self) -> ::std::option::Option<&str> {
         402  +
        /* OperationErrorGenerator.kt:187 */
  320    403   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         404  +
        /* OperationErrorGenerator.kt:186 */
  321    405   
    }
         406  +
    /* OperationErrorGenerator.kt:190 */
  322    407   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         408  +
        /* OperationErrorGenerator.kt:197 */
  323    409   
        ::std::option::Option::None
         410  +
        /* OperationErrorGenerator.kt:190 */
  324    411   
    }
         412  +
    /* OperationErrorGenerator.kt:182 */
  325    413   
}
         414  +
/* OperationErrorGenerator.kt:163 */
  326    415   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetPokemonSpeciesError {
         416  +
    /* OperationErrorGenerator.kt:164 */
  327    417   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         418  +
        /* OperationErrorGenerator.kt:318 */
  328    419   
        match self {
  329         -
            Self::ValidationError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  330         -
            Self::ResourceNotFoundError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  331         -
            Self::Unhandled(_inner) => &_inner.meta,
         420  +
            /* OperationErrorGenerator.kt:321 */
         421  +
            Self::ValidationError(_inner) =>
         422  +
            /* OperationErrorGenerator.kt:169 */
         423  +
            {
         424  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         425  +
            }
         426  +
            ,
         427  +
            /* OperationErrorGenerator.kt:321 */
         428  +
            Self::ResourceNotFoundError(_inner) =>
         429  +
            /* OperationErrorGenerator.kt:169 */
         430  +
            {
         431  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         432  +
            }
         433  +
            ,
         434  +
            /* OperationErrorGenerator.kt:326 */
         435  +
            Self::Unhandled(_inner) => {
         436  +
                /* OperationErrorGenerator.kt:168 */
         437  +
                &_inner.meta
         438  +
                /* OperationErrorGenerator.kt:326 */
         439  +
            } /* OperationErrorGenerator.kt:318 */
  332    440   
        }
         441  +
        /* OperationErrorGenerator.kt:164 */
  333    442   
    }
         443  +
    /* OperationErrorGenerator.kt:163 */
  334    444   
}
         445  +
/* OperationErrorGenerator.kt:109 */
  335    446   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetPokemonSpeciesError {
         447  +
    /* OperationErrorGenerator.kt:110 */
  336    448   
    fn create_unhandled_error(
  337    449   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  338    450   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  339    451   
    ) -> Self {
         452  +
        /* OperationErrorGenerator.kt:121 */
  340    453   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  341    454   
            source,
  342    455   
            meta: meta.unwrap_or_default(),
  343    456   
        })
         457  +
        /* OperationErrorGenerator.kt:110 */
  344    458   
    }
         459  +
    /* OperationErrorGenerator.kt:109 */
  345    460   
}
  346    461   
         462  +
/* CodegenDelegator.kt:255 */
  347    463   
pub use crate::operation::get_pokemon_species::_get_pokemon_species_output::GetPokemonSpeciesOutput;
  348    464   
         465  +
/* CodegenDelegator.kt:255 */
  349    466   
pub use crate::operation::get_pokemon_species::_get_pokemon_species_input::GetPokemonSpeciesInput;
  350    467   
         468  +
/* RustModule.kt:172 */
  351    469   
mod _get_pokemon_species_input;
  352    470   
         471  +
/* RustModule.kt:172 */
  353    472   
mod _get_pokemon_species_output;
  354    473   
  355         -
/// Builders
         474  +
/// /* CodegenDelegator.kt:51 */Builders
  356    475   
pub mod builders;

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_pokemon_species/_get_pokemon_species_input.rs

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

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_pokemon_species/_get_pokemon_species_output.rs

@@ -1,1 +95,143 @@
    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 GetPokemonSpeciesOutput {
    6         -
    /// The name for this resource.
           8  +
pub /* StructureGenerator.kt:201 */ struct GetPokemonSpeciesOutput {
           9  +
    /// /* StructureGenerator.kt:231 */The name for this resource.
    7     10   
    pub name: ::std::string::String,
    8         -
    /// A list of flavor text entries for this Pokémon species.
          11  +
    /// /* StructureGenerator.kt:231 */A list of flavor text entries for this Pokémon species.
    9     12   
    pub flavor_text_entries: ::std::vec::Vec<crate::types::FlavorText>,
          13  +
    /* StructureGenerator.kt:201 */
   10     14   
}
          15  +
/* StructureGenerator.kt:135 */
   11     16   
impl GetPokemonSpeciesOutput {
   12         -
    /// The name for this resource.
          17  +
    /// /* StructureGenerator.kt:231 */The name for this resource.
          18  +
    /* StructureGenerator.kt:166 */
   13     19   
    pub fn name(&self) -> &str {
          20  +
        /* StructureGenerator.kt:171 */
   14     21   
        use std::ops::Deref;
   15     22   
        self.name.deref()
          23  +
        /* StructureGenerator.kt:166 */
   16     24   
    }
   17         -
    /// A list of flavor text entries for this Pokémon species.
          25  +
    /// /* StructureGenerator.kt:231 */A list of flavor text entries for this Pokémon species.
          26  +
    /* StructureGenerator.kt:166 */
   18     27   
    pub fn flavor_text_entries(&self) -> &[crate::types::FlavorText] {
          28  +
        /* StructureGenerator.kt:171 */
   19     29   
        use std::ops::Deref;
   20     30   
        self.flavor_text_entries.deref()
          31  +
        /* StructureGenerator.kt:166 */
   21     32   
    }
          33  +
    /* StructureGenerator.kt:135 */
   22     34   
}
          35  +
/* ClientCodegenVisitor.kt:237 */
   23     36   
impl GetPokemonSpeciesOutput {
   24         -
    /// Creates a new builder-style object to manufacture [`GetPokemonSpeciesOutput`](crate::operation::get_pokemon_species::GetPokemonSpeciesOutput).
          37  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`GetPokemonSpeciesOutput`](crate::operation::get_pokemon_species::GetPokemonSpeciesOutput).
          38  +
    /* BuilderGenerator.kt:175 */
   25     39   
    pub fn builder() -> crate::operation::get_pokemon_species::builders::GetPokemonSpeciesOutputBuilder {
          40  +
        /* BuilderGenerator.kt:176 */
   26     41   
        crate::operation::get_pokemon_species::builders::GetPokemonSpeciesOutputBuilder::default()
          42  +
        /* BuilderGenerator.kt:175 */
   27     43   
    }
          44  +
    /* ClientCodegenVisitor.kt:237 */
   28     45   
}
   29     46   
   30         -
/// A builder for [`GetPokemonSpeciesOutput`](crate::operation::get_pokemon_species::GetPokemonSpeciesOutput).
          47  +
/// /* BuilderGenerator.kt:342 */A builder for [`GetPokemonSpeciesOutput`](crate::operation::get_pokemon_species::GetPokemonSpeciesOutput).
          48  +
/* RustType.kt:516 */
   31     49   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          50  +
/* RustType.kt:516 */
   32     51   
#[non_exhaustive]
          52  +
/* BuilderGenerator.kt:345 */
   33     53   
pub struct GetPokemonSpeciesOutputBuilder {
   34         -
    pub(crate) name: ::std::option::Option<::std::string::String>,
          54  +
    /* BuilderGenerator.kt:275 */ pub(crate) name: ::std::option::Option<::std::string::String>,
          55  +
    /* BuilderGenerator.kt:275 */
   35     56   
    pub(crate) flavor_text_entries: ::std::option::Option<::std::vec::Vec<crate::types::FlavorText>>,
          57  +
    /* BuilderGenerator.kt:345 */
   36     58   
}
          59  +
/* BuilderGenerator.kt:355 */
   37     60   
impl GetPokemonSpeciesOutputBuilder {
   38         -
    /// The name for this resource.
   39         -
    /// This field is required.
          61  +
    /// /* BuilderGenerator.kt:286 */The name for this resource.
          62  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          63  +
    /* BuilderGenerator.kt:291 */
   40     64   
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          65  +
        /* BuilderGenerator.kt:292 */
   41     66   
        self.name = ::std::option::Option::Some(input.into());
          67  +
        /* BuilderGenerator.kt:293 */
   42     68   
        self
          69  +
        /* BuilderGenerator.kt:291 */
   43     70   
    }
   44         -
    /// The name for this resource.
          71  +
    /// /* BuilderGenerator.kt:312 */The name for this resource.
          72  +
    /* BuilderGenerator.kt:314 */
   45     73   
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          74  +
        /* BuilderGenerator.kt:315 */
   46     75   
        self.name = input;
   47     76   
        self
          77  +
        /* BuilderGenerator.kt:314 */
   48     78   
    }
   49         -
    /// The name for this resource.
          79  +
    /// /* BuilderGenerator.kt:334 */The name for this resource.
          80  +
    /* BuilderGenerator.kt:336 */
   50     81   
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
          82  +
        /* BuilderGenerator.kt:337 */
   51     83   
        &self.name
          84  +
        /* BuilderGenerator.kt:336 */
   52     85   
    }
   53         -
    /// Appends an item to `flavor_text_entries`.
          86  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `flavor_text_entries`.
          87  +
    /* BuilderGenerator.kt:411 */
   54     88   
    ///
   55         -
    /// To override the contents of this collection use [`set_flavor_text_entries`](Self::set_flavor_text_entries).
          89  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_flavor_text_entries`](Self::set_flavor_text_entries).
          90  +
    /* BuilderGenerator.kt:413 */
   56     91   
    ///
   57         -
    /// A list of flavor text entries for this Pokémon species.
          92  +
    /// /* BuilderGenerator.kt:414 */A list of flavor text entries for this Pokémon species.
          93  +
    /* BuilderGenerator.kt:418 */
   58     94   
    pub fn flavor_text_entries(mut self, input: crate::types::FlavorText) -> Self {
          95  +
        /* BuilderGenerator.kt:419 */
   59     96   
        let mut v = self.flavor_text_entries.unwrap_or_default();
   60     97   
        v.push(input);
   61     98   
        self.flavor_text_entries = ::std::option::Option::Some(v);
   62     99   
        self
         100  +
        /* BuilderGenerator.kt:418 */
   63    101   
    }
   64         -
    /// A list of flavor text entries for this Pokémon species.
         102  +
    /// /* BuilderGenerator.kt:312 */A list of flavor text entries for this Pokémon species.
         103  +
    /* BuilderGenerator.kt:314 */
   65    104   
    pub fn set_flavor_text_entries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FlavorText>>) -> Self {
         105  +
        /* BuilderGenerator.kt:315 */
   66    106   
        self.flavor_text_entries = input;
   67    107   
        self
         108  +
        /* BuilderGenerator.kt:314 */
   68    109   
    }
   69         -
    /// A list of flavor text entries for this Pokémon species.
         110  +
    /// /* BuilderGenerator.kt:334 */A list of flavor text entries for this Pokémon species.
         111  +
    /* BuilderGenerator.kt:336 */
   70    112   
    pub fn get_flavor_text_entries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FlavorText>> {
         113  +
        /* BuilderGenerator.kt:337 */
   71    114   
        &self.flavor_text_entries
         115  +
        /* BuilderGenerator.kt:336 */
   72    116   
    }
   73         -
    /// Consumes the builder and constructs a [`GetPokemonSpeciesOutput`](crate::operation::get_pokemon_species::GetPokemonSpeciesOutput).
   74         -
    /// This method will fail if any of the following fields are not set:
   75         -
    /// - [`name`](crate::operation::get_pokemon_species::builders::GetPokemonSpeciesOutputBuilder::name)
   76         -
    /// - [`flavor_text_entries`](crate::operation::get_pokemon_species::builders::GetPokemonSpeciesOutputBuilder::flavor_text_entries)
         117  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`GetPokemonSpeciesOutput`](crate::operation::get_pokemon_species::GetPokemonSpeciesOutput).
         118  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         119  +
    /// /* BuilderGenerator.kt:246 */- [`name`](crate::operation::get_pokemon_species::builders::GetPokemonSpeciesOutputBuilder::name)
         120  +
    /// /* BuilderGenerator.kt:246 */- [`flavor_text_entries`](crate::operation::get_pokemon_species::builders::GetPokemonSpeciesOutputBuilder::flavor_text_entries)
         121  +
    /* BuilderGenerator.kt:253 */
   77    122   
    pub fn build(
   78    123   
        self,
   79    124   
    ) -> ::std::result::Result<crate::operation::get_pokemon_species::GetPokemonSpeciesOutput, ::aws_smithy_types::error::operation::BuildError> {
   80         -
        ::std::result::Result::Ok(crate::operation::get_pokemon_species::GetPokemonSpeciesOutput {
   81         -
            name: self.name.ok_or_else(|| {
   82         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   83         -
                    "name",
   84         -
                    "name was not specified but it is required when building GetPokemonSpeciesOutput",
   85         -
                )
   86         -
            })?,
   87         -
            flavor_text_entries: self.flavor_text_entries.ok_or_else(|| {
   88         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   89         -
                    "flavor_text_entries",
   90         -
                    "flavor_text_entries was not specified but it is required when building GetPokemonSpeciesOutput",
   91         -
                )
   92         -
            })?,
   93         -
        })
         125  +
        /* BuilderGenerator.kt:254 */
         126  +
        ::std::result::Result::Ok(
         127  +
            /* BuilderGenerator.kt:477 */crate::operation::get_pokemon_species::GetPokemonSpeciesOutput {
         128  +
                /* BuilderGenerator.kt:481 */name: self.name
         129  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         130  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("name", "name was not specified but it is required when building GetPokemonSpeciesOutput")
         131  +
                    /* BuilderGenerator.kt:494 */)?
         132  +
                ,
         133  +
                /* BuilderGenerator.kt:481 */flavor_text_entries: self.flavor_text_entries
         134  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         135  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("flavor_text_entries", "flavor_text_entries was not specified but it is required when building GetPokemonSpeciesOutput")
         136  +
                    /* BuilderGenerator.kt:494 */)?
         137  +
                ,
         138  +
            /* BuilderGenerator.kt:477 */}
         139  +
        /* BuilderGenerator.kt:254 */)
         140  +
        /* BuilderGenerator.kt:253 */
   94    141   
    }
         142  +
    /* BuilderGenerator.kt:355 */
   95    143   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_pokemon_species/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::get_pokemon_species::_get_pokemon_species_output::GetPokemonSpeciesOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::get_pokemon_species::_get_pokemon_species_input::GetPokemonSpeciesInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::get_pokemon_species::builders::GetPokemonSpeciesInputBuilder {
    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::get_pokemon_species::GetPokemonSpeciesOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::get_pokemon_species::GetPokemonSpeciesError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.get_pokemon_species();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `GetPokemonSpecies`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `GetPokemonSpecies`.
   24     27   
///
   25         -
/// Retrieve information about a Pokémon species.
          28  +
/// /* FluentBuilderGenerator.kt:130 */Retrieve information about a Pokémon species.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct GetPokemonSpeciesFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::get_pokemon_species::builders::GetPokemonSpeciesInputBuilder,
   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::get_pokemon_species::GetPokemonSpeciesOutput,
   35     41   
        crate::operation::get_pokemon_species::GetPokemonSpeciesError,
   36     42   
    > for GetPokemonSpeciesFluentBuilder
   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::get_pokemon_species::GetPokemonSpeciesOutput,
   44     50   
            crate::operation::get_pokemon_species::GetPokemonSpeciesError,
   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 GetPokemonSpeciesFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `GetPokemonSpeciesFluentBuilder`.
   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 GetPokemonSpecies as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::get_pokemon_species::builders::GetPokemonSpeciesInputBuilder {
   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::get_pokemon_species::GetPokemonSpeciesOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::get_pokemon_species::GetPokemonSpeciesError,
   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::get_pokemon_species::GetPokemonSpecies::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::get_pokemon_species::GetPokemonSpecies::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::get_pokemon_species::GetPokemonSpeciesOutput,
   97    107   
        crate::operation::get_pokemon_species::GetPokemonSpeciesError,
   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 name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.name(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_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_name(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_name(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_name()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:282 */
  125    143   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_server_statistics.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 `GetServerStatistics`.
           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 GetServerStatistics;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl GetServerStatistics {
    7         -
    /// Creates a new `GetServerStatistics`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `GetServerStatistics`
          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::get_server_statistics::GetServerStatisticsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::get_server_statistics::GetServerStatisticsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::get_server_statistics::GetServerStatisticsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +331,402 @@
   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 GetServerStatistics {
   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("GetServerStatistics");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            GetServerStatisticsRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            GetServerStatisticsResponseDeserializer,
  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   
            "GetServerStatistics",
  111    122   
            "PokemonService",
  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("GetServerStatistics")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(GetServerStatisticsEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::get_server_statistics::GetServerStatisticsError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::get_server_statistics::GetServerStatisticsError,
  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 GetServerStatisticsResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetServerStatisticsResponseDeserializer {
  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_get_server_statistics::de_get_server_statistics_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_get_server_statistics::de_get_server_statistics_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 GetServerStatisticsRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetServerStatisticsRequestSerializer {
  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::get_server_statistics::GetServerStatisticsInput>()
  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::get_server_statistics::GetServerStatisticsInput,
  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, "/stats").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::get_server_statistics::GetServerStatisticsInput,
  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 GetServerStatisticsEndpointParamsInterceptor;
  201    215   
  202    216   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetServerStatisticsEndpointParamsInterceptor {
  203    217   
    fn name(&self) -> &'static str {
  204    218   
        "GetServerStatisticsEndpointParamsInterceptor"
  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::<GetServerStatisticsInput>()
  220    234   
            .ok_or("failed to downcast to GetServerStatisticsInput")?;
  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  +
/* OperationErrorGenerator.kt:79 */
  234    249   
/// Error type for the `GetServerStatisticsError` operation.
         250  +
/* RustType.kt:516 */
  235    251   
#[non_exhaustive]
         252  +
/* RustType.kt:516 */
  236    253   
#[derive(::std::fmt::Debug)]
  237         -
pub enum GetServerStatisticsError {
         254  +
pub /* OperationErrorGenerator.kt:81 */ enum GetServerStatisticsError {
         255  +
    /* OperationErrorGenerator.kt:88 */
  238    256   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  239    257   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  240    258   
    variable wildcard pattern and check `.code()`:
  241    259   
     \
  242    260   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  243    261   
     \
  244    262   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetServerStatisticsError) for what information is available for the error.")]
  245    263   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         264  +
    /* OperationErrorGenerator.kt:81 */
  246    265   
}
         266  +
/* OperationErrorGenerator.kt:218 */
  247    267   
impl GetServerStatisticsError {
         268  +
    /* OperationErrorGenerator.kt:219 */
  248    269   
    /// Creates the `GetServerStatisticsError::Unhandled` variant from any error type.
  249    270   
    pub fn unhandled(
  250    271   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  251    272   
    ) -> Self {
  252    273   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  253    274   
            source: err.into(),
  254    275   
            meta: ::std::default::Default::default(),
  255    276   
        })
  256    277   
    }
  257    278   
  258    279   
    /// Creates the `GetServerStatisticsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  259    280   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  260    281   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  261    282   
            source: err.clone().into(),
  262    283   
            meta: err,
  263    284   
        })
  264    285   
    }
  265         -
    ///
         286  +
    /// /* OperationErrorGenerator.kt:236 */
  266    287   
    /// Returns error metadata, which includes the error code, message,
  267    288   
    /// request ID, and potentially additional information.
  268    289   
    ///
         290  +
    /* OperationErrorGenerator.kt:242 */
  269    291   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         292  +
        /* OperationErrorGenerator.kt:243 */
  270    293   
        match self {
  271         -
            Self::Unhandled(e) => &e.meta,
         294  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         295  +
            /* OperationErrorGenerator.kt:243 */
  272    296   
        }
         297  +
        /* OperationErrorGenerator.kt:242 */
  273    298   
    }
         299  +
    /* OperationErrorGenerator.kt:218 */
  274    300   
}
         301  +
/* OperationErrorGenerator.kt:269 */
  275    302   
impl ::std::error::Error for GetServerStatisticsError {
         303  +
    /* OperationErrorGenerator.kt:270 */
  276    304   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         305  +
        /* OperationErrorGenerator.kt:318 */
  277    306   
        match self {
  278         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         307  +
            /* OperationErrorGenerator.kt:326 */
         308  +
            Self::Unhandled(_inner) => {
         309  +
                /* OperationErrorGenerator.kt:279 */
         310  +
                ::std::option::Option::Some(&*_inner.source)
         311  +
                /* OperationErrorGenerator.kt:326 */
         312  +
            } /* OperationErrorGenerator.kt:318 */
  279    313   
        }
         314  +
        /* OperationErrorGenerator.kt:270 */
  280    315   
    }
         316  +
    /* OperationErrorGenerator.kt:269 */
  281    317   
}
         318  +
/* OperationErrorGenerator.kt:133 */
  282    319   
impl ::std::fmt::Display for GetServerStatisticsError {
         320  +
    /* OperationErrorGenerator.kt:134 */
  283    321   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         322  +
        /* OperationErrorGenerator.kt:318 */
  284    323   
        match self {
         324  +
            /* OperationErrorGenerator.kt:326 */
  285    325   
            Self::Unhandled(_inner) => {
         326  +
                /* OperationErrorGenerator.kt:139 */
  286    327   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  287    328   
                    write!(f, "unhandled error ({code})")
  288    329   
                } else {
  289    330   
                    f.write_str("unhandled error")
  290    331   
                }
         332  +
                /* OperationErrorGenerator.kt:326 */
         333  +
            } /* OperationErrorGenerator.kt:318 */
  291    334   
        }
         335  +
        /* OperationErrorGenerator.kt:134 */
  292    336   
    }
  293         -
    }
         337  +
    /* OperationErrorGenerator.kt:133 */
  294    338   
}
         339  +
/* OperationErrorGenerator.kt:182 */
  295    340   
impl ::aws_smithy_types::retry::ProvideErrorKind for GetServerStatisticsError {
         341  +
    /* OperationErrorGenerator.kt:186 */
  296    342   
    fn code(&self) -> ::std::option::Option<&str> {
         343  +
        /* OperationErrorGenerator.kt:187 */
  297    344   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         345  +
        /* OperationErrorGenerator.kt:186 */
  298    346   
    }
         347  +
    /* OperationErrorGenerator.kt:190 */
  299    348   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         349  +
        /* OperationErrorGenerator.kt:197 */
  300    350   
        ::std::option::Option::None
         351  +
        /* OperationErrorGenerator.kt:190 */
  301    352   
    }
         353  +
    /* OperationErrorGenerator.kt:182 */
  302    354   
}
         355  +
/* OperationErrorGenerator.kt:163 */
  303    356   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetServerStatisticsError {
         357  +
    /* OperationErrorGenerator.kt:164 */
  304    358   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         359  +
        /* OperationErrorGenerator.kt:318 */
  305    360   
        match self {
  306         -
            Self::Unhandled(_inner) => &_inner.meta,
         361  +
            /* OperationErrorGenerator.kt:326 */
         362  +
            Self::Unhandled(_inner) => {
         363  +
                /* OperationErrorGenerator.kt:168 */
         364  +
                &_inner.meta
         365  +
                /* OperationErrorGenerator.kt:326 */
         366  +
            } /* OperationErrorGenerator.kt:318 */
  307    367   
        }
         368  +
        /* OperationErrorGenerator.kt:164 */
  308    369   
    }
         370  +
    /* OperationErrorGenerator.kt:163 */
  309    371   
}
         372  +
/* OperationErrorGenerator.kt:109 */
  310    373   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetServerStatisticsError {
         374  +
    /* OperationErrorGenerator.kt:110 */
  311    375   
    fn create_unhandled_error(
  312    376   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  313    377   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  314    378   
    ) -> Self {
         379  +
        /* OperationErrorGenerator.kt:121 */
  315    380   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  316    381   
            source,
  317    382   
            meta: meta.unwrap_or_default(),
  318    383   
        })
         384  +
        /* OperationErrorGenerator.kt:110 */
  319    385   
    }
         386  +
    /* OperationErrorGenerator.kt:109 */
  320    387   
}
  321    388   
         389  +
/* CodegenDelegator.kt:255 */
  322    390   
pub use crate::operation::get_server_statistics::_get_server_statistics_output::GetServerStatisticsOutput;
  323    391   
         392  +
/* CodegenDelegator.kt:255 */
  324    393   
pub use crate::operation::get_server_statistics::_get_server_statistics_input::GetServerStatisticsInput;
  325    394   
         395  +
/* RustModule.kt:172 */
  326    396   
mod _get_server_statistics_input;
  327    397   
         398  +
/* RustModule.kt:172 */
  328    399   
mod _get_server_statistics_output;
  329    400   
  330         -
/// Builders
         401  +
/// /* CodegenDelegator.kt:51 */Builders
  331    402   
pub mod builders;