Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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   
                }
  283         -
            }
         324  +
                /* OperationErrorGenerator.kt:326 */
         325  +
            } /* OperationErrorGenerator.kt:318 */
  284    326   
        }
         327  +
        /* OperationErrorGenerator.kt:134 */
  285    328   
    }
         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   
                }
  314         -
            }
         391  +
                /* OperationErrorGenerator.kt:326 */
         392  +
            } /* OperationErrorGenerator.kt:318 */
  315    393   
        }
         394  +
        /* OperationErrorGenerator.kt:134 */
  316    395   
    }
         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   
                }
  291         -
            }
         332  +
                /* OperationErrorGenerator.kt:326 */
         333  +
            } /* OperationErrorGenerator.kt:318 */
  292    334   
        }
         335  +
        /* OperationErrorGenerator.kt:134 */
  293    336   
    }
         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;

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_server_statistics/_get_server_statistics_input.rs

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

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_server_statistics/_get_server_statistics_output.rs

@@ -1,1 +60,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 GetServerStatisticsOutput {
    6         -
    /// The number of calls executed by the server.
           8  +
pub /* StructureGenerator.kt:201 */ struct GetServerStatisticsOutput {
           9  +
    /// /* StructureGenerator.kt:231 */The number of calls executed by the server.
    7     10   
    pub calls_count: i64,
          11  +
    /* StructureGenerator.kt:201 */
    8     12   
}
          13  +
/* StructureGenerator.kt:135 */
    9     14   
impl GetServerStatisticsOutput {
   10         -
    /// The number of calls executed by the server.
          15  +
    /// /* StructureGenerator.kt:231 */The number of calls executed by the server.
          16  +
    /* StructureGenerator.kt:166 */
   11     17   
    pub fn calls_count(&self) -> i64 {
          18  +
        /* StructureGenerator.kt:168 */
   12     19   
        self.calls_count
          20  +
        /* StructureGenerator.kt:166 */
   13     21   
    }
          22  +
    /* StructureGenerator.kt:135 */
   14     23   
}
          24  +
/* ClientCodegenVisitor.kt:237 */
   15     25   
impl GetServerStatisticsOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`GetServerStatisticsOutput`](crate::operation::get_server_statistics::GetServerStatisticsOutput).
          26  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`GetServerStatisticsOutput`](crate::operation::get_server_statistics::GetServerStatisticsOutput).
          27  +
    /* BuilderGenerator.kt:175 */
   17     28   
    pub fn builder() -> crate::operation::get_server_statistics::builders::GetServerStatisticsOutputBuilder {
          29  +
        /* BuilderGenerator.kt:176 */
   18     30   
        crate::operation::get_server_statistics::builders::GetServerStatisticsOutputBuilder::default()
          31  +
        /* BuilderGenerator.kt:175 */
   19     32   
    }
          33  +
    /* ClientCodegenVisitor.kt:237 */
   20     34   
}
   21     35   
   22         -
/// A builder for [`GetServerStatisticsOutput`](crate::operation::get_server_statistics::GetServerStatisticsOutput).
          36  +
/// /* BuilderGenerator.kt:342 */A builder for [`GetServerStatisticsOutput`](crate::operation::get_server_statistics::GetServerStatisticsOutput).
          37  +
/* RustType.kt:516 */
   23     38   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          39  +
/* RustType.kt:516 */
   24     40   
#[non_exhaustive]
          41  +
/* BuilderGenerator.kt:345 */
   25     42   
pub struct GetServerStatisticsOutputBuilder {
   26         -
    pub(crate) calls_count: ::std::option::Option<i64>,
          43  +
    /* BuilderGenerator.kt:275 */ pub(crate) calls_count: ::std::option::Option<i64>,
          44  +
    /* BuilderGenerator.kt:345 */
   27     45   
}
          46  +
/* BuilderGenerator.kt:355 */
   28     47   
impl GetServerStatisticsOutputBuilder {
   29         -
    /// The number of calls executed by the server.
   30         -
    /// This field is required.
          48  +
    /// /* BuilderGenerator.kt:286 */The number of calls executed by the server.
          49  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          50  +
    /* BuilderGenerator.kt:291 */
   31     51   
    pub fn calls_count(mut self, input: i64) -> Self {
          52  +
        /* BuilderGenerator.kt:292 */
   32     53   
        self.calls_count = ::std::option::Option::Some(input);
          54  +
        /* BuilderGenerator.kt:293 */
   33     55   
        self
          56  +
        /* BuilderGenerator.kt:291 */
   34     57   
    }
   35         -
    /// The number of calls executed by the server.
          58  +
    /// /* BuilderGenerator.kt:312 */The number of calls executed by the server.
          59  +
    /* BuilderGenerator.kt:314 */
   36     60   
    pub fn set_calls_count(mut self, input: ::std::option::Option<i64>) -> Self {
          61  +
        /* BuilderGenerator.kt:315 */
   37     62   
        self.calls_count = input;
   38     63   
        self
          64  +
        /* BuilderGenerator.kt:314 */
   39     65   
    }
   40         -
    /// The number of calls executed by the server.
          66  +
    /// /* BuilderGenerator.kt:334 */The number of calls executed by the server.
          67  +
    /* BuilderGenerator.kt:336 */
   41     68   
    pub fn get_calls_count(&self) -> &::std::option::Option<i64> {
          69  +
        /* BuilderGenerator.kt:337 */
   42     70   
        &self.calls_count
          71  +
        /* BuilderGenerator.kt:336 */
   43     72   
    }
   44         -
    /// Consumes the builder and constructs a [`GetServerStatisticsOutput`](crate::operation::get_server_statistics::GetServerStatisticsOutput).
   45         -
    /// This method will fail if any of the following fields are not set:
   46         -
    /// - [`calls_count`](crate::operation::get_server_statistics::builders::GetServerStatisticsOutputBuilder::calls_count)
          73  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`GetServerStatisticsOutput`](crate::operation::get_server_statistics::GetServerStatisticsOutput).
          74  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
          75  +
    /// /* BuilderGenerator.kt:246 */- [`calls_count`](crate::operation::get_server_statistics::builders::GetServerStatisticsOutputBuilder::calls_count)
          76  +
    /* BuilderGenerator.kt:253 */
   47     77   
    pub fn build(
   48     78   
        self,
   49     79   
    ) -> ::std::result::Result<crate::operation::get_server_statistics::GetServerStatisticsOutput, ::aws_smithy_types::error::operation::BuildError>
   50     80   
    {
   51         -
        ::std::result::Result::Ok(crate::operation::get_server_statistics::GetServerStatisticsOutput {
   52         -
            calls_count: self.calls_count.ok_or_else(|| {
   53         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   54         -
                    "calls_count",
   55         -
                    "calls_count was not specified but it is required when building GetServerStatisticsOutput",
   56         -
                )
   57         -
            })?,
   58         -
        })
          81  +
        /* BuilderGenerator.kt:254 */
          82  +
        ::std::result::Result::Ok(
          83  +
            /* BuilderGenerator.kt:477 */crate::operation::get_server_statistics::GetServerStatisticsOutput {
          84  +
                /* BuilderGenerator.kt:481 */calls_count: self.calls_count
          85  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
          86  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("calls_count", "calls_count was not specified but it is required when building GetServerStatisticsOutput")
          87  +
                    /* BuilderGenerator.kt:494 */)?
          88  +
                ,
          89  +
            /* BuilderGenerator.kt:477 */}
          90  +
        /* BuilderGenerator.kt:254 */)
          91  +
        /* BuilderGenerator.kt:253 */
   59     92   
    }
          93  +
    /* BuilderGenerator.kt:355 */
   60     94   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_server_statistics/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::get_server_statistics::_get_server_statistics_output::GetServerStatisticsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::get_server_statistics::_get_server_statistics_input::GetServerStatisticsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::get_server_statistics::builders::GetServerStatisticsInputBuilder {
    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_server_statistics::GetServerStatisticsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::get_server_statistics::GetServerStatisticsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.get_server_statistics();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `GetServerStatistics`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `GetServerStatistics`.
   24     27   
///
   25         -
/// Retrieve HTTP server statistiscs, such as calls count.
          28  +
/// /* FluentBuilderGenerator.kt:130 */Retrieve HTTP server statistiscs, such as calls count.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct GetServerStatisticsFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::get_server_statistics::builders::GetServerStatisticsInputBuilder,
   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_server_statistics::GetServerStatisticsOutput,
   35     41   
        crate::operation::get_server_statistics::GetServerStatisticsError,
   36     42   
    > for GetServerStatisticsFluentBuilder
   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_server_statistics::GetServerStatisticsOutput,
   44     50   
            crate::operation::get_server_statistics::GetServerStatisticsError,
   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 GetServerStatisticsFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `GetServerStatisticsFluentBuilder`.
   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 GetServerStatistics as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::get_server_statistics::builders::GetServerStatisticsInputBuilder {
   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_server_statistics::GetServerStatisticsOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::get_server_statistics::GetServerStatisticsError,
   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_server_statistics::GetServerStatistics::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_server_statistics::GetServerStatistics::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_server_statistics::GetServerStatisticsOutput,
   97    107   
        crate::operation::get_server_statistics::GetServerStatisticsError,
   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/get_storage.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 `GetStorage`.
           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 GetStorage;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl GetStorage {
    7         -
    /// Creates a new `GetStorage`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `GetStorage`
          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_storage::GetStorageInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::get_storage::GetStorageOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::get_storage::GetStorageError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +365,508 @@
   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 GetStorage {
   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("GetStorage");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            GetStorageRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            GetStorageResponseDeserializer,
   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   
            "GetStorage",
  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("GetStorage")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(GetStorageEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::get_storage::GetStorageError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::get_storage::GetStorageError,
  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 GetStorageResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetStorageResponseDeserializer {
  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_storage::de_get_storage_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_get_storage::de_get_storage_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 GetStorageRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetStorageRequestSerializer {
  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::get_storage::GetStorageInput>().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::get_storage::GetStorageInput,
  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   
                let input_1 = &_input.user;
  172    185   
                let input_1 = input_1
  173    186   
                    .as_ref()
  174    187   
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("user", "cannot be empty or unset"))?;
  175    188   
                let user = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  176    189   
                if user.is_empty() {
  177    190   
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  178    191   
                        "user",
  179    192   
                        "cannot be empty or unset",
  180    193   
                    ));
  181    194   
                }
  182    195   
                ::std::write!(output, "/pokedex/{user}", user = user).expect("formatting should succeed");
  183    196   
                ::std::result::Result::Ok(())
  184    197   
            }
  185    198   
            #[allow(clippy::unnecessary_wraps)]
  186    199   
            fn update_http_builder(
  187    200   
                input: &crate::operation::get_storage::GetStorageInput,
  188    201   
                builder: ::http::request::Builder,
  189    202   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  190    203   
                let mut uri = ::std::string::String::new();
  191    204   
                uri_base(input, &mut uri)?;
  192    205   
                let builder = crate::protocol_serde::shape_get_storage::ser_get_storage_headers(input, builder)?;
  193    206   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  194    207   
            }
  195    208   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  196    209   
            builder
  197    210   
        };
  198    211   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  199    212   
  200    213   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  201    214   
    }
  202    215   
}
         216  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  203    217   
#[derive(Debug)]
  204    218   
struct GetStorageEndpointParamsInterceptor;
  205    219   
  206    220   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetStorageEndpointParamsInterceptor {
  207    221   
    fn name(&self) -> &'static str {
  208    222   
        "GetStorageEndpointParamsInterceptor"
  209    223   
    }
  210    224   
  211    225   
    fn read_before_execution(
  212    226   
        &self,
  213    227   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  214    228   
            '_,
  215    229   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  216    230   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  218    232   
        >,
  219    233   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  220    234   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  221    235   
        let _input = context
  222    236   
            .input()
  223    237   
            .downcast_ref::<GetStorageInput>()
  224    238   
            .ok_or("failed to downcast to GetStorageInput")?;
  225    239   
  226    240   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  227    241   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  228    242   
        })?;
  229    243   
        cfg.interceptor_state()
  230    244   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  231    245   
        ::std::result::Result::Ok(())
  232    246   
    }
  233    247   
}
  234    248   
  235    249   
// The get_* functions below are generated from JMESPath expressions in the
  236    250   
// operationContextParams trait. They target the operation's input shape.
  237    251   
         252  +
/* OperationErrorGenerator.kt:79 */
  238    253   
/// Error type for the `GetStorageError` operation.
         254  +
/* RustType.kt:516 */
  239    255   
#[non_exhaustive]
         256  +
/* RustType.kt:516 */
  240    257   
#[derive(::std::fmt::Debug)]
  241         -
pub enum GetStorageError {
  242         -
    /// 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.
         258  +
pub /* OperationErrorGenerator.kt:81 */ enum GetStorageError {
         259  +
    /// /* 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.
         260  +
    /* OperationErrorGenerator.kt:86 */
  243    261   
    ValidationError(crate::types::error::ValidationError),
  244         -
    /// Not authorized to access Pokémon storage.
         262  +
    /// /* OperationErrorGenerator.kt:83 */Not authorized to access Pokémon storage.
         263  +
    /* OperationErrorGenerator.kt:86 */
  245    264   
    StorageAccessNotAuthorized(crate::types::error::StorageAccessNotAuthorized),
         265  +
    /* OperationErrorGenerator.kt:83 */
  246    266   
    #[allow(missing_docs)] // documentation missing in model
         267  +
    /* OperationErrorGenerator.kt:86 */
  247    268   
    ResourceNotFoundError(crate::types::error::ResourceNotFoundError),
         269  +
    /* OperationErrorGenerator.kt:88 */
  248    270   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  249    271   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  250    272   
    variable wildcard pattern and check `.code()`:
  251    273   
     \
  252    274   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  253    275   
     \
  254    276   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetStorageError) for what information is available for the error.")]
  255    277   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         278  +
    /* OperationErrorGenerator.kt:81 */
  256    279   
}
         280  +
/* OperationErrorGenerator.kt:218 */
  257    281   
impl GetStorageError {
         282  +
    /* OperationErrorGenerator.kt:219 */
  258    283   
    /// Creates the `GetStorageError::Unhandled` variant from any error type.
  259    284   
    pub fn unhandled(
  260    285   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  261    286   
    ) -> Self {
  262    287   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  263    288   
            source: err.into(),
  264    289   
            meta: ::std::default::Default::default(),
  265    290   
        })
  266    291   
    }
  267    292   
  268    293   
    /// Creates the `GetStorageError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  269    294   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  270    295   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  271    296   
            source: err.clone().into(),
  272    297   
            meta: err,
  273    298   
        })
  274    299   
    }
  275         -
    ///
         300  +
    /// /* OperationErrorGenerator.kt:236 */
  276    301   
    /// Returns error metadata, which includes the error code, message,
  277    302   
    /// request ID, and potentially additional information.
  278    303   
    ///
         304  +
    /* OperationErrorGenerator.kt:242 */
  279    305   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         306  +
        /* OperationErrorGenerator.kt:243 */
  280    307   
        match self {
  281         -
            Self::ValidationError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         308  +
            /* OperationErrorGenerator.kt:246 */ Self::ValidationError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         309  +
            /* OperationErrorGenerator.kt:246 */
  282    310   
            Self::StorageAccessNotAuthorized(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         311  +
            /* OperationErrorGenerator.kt:246 */
  283    312   
            Self::ResourceNotFoundError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  284         -
            Self::Unhandled(e) => &e.meta,
         313  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         314  +
            /* OperationErrorGenerator.kt:243 */
  285    315   
        }
         316  +
        /* OperationErrorGenerator.kt:242 */
  286    317   
    }
         318  +
    /* OperationErrorGenerator.kt:257 */
  287    319   
    /// Returns `true` if the error kind is `GetStorageError::ValidationError`.
         320  +
    /* OperationErrorGenerator.kt:258 */
  288    321   
    pub fn is_validation_error(&self) -> bool {
         322  +
        /* OperationErrorGenerator.kt:259 */
  289    323   
        matches!(self, Self::ValidationError(_))
         324  +
        /* OperationErrorGenerator.kt:258 */
  290    325   
    }
         326  +
    /* OperationErrorGenerator.kt:257 */
  291    327   
    /// Returns `true` if the error kind is `GetStorageError::StorageAccessNotAuthorized`.
         328  +
    /* OperationErrorGenerator.kt:258 */
  292    329   
    pub fn is_storage_access_not_authorized(&self) -> bool {
         330  +
        /* OperationErrorGenerator.kt:259 */
  293    331   
        matches!(self, Self::StorageAccessNotAuthorized(_))
         332  +
        /* OperationErrorGenerator.kt:258 */
  294    333   
    }
         334  +
    /* OperationErrorGenerator.kt:257 */
  295    335   
    /// Returns `true` if the error kind is `GetStorageError::ResourceNotFoundError`.
         336  +
    /* OperationErrorGenerator.kt:258 */
  296    337   
    pub fn is_resource_not_found_error(&self) -> bool {
         338  +
        /* OperationErrorGenerator.kt:259 */
  297    339   
        matches!(self, Self::ResourceNotFoundError(_))
         340  +
        /* OperationErrorGenerator.kt:258 */
  298    341   
    }
         342  +
    /* OperationErrorGenerator.kt:218 */
  299    343   
}
         344  +
/* OperationErrorGenerator.kt:269 */
  300    345   
impl ::std::error::Error for GetStorageError {
         346  +
    /* OperationErrorGenerator.kt:270 */
  301    347   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         348  +
        /* OperationErrorGenerator.kt:318 */
  302    349   
        match self {
  303         -
            Self::ValidationError(_inner) => ::std::option::Option::Some(_inner),
  304         -
            Self::StorageAccessNotAuthorized(_inner) => ::std::option::Option::Some(_inner),
  305         -
            Self::ResourceNotFoundError(_inner) => ::std::option::Option::Some(_inner),
  306         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         350  +
            /* OperationErrorGenerator.kt:321 */
         351  +
            Self::ValidationError(_inner) =>
         352  +
            /* OperationErrorGenerator.kt:283 */
         353  +
            {
         354  +
                ::std::option::Option::Some(_inner)
         355  +
            }
         356  +
            ,
         357  +
            /* OperationErrorGenerator.kt:321 */
         358  +
            Self::StorageAccessNotAuthorized(_inner) =>
         359  +
            /* OperationErrorGenerator.kt:283 */
         360  +
            {
         361  +
                ::std::option::Option::Some(_inner)
         362  +
            }
         363  +
            ,
         364  +
            /* OperationErrorGenerator.kt:321 */
         365  +
            Self::ResourceNotFoundError(_inner) =>
         366  +
            /* OperationErrorGenerator.kt:283 */
         367  +
            {
         368  +
                ::std::option::Option::Some(_inner)
         369  +
            }
         370  +
            ,
         371  +
            /* OperationErrorGenerator.kt:326 */
         372  +
            Self::Unhandled(_inner) => {
         373  +
                /* OperationErrorGenerator.kt:279 */
         374  +
                ::std::option::Option::Some(&*_inner.source)
         375  +
                /* OperationErrorGenerator.kt:326 */
         376  +
            } /* OperationErrorGenerator.kt:318 */
  307    377   
        }
         378  +
        /* OperationErrorGenerator.kt:270 */
  308    379   
    }
         380  +
    /* OperationErrorGenerator.kt:269 */
  309    381   
}
         382  +
/* OperationErrorGenerator.kt:133 */
  310    383   
impl ::std::fmt::Display for GetStorageError {
         384  +
    /* OperationErrorGenerator.kt:134 */
  311    385   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         386  +
        /* OperationErrorGenerator.kt:318 */
  312    387   
        match self {
  313         -
            Self::ValidationError(_inner) => _inner.fmt(f),
  314         -
            Self::StorageAccessNotAuthorized(_inner) => _inner.fmt(f),
  315         -
            Self::ResourceNotFoundError(_inner) => _inner.fmt(f),
         388  +
            /* OperationErrorGenerator.kt:321 */
         389  +
            Self::ValidationError(_inner) =>
         390  +
            /* OperationErrorGenerator.kt:151 */
         391  +
            {
         392  +
                _inner.fmt(f)
         393  +
            }
         394  +
            ,
         395  +
            /* OperationErrorGenerator.kt:321 */
         396  +
            Self::StorageAccessNotAuthorized(_inner) =>
         397  +
            /* OperationErrorGenerator.kt:151 */
         398  +
            {
         399  +
                _inner.fmt(f)
         400  +
            }
         401  +
            ,
         402  +
            /* OperationErrorGenerator.kt:321 */
         403  +
            Self::ResourceNotFoundError(_inner) =>
         404  +
            /* OperationErrorGenerator.kt:151 */
         405  +
            {
         406  +
                _inner.fmt(f)
         407  +
            }
         408  +
            ,
         409  +
            /* OperationErrorGenerator.kt:326 */
  316    410   
            Self::Unhandled(_inner) => {
         411  +
                /* OperationErrorGenerator.kt:139 */
  317    412   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  318    413   
                    write!(f, "unhandled error ({code})")
  319    414   
                } else {
  320    415   
                    f.write_str("unhandled error")
  321    416   
                }
  322         -
            }
         417  +
                /* OperationErrorGenerator.kt:326 */
         418  +
            } /* OperationErrorGenerator.kt:318 */
  323    419   
        }
         420  +
        /* OperationErrorGenerator.kt:134 */
  324    421   
    }
         422  +
    /* OperationErrorGenerator.kt:133 */
  325    423   
}
         424  +
/* OperationErrorGenerator.kt:182 */
  326    425   
impl ::aws_smithy_types::retry::ProvideErrorKind for GetStorageError {
         426  +
    /* OperationErrorGenerator.kt:186 */
  327    427   
    fn code(&self) -> ::std::option::Option<&str> {
         428  +
        /* OperationErrorGenerator.kt:187 */
  328    429   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         430  +
        /* OperationErrorGenerator.kt:186 */
  329    431   
    }
         432  +
    /* OperationErrorGenerator.kt:190 */
  330    433   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         434  +
        /* OperationErrorGenerator.kt:197 */
  331    435   
        ::std::option::Option::None
         436  +
        /* OperationErrorGenerator.kt:190 */
  332    437   
    }
         438  +
    /* OperationErrorGenerator.kt:182 */
  333    439   
}
         440  +
/* OperationErrorGenerator.kt:163 */
  334    441   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetStorageError {
         442  +
    /* OperationErrorGenerator.kt:164 */
  335    443   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         444  +
        /* OperationErrorGenerator.kt:318 */
  336    445   
        match self {
  337         -
            Self::ValidationError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  338         -
            Self::StorageAccessNotAuthorized(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  339         -
            Self::ResourceNotFoundError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  340         -
            Self::Unhandled(_inner) => &_inner.meta,
         446  +
            /* OperationErrorGenerator.kt:321 */
         447  +
            Self::ValidationError(_inner) =>
         448  +
            /* OperationErrorGenerator.kt:169 */
         449  +
            {
         450  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         451  +
            }
         452  +
            ,
         453  +
            /* OperationErrorGenerator.kt:321 */
         454  +
            Self::StorageAccessNotAuthorized(_inner) =>
         455  +
            /* OperationErrorGenerator.kt:169 */
         456  +
            {
         457  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         458  +
            }
         459  +
            ,
         460  +
            /* OperationErrorGenerator.kt:321 */
         461  +
            Self::ResourceNotFoundError(_inner) =>
         462  +
            /* OperationErrorGenerator.kt:169 */
         463  +
            {
         464  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         465  +
            }
         466  +
            ,
         467  +
            /* OperationErrorGenerator.kt:326 */
         468  +
            Self::Unhandled(_inner) => {
         469  +
                /* OperationErrorGenerator.kt:168 */
         470  +
                &_inner.meta
         471  +
                /* OperationErrorGenerator.kt:326 */
         472  +
            } /* OperationErrorGenerator.kt:318 */
  341    473   
        }
         474  +
        /* OperationErrorGenerator.kt:164 */
  342    475   
    }
         476  +
    /* OperationErrorGenerator.kt:163 */
  343    477   
}
         478  +
/* OperationErrorGenerator.kt:109 */
  344    479   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetStorageError {
         480  +
    /* OperationErrorGenerator.kt:110 */
  345    481   
    fn create_unhandled_error(
  346    482   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  347    483   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  348    484   
    ) -> Self {
         485  +
        /* OperationErrorGenerator.kt:121 */
  349    486   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  350    487   
            source,
  351    488   
            meta: meta.unwrap_or_default(),
  352    489   
        })
         490  +
        /* OperationErrorGenerator.kt:110 */
  353    491   
    }
         492  +
    /* OperationErrorGenerator.kt:109 */
  354    493   
}
  355    494   
         495  +
/* CodegenDelegator.kt:255 */
  356    496   
pub use crate::operation::get_storage::_get_storage_output::GetStorageOutput;
  357    497   
         498  +
/* CodegenDelegator.kt:255 */
  358    499   
pub use crate::operation::get_storage::_get_storage_input::GetStorageInput;
  359    500   
         501  +
/* RustModule.kt:172 */
  360    502   
mod _get_storage_input;
  361    503   
         504  +
/* RustModule.kt:172 */
  362    505   
mod _get_storage_output;
  363    506   
  364         -
/// Builders
         507  +
/// /* CodegenDelegator.kt:51 */Builders
  365    508   
pub mod builders;

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_storage/_get_storage_input.rs

@@ -1,1 +90,166 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// A request to access Pokémon storage.
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */A request to access Pokémon storage.
           4  +
/* RustType.kt:516 */
    4      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    5      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
    6         -
pub struct GetStorageInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct GetStorageInput {
           9  +
    /* StructureGenerator.kt:231 */
    7     10   
    #[allow(missing_docs)] // documentation missing in model
    8     11   
    pub user: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    9     13   
    #[allow(missing_docs)] // documentation missing in model
   10     14   
    pub passcode: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:201 */
   11     16   
}
          17  +
/* StructureGenerator.kt:135 */
   12     18   
impl GetStorageInput {
          19  +
    /* StructureGenerator.kt:231 */
   13     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   14     22   
    pub fn user(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   15     24   
        self.user.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   16     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   17     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   18     30   
    pub fn passcode(&self) -> ::std::option::Option<&str> {
          31  +
        /* StructureGenerator.kt:169 */
   19     32   
        self.passcode.as_deref()
          33  +
        /* StructureGenerator.kt:166 */
   20     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   21     36   
}
          37  +
/* StructureGenerator.kt:101 */
   22     38   
impl ::std::fmt::Debug for GetStorageInput {
          39  +
    /* StructureGenerator.kt:105 */
   23     40   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          41  +
        /* StructureGenerator.kt:106 */
   24     42   
        let mut formatter = f.debug_struct("GetStorageInput");
          43  +
        /* StructureGenerator.kt:121 */
   25     44   
        formatter.field("user", &"*** Sensitive Data Redacted ***");
          45  +
        /* StructureGenerator.kt:121 */
   26     46   
        formatter.field("passcode", &"*** Sensitive Data Redacted ***");
          47  +
        /* StructureGenerator.kt:126 */
   27     48   
        formatter.finish()
          49  +
        /* StructureGenerator.kt:105 */
   28     50   
    }
          51  +
    /* StructureGenerator.kt:101 */
   29     52   
}
          53  +
/* ClientCodegenVisitor.kt:237 */
   30     54   
impl GetStorageInput {
   31         -
    /// Creates a new builder-style object to manufacture [`GetStorageInput`](crate::operation::get_storage::GetStorageInput).
          55  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`GetStorageInput`](crate::operation::get_storage::GetStorageInput).
          56  +
    /* BuilderGenerator.kt:175 */
   32     57   
    pub fn builder() -> crate::operation::get_storage::builders::GetStorageInputBuilder {
          58  +
        /* BuilderGenerator.kt:176 */
   33     59   
        crate::operation::get_storage::builders::GetStorageInputBuilder::default()
          60  +
        /* BuilderGenerator.kt:175 */
   34     61   
    }
          62  +
    /* ClientCodegenVisitor.kt:237 */
   35     63   
}
   36     64   
   37         -
/// A builder for [`GetStorageInput`](crate::operation::get_storage::GetStorageInput).
          65  +
/// /* BuilderGenerator.kt:342 */A builder for [`GetStorageInput`](crate::operation::get_storage::GetStorageInput).
          66  +
/* RustType.kt:516 */
   38     67   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
          68  +
/* RustType.kt:516 */
   39     69   
#[non_exhaustive]
          70  +
/* BuilderGenerator.kt:345 */
   40     71   
pub struct GetStorageInputBuilder {
   41         -
    pub(crate) user: ::std::option::Option<::std::string::String>,
   42         -
    pub(crate) passcode: ::std::option::Option<::std::string::String>,
          72  +
    /* BuilderGenerator.kt:275 */ pub(crate) user: ::std::option::Option<::std::string::String>,
          73  +
    /* BuilderGenerator.kt:275 */ pub(crate) passcode: ::std::option::Option<::std::string::String>,
          74  +
    /* BuilderGenerator.kt:345 */
   43     75   
}
          76  +
/* BuilderGenerator.kt:355 */
   44     77   
impl GetStorageInputBuilder {
          78  +
    /* BuilderGenerator.kt:286 */
   45     79   
    #[allow(missing_docs)] // documentation missing in model
   46         -
    /// This field is required.
          80  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          81  +
    /* BuilderGenerator.kt:291 */
   47     82   
    pub fn user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          83  +
        /* BuilderGenerator.kt:292 */
   48     84   
        self.user = ::std::option::Option::Some(input.into());
          85  +
        /* BuilderGenerator.kt:293 */
   49     86   
        self
          87  +
        /* BuilderGenerator.kt:291 */
   50     88   
    }
          89  +
    /* BuilderGenerator.kt:312 */
   51     90   
    #[allow(missing_docs)] // documentation missing in model
          91  +
                           /* BuilderGenerator.kt:314 */
   52     92   
    pub fn set_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          93  +
        /* BuilderGenerator.kt:315 */
   53     94   
        self.user = input;
   54     95   
        self
          96  +
        /* BuilderGenerator.kt:314 */
   55     97   
    }
          98  +
    /* BuilderGenerator.kt:334 */
   56     99   
    #[allow(missing_docs)] // documentation missing in model
         100  +
                           /* BuilderGenerator.kt:336 */
   57    101   
    pub fn get_user(&self) -> &::std::option::Option<::std::string::String> {
         102  +
        /* BuilderGenerator.kt:337 */
   58    103   
        &self.user
         104  +
        /* BuilderGenerator.kt:336 */
   59    105   
    }
         106  +
    /* BuilderGenerator.kt:286 */
   60    107   
    #[allow(missing_docs)] // documentation missing in model
   61         -
    /// This field is required.
         108  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         109  +
    /* BuilderGenerator.kt:291 */
   62    110   
    pub fn passcode(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         111  +
        /* BuilderGenerator.kt:292 */
   63    112   
        self.passcode = ::std::option::Option::Some(input.into());
         113  +
        /* BuilderGenerator.kt:293 */
   64    114   
        self
         115  +
        /* BuilderGenerator.kt:291 */
   65    116   
    }
         117  +
    /* BuilderGenerator.kt:312 */
   66    118   
    #[allow(missing_docs)] // documentation missing in model
         119  +
                           /* BuilderGenerator.kt:314 */
   67    120   
    pub fn set_passcode(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         121  +
        /* BuilderGenerator.kt:315 */
   68    122   
        self.passcode = input;
   69    123   
        self
         124  +
        /* BuilderGenerator.kt:314 */
   70    125   
    }
         126  +
    /* BuilderGenerator.kt:334 */
   71    127   
    #[allow(missing_docs)] // documentation missing in model
         128  +
                           /* BuilderGenerator.kt:336 */
   72    129   
    pub fn get_passcode(&self) -> &::std::option::Option<::std::string::String> {
         130  +
        /* BuilderGenerator.kt:337 */
   73    131   
        &self.passcode
         132  +
        /* BuilderGenerator.kt:336 */
   74    133   
    }
   75         -
    /// Consumes the builder and constructs a [`GetStorageInput`](crate::operation::get_storage::GetStorageInput).
         134  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`GetStorageInput`](crate::operation::get_storage::GetStorageInput).
         135  +
    /* BuilderGenerator.kt:253 */
   76    136   
    pub fn build(self) -> ::std::result::Result<crate::operation::get_storage::GetStorageInput, ::aws_smithy_types::error::operation::BuildError> {
   77         -
        ::std::result::Result::Ok(crate::operation::get_storage::GetStorageInput {
   78         -
            user: self.user,
   79         -
            passcode: self.passcode,
   80         -
        })
         137  +
        /* BuilderGenerator.kt:254 */
         138  +
        ::std::result::Result::Ok(
         139  +
            /* BuilderGenerator.kt:477 */
         140  +
            crate::operation::get_storage::GetStorageInput {
         141  +
                /* BuilderGenerator.kt:481 */ user: self.user,
         142  +
                /* BuilderGenerator.kt:481 */
         143  +
                passcode: self.passcode,
         144  +
                /* BuilderGenerator.kt:477 */
         145  +
            }, /* BuilderGenerator.kt:254 */
         146  +
        )
         147  +
        /* BuilderGenerator.kt:253 */
   81    148   
    }
         149  +
    /* BuilderGenerator.kt:355 */
   82    150   
}
         151  +
/* BuilderGenerator.kt:379 */
   83    152   
impl ::std::fmt::Debug for GetStorageInputBuilder {
         153  +
    /* BuilderGenerator.kt:380 */
   84    154   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         155  +
        /* BuilderGenerator.kt:381 */
   85    156   
        let mut formatter = f.debug_struct("GetStorageInputBuilder");
         157  +
        /* BuilderGenerator.kt:395 */
   86    158   
        formatter.field("user", &"*** Sensitive Data Redacted ***");
         159  +
        /* BuilderGenerator.kt:395 */
   87    160   
        formatter.field("passcode", &"*** Sensitive Data Redacted ***");
         161  +
        /* BuilderGenerator.kt:400 */
   88    162   
        formatter.finish()
         163  +
        /* BuilderGenerator.kt:380 */
   89    164   
    }
         165  +
    /* BuilderGenerator.kt:379 */
   90    166   
}