Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/fractional_seconds/_fractional_seconds_output.rs

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

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/fractional_seconds/builders.rs

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

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/greeting_with_errors.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 `GreetingWithErrors`.
           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 GreetingWithErrors;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl GreetingWithErrors {
    7         -
    /// Creates a new `GreetingWithErrors`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `GreetingWithErrors`
          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::greeting_with_errors::GreetingWithErrorsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::greeting_with_errors::GreetingWithErrorsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::greeting_with_errors::GreetingWithErrorsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +262,279 @@
   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 GreetingWithErrors {
   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("GreetingWithErrors");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            GreetingWithErrorsRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            GreetingWithErrorsResponseDeserializer,
   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   
            "GreetingWithErrors",
  105    116   
            "Query Protocol",
  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("GreetingWithErrors")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(GreetingWithErrorsEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::greeting_with_errors::GreetingWithErrorsError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::greeting_with_errors::GreetingWithErrorsError,
  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 GreetingWithErrorsResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GreetingWithErrorsResponseDeserializer {
  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_greeting_with_errors::de_greeting_with_errors_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_greeting_with_errors::de_greeting_with_errors_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 GreetingWithErrorsRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GreetingWithErrorsRequestSerializer {
  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::greeting_with_errors::GreetingWithErrorsInput>()
  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::greeting_with_errors::GreetingWithErrorsInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                ::std::write!(output, "/").expect("formatting should succeed");
  174    187   
                ::std::result::Result::Ok(())
  175    188   
            }
  176    189   
            #[allow(clippy::unnecessary_wraps)]
  177    190   
            fn update_http_builder(
  178    191   
                input: &crate::operation::greeting_with_errors::GreetingWithErrorsInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(
  190    203   
            crate::protocol_serde::shape_greeting_with_errors_input::ser_greeting_with_errors_input_input_input(&input)?,
  191    204   
        );
  192    205   
  193    206   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  194    207   
    }
  195    208   
}
         209  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  196    210   
#[derive(Debug)]
  197    211   
struct GreetingWithErrorsEndpointParamsInterceptor;
  198    212   
  199    213   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GreetingWithErrorsEndpointParamsInterceptor {
  200    214   
    fn name(&self) -> &'static str {
  201    215   
        "GreetingWithErrorsEndpointParamsInterceptor"
  202    216   
    }
  203    217   
  204    218   
    fn read_before_execution(
  205    219   
        &self,
  206    220   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  207    221   
            '_,
  208    222   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  209    223   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  210    224   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  211    225   
        >,
  212    226   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  213    227   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  214    228   
        let _input = context
  215    229   
            .input()
  216    230   
            .downcast_ref::<GreetingWithErrorsInput>()
  217    231   
            .ok_or("failed to downcast to GreetingWithErrorsInput")?;
  218    232   
  219    233   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  220    234   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  221    235   
        })?;
  222    236   
        cfg.interceptor_state()
  223    237   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  224    238   
        ::std::result::Result::Ok(())
  225    239   
    }
  226    240   
}
  227    241   
  228    242   
// The get_* functions below are generated from JMESPath expressions in the
  229    243   
// operationContextParams trait. They target the operation's input shape.
  230    244   
         245  +
/* RustType.kt:516 */
  231    246   
#[allow(unreachable_code, unused_variables)]
         247  +
/* RustType.kt:516 */
  232    248   
#[cfg(test)]
         249  +
/* ProtocolTestGenerator.kt:98 */
  233    250   
mod greeting_with_errors_test {
  234    251   
  235    252   
    /// Ensures that operations with errors successfully know how to deserialize the successful response
  236    253   
    /// Test ID: QueryGreetingWithErrors
  237    254   
    #[::tokio::test]
  238    255   
    #[::tracing_test::traced_test]
  239    256   
    async fn query_greeting_with_errors_response() {
  240    257   
        let expected_output = crate::operation::greeting_with_errors::GreetingWithErrorsOutput::builder()
  241    258   
            .set_greeting(::std::option::Option::Some("Hello".to_owned()))
  242    259   
            .build();
@@ -377,394 +536,682 @@
  397    414   
        });
  398    415   
        let parsed = parsed.expect_err("should be error response");
  399    416   
        let parsed: &crate::operation::greeting_with_errors::GreetingWithErrorsError =
  400    417   
            parsed.as_operation_error().expect("operation error").downcast_ref().unwrap();
  401    418   
        if let crate::operation::greeting_with_errors::GreetingWithErrorsError::CustomCodeError(parsed) = parsed {
  402    419   
            ::pretty_assertions::assert_eq!(parsed.message, expected_output.message, "Unexpected value for `message`");
  403    420   
        } else {
  404    421   
            panic!("wrong variant: Got: {:?}. Expected: {:?}", parsed, expected_output);
  405    422   
        }
  406    423   
    }
         424  +
         425  +
    /* ProtocolTestGenerator.kt:98 */
  407    426   
}
  408    427   
         428  +
/* OperationErrorGenerator.kt:79 */
  409    429   
/// Error type for the `GreetingWithErrorsError` operation.
         430  +
/* RustType.kt:516 */
  410    431   
#[non_exhaustive]
         432  +
/* RustType.kt:516 */
  411    433   
#[derive(::std::fmt::Debug)]
  412         -
pub enum GreetingWithErrorsError {
  413         -
    /// This error is thrown when an invalid greeting value is provided.
         434  +
pub /* OperationErrorGenerator.kt:81 */ enum GreetingWithErrorsError {
         435  +
    /// /* OperationErrorGenerator.kt:83 */This error is thrown when an invalid greeting value is provided.
         436  +
    /* OperationErrorGenerator.kt:86 */
  414    437   
    InvalidGreeting(crate::types::error::InvalidGreeting),
  415         -
    /// This error is thrown when a request is invalid.
         438  +
    /// /* OperationErrorGenerator.kt:83 */This error is thrown when a request is invalid.
         439  +
    /* OperationErrorGenerator.kt:86 */
  416    440   
    ComplexError(crate::types::error::ComplexError),
         441  +
    /* OperationErrorGenerator.kt:83 */
  417    442   
    #[allow(missing_docs)] // documentation missing in model
         443  +
    /* OperationErrorGenerator.kt:86 */
  418    444   
    CustomCodeError(crate::types::error::CustomCodeError),
         445  +
    /* OperationErrorGenerator.kt:88 */
  419    446   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  420    447   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  421    448   
    variable wildcard pattern and check `.code()`:
  422    449   
     \
  423    450   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  424    451   
     \
  425    452   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GreetingWithErrorsError) for what information is available for the error.")]
  426    453   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         454  +
    /* OperationErrorGenerator.kt:81 */
  427    455   
}
         456  +
/* OperationErrorGenerator.kt:218 */
  428    457   
impl GreetingWithErrorsError {
         458  +
    /* OperationErrorGenerator.kt:219 */
  429    459   
    /// Creates the `GreetingWithErrorsError::Unhandled` variant from any error type.
  430    460   
    pub fn unhandled(
  431    461   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  432    462   
    ) -> Self {
  433    463   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  434    464   
            source: err.into(),
  435    465   
            meta: ::std::default::Default::default(),
  436    466   
        })
  437    467   
    }
  438    468   
  439    469   
    /// Creates the `GreetingWithErrorsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  440    470   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  441    471   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  442    472   
            source: err.clone().into(),
  443    473   
            meta: err,
  444    474   
        })
  445    475   
    }
  446         -
    ///
         476  +
    /// /* OperationErrorGenerator.kt:236 */
  447    477   
    /// Returns error metadata, which includes the error code, message,
  448    478   
    /// request ID, and potentially additional information.
  449    479   
    ///
         480  +
    /* OperationErrorGenerator.kt:242 */
  450    481   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         482  +
        /* OperationErrorGenerator.kt:243 */
  451    483   
        match self {
  452         -
            Self::InvalidGreeting(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  453         -
            Self::ComplexError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  454         -
            Self::CustomCodeError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  455         -
            Self::Unhandled(e) => &e.meta,
         484  +
            /* OperationErrorGenerator.kt:246 */ Self::InvalidGreeting(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         485  +
            /* OperationErrorGenerator.kt:246 */ Self::ComplexError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         486  +
            /* OperationErrorGenerator.kt:246 */ Self::CustomCodeError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         487  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         488  +
            /* OperationErrorGenerator.kt:243 */
  456    489   
        }
         490  +
        /* OperationErrorGenerator.kt:242 */
  457    491   
    }
         492  +
    /* OperationErrorGenerator.kt:257 */
  458    493   
    /// Returns `true` if the error kind is `GreetingWithErrorsError::InvalidGreeting`.
         494  +
    /* OperationErrorGenerator.kt:258 */
  459    495   
    pub fn is_invalid_greeting(&self) -> bool {
         496  +
        /* OperationErrorGenerator.kt:259 */
  460    497   
        matches!(self, Self::InvalidGreeting(_))
         498  +
        /* OperationErrorGenerator.kt:258 */
  461    499   
    }
         500  +
    /* OperationErrorGenerator.kt:257 */
  462    501   
    /// Returns `true` if the error kind is `GreetingWithErrorsError::ComplexError`.
         502  +
    /* OperationErrorGenerator.kt:258 */
  463    503   
    pub fn is_complex_error(&self) -> bool {
         504  +
        /* OperationErrorGenerator.kt:259 */
  464    505   
        matches!(self, Self::ComplexError(_))
         506  +
        /* OperationErrorGenerator.kt:258 */
  465    507   
    }
         508  +
    /* OperationErrorGenerator.kt:257 */
  466    509   
    /// Returns `true` if the error kind is `GreetingWithErrorsError::CustomCodeError`.
         510  +
    /* OperationErrorGenerator.kt:258 */
  467    511   
    pub fn is_custom_code_error(&self) -> bool {
         512  +
        /* OperationErrorGenerator.kt:259 */
  468    513   
        matches!(self, Self::CustomCodeError(_))
         514  +
        /* OperationErrorGenerator.kt:258 */
  469    515   
    }
         516  +
    /* OperationErrorGenerator.kt:218 */
  470    517   
}
         518  +
/* OperationErrorGenerator.kt:269 */
  471    519   
impl ::std::error::Error for GreetingWithErrorsError {
         520  +
    /* OperationErrorGenerator.kt:270 */
  472    521   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         522  +
        /* OperationErrorGenerator.kt:318 */
  473    523   
        match self {
  474         -
            Self::InvalidGreeting(_inner) => ::std::option::Option::Some(_inner),
  475         -
            Self::ComplexError(_inner) => ::std::option::Option::Some(_inner),
  476         -
            Self::CustomCodeError(_inner) => ::std::option::Option::Some(_inner),
  477         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         524  +
            /* OperationErrorGenerator.kt:321 */
         525  +
            Self::InvalidGreeting(_inner) =>
         526  +
            /* OperationErrorGenerator.kt:283 */
         527  +
            {
         528  +
                ::std::option::Option::Some(_inner)
         529  +
            }
         530  +
            ,
         531  +
            /* OperationErrorGenerator.kt:321 */
         532  +
            Self::ComplexError(_inner) =>
         533  +
            /* OperationErrorGenerator.kt:283 */
         534  +
            {
         535  +
                ::std::option::Option::Some(_inner)
         536  +
            }
         537  +
            ,
         538  +
            /* OperationErrorGenerator.kt:321 */
         539  +
            Self::CustomCodeError(_inner) =>
         540  +
            /* OperationErrorGenerator.kt:283 */
         541  +
            {
         542  +
                ::std::option::Option::Some(_inner)
         543  +
            }
         544  +
            ,
         545  +
            /* OperationErrorGenerator.kt:326 */
         546  +
            Self::Unhandled(_inner) => {
         547  +
                /* OperationErrorGenerator.kt:279 */
         548  +
                ::std::option::Option::Some(&*_inner.source)
         549  +
                /* OperationErrorGenerator.kt:326 */
         550  +
            } /* OperationErrorGenerator.kt:318 */
  478    551   
        }
         552  +
        /* OperationErrorGenerator.kt:270 */
  479    553   
    }
         554  +
    /* OperationErrorGenerator.kt:269 */
  480    555   
}
         556  +
/* OperationErrorGenerator.kt:133 */
  481    557   
impl ::std::fmt::Display for GreetingWithErrorsError {
         558  +
    /* OperationErrorGenerator.kt:134 */
  482    559   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         560  +
        /* OperationErrorGenerator.kt:318 */
  483    561   
        match self {
  484         -
            Self::InvalidGreeting(_inner) => _inner.fmt(f),
  485         -
            Self::ComplexError(_inner) => _inner.fmt(f),
  486         -
            Self::CustomCodeError(_inner) => _inner.fmt(f),
         562  +
            /* OperationErrorGenerator.kt:321 */
         563  +
            Self::InvalidGreeting(_inner) =>
         564  +
            /* OperationErrorGenerator.kt:151 */
         565  +
            {
         566  +
                _inner.fmt(f)
         567  +
            }
         568  +
            ,
         569  +
            /* OperationErrorGenerator.kt:321 */
         570  +
            Self::ComplexError(_inner) =>
         571  +
            /* OperationErrorGenerator.kt:151 */
         572  +
            {
         573  +
                _inner.fmt(f)
         574  +
            }
         575  +
            ,
         576  +
            /* OperationErrorGenerator.kt:321 */
         577  +
            Self::CustomCodeError(_inner) =>
         578  +
            /* OperationErrorGenerator.kt:151 */
         579  +
            {
         580  +
                _inner.fmt(f)
         581  +
            }
         582  +
            ,
         583  +
            /* OperationErrorGenerator.kt:326 */
  487    584   
            Self::Unhandled(_inner) => {
         585  +
                /* OperationErrorGenerator.kt:139 */
  488    586   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  489    587   
                    write!(f, "unhandled error ({code})")
  490    588   
                } else {
  491    589   
                    f.write_str("unhandled error")
  492    590   
                }
         591  +
                /* OperationErrorGenerator.kt:326 */
         592  +
            } /* OperationErrorGenerator.kt:318 */
  493    593   
        }
         594  +
        /* OperationErrorGenerator.kt:134 */
  494    595   
    }
  495         -
    }
         596  +
    /* OperationErrorGenerator.kt:133 */
  496    597   
}
         598  +
/* OperationErrorGenerator.kt:182 */
  497    599   
impl ::aws_smithy_types::retry::ProvideErrorKind for GreetingWithErrorsError {
         600  +
    /* OperationErrorGenerator.kt:186 */
  498    601   
    fn code(&self) -> ::std::option::Option<&str> {
         602  +
        /* OperationErrorGenerator.kt:187 */
  499    603   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         604  +
        /* OperationErrorGenerator.kt:186 */
  500    605   
    }
         606  +
    /* OperationErrorGenerator.kt:190 */
  501    607   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         608  +
        /* OperationErrorGenerator.kt:197 */
  502    609   
        ::std::option::Option::None
         610  +
        /* OperationErrorGenerator.kt:190 */
  503    611   
    }
         612  +
    /* OperationErrorGenerator.kt:182 */
  504    613   
}
         614  +
/* OperationErrorGenerator.kt:163 */
  505    615   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GreetingWithErrorsError {
         616  +
    /* OperationErrorGenerator.kt:164 */
  506    617   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         618  +
        /* OperationErrorGenerator.kt:318 */
  507    619   
        match self {
  508         -
            Self::InvalidGreeting(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  509         -
            Self::ComplexError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  510         -
            Self::CustomCodeError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  511         -
            Self::Unhandled(_inner) => &_inner.meta,
         620  +
            /* OperationErrorGenerator.kt:321 */
         621  +
            Self::InvalidGreeting(_inner) =>
         622  +
            /* OperationErrorGenerator.kt:169 */
         623  +
            {
         624  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         625  +
            }
         626  +
            ,
         627  +
            /* OperationErrorGenerator.kt:321 */
         628  +
            Self::ComplexError(_inner) =>
         629  +
            /* OperationErrorGenerator.kt:169 */
         630  +
            {
         631  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         632  +
            }
         633  +
            ,
         634  +
            /* OperationErrorGenerator.kt:321 */
         635  +
            Self::CustomCodeError(_inner) =>
         636  +
            /* OperationErrorGenerator.kt:169 */
         637  +
            {
         638  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         639  +
            }
         640  +
            ,
         641  +
            /* OperationErrorGenerator.kt:326 */
         642  +
            Self::Unhandled(_inner) => {
         643  +
                /* OperationErrorGenerator.kt:168 */
         644  +
                &_inner.meta
         645  +
                /* OperationErrorGenerator.kt:326 */
         646  +
            } /* OperationErrorGenerator.kt:318 */
  512    647   
        }
         648  +
        /* OperationErrorGenerator.kt:164 */
  513    649   
    }
         650  +
    /* OperationErrorGenerator.kt:163 */
  514    651   
}
         652  +
/* OperationErrorGenerator.kt:109 */
  515    653   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GreetingWithErrorsError {
         654  +
    /* OperationErrorGenerator.kt:110 */
  516    655   
    fn create_unhandled_error(
  517    656   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  518    657   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  519    658   
    ) -> Self {
         659  +
        /* OperationErrorGenerator.kt:121 */
  520    660   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  521    661   
            source,
  522    662   
            meta: meta.unwrap_or_default(),
  523    663   
        })
         664  +
        /* OperationErrorGenerator.kt:110 */
  524    665   
    }
         666  +
    /* OperationErrorGenerator.kt:109 */
  525    667   
}
  526    668   
         669  +
/* CodegenDelegator.kt:255 */
  527    670   
pub use crate::operation::greeting_with_errors::_greeting_with_errors_output::GreetingWithErrorsOutput;
  528    671   
         672  +
/* CodegenDelegator.kt:255 */
  529    673   
pub use crate::operation::greeting_with_errors::_greeting_with_errors_input::GreetingWithErrorsInput;
  530    674   
         675  +
/* RustModule.kt:172 */
  531    676   
mod _greeting_with_errors_input;
  532    677   
         678  +
/* RustModule.kt:172 */
  533    679   
mod _greeting_with_errors_output;
  534    680   
  535         -
/// Builders
         681  +
/// /* CodegenDelegator.kt:51 */Builders
  536    682   
pub mod builders;

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

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

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/greeting_with_errors/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::greeting_with_errors::_greeting_with_errors_output::GreetingWithErrorsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::greeting_with_errors::_greeting_with_errors_input::GreetingWithErrorsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::greeting_with_errors::builders::GreetingWithErrorsInputBuilder {
    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::greeting_with_errors::GreetingWithErrorsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::greeting_with_errors::GreetingWithErrorsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.greeting_with_errors();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `GreetingWithErrors`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `GreetingWithErrors`.
   24     27   
///
   25         -
/// This operation has three possible return values: 1. A successful response in the form of GreetingWithErrorsOutput 2. An InvalidGreeting error. 3. A BadRequest error.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This operation has three possible return values: 1. A successful response in the form of GreetingWithErrorsOutput 2. An InvalidGreeting error. 3. A BadRequest error.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct GreetingWithErrorsFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::greeting_with_errors::builders::GreetingWithErrorsInputBuilder,
   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::greeting_with_errors::GreetingWithErrorsOutput,
   35     41   
        crate::operation::greeting_with_errors::GreetingWithErrorsError,
   36     42   
    > for GreetingWithErrorsFluentBuilder
   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::greeting_with_errors::GreetingWithErrorsOutput,
   44     50   
            crate::operation::greeting_with_errors::GreetingWithErrorsError,
   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 GreetingWithErrorsFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `GreetingWithErrorsFluentBuilder`.
   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 GreetingWithErrors as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::greeting_with_errors::builders::GreetingWithErrorsInputBuilder {
   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::greeting_with_errors::GreetingWithErrorsOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::greeting_with_errors::GreetingWithErrorsError,
   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::greeting_with_errors::GreetingWithErrors::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::greeting_with_errors::GreetingWithErrors::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::greeting_with_errors::GreetingWithErrorsOutput,
   97    107   
        crate::operation::greeting_with_errors::GreetingWithErrorsError,
   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/aws_query/rust-client-codegen/src/operation/host_with_path_operation.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 `HostWithPathOperation`.
           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 HostWithPathOperation;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl HostWithPathOperation {
    7         -
    /// Creates a new `HostWithPathOperation`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `HostWithPathOperation`
          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::host_with_path_operation::HostWithPathOperationInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::host_with_path_operation::HostWithPathOperationOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::host_with_path_operation::HostWithPathOperationError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +364,440 @@
   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 HostWithPathOperation {
   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("HostWithPathOperation");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            HostWithPathOperationRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            HostWithPathOperationResponseDeserializer,
  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   
            "HostWithPathOperation",
  111    122   
            "Query Protocol",
  112    123   
        ));
  113    124   
  114    125   
        ::std::option::Option::Some(cfg.freeze())
  115    126   
    }
  116    127   
  117    128   
    fn runtime_components(
  118    129   
        &self,
  119    130   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  120    131   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  121    132   
        #[allow(unused_mut)]
  122    133   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("HostWithPathOperation")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(HostWithPathOperationEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::host_with_path_operation::HostWithPathOperationError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::host_with_path_operation::HostWithPathOperationError,
  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 HostWithPathOperationResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HostWithPathOperationResponseDeserializer {
  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_host_with_path_operation::de_host_with_path_operation_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_host_with_path_operation::de_host_with_path_operation_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 HostWithPathOperationRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HostWithPathOperationRequestSerializer {
  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::host_with_path_operation::HostWithPathOperationInput>()
  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::host_with_path_operation::HostWithPathOperationInput,
  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, "/").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::host_with_path_operation::HostWithPathOperationInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from(
  196    209   
            crate::protocol_serde::shape_host_with_path_operation_input::ser_host_with_path_operation_input_input_input(&input)?,
  197    210   
        );
  198    211   
  199    212   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  200    213   
    }
  201    214   
}
         215  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  202    216   
#[derive(Debug)]
  203    217   
struct HostWithPathOperationEndpointParamsInterceptor;
  204    218   
  205    219   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HostWithPathOperationEndpointParamsInterceptor {
  206    220   
    fn name(&self) -> &'static str {
  207    221   
        "HostWithPathOperationEndpointParamsInterceptor"
  208    222   
    }
  209    223   
  210    224   
    fn read_before_execution(
  211    225   
        &self,
  212    226   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  213    227   
            '_,
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  215    229   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  216    230   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  217    231   
        >,
  218    232   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  219    233   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  220    234   
        let _input = context
  221    235   
            .input()
  222    236   
            .downcast_ref::<HostWithPathOperationInput>()
  223    237   
            .ok_or("failed to downcast to HostWithPathOperationInput")?;
  224    238   
  225    239   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  226    240   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  227    241   
        })?;
  228    242   
        cfg.interceptor_state()
  229    243   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  230    244   
        ::std::result::Result::Ok(())
  231    245   
    }
  232    246   
}
  233    247   
  234    248   
// The get_* functions below are generated from JMESPath expressions in the
  235    249   
// operationContextParams trait. They target the operation's input shape.
  236    250   
         251  +
/* RustType.kt:516 */
  237    252   
#[allow(unreachable_code, unused_variables)]
         253  +
/* RustType.kt:516 */
  238    254   
#[cfg(test)]
         255  +
/* ProtocolTestGenerator.kt:98 */
  239    256   
mod host_with_path_operation_test {
  240    257   
  241    258   
    /// Custom endpoints supplied by users can have paths
  242    259   
    /// Test ID: QueryHostWithPath
  243    260   
    #[::tokio::test]
  244    261   
    #[::tracing_test::traced_test]
  245    262   
    async fn query_host_with_path_request() {
  246    263   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  247    264   
        let config_builder = crate::config::Config::builder()
  248    265   
            .with_test_defaults()
  249    266   
            .endpoint_url("https://example.com/custom");
  250    267   
  251    268   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  252    269   
        let result = client.host_with_path_operation().send().await;
  253    270   
        let _ = dbg!(result);
  254    271   
        let http_request = request_receiver.expect_request();
  255    272   
        let body = http_request.body().bytes().expect("body should be strict");
  256    273   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  257    274   
            body,
  258    275   
            "Action=HostWithPathOperation&Version=2020-01-08",
  259    276   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
  260    277   
        ));
  261    278   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  262    279   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  263    280   
        ::pretty_assertions::assert_eq!(uri.path(), "/custom/", "path was incorrect");
  264    281   
    }
         282  +
         283  +
    /* ProtocolTestGenerator.kt:98 */
  265    284   
}
  266    285   
         286  +
/* OperationErrorGenerator.kt:79 */
  267    287   
/// Error type for the `HostWithPathOperationError` operation.
         288  +
/* RustType.kt:516 */
  268    289   
#[non_exhaustive]
         290  +
/* RustType.kt:516 */
  269    291   
#[derive(::std::fmt::Debug)]
  270         -
pub enum HostWithPathOperationError {
         292  +
pub /* OperationErrorGenerator.kt:81 */ enum HostWithPathOperationError {
         293  +
    /* OperationErrorGenerator.kt:88 */
  271    294   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  272    295   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  273    296   
    variable wildcard pattern and check `.code()`:
  274    297   
     \
  275    298   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  276    299   
     \
  277    300   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HostWithPathOperationError) for what information is available for the error.")]
  278    301   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         302  +
    /* OperationErrorGenerator.kt:81 */
  279    303   
}
         304  +
/* OperationErrorGenerator.kt:218 */
  280    305   
impl HostWithPathOperationError {
         306  +
    /* OperationErrorGenerator.kt:219 */
  281    307   
    /// Creates the `HostWithPathOperationError::Unhandled` variant from any error type.
  282    308   
    pub fn unhandled(
  283    309   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  284    310   
    ) -> Self {
  285    311   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  286    312   
            source: err.into(),
  287    313   
            meta: ::std::default::Default::default(),
  288    314   
        })
  289    315   
    }
  290    316   
  291    317   
    /// Creates the `HostWithPathOperationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  292    318   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  293    319   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  294    320   
            source: err.clone().into(),
  295    321   
            meta: err,
  296    322   
        })
  297    323   
    }
  298         -
    ///
         324  +
    /// /* OperationErrorGenerator.kt:236 */
  299    325   
    /// Returns error metadata, which includes the error code, message,
  300    326   
    /// request ID, and potentially additional information.
  301    327   
    ///
         328  +
    /* OperationErrorGenerator.kt:242 */
  302    329   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         330  +
        /* OperationErrorGenerator.kt:243 */
  303    331   
        match self {
  304         -
            Self::Unhandled(e) => &e.meta,
         332  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         333  +
            /* OperationErrorGenerator.kt:243 */
  305    334   
        }
         335  +
        /* OperationErrorGenerator.kt:242 */
  306    336   
    }
         337  +
    /* OperationErrorGenerator.kt:218 */
  307    338   
}
         339  +
/* OperationErrorGenerator.kt:269 */
  308    340   
impl ::std::error::Error for HostWithPathOperationError {
         341  +
    /* OperationErrorGenerator.kt:270 */
  309    342   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         343  +
        /* OperationErrorGenerator.kt:318 */
  310    344   
        match self {
  311         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         345  +
            /* OperationErrorGenerator.kt:326 */
         346  +
            Self::Unhandled(_inner) => {
         347  +
                /* OperationErrorGenerator.kt:279 */
         348  +
                ::std::option::Option::Some(&*_inner.source)
         349  +
                /* OperationErrorGenerator.kt:326 */
         350  +
            } /* OperationErrorGenerator.kt:318 */
  312    351   
        }
         352  +
        /* OperationErrorGenerator.kt:270 */
  313    353   
    }
         354  +
    /* OperationErrorGenerator.kt:269 */
  314    355   
}
         356  +
/* OperationErrorGenerator.kt:133 */
  315    357   
impl ::std::fmt::Display for HostWithPathOperationError {
         358  +
    /* OperationErrorGenerator.kt:134 */
  316    359   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         360  +
        /* OperationErrorGenerator.kt:318 */
  317    361   
        match self {
         362  +
            /* OperationErrorGenerator.kt:326 */
  318    363   
            Self::Unhandled(_inner) => {
         364  +
                /* OperationErrorGenerator.kt:139 */
  319    365   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  320    366   
                    write!(f, "unhandled error ({code})")
  321    367   
                } else {
  322    368   
                    f.write_str("unhandled error")
  323    369   
                }
         370  +
                /* OperationErrorGenerator.kt:326 */
         371  +
            } /* OperationErrorGenerator.kt:318 */
  324    372   
        }
         373  +
        /* OperationErrorGenerator.kt:134 */
  325    374   
    }
  326         -
    }
         375  +
    /* OperationErrorGenerator.kt:133 */
  327    376   
}
         377  +
/* OperationErrorGenerator.kt:182 */
  328    378   
impl ::aws_smithy_types::retry::ProvideErrorKind for HostWithPathOperationError {
         379  +
    /* OperationErrorGenerator.kt:186 */
  329    380   
    fn code(&self) -> ::std::option::Option<&str> {
         381  +
        /* OperationErrorGenerator.kt:187 */
  330    382   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         383  +
        /* OperationErrorGenerator.kt:186 */
  331    384   
    }
         385  +
    /* OperationErrorGenerator.kt:190 */
  332    386   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         387  +
        /* OperationErrorGenerator.kt:197 */
  333    388   
        ::std::option::Option::None
         389  +
        /* OperationErrorGenerator.kt:190 */
  334    390   
    }
         391  +
    /* OperationErrorGenerator.kt:182 */
  335    392   
}
         393  +
/* OperationErrorGenerator.kt:163 */
  336    394   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HostWithPathOperationError {
         395  +
    /* OperationErrorGenerator.kt:164 */
  337    396   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         397  +
        /* OperationErrorGenerator.kt:318 */
  338    398   
        match self {
  339         -
            Self::Unhandled(_inner) => &_inner.meta,
         399  +
            /* OperationErrorGenerator.kt:326 */
         400  +
            Self::Unhandled(_inner) => {
         401  +
                /* OperationErrorGenerator.kt:168 */
         402  +
                &_inner.meta
         403  +
                /* OperationErrorGenerator.kt:326 */
         404  +
            } /* OperationErrorGenerator.kt:318 */
  340    405   
        }
         406  +
        /* OperationErrorGenerator.kt:164 */
  341    407   
    }
         408  +
    /* OperationErrorGenerator.kt:163 */
  342    409   
}
         410  +
/* OperationErrorGenerator.kt:109 */
  343    411   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HostWithPathOperationError {
         412  +
    /* OperationErrorGenerator.kt:110 */
  344    413   
    fn create_unhandled_error(
  345    414   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  346    415   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  347    416   
    ) -> Self {
         417  +
        /* OperationErrorGenerator.kt:121 */
  348    418   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  349    419   
            source,
  350    420   
            meta: meta.unwrap_or_default(),
  351    421   
        })
         422  +
        /* OperationErrorGenerator.kt:110 */
  352    423   
    }
         424  +
    /* OperationErrorGenerator.kt:109 */
  353    425   
}
  354    426   
         427  +
/* CodegenDelegator.kt:255 */
  355    428   
pub use crate::operation::host_with_path_operation::_host_with_path_operation_output::HostWithPathOperationOutput;
  356    429   
         430  +
/* CodegenDelegator.kt:255 */
  357    431   
pub use crate::operation::host_with_path_operation::_host_with_path_operation_input::HostWithPathOperationInput;
  358    432   
         433  +
/* RustModule.kt:172 */
  359    434   
mod _host_with_path_operation_input;
  360    435   
         436  +
/* RustModule.kt:172 */
  361    437   
mod _host_with_path_operation_output;
  362    438   
  363         -
/// Builders
         439  +
/// /* CodegenDelegator.kt:51 */Builders
  364    440   
pub mod builders;

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

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/host_with_path_operation/builders.rs

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

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/ignores_wrapping_xml_name.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 `IgnoresWrappingXmlName`.
           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 IgnoresWrappingXmlName;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl IgnoresWrappingXmlName {
    7         -
    /// Creates a new `IgnoresWrappingXmlName`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `IgnoresWrappingXmlName`
          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::ignores_wrapping_xml_name::IgnoresWrappingXmlNameInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +379,455 @@
   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 IgnoresWrappingXmlName {
   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("IgnoresWrappingXmlName");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            IgnoresWrappingXmlNameRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            IgnoresWrappingXmlNameResponseDeserializer,
  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   
            "IgnoresWrappingXmlName",
  111    122   
            "Query Protocol",
  112    123   
        ));
  113    124   
  114    125   
        ::std::option::Option::Some(cfg.freeze())
  115    126   
    }
  116    127   
  117    128   
    fn runtime_components(
  118    129   
        &self,
  119    130   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  120    131   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  121    132   
        #[allow(unused_mut)]
  122    133   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("IgnoresWrappingXmlName")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(IgnoresWrappingXmlNameEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError,
  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 IgnoresWrappingXmlNameResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for IgnoresWrappingXmlNameResponseDeserializer {
  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_ignores_wrapping_xml_name::de_ignores_wrapping_xml_name_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_ignores_wrapping_xml_name::de_ignores_wrapping_xml_name_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 IgnoresWrappingXmlNameRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for IgnoresWrappingXmlNameRequestSerializer {
  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::ignores_wrapping_xml_name::IgnoresWrappingXmlNameInput>()
  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::ignores_wrapping_xml_name::IgnoresWrappingXmlNameInput,
  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, "/").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::ignores_wrapping_xml_name::IgnoresWrappingXmlNameInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from(
  196    209   
            crate::protocol_serde::shape_ignores_wrapping_xml_name_input::ser_ignores_wrapping_xml_name_input_input_input(&input)?,
  197    210   
        );
  198    211   
  199    212   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  200    213   
    }
  201    214   
}
         215  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  202    216   
#[derive(Debug)]
  203    217   
struct IgnoresWrappingXmlNameEndpointParamsInterceptor;
  204    218   
  205    219   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for IgnoresWrappingXmlNameEndpointParamsInterceptor {
  206    220   
    fn name(&self) -> &'static str {
  207    221   
        "IgnoresWrappingXmlNameEndpointParamsInterceptor"
  208    222   
    }
  209    223   
  210    224   
    fn read_before_execution(
  211    225   
        &self,
  212    226   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  213    227   
            '_,
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  215    229   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  216    230   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  217    231   
        >,
  218    232   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  219    233   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  220    234   
        let _input = context
  221    235   
            .input()
  222    236   
            .downcast_ref::<IgnoresWrappingXmlNameInput>()
  223    237   
            .ok_or("failed to downcast to IgnoresWrappingXmlNameInput")?;
  224    238   
  225    239   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  226    240   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  227    241   
        })?;
  228    242   
        cfg.interceptor_state()
  229    243   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  230    244   
        ::std::result::Result::Ok(())
  231    245   
    }
  232    246   
}
  233    247   
  234    248   
// The get_* functions below are generated from JMESPath expressions in the
  235    249   
// operationContextParams trait. They target the operation's input shape.
  236    250   
         251  +
/* RustType.kt:516 */
  237    252   
#[allow(unreachable_code, unused_variables)]
         253  +
/* RustType.kt:516 */
  238    254   
#[cfg(test)]
         255  +
/* ProtocolTestGenerator.kt:98 */
  239    256   
mod ignores_wrapping_xml_name_test {
  240    257   
  241    258   
    /// The xmlName trait on the output structure is ignored in AWS Query
  242    259   
    /// Test ID: QueryIgnoresWrappingXmlName
  243    260   
    #[::tokio::test]
  244    261   
    #[::tracing_test::traced_test]
  245    262   
    async fn query_ignores_wrapping_xml_name_response() {
  246    263   
        let expected_output = crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameOutput::builder()
  247    264   
            .set_foo(::std::option::Option::Some("bar".to_owned()))
  248    265   
            .build();
  249    266   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(::http::response::Builder::new()
  250    267   
        .header("Content-Type", "text/xml")
  251    268   
        .status(200)
  252    269   
                    .body(::aws_smithy_types::body::SdkBody::from("<IgnoresWrappingXmlNameResponse xmlns=\"https://example.com/\">\n    <IgnoresWrappingXmlNameResult>\n        <foo>bar</foo>\n    </IgnoresWrappingXmlNameResult>\n</IgnoresWrappingXmlNameResponse>\n"))
  253    270   
                    .unwrap()
  254    271   
                    ).unwrap();
  255    272   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  256    273   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  257    274   
  258    275   
        let op = crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlName::new();
  259    276   
        let config = op.config().expect("the operation has config");
  260    277   
        let de = config
  261    278   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  262    279   
            .expect("the config must have a deserializer");
  263    280   
  264    281   
        let parsed = de.deserialize_streaming(&mut http_response);
  265    282   
        let parsed = parsed.unwrap_or_else(|| {
  266    283   
            let http_response = http_response.map(|body| {
  267    284   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  268    285   
                    body.bytes().unwrap(),
  269    286   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  270    287   
                )))
  271    288   
            });
  272    289   
            de.deserialize_nonstreaming(&http_response)
  273    290   
        });
  274    291   
        let parsed = parsed
  275    292   
            .expect("should be successful response")
  276    293   
            .downcast::<crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameOutput>()
  277    294   
            .unwrap();
  278    295   
        ::pretty_assertions::assert_eq!(parsed.foo, expected_output.foo, "Unexpected value for `foo`");
  279    296   
    }
         297  +
         298  +
    /* ProtocolTestGenerator.kt:98 */
  280    299   
}
  281    300   
         301  +
/* OperationErrorGenerator.kt:79 */
  282    302   
/// Error type for the `IgnoresWrappingXmlNameError` operation.
         303  +
/* RustType.kt:516 */
  283    304   
#[non_exhaustive]
         305  +
/* RustType.kt:516 */
  284    306   
#[derive(::std::fmt::Debug)]
  285         -
pub enum IgnoresWrappingXmlNameError {
         307  +
pub /* OperationErrorGenerator.kt:81 */ enum IgnoresWrappingXmlNameError {
         308  +
    /* OperationErrorGenerator.kt:88 */
  286    309   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  287    310   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  288    311   
    variable wildcard pattern and check `.code()`:
  289    312   
     \
  290    313   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  291    314   
     \
  292    315   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-IgnoresWrappingXmlNameError) for what information is available for the error.")]
  293    316   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         317  +
    /* OperationErrorGenerator.kt:81 */
  294    318   
}
         319  +
/* OperationErrorGenerator.kt:218 */
  295    320   
impl IgnoresWrappingXmlNameError {
         321  +
    /* OperationErrorGenerator.kt:219 */
  296    322   
    /// Creates the `IgnoresWrappingXmlNameError::Unhandled` variant from any error type.
  297    323   
    pub fn unhandled(
  298    324   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  299    325   
    ) -> Self {
  300    326   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  301    327   
            source: err.into(),
  302    328   
            meta: ::std::default::Default::default(),
  303    329   
        })
  304    330   
    }
  305    331   
  306    332   
    /// Creates the `IgnoresWrappingXmlNameError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  307    333   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  308    334   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  309    335   
            source: err.clone().into(),
  310    336   
            meta: err,
  311    337   
        })
  312    338   
    }
  313         -
    ///
         339  +
    /// /* OperationErrorGenerator.kt:236 */
  314    340   
    /// Returns error metadata, which includes the error code, message,
  315    341   
    /// request ID, and potentially additional information.
  316    342   
    ///
         343  +
    /* OperationErrorGenerator.kt:242 */
  317    344   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         345  +
        /* OperationErrorGenerator.kt:243 */
  318    346   
        match self {
  319         -
            Self::Unhandled(e) => &e.meta,
         347  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         348  +
            /* OperationErrorGenerator.kt:243 */
  320    349   
        }
         350  +
        /* OperationErrorGenerator.kt:242 */
  321    351   
    }
         352  +
    /* OperationErrorGenerator.kt:218 */
  322    353   
}
         354  +
/* OperationErrorGenerator.kt:269 */
  323    355   
impl ::std::error::Error for IgnoresWrappingXmlNameError {
         356  +
    /* OperationErrorGenerator.kt:270 */
  324    357   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         358  +
        /* OperationErrorGenerator.kt:318 */
  325    359   
        match self {
  326         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         360  +
            /* OperationErrorGenerator.kt:326 */
         361  +
            Self::Unhandled(_inner) => {
         362  +
                /* OperationErrorGenerator.kt:279 */
         363  +
                ::std::option::Option::Some(&*_inner.source)
         364  +
                /* OperationErrorGenerator.kt:326 */
         365  +
            } /* OperationErrorGenerator.kt:318 */
  327    366   
        }
         367  +
        /* OperationErrorGenerator.kt:270 */
  328    368   
    }
         369  +
    /* OperationErrorGenerator.kt:269 */
  329    370   
}
         371  +
/* OperationErrorGenerator.kt:133 */
  330    372   
impl ::std::fmt::Display for IgnoresWrappingXmlNameError {
         373  +
    /* OperationErrorGenerator.kt:134 */
  331    374   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         375  +
        /* OperationErrorGenerator.kt:318 */
  332    376   
        match self {
         377  +
            /* OperationErrorGenerator.kt:326 */
  333    378   
            Self::Unhandled(_inner) => {
         379  +
                /* OperationErrorGenerator.kt:139 */
  334    380   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  335    381   
                    write!(f, "unhandled error ({code})")
  336    382   
                } else {
  337    383   
                    f.write_str("unhandled error")
  338    384   
                }
         385  +
                /* OperationErrorGenerator.kt:326 */
         386  +
            } /* OperationErrorGenerator.kt:318 */
  339    387   
        }
         388  +
        /* OperationErrorGenerator.kt:134 */
  340    389   
    }
  341         -
    }
         390  +
    /* OperationErrorGenerator.kt:133 */
  342    391   
}
         392  +
/* OperationErrorGenerator.kt:182 */
  343    393   
impl ::aws_smithy_types::retry::ProvideErrorKind for IgnoresWrappingXmlNameError {
         394  +
    /* OperationErrorGenerator.kt:186 */
  344    395   
    fn code(&self) -> ::std::option::Option<&str> {
         396  +
        /* OperationErrorGenerator.kt:187 */
  345    397   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         398  +
        /* OperationErrorGenerator.kt:186 */
  346    399   
    }
         400  +
    /* OperationErrorGenerator.kt:190 */
  347    401   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         402  +
        /* OperationErrorGenerator.kt:197 */
  348    403   
        ::std::option::Option::None
         404  +
        /* OperationErrorGenerator.kt:190 */
  349    405   
    }
         406  +
    /* OperationErrorGenerator.kt:182 */
  350    407   
}
         408  +
/* OperationErrorGenerator.kt:163 */
  351    409   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for IgnoresWrappingXmlNameError {
         410  +
    /* OperationErrorGenerator.kt:164 */
  352    411   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         412  +
        /* OperationErrorGenerator.kt:318 */
  353    413   
        match self {
  354         -
            Self::Unhandled(_inner) => &_inner.meta,
         414  +
            /* OperationErrorGenerator.kt:326 */
         415  +
            Self::Unhandled(_inner) => {
         416  +
                /* OperationErrorGenerator.kt:168 */
         417  +
                &_inner.meta
         418  +
                /* OperationErrorGenerator.kt:326 */
         419  +
            } /* OperationErrorGenerator.kt:318 */
  355    420   
        }
         421  +
        /* OperationErrorGenerator.kt:164 */
  356    422   
    }
         423  +
    /* OperationErrorGenerator.kt:163 */
  357    424   
}
         425  +
/* OperationErrorGenerator.kt:109 */
  358    426   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for IgnoresWrappingXmlNameError {
         427  +
    /* OperationErrorGenerator.kt:110 */
  359    428   
    fn create_unhandled_error(
  360    429   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  361    430   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  362    431   
    ) -> Self {
         432  +
        /* OperationErrorGenerator.kt:121 */
  363    433   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  364    434   
            source,
  365    435   
            meta: meta.unwrap_or_default(),
  366    436   
        })
         437  +
        /* OperationErrorGenerator.kt:110 */
  367    438   
    }
         439  +
    /* OperationErrorGenerator.kt:109 */
  368    440   
}
  369    441   
         442  +
/* CodegenDelegator.kt:255 */
  370    443   
pub use crate::operation::ignores_wrapping_xml_name::_ignores_wrapping_xml_name_output::IgnoresWrappingXmlNameOutput;
  371    444   
         445  +
/* CodegenDelegator.kt:255 */
  372    446   
pub use crate::operation::ignores_wrapping_xml_name::_ignores_wrapping_xml_name_input::IgnoresWrappingXmlNameInput;
  373    447   
         448  +
/* RustModule.kt:172 */
  374    449   
mod _ignores_wrapping_xml_name_input;
  375    450   
         451  +
/* RustModule.kt:172 */
  376    452   
mod _ignores_wrapping_xml_name_output;
  377    453   
  378         -
/// Builders
         454  +
/// /* CodegenDelegator.kt:51 */Builders
  379    455   
pub mod builders;

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/ignores_wrapping_xml_name/_ignores_wrapping_xml_name_input.rs

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

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/ignores_wrapping_xml_name/_ignores_wrapping_xml_name_output.rs

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

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/ignores_wrapping_xml_name/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::ignores_wrapping_xml_name::_ignores_wrapping_xml_name_output::IgnoresWrappingXmlNameOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::ignores_wrapping_xml_name::_ignores_wrapping_xml_name_input::IgnoresWrappingXmlNameInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::ignores_wrapping_xml_name::builders::IgnoresWrappingXmlNameInputBuilder {
    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::ignores_wrapping_xml_name::IgnoresWrappingXmlNameOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.ignores_wrapping_xml_name();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `IgnoresWrappingXmlName`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `IgnoresWrappingXmlName`.
   24     27   
///
   25         -
/// The xmlName trait on the output structure is ignored in AWS Query. The wrapping element is always operation name + "Response", and inside of that wrapper is another wrapper named operation name + "Result".
          28  +
/// /* FluentBuilderGenerator.kt:130 */The xmlName trait on the output structure is ignored in AWS Query. The wrapping element is always operation name + "Response", and inside of that wrapper is another wrapper named operation name + "Result".
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct IgnoresWrappingXmlNameFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::ignores_wrapping_xml_name::builders::IgnoresWrappingXmlNameInputBuilder,
   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::ignores_wrapping_xml_name::IgnoresWrappingXmlNameOutput,
   35     41   
        crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError,
   36     42   
    > for IgnoresWrappingXmlNameFluentBuilder
   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::ignores_wrapping_xml_name::IgnoresWrappingXmlNameOutput,
   44     50   
            crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError,
   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 IgnoresWrappingXmlNameFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `IgnoresWrappingXmlNameFluentBuilder`.
   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 IgnoresWrappingXmlName as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::ignores_wrapping_xml_name::builders::IgnoresWrappingXmlNameInputBuilder {
   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::ignores_wrapping_xml_name::IgnoresWrappingXmlNameOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError,
   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::ignores_wrapping_xml_name::IgnoresWrappingXmlName::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::ignores_wrapping_xml_name::IgnoresWrappingXmlName::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::ignores_wrapping_xml_name::IgnoresWrappingXmlNameOutput,
   97    107   
        crate::operation::ignores_wrapping_xml_name::IgnoresWrappingXmlNameError,
   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/aws_query/rust-client-codegen/src/operation/nested_structures.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 `NestedStructures`.
           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 NestedStructures;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl NestedStructures {
    7         -
    /// Creates a new `NestedStructures`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `NestedStructures`
          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::nested_structures::NestedStructuresInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::nested_structures::NestedStructuresOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::nested_structures::NestedStructuresError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +377,453 @@
   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 NestedStructures {
   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("NestedStructures");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            NestedStructuresRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            NestedStructuresResponseDeserializer,
   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   
            "NestedStructures",
  105    116   
            "Query Protocol",
  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("NestedStructures")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(NestedStructuresEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::nested_structures::NestedStructuresError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::nested_structures::NestedStructuresError,
  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 NestedStructuresResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for NestedStructuresResponseDeserializer {
  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_nested_structures::de_nested_structures_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_nested_structures::de_nested_structures_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 NestedStructuresRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for NestedStructuresRequestSerializer {
  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::nested_structures::NestedStructuresInput>()
  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::nested_structures::NestedStructuresInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                ::std::write!(output, "/").expect("formatting should succeed");
  174    187   
                ::std::result::Result::Ok(())
  175    188   
            }
  176    189   
            #[allow(clippy::unnecessary_wraps)]
  177    190   
            fn update_http_builder(
  178    191   
                input: &crate::operation::nested_structures::NestedStructuresInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(
  190    203   
            crate::protocol_serde::shape_nested_structures_input::ser_nested_structures_input_input_input(&input)?,
  191    204   
        );
  192    205   
        if let Some(content_length) = body.content_length() {
  193    206   
            let content_length = content_length.to_string();
  194    207   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  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 NestedStructuresEndpointParamsInterceptor;
  201    215   
  202    216   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for NestedStructuresEndpointParamsInterceptor {
  203    217   
    fn name(&self) -> &'static str {
  204    218   
        "NestedStructuresEndpointParamsInterceptor"
  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::<NestedStructuresInput>()
  220    234   
            .ok_or("failed to downcast to NestedStructuresInput")?;
  221    235   
  222    236   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  223    237   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  224    238   
        })?;
  225    239   
        cfg.interceptor_state()
  226    240   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  227    241   
        ::std::result::Result::Ok(())
  228    242   
    }
  229    243   
}
  230    244   
  231    245   
// The get_* functions below are generated from JMESPath expressions in the
  232    246   
// operationContextParams trait. They target the operation's input shape.
  233    247   
         248  +
/* RustType.kt:516 */
  234    249   
#[allow(unreachable_code, unused_variables)]
         250  +
/* RustType.kt:516 */
  235    251   
#[cfg(test)]
         252  +
/* ProtocolTestGenerator.kt:98 */
  236    253   
mod nested_structures_test {
  237    254   
  238    255   
    /// Serializes nested structures using dots
  239    256   
    /// Test ID: NestedStructures
  240    257   
    #[::tokio::test]
  241    258   
    #[::tracing_test::traced_test]
  242    259   
    async fn nested_structures_request() {
  243    260   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  244    261   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  245    262   
  246    263   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  247    264   
        let result = client
  248    265   
            .nested_structures()
  249    266   
            .set_nested(::std::option::Option::Some(
  250    267   
                crate::types::StructArg::builder()
  251    268   
                    .set_string_arg(::std::option::Option::Some("foo".to_owned()))
  252    269   
                    .set_other_arg(::std::option::Option::Some(true))
  253    270   
                    .set_recursive_arg(::std::option::Option::Some(::std::boxed::Box::new(
  254    271   
                        crate::types::StructArg::builder()
  255    272   
                            .set_string_arg(::std::option::Option::Some("baz".to_owned()))
  256    273   
                            .build(),
  257    274   
                    )))
  258    275   
                    .build(),
  259    276   
            ))
  260    277   
            .send()
  261    278   
            .await;
  262    279   
        let _ = dbg!(result);
  263    280   
        let http_request = request_receiver.expect_request();
  264    281   
        let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
  265    282   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  266    283   
        let required_headers = &["Content-Length"];
  267    284   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
  268    285   
        let body = http_request.body().bytes().expect("body should be strict");
  269    286   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  270    287   
            body,
  271    288   
            "Action=NestedStructures&Version=2020-01-08&Nested.StringArg=foo&Nested.OtherArg=true&Nested.RecursiveArg.StringArg=baz",
  272    289   
            ::aws_smithy_protocol_test::MediaType::from("application/x-www-form-urlencoded"),
  273    290   
        ));
  274    291   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  275    292   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  276    293   
        ::pretty_assertions::assert_eq!(uri.path(), "/", "path was incorrect");
  277    294   
    }
         295  +
         296  +
    /* ProtocolTestGenerator.kt:98 */
  278    297   
}
  279    298   
         299  +
/* OperationErrorGenerator.kt:79 */
  280    300   
/// Error type for the `NestedStructuresError` operation.
         301  +
/* RustType.kt:516 */
  281    302   
#[non_exhaustive]
         303  +
/* RustType.kt:516 */
  282    304   
#[derive(::std::fmt::Debug)]
  283         -
pub enum NestedStructuresError {
         305  +
pub /* OperationErrorGenerator.kt:81 */ enum NestedStructuresError {
         306  +
    /* OperationErrorGenerator.kt:88 */
  284    307   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  285    308   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  286    309   
    variable wildcard pattern and check `.code()`:
  287    310   
     \
  288    311   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  289    312   
     \
  290    313   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-NestedStructuresError) for what information is available for the error.")]
  291    314   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         315  +
    /* OperationErrorGenerator.kt:81 */
  292    316   
}
         317  +
/* OperationErrorGenerator.kt:218 */
  293    318   
impl NestedStructuresError {
         319  +
    /* OperationErrorGenerator.kt:219 */
  294    320   
    /// Creates the `NestedStructuresError::Unhandled` variant from any error type.
  295    321   
    pub fn unhandled(
  296    322   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  297    323   
    ) -> Self {
  298    324   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  299    325   
            source: err.into(),
  300    326   
            meta: ::std::default::Default::default(),
  301    327   
        })
  302    328   
    }
  303    329   
  304    330   
    /// Creates the `NestedStructuresError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  305    331   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  306    332   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  307    333   
            source: err.clone().into(),
  308    334   
            meta: err,
  309    335   
        })
  310    336   
    }
  311         -
    ///
         337  +
    /// /* OperationErrorGenerator.kt:236 */
  312    338   
    /// Returns error metadata, which includes the error code, message,
  313    339   
    /// request ID, and potentially additional information.
  314    340   
    ///
         341  +
    /* OperationErrorGenerator.kt:242 */
  315    342   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         343  +
        /* OperationErrorGenerator.kt:243 */
  316    344   
        match self {
  317         -
            Self::Unhandled(e) => &e.meta,
         345  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         346  +
            /* OperationErrorGenerator.kt:243 */
  318    347   
        }
         348  +
        /* OperationErrorGenerator.kt:242 */
  319    349   
    }
         350  +
    /* OperationErrorGenerator.kt:218 */
  320    351   
}
         352  +
/* OperationErrorGenerator.kt:269 */
  321    353   
impl ::std::error::Error for NestedStructuresError {
         354  +
    /* OperationErrorGenerator.kt:270 */
  322    355   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         356  +
        /* OperationErrorGenerator.kt:318 */
  323    357   
        match self {
  324         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         358  +
            /* OperationErrorGenerator.kt:326 */
         359  +
            Self::Unhandled(_inner) => {
         360  +
                /* OperationErrorGenerator.kt:279 */
         361  +
                ::std::option::Option::Some(&*_inner.source)
         362  +
                /* OperationErrorGenerator.kt:326 */
         363  +
            } /* OperationErrorGenerator.kt:318 */
  325    364   
        }
         365  +
        /* OperationErrorGenerator.kt:270 */
  326    366   
    }
         367  +
    /* OperationErrorGenerator.kt:269 */
  327    368   
}
         369  +
/* OperationErrorGenerator.kt:133 */
  328    370   
impl ::std::fmt::Display for NestedStructuresError {
         371  +
    /* OperationErrorGenerator.kt:134 */
  329    372   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         373  +
        /* OperationErrorGenerator.kt:318 */
  330    374   
        match self {
         375  +
            /* OperationErrorGenerator.kt:326 */
  331    376   
            Self::Unhandled(_inner) => {
         377  +
                /* OperationErrorGenerator.kt:139 */
  332    378   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  333    379   
                    write!(f, "unhandled error ({code})")
  334    380   
                } else {
  335    381   
                    f.write_str("unhandled error")
  336    382   
                }
         383  +
                /* OperationErrorGenerator.kt:326 */
         384  +
            } /* OperationErrorGenerator.kt:318 */
  337    385   
        }
         386  +
        /* OperationErrorGenerator.kt:134 */
  338    387   
    }
  339         -
    }
         388  +
    /* OperationErrorGenerator.kt:133 */
  340    389   
}
         390  +
/* OperationErrorGenerator.kt:182 */
  341    391   
impl ::aws_smithy_types::retry::ProvideErrorKind for NestedStructuresError {
         392  +
    /* OperationErrorGenerator.kt:186 */
  342    393   
    fn code(&self) -> ::std::option::Option<&str> {
         394  +
        /* OperationErrorGenerator.kt:187 */
  343    395   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         396  +
        /* OperationErrorGenerator.kt:186 */
  344    397   
    }
         398  +
    /* OperationErrorGenerator.kt:190 */
  345    399   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         400  +
        /* OperationErrorGenerator.kt:197 */
  346    401   
        ::std::option::Option::None
         402  +
        /* OperationErrorGenerator.kt:190 */
  347    403   
    }
         404  +
    /* OperationErrorGenerator.kt:182 */
  348    405   
}
         406  +
/* OperationErrorGenerator.kt:163 */
  349    407   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for NestedStructuresError {
         408  +
    /* OperationErrorGenerator.kt:164 */
  350    409   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         410  +
        /* OperationErrorGenerator.kt:318 */
  351    411   
        match self {
  352         -
            Self::Unhandled(_inner) => &_inner.meta,
         412  +
            /* OperationErrorGenerator.kt:326 */
         413  +
            Self::Unhandled(_inner) => {
         414  +
                /* OperationErrorGenerator.kt:168 */
         415  +
                &_inner.meta
         416  +
                /* OperationErrorGenerator.kt:326 */
         417  +
            } /* OperationErrorGenerator.kt:318 */
  353    418   
        }
         419  +
        /* OperationErrorGenerator.kt:164 */
  354    420   
    }
         421  +
    /* OperationErrorGenerator.kt:163 */
  355    422   
}
         423  +
/* OperationErrorGenerator.kt:109 */
  356    424   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for NestedStructuresError {
         425  +
    /* OperationErrorGenerator.kt:110 */
  357    426   
    fn create_unhandled_error(
  358    427   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  359    428   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  360    429   
    ) -> Self {
         430  +
        /* OperationErrorGenerator.kt:121 */
  361    431   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  362    432   
            source,
  363    433   
            meta: meta.unwrap_or_default(),
  364    434   
        })
         435  +
        /* OperationErrorGenerator.kt:110 */
  365    436   
    }
         437  +
    /* OperationErrorGenerator.kt:109 */
  366    438   
}
  367    439   
         440  +
/* CodegenDelegator.kt:255 */
  368    441   
pub use crate::operation::nested_structures::_nested_structures_output::NestedStructuresOutput;
  369    442   
         443  +
/* CodegenDelegator.kt:255 */
  370    444   
pub use crate::operation::nested_structures::_nested_structures_input::NestedStructuresInput;
  371    445   
         446  +
/* RustModule.kt:172 */
  372    447   
mod _nested_structures_input;
  373    448   
         449  +
/* RustModule.kt:172 */
  374    450   
mod _nested_structures_output;
  375    451   
  376         -
/// Builders
         452  +
/// /* CodegenDelegator.kt:51 */Builders
  377    453   
pub mod builders;

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/nested_structures/_nested_structures_input.rs

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